-
Notifications
You must be signed in to change notification settings - Fork 178
Tutorial on creating a bare metal application #1305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6797dd7
to
b6f9052
Compare
@iriark01 Many thanks for the detailed review, I will take the suggestions on wordings. As for what to include in the guide, the Core team is in progress of discussion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding docs/program-setup/bare_metal/baremetal_usage.md
- The recommended workflow has always been to use a
mbed-os.lib
file to get Mbed OS, not to use git clone. - Perhaps mention the relationship between
mbed_app.json
andplatform/bare_metal/mbed_lib.json
when the bare metal profile is used. This is so users can have a look at (if they so wish) what is included. - Have the Mbed 2 to Mbed OS 6 porting guide link to this page section on running the Greentea test for baremetal rather than the porting guide repeating these instructions.
- List the tests that will not fit in ultra constrained devices. This could go at the end when we talk about using the release profile.
@hugueskamba Thanks for the review, I'll fix everything together once we've clarified the part regarding greentea tests |
Rather than list (which required maintenance or goes out-of-date), explain that a limited set of tests won't fit and show the compilation error. All other tests that were compiled shoud either pass or be slipped (typically because some HW is not present on the target) |
Is this ready for review? |
We're still working on it, will let you know, thanks! |
a8d1668
to
3ae0b66
Compare
3ae0b66
to
910e020
Compare
I’ve made some major changes:
|
@hugueskamba Well, {
"name": "bare-metal",
"requires": ["platform", "drivers", "rtos-api"]
} which doesn't provide much detail in my opinion. Now we have APIs with bare metal compatibilities listed here which I've linked in the guide. |
@iriark01 @evedon @hugueskamba I've addressed your comments, please review again. |
docs/bare_metal/mbed2_porting.md
Outdated
region `FLASH' overflowed by 792 bytes | ||
``` | ||
|
||
Please ignore tests with similar errors for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "for now" mean? Until later in the document? Later in the year?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove "for now" to avoid confusion.
(If we have worked around those errors sometime in the future, we will then remove this line in my opinion.)
docs/bare_metal/using_bare_metal.md
Outdated
called every 1 seconds | ||
``` | ||
|
||
To exit the serial terminal, press Ctrl + C. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I don't get that output? What does it mean and what should I do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be different causes of not getting the expected output - issues with serial communication, target drivers, the application itself, etc. In my opinion it may not be feasible to have a troubleshooting guide wherever some output is quoted.
In https://os.mbed.com/docs/mbed-os/v5.15/tutorials/the-eventqueue-api.html for example, it just says "This is the output of the above program on an FRDM-K64F board." So I'll replace "You should get the following output" which seems to hint users they may or may not get it.
Co-authored-by: Irit Arkin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iriark01 Thanks a lot for the detailed review and suggestions, I'll make an update soon.
docs/bare_metal/mbed2_porting.md
Outdated
region `FLASH' overflowed by 792 bytes | ||
``` | ||
|
||
Please ignore tests with similar errors for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove "for now" to avoid confusion.
(If we have worked around those errors sometime in the future, we will then remove this line in my opinion.)
docs/bare_metal/using_bare_metal.md
Outdated
called every 1 seconds | ||
``` | ||
|
||
To exit the serial terminal, press Ctrl + C. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be different causes of not getting the expected output - issues with serial communication, target drivers, the application itself, etc. In my opinion it may not be feasible to have a troubleshooting guide wherever some output is quoted.
In https://os.mbed.com/docs/mbed-os/v5.15/tutorials/the-eventqueue-api.html for example, it just says "This is the output of the above program on an FRDM-K64F board." So I'll replace "You should get the following output" which seems to hint users they may or may not get it.
@iriark01 Could you please review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good tutorial. I am fine with the content.
@iriark01 We need a one-liner update to the list of APIs that support bare metal, may I do it in this PR? |
Since this is a fork, I can't preview it on the docs site. I'm therefore going to merge for final checks. Please ping me if you want to change anything. |
This PR adds a new page for creating bare metal applications.