-
Notifications
You must be signed in to change notification settings - Fork 157
Simplify application #192
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
Simplify application #192
Conversation
main.cpp
Outdated
} | ||
++count; | ||
} | ||
#ifndef MBED_BARE_METAL |
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.
Could we try to simplify it and maybe showcase that some of the RTOS APIs can be used both with and without rtos? I'd like the code for blinky not to go over 1 screen it has to be simple and clear. Your example for RTOS is nice, but it my opinion it fits more exactly as RTOS example. Also adding short explanation in README what is the difference between normal and bare metal modes with link to docs would be useful.
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.
Re-worked it including your feedback acdb35f
acdb35f
to
512a54a
Compare
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.
We should make sure we're not making changes for the sake of making changes. Some of the README wording changes, for example, keep the same content but rearrange it.
512a54a
to
e069957
Compare
The application has been re-written to use inter-thread communication in order to blink the LED. It now shows how threads can be created, started and how they can communicate with each other. Runtime statistics are made optional via an application configuration file. Instructions have been provided to use the configuration to enable runtime statistics to be printed on the serial output. Finally, a configuration file has been provided to build the application with Mbed OS bare metal profile
The example project has been re-written to include variants of an application to blink an LED. The variants include a simple variant that uses a delay within a loop and a more complex that creates threads and shows inter-thread communication. As the simpler variant is single-threaded, it showcases that some of Mbed OS APIs can be used both with and without rtos (using Mbed OS bare metal profile). Instructions are also provided to build the simple blinky application with Mbed OS bare metal profile. Runtime statistics has been removed and is only mentioned in the README. The reader is invited to find out more. Runtime statistics is a topic on its own and should not be implemented here. The example project also exposes the user to Mbed OS parameter configuration option.
The test was checking the serial output from the runtime stats. Runtime stats have been removed.
5dabd86
to
b3e0e50
Compare
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 like the simplicity of the example.
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.
Looks good could we clearly reference the other forms of blinky somewhere at the top? That is baremetal and eventqueue. It would be good to briefly explain the difference and their purpose.
We are providing links at the bottom of the page for further references. I think it's better than the top so that the reader can get straight to the "getting started`' example. @hugueskamba you can add a link to https://os.mbed.com/docs/mbed-os/v5.14/tutorials/the-eventqueue-api.html for the eventqueue |
@AnotherButler could you check the latest version please? |
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.
@evedon Please forgive all of the suggested changes. I usually edit these directly, but I don't have permissions for this repo.
We'll need to update the quick start documentation next.
@Wenchou01 @sophewilliams From a UX perspective, do you have any concerns about only having quick start for both the full and bare metal configurations?
README.md
Outdated
|
||
## Troubleshooting | ||
If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it. | ||
|
||
## Related Links | ||
|
||
* [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html) |
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.
* [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html) | |
* [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html). |
README.md
Outdated
|
||
## Troubleshooting | ||
If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it. | ||
|
||
## Related Links | ||
|
||
* [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html) | ||
* [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html) |
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.
* [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html) | |
* [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html). |
README.md
Outdated
|
||
## Troubleshooting | ||
If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it. | ||
|
||
## Related Links | ||
|
||
* [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html) | ||
* [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html) | ||
* [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html) |
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.
* [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html) | |
* [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html). |
Co-Authored-By: Amanda Butler <[email protected]>
@AnotherButler You now have write access. Please check latest corrections. Thanks. |
Add/change punctuation to follow our style guide for consistency across documents.
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.
Looks good 👍
Description
The example project has been re-written to be simplified. It uses a delay within
a loop. As it is single-threaded, it showcases that some of Mbed OS
APIs can be used both with and without rtos (using Mbed OS bare metal profile).
Instructions are also provided to build the simple blinky application with
Mbed OS bare metal profile.
Runtime statistics has been removed and is only mentioned in the README. The
reader is invited to find out more. Runtime statistics is a topic on its own
and should not be implemented here.
The example project also exposes the user to Mbed OS parameter configuration
option.