Skip to content

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

Merged

Conversation

hugueskamba
Copy link
Contributor

@hugueskamba hugueskamba commented Oct 11, 2019

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.

main.cpp Outdated
}
++count;
}
#ifndef MBED_BARE_METAL
Copy link
Member

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.

Copy link
Contributor Author

@hugueskamba hugueskamba Oct 12, 2019

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

@hugueskamba hugueskamba changed the title Use threads comms to blink and add baremetal version Add application variants and Mbed OS bare metal tutorial Oct 12, 2019
@hugueskamba hugueskamba force-pushed the hk-multi-threaded-blinky-and-baremetal branch 6 times, most recently from acdb35f to 512a54a Compare October 14, 2019 06:26
Copy link
Contributor

@AnotherButler AnotherButler left a 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.

@hugueskamba hugueskamba force-pushed the hk-multi-threaded-blinky-and-baremetal branch from 512a54a to e069957 Compare October 14, 2019 13:21
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.
@hugueskamba hugueskamba force-pushed the hk-multi-threaded-blinky-and-baremetal branch from 5dabd86 to b3e0e50 Compare October 15, 2019 13:20
@hugueskamba hugueskamba changed the title Add application variants and Mbed OS bare metal tutorial Simplify application and add Mbed OS bare metal tutorial Oct 15, 2019
Copy link
Collaborator

@evedon evedon left a 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.

Copy link
Member

@bulislaw bulislaw left a 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.

@hugueskamba hugueskamba changed the title Simplify application and add Mbed OS bare metal tutorial Simplify application Oct 31, 2019
@evedon
Copy link
Collaborator

evedon commented Nov 1, 2019

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

@evedon
Copy link
Collaborator

evedon commented Nov 1, 2019

@AnotherButler could you check the latest version please?

Copy link
Contributor

@AnotherButler AnotherButler left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [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).

@evedon
Copy link
Collaborator

evedon commented Nov 4, 2019

@AnotherButler You now have write access. Please check latest corrections. Thanks.

Add/change punctuation to follow our style guide for consistency across documents.
Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@evedon evedon merged commit 885f1eb into ARMmbed:master Nov 4, 2019
@hugueskamba hugueskamba deleted the hk-multi-threaded-blinky-and-baremetal branch November 5, 2019 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants