-
Notifications
You must be signed in to change notification settings - Fork 178
Update for bare metal area #1303
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
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
24b0168
Update for bare metal area
iriark01 427adc1
Added Mbed 2 to Mbed OS bare metal porting guide (#1293)
evedon 7c630de
Adding bare metal porting to JSON
iriark01 f88acb4
First table - just to see what it looks like
iriark01 99658d6
Replacing Gap class link
iriark01 2953c93
Giving UX some symbols to choose from
iriark01 55002c0
Better preview for UX
iriark01 b7c9ad5
A bit more for testing
iriark01 32cf4bc
Index is ready
iriark01 07d4d97
More content from PR 1304
iriark01 cfb541c
Some tidying up from comments
iriark01 532b134
Quick edit
iriark01 803f7ed
Comments in intro
iriark01 1a8215c
Invalid JSON
iriark01 6beb754
Spans broke the table
iriark01 1b328ee
Missed some spans
iriark01 9fb4cd4
Draft for review
iriark01 43c04cf
Tidying up
iriark01 5b9b15d
Trying another place for the pic
iriark01 fd29abd
Typo fix
iriark01 b67138b
Will this work?
iriark01 78a34d5
Removing diagram
iriark01 22a8a6c
Updated from Evelyne's comments
iriark01 323d594
Merge branch 'development' into bare-metal-work
iriark01 c553a8a
Merge remote-tracking branch 'origin/bare-metal-work' into bare-metal…
iriark01 7a3df48
Quick starts to offer both Blinkys
iriark01 7cc13a1
Not showing LoRAWAN as supported
iriark01 3d5c509
Trying a new version of the API index
iriark01 d5f94db
Changing tick for manually enabled
iriark01 c34a79b
Demonstrating page order
iriark01 685240a
Util > Platform
iriark01 8927920
Is this a better title?
iriark01 0cd0767
New attempt at APIs
iriark01 a5e2bd3
Driver tidying
iriark01 177622a
Function link as tip
iriark01 9778f0f
Updating intro
iriark01 961c49f
Intro text update
iriark01 b2faa8d
Adding Wait
iriark01 ad87492
Adding Wait.md so the branch can build
iriark01 2964c31
Fixing deprecated APIs
iriark01 ecf3f14
Format fixes
iriark01 e9a7c03
Some comments from Evelyne + moving files
iriark01 1e98693
Organising Driver APIs
iriark01 4b4bb1b
Platform APIs
iriark01 5929b66
JSON fix + trying new format for table
iriark01 91a861e
I think this tidies up all APIs
iriark01 b3ff2e5
Differentiated marks (UX request)
iriark01 0e972ea
Tidying up the lists
iriark01 d840cff
Regrouping APIs
iriark01 79a3efb
Everything alphabetised
iriark01 bca50e9
Final comments
iriark01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
# Mbed OS bare metal profile | ||
|
||
There are many use cases for IoT devices. Different use cases require different configurations, connectivity and security. They also have different requirements for resource consumption. Many products must operate in ultraconstrained environments on tiny MCUs with low memory and compute power available. We created the Mbed OS bare metal profile for IoT devices that require ultraconstrained resources. | ||
Bare metal is a profile of Mbed OS for ultraconstrained devices. Unlike the full Mbed OS, which by default includes all APIs, the bare metal profile starts with a minimal set of APIs to which you can add only the APIs your application or hardware demand. This helps you control the size of your final binary.<!--not sure that's a good term--> | ||
|
||
<span class="images"><span>Mbed OS bare metal profile block digram</span></span> | ||
Bare metal doesn't use the RTOS APIs. Instead, it relies on timers to control the workflow. | ||
<!--not sure I get it - I looked at both Blinky examples and they both use thread_sleep_for, even though the bare metal one doesn't include mbed_thread.h--> | ||
<!--what other APIs does it have or not have by default?--> | ||
|
||
The Mbed OS tools - Mbed CLI, Mbed Online Compiler and Mbed Studio all support working with the bare metal profile. | ||
|
||
The Mbed OS bare metal profile is a compact profile of Mbed OS without an RTOS. The Mbed OS bare metal profile is API compatible with Mbed OS and supports a subset of Mbed OS features, such as analog I/O, digital I/O, timers and digital interfaces, such as SPI, I2C, Serial and CAN. Mbed Studio, Mbed CLI and the Mbed Online Compiler all support the Mbed OS bare metal profile. | ||
Note that Mbed TLS and Mbed Crypto are not supported for bare metal. | ||
iriark01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<span class="images"><span>Mbed OS bare metal profile block digram</span></span> | ||
|
||
| Features | Mbed OS bare metal | Mbed OS | | ||
| --- | --- | --- | | ||
| Analog I/O | Available | Available | | ||
| Digital I/O | Available | Available | | ||
| Digital interfaces | Available | Available | | ||
| Timers | Available | Available | | ||
| Development tools<br> (For example, Mbed CLI, Mbed Studio, Mbed Online Compiler, GCC, Arm Compiler 6 and so on) | Available | Available | | ||
| Support for Mbed Enabled development boards | Available | Available | | ||
| RTOS | Not available | Available | | ||
| Storage | Ecosystem libraries | Available | | ||
| Mbed TLS | Not available | Available | | ||
| Mbed PSA | Not available | Available | | ||
## Documentation | ||
|
||
To begin using the Mbed OS bare metal profile from Mbed OS 2, please follow our [instructions](../tutorials/migrating-to-mbed-os-5.html). | ||
- To see how to enable the profile, or to try the bare metal Blinky, see [our example page](). | ||
- To learn how to add APIs, [see the bare metal API page](). | ||
- If you're an Mbed OS 2 user, migrate to the Mbed OS 6 bare metal profile by following [our migration guide]().<!--that's not application develoeprs though, right? it's for hardware people?--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,26 @@ | ||
# Bare metal APIs | ||
iriark01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Mbed OS bare metal supports the following APIs: | ||
The bare metal profile starts with a restricted list of API, to which you can add what you need. However, bare metal doesn't support all Mbed OS APIs. | ||
|
||
<h2 id="analog-i-o">Analog I/O</h2> | ||
## Initial list of APIs | ||
|
||
- AnalogIn - Read the voltage applied to an analog input pin. | ||
- AnalogOut - Set the voltage of an analog output pin. | ||
By default, bare metal includes the following APIs: | ||
|
||
<h2 id="digital-i-o">Digital I/O</h2> | ||
## Adding APIs | ||
iriark01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- DigitalIn - Configure and control a digital input pin. | ||
- DigitalOut - Configure and control a digital output pin. | ||
- DigitalInOut - Bidirectional digital pins. | ||
<!--how?--> | ||
|
||
- BusIn - Flexible way to read multiple DigitalIn pins as one value. | ||
- BusOut - Flexible way to write multiple DigitalOut pins as one value. | ||
- BusInOut - Flexible way to read and write multiple DigitalInOut pins as one value. | ||
## Full list of APIs | ||
|
||
- PortIn - Fast way to read multiple DigitalIn pins as one value. | ||
- PortOut - Fast way to write multiple DigitalOut pins as one value. | ||
- PortInOut - Fast way to read and write multiple DigitalInOut pins as one value. | ||
The [Mbed OS API list]() indicates which APIs are supported by bare metal. | ||
|
||
- PwmOut - Pulse-width modulated output. | ||
<!-- | ||
Evelyne, my suggestion is to use something like | ||
|
||
- InterruptIn - Trigger an event when a digital input pin changes. | ||
|
||
<h2 id="timers">Timers</h2> | ||
| API | Full Mbed OS | Bare metal | | ||
| - | - | - | | ||
| AnalogIn | ☑ | ☑ | | ||
|
||
- Timer - Create, start, stop and read a timer. | ||
- Timeout - Call a function after a specified delay. | ||
- Ticker - Repeatedly call a function. | ||
|
||
- Wait - Wait for a specified time. | ||
- Time - Get and set the realtime clock. | ||
|
||
<h2 id="digital-interfaces">Digital Interfaces</h2> | ||
|
||
- Serial - Serial/UART bus. | ||
|
||
- SPI - SPI bus master. | ||
- SPISlave - SPI bus slave. | ||
|
||
- I2C - I²C bus master. | ||
- I2CSlave - I²C bus slave. | ||
|
||
- CAN - Controller-area network bus. | ||
Although it's a bit silly, because of course it's supported in the full Mbed OS... I'd love some suggestions | ||
--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.