Skip to content

Document update on bare metal supported APIs. #1304

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

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 70 additions & 21 deletions docs/api/api.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
# Full API list
<!--these are now just the APIs - do I want to add the tutorials?-->

Mbed OS supports two profiles: the full profile, when an RTOS is present, and the bare metal profile which is a subset of the full profile. In the list below, APIs which are supported in bare metal are noted with an asterik. A double asterisk indicates that the API is partially supported in bare metal.

## RTOS and event handling
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Evelyne, Bartek and Andy have just confirmed that it's "full profile" and "bare metal profile", not "RTOS profile". I will edit this page to reflect that.
  2. I'm going to talk to the UX team about how best to show which APIs are full profile only, and which are also for bare metal. I think the multiple headers will confuse users.


The Mbed OS RTOS capabilities include managing objects such as threads, synchronization objects and timers. It also provides interfaces for attaching an application-specific idle hook function, reads the OS tick count and implements functionality to report RTOS errors.
The Mbed OS RTOS capabilities include managing objects such as threads and synchronization objects. It also provides interfaces for attaching an application-specific idle hook function, reads the OS tick count and implements functionality to report RTOS errors.

Most of the Mbed OS APIs are also supported with the Mbed OS bare metal profile.

<table>
<tbody>
<tr>
<td><a href="rtos-apis.html">Thread</a></td>
<td><a href="semaphore.html">Semaphore<span>*</span></a></td>
<td><a href="userallocatedevent.html">UserAllocatedEvent<span>*</span></a></td>
<td><a href="eventflags.html">EventFlags</a></td>
<td><a href="kernel-interface-functions.html">Kernel interface functions<br><i>(Only get_ms_count API)<i></a></td>
</tr>
<tr>
<td><a href="thisthread.html">ThisThread</a></td>
<td><a href="event.html">Event</a></td>
<td><a href="eventqueue.html">EventQueue</a></td>
<td><a href="mutex.html">Mutex</a></td>
<td><a href="semaphore.html">Semaphore</a></td>
</tr>
</tbody>
</table>

### RTOS only supported APIs
<table>
<tr>
<td><a href="rtos-apis.html">Thread</a></td>
<td><a href="queue.html">Queue</a></td>
<td><a href="eventqueue.html">EventQueue</a></td>
<td><a href="userallocatedevent.html">UserAllocatedEvent</a></td>
<td><a href="mail.html">Mail</a></td>
</tr>
<tr>
<td><a href="eventflags.html">EventFlags</a></td>
<td><a href="event.html">Event</a></td>
<td><a href="conditionvariable.html">Conditionvariable</a></td>
<td><a href="kernel-interface-functions.html">Kernel interface functions</a></td>
<td><a href="conditionvariable.html">ConditionVariable</a></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -121,6 +129,12 @@ The data storage APIs include file system APIs, for file system operations, and
<td><a href="spi-flash-block-device.html">SPI Flash block device</a></td>
<td><a href="qspifblockdevice.html">QSPIFBlockDevice</a></td>
</tr>
</tbody>
</table>

### RTOS only supported APIs
<table>
<tbody>
<tr>
<td><a href="psa-internal-storage.html">PSA internal storage</a></td>
<td><a href="psa-protected-storage.html">PSA protected storage</a></td>
Expand All @@ -131,7 +145,7 @@ The data storage APIs include file system APIs, for file system operations, and

## Connectivity

### Network interface
### Network interface (*RTOS only*)

Network interfaces are the application level APIs where users choose the driver, connectivity method and IP stack. These include ethernet, Wi-Fi, cellular and mesh interfaces.

Expand All @@ -153,7 +167,7 @@ Network interfaces are the application level APIs where users choose the driver,
</tbody>
</table>

### Socket
### Socket (*RTOS only*)

Socket APIs include the application programming interface for IP networking. In Mbed OS, this API supports both TCP and UDP protocols.

Expand All @@ -169,7 +183,7 @@ Socket APIs include the application programming interface for IP networking. In
</tbody>
</table>

### Secure socket
### Secure socket (*RTOS only*)

<table>
<tbody>
Expand All @@ -180,7 +194,7 @@ Socket APIs include the application programming interface for IP networking. In
</tbody>
</table>

### DNS
### DNS (*RTOS only*)

<table>
<tbody>
Expand Down Expand Up @@ -247,10 +261,9 @@ The Mbed OS classes providing USB peripheral functionality, also known as USB co
<td><a href="usbaudio.html">USBAudio</a></td>
<td><a href="ubshid.html">USBHID</a></td>
<td><a href="usbcdc.html">USBCDC</a></td>
<td><a href="usbcdc-ecm.html">USBCDC_ECM</a></td>
<td><a href="usbmsd.html">USBMSD</a></td>
</tr>
<tr>
<td><a href="usbmsd.html">USBMSD</a></td>
<td><a href="usbmidi.html">USBMIDI</a></td>
<td><a href="usbmouse.html">USBMouse</a></td>
<td><a href="usbkeyboard.html">USBKeyboard</a></td>
Expand All @@ -259,39 +272,64 @@ The Mbed OS classes providing USB peripheral functionality, also known as USB co
</tbody>
</table>

### RTOS only supported APIs
<table>
<tbody>
<tr>
<td><a href="usbcdc-ecm.html">USBCDC_ECM</a></td>
</tr>
</tbody>
</table>

## Security

With [Arm Mbed TLS](security.html), a comprehensive SSL/TLS solution, you can include cryptographic and SSL/TLS capabilities in your code.

<table>
<tbody>
<tr>
<td><a href="security-apis.html">PSA initial attestation</a></td>
<td><a href="psa-lifecycle.html">PSA lifecycle</a></td>
<td><a href="mbed-crypto.html">Mbed Crypto</a></td>
<td><a href="tls.html">TLS</a></td>
<td><a href="devicekey.html">DeviceKey</a></td>
</tr>
</tbody>
</table>

### RTOS only supported APIs
<table>
<tbody>
<tr>
<td><a href="security-apis.html">PSA initial attestation</a></td>
<td><a href="psa-lifecycle.html">PSA lifecycle</a></td>
</tr>
</tbody>
</table>

## Power

<table>
<tbody>
<tr>
<td><a href="power-apis.html">Power management (sleep)</a></td>
<td><a href="deepsleeplock.html">DeepSleepLock</a></td>
<td><a href="idle-loop.html">Idle loop</a></td>
<td><a href="lowpowerticker.html">LowPowerTicker</a></td>
</tr>
<tr>
<td><a href="lowpowerticker.html">LowPowerTicker</a></td>
<td><a href="lowpowertimeout.html">LowPowerTimeout</a></td>
<td><a href="lowpowertimer.html">LowPowerTimer</a></td>
</tr>
</tbody>
</table>

### RTOS only supported APIs
<table>
<tbody>
<tr>
<td><a href="idle-loop.html">Idle loop</a></td>
</tr>
</tbody>
</table>

## Memory

<table>
Expand All @@ -300,6 +338,14 @@ With [Arm Mbed TLS](security.html), a comprehensive SSL/TLS solution, you can in
<td><a href="mbed-statistics.html">mbed_stats (Mbed statistics)</a></td>
<td><a href="mpu-management.html">mpug_mgmt (MPU management)</a></td>
<td><a href="memory-tracing.html">mbed_mem_trace (Memory tracing)</a></td>
</tr>
</tbody>
</table>

### RTOS only supported APIs
<table>
<tbody>
<tr>
<td><a href="memorypool.html">MemoryPool</a></td>
</tr>
</tbody>
Expand Down Expand Up @@ -344,3 +390,6 @@ If you're moving your program from Mbed OS 5 to 6, you will need to replace depr
| Deprecated API | Replaced by |
| - | - |
| Serial | [BufferedSerial](../apis/bufferedserial.html), [UnbufferedSerial](../apis/unbufferedserial.html) |

**_Note_**
- When you click, any component from the table it takes to its description webpage, but it mostly shows an example based on RTOS.
136 changes: 121 additions & 15 deletions docs/program-setup/bare_metal/bare_metal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,125 @@ There are many use cases for IoT devices. Different use cases require different

Copy link
Contributor

Choose a reason for hiding this comment

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

Please note that in PR 1303, I edited the intro to this page.

<span class="images">![Mbed OS bare metal profile block diagram](../../images/bare_metal_block_diagram.png)<span>Mbed OS bare metal profile block digram</span></span>

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.
The Mbed OS bare metal profile is a compact profile of Mbed OS without an RTOS. Most of the Mbed OS APIs are compatible with bare metal profile and below table shows the availability of various Mbed OS features and components on bare metal profile.
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this list and the general API list have a lot of duplicate content. What is the purpose of this list?

Copy link
Contributor

Choose a reason for hiding this comment

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

One is a summary of features, the other is a list of APIs.


| 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 |

To begin using the Mbed OS bare metal profile from Mbed OS 2, please follow our [instructions](../tutorials/migrating-to-mbed-os-5.html).
<table>
<thead>
<tr>
<th colspan="2">Features/Components</th>
<th>Mbed OS bare metal profile</th>
<th> Mbed OS full profile</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="8">Core</td>
<td >Drivers</td>
<td>Available <br>(Except USBCDC_ECM)</td>
<td>Available</td>
</tr>
<tr>
<td >Events</td>
<td>Available</span></td>
<td>Available</td>
</tr>
<tr>
<td >HAL</td>
<td>Available</span></td>
<td>Available</td>
</tr>
<tr>
<td >Platform</td>
<td>Available</span></td>
<td>Available</td>
</tr>
<tr>
<td >RTOS</td>
<td><span style="color:red">Not Available</span></span></td>
<td>Available</td>
</tr>
<tr>
<td >RTOS APIs <br> (Semaphore, Mutex, EventFlags, ThisThread)</td>
<td>Available</td>
<td>Available</td>
</tr>
<tr>
<td >Storage</td>
<td>Available</td>
<td>Available</td>
</tr>
<tr>
<td >Development tools<br> (Mbed CLI, Mbed Studio, Mbed Online Compiler etc.)</td>
<td>Available</td>
<td>Available</td>
</tr>
<tr>
<td rowspan="9">Connectivity</td>
<td >802.15.4_RF</td>
<td><span style="color:red">Not Available</span></td>
<td>Available</td>
</tr>
<tr>
<td>Wifi</td>
<td><span style="color:red">Not Available</span></td>
<td>Available</td>
</tr>
<tr>
<td>Cellular</td>
<td><span style="color:red">Not Available</span></td>
<td>Available</td>
</tr>
<tr>
<td>LWIP stack</td>
<td><span style="color:red">Not Available</span></td>
<td>Available</td>
</tr>
<tr>
<td>Nanostack</td>
<td><span style="color:red">Not Available</span></td>
<td>Available</td>
</tr>
<tr>
<td>Network Socket</td>
<td><span style="color:red">Not Available</span></td>
<td>Available</td>
</tr>
</tr>
<tr>
<td>BLE</td>
<td>Available <br>(Except TARGET_NORDIC_CORDIO)</td>
<td>Available</td>
</tr>
<tr>
<td>LoRaWAN</td>
<td>Available</td>
<td>Available</td>
</tr>
<tr>
<td>NFC</td>
<td>Available</td>
<td>Available</td>
</tr>
<tr>
<td rowspan="4">Security</td>
<td>PSA</td>
<td><span style="color:red">Not Available</span></td>
<td>Available</td>
</tr>
<tr>
<td>Mbed Crypto</td>
<td>Available</td>
<td>Available</td>
</tr>
<tr>
<td>Devicekey</td>
<td>Available</td>
<td>Available</td>
</tr>
<tr>
<td>Mbed TLS</td>
<td>Available</td>
<td>Available</td>
</tr>
</tbody>
</table>
47 changes: 0 additions & 47 deletions docs/program-setup/bare_metal/bare_metal_api.md

This file was deleted.