diff --git a/_data/docs.yml b/_data/docs.yml index 750eb5c7..6125d314 100644 --- a/_data/docs.yml +++ b/_data/docs.yml @@ -24,12 +24,9 @@ - concepts/middleware/rosserial - concepts/middleware/IoT -- title: RTOS +- title: RTOSes docs: - concepts/rtos - - concepts/rtos/FreeRTOS - - concepts/rtos/NuttX - - concepts/rtos/Zephyr - concepts/rtos/comparison - title: Build System diff --git a/_docs/concepts/rtos/FreeRTOS/index.md b/_docs/concepts/rtos/FreeRTOS/index.md deleted file mode 100644 index 82af8362..00000000 --- a/_docs/concepts/rtos/FreeRTOS/index.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: FreeRTOS -permalink: /docs/concepts/rtos/FreeRTOS/ ---- - - - -FreeRTOS is distributed under the MIT license. It is know particularly for is simplicity and the extension a:FreeRTOS provided by Amazon. For micro-ROS, we make use of the [POSIX extension](https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_POSIX/). - -## Links - -* Main website: [https://www.freertos.org/](https://www.freertos.org/) -* Download: [https://www.freertos.org/a00104.html](https://www.freertos.org/a00104.html) -* Documentation: [https://www.freertos.org/Documentation/RTOS_book.html](https://www.freertos.org/Documentation/RTOS_book.html) - -{% include logos_disclaimer.md %} diff --git a/_docs/concepts/rtos/NuttX/index.md b/_docs/concepts/rtos/NuttX/index.md deleted file mode 100644 index 360a9037..00000000 --- a/_docs/concepts/rtos/NuttX/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: NuttX -permalink: /docs/concepts/rtos/NuttX/ ---- - - - -NuttX emphasizes its compliance with standards - including POSIX - and small footprint. It can be fit on 8- to 32-bit microcontrollers. The use of POSIX and ANSI standards, together with the mimic it does to UNIX APIs, makes it friendly to the developers that are used to Linux. NuttX is licensed under BSD license and makes use of the GNU toolchain. - -## Links - -* Main website: [https://nuttx.apache.org/](https://nuttx.apache.org/) -* Download: [https://nuttx.apache.org/download/](https://nuttx.apache.org/download/) -* Documentation: [https://cwiki.apache.org/confluence/display/NUTTX/Nuttx](https://cwiki.apache.org/confluence/display/NUTTX/Nuttx) - -## Supported development boards - -Check [supported board](/docs/overview/hardware/) section for more information about the boards we are currently using. - -## Getting started with NuttX and micro-ROS - -In order to obtain more information about how to get started using this RTOS, please check our [tutorials section](/docs/tutorials/core/first_application_rtos/). - -{% include logos_disclaimer.md %} diff --git a/_docs/concepts/rtos/Zepyhr/index.md b/_docs/concepts/rtos/Zepyhr/index.md deleted file mode 100644 index d40bc5ed..00000000 --- a/_docs/concepts/rtos/Zepyhr/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: Zephyr -permalink: /docs/concepts/rtos/Zephyr/ ---- - - - -Zephyr is a fairly new open-source RTOS, developed in a Linux Foundation Project. The members of this project include several renowned semiconductor companies. Zephyr [strives for a functional safety certification](https://www.zephyrproject.org/zephyr-project-rtos-first-functional-safety-certification-submission-for-an-open-source-real-time-operating-system/), which would make it the first open-source RTOS with such a certification. - -## Links - -* Main website: [https://www.zephyrproject.org/](https://www.zephyrproject.org/) -* Meta-tool *West*: [https://docs.zephyrproject.org/latest/guides/west/](https://docs.zephyrproject.org/latest/guides/west/) -* Download: [https://github.com/zephyrproject-rtos/zephyr](https://github.com/zephyrproject-rtos/zephyr) -* Documentation: [https://docs.zephyrproject.org/latest/](https://docs.zephyrproject.org/latest/) - -{% include logos_disclaimer.md %} diff --git a/_docs/concepts/rtos/comparison/index.md b/_docs/concepts/rtos/comparison/index.md index e2289cd8..89c77ab7 100644 --- a/_docs/concepts/rtos/comparison/index.md +++ b/_docs/concepts/rtos/comparison/index.md @@ -1,14 +1,14 @@ --- -title: Comparison of these RTOS +title: Comparison between RTOSes permalink: /docs/concepts/rtos/comparison/ --- -The table below compares RTOS -* NuttX -* FreeRTOS -* Zephyr +In this section, we present a techincal comparison between the three RTOSes supported by micro-ROS: +* [NuttX](https://nuttx.apache.org/) +* [FreeRTOS](https://www.freertos.org/index.html) +* [Zephyr](https://www.zephyrproject.org/) -regarding the following features: +The comparison regards the features listed below: * Standardized API to Application level * Maturity * Supported Hardware @@ -21,14 +21,14 @@ regarding the following features: * License * POSIX level support -Key questions: +**Key questions:** * Evaluation POSIX-compliance of RTOS. * What is the effort in providing an additional layer for non-POSIX RTOS regarding micro-ROS or ROS 2? * Support of RTOS for specific HW platforms -Table: +## Table of Comparisons -| **OS** | [NuttX](http://nuttx.org/) | [FreeRTOS](https://sourceforge.net/projects/freertos/) | [Zephyr](https://www.zephyrproject.org/) | +| **OS** | **NuttX** | **FreeRTOS** | **Zephyr** | | ------------------------------------------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | | **Feature** | | | | | **Standardization** | | | | diff --git a/_docs/concepts/rtos/index.md b/_docs/concepts/rtos/index.md index 459d8818..d62d6b40 100644 --- a/_docs/concepts/rtos/index.md +++ b/_docs/concepts/rtos/index.md @@ -3,22 +3,29 @@ title: Why a Real-Time Operating System? permalink: /docs/concepts/rtos/ --- -The use of Real-Time Operating Systems (RTOS) is a general practice in nowadays embedded systems. These embedded devices typically consist of a resource-constrained microcontroller that executes an application where the interaction with external components is performed. In many cases, this application contains a time-critical task where a time-deadline or deterministic response is required. +The use of Real-Time Operating Systems (RTOSes) is a general practice in nowadays embedded systems. These devices typically consist of a resource-constrained microcontroller that executes an application which requires an interaction with external components. In many cases, this application contains a time-critical task where a strict time deadline or deterministic response is required. -Bare-metal applications are also used nowadays, but it requires a very low-level programming skills and lacks of hardware abstraction layers that RTOSes offers. On the other hand, RTOSes typically uses hardware abstraction layers (HAL) that eases the use of hardware resources, such us timers and communication buses, making easier the development and allowing the reuse of code. In addition, they offer thread and tasks entities that, together with the use of schedulers, provides the necessary tools to implement determinism in the applications. The scheduling normally consists of different algorithms where the user can choose from. Another feature that RTOSes normally offers is the stack management, helping in the correct memory usage of the MCU, a valuable resource in embedded-systems. +Bare-metal applications are also used nowadays, but require very low-level programming skills and lack of the hardware abstraction layers that RTOSes offers. On the other hand, RTOSes typically use hardware abstraction layers (HAL) that ease the use of hardware resources, such us timers and communication buses, lightening the development and allowing the reuse of code. In addition, they offer threads and tasks entities which, together with the use of schedulers, provide the necessary tools to implement determinism in the applications. The scheduling consists of different algorithms, among which users can choose the ones that better fits their applications. Another feature that RTOSes normally offer is the stack management, helping in the correct memory usage of the MCU resources, a valuable good in embedded systems. ## RTOS in micro-ROS -Due to the benefits explained in the introduction, micro-ROS integrates RTOS in its software stack. The use of such a tool enhances the micro-ROS features and allows reusing all the tools and implementations they provide. As the micro-ROS software stack is modular, the exchange of software entities is expected and desired. Same happens with the RTOS. Even that NuttX is the *default* RTOS for the project, it can be replaced with Zephyr and FreeRTOS. +Due to the benefits presented above, micro-ROS integrates RTOSes in its software stack. The use of such a tool enhances micro-ROS' capabilities and allows reusing all the tools and functions they provide. As the micro-ROS software stack is modular, the exchange of software entities is expected and desired at all levels, including the RTOS layer. -As the Operating Systems (OS) that are available for computers, the RTOSes also have different support for standard interfaces. This is established in a family of standards named [POSIX](https://pubs.opengroup.org/onlinepubs/9699919799/). As we aim to port or reuse code of ROS 2 that was natively coded in Linux (a mostly POSIX-compliant OS), the use of RTOSes that complies with these standards is beneficial, as the porting effort of the code is minimal. Same as Linux, NuttX and Zephyr complies at a good degree with POSIX standards, making the porting effort minimal. +Like the Operating Systems (OSes) available for computers, the RTOSes also have different support for standard interfaces. This is established in a family of standards named [POSIX](https://pubs.opengroup.org/onlinepubs/9699919799/). As we aim to port or reuse code of ROS 2 that was natively coded in Linux (a mostly POSIX-compliant OS), the use of RTOSes that comply with these standards is beneficial, as the porting effort of the code is minimal. Both NuttX and Zephyr comply to a good degree with POSIX standards, making the porting effort minimal, whereas FreeRTOS provides a plugin, *FreeRTOS+POSIX*, thanks to which an existing POSIX compliant application can be easily ported to FreeRTOS ecosystem, and therefore leverage all its functionality. -Notice that the RTOS call are made by several top layers in the micro-ROS stack. The main one using the RTOS primitives is the middleware. The middleware requires accessing to the transport resources of the RTOS (serial, UDP or 6LoWPAN communications for example), it also requires of the time resources of the RTOS to operate properly. In addition, it is expected that the micro-ROS client library could have access to RTOS resources to have control of mechanisms such as scheduling or power management, so the developer could optimize the application in many domains. +Notice that calls to the RTOS functions are made by several abstraction layers in the micro-ROS stack. The main layer using the RTOS primitives is the middleware. Indeed, it requires accessing the transport resources (serial, UDP or 6LoWPAN communications for example) and the time resources of the RTOS in order to operate properly. In addition, it is desirable that the micro-ROS client libraries (rcl, rclc) have also access to RTOS resources in order to handle mechanisms such as scheduling or power management. In this way, the developer can optimize the application at various levels. -By now, micro-ROS supports three RTOSes, which all come with (basic) POSIX implementations: +At present, micro-ROS supports three RTOSes, which all come with (basic) POSIX implementations: FreeRTOS, Zephyr and NuttX, all of them [integrated into the micro-ROS build system](/docs/concepts/build_system/). +By clicking on the logos below, you'll be redirected to the Overview section, where the most relevant aspects and key features of each RTOS are presented. -* [FreeRTOS](FreeRTOS/) -* [NuttX](NuttX/) -* [Zephyr](Zephyr/) + + + + + + +

FreeRTOS

Zephyr

NuttX
-Most important, we [integrated these RTOSes with the micro-ROS build system](/docs/concepts/build_system/). \ No newline at end of file +A thorough technical comparison between these RTOSes can be found [here](/docs/concepts/rtos/comparison/). + +{% include logos_disclaimer.md %} diff --git a/_docs/overview/rtos/index.md b/_docs/overview/rtos/index.md index 2a872116..9293120d 100644 --- a/_docs/overview/rtos/index.md +++ b/_docs/overview/rtos/index.md @@ -38,17 +38,22 @@ To date, micro-ROS is supported by the RTOSes FreeRTOS, Zephyr, NuttX, in additi All three RTOSes are downloaded natively with the [micro-ROS build system](https://github.com/micro-ROS/micro_ros_setup), and can be chosen when creating a new firmware workspace. Dedicated tutorials for running your first micro-ROS application on each of these Operating Systems can be found [here](https://micro-ros.github.io/docs/tutorials/core/first_application_rtos/). -The features common to all supported RTOSes are an API compliant with POSIX to some degree, extremely low to low footprint, and availability of different scheduling algorithms to ensure determinism in micro-ROS apps behavior. -Find more details about each of the supported RTOSes below, and a more comprehensive explaination on "Why an RTOS?" in the Concepts section, as this page is meant to provide a schematic overview on the matter. +The features common to all supported RTOSes are an API compliant with POSIX to some degree, extremely low-to-low memory footprint, and availability of different scheduling algorithms to ensure determinism in micro-ROS apps behavior. + +Find more details about each of the supported RTOSes below. +For a more comprehensive explanation regarding the choice of working with Real-Time Operating Systems, and for a more technical comparison among these three RTOSes, please refer to the [RTOS page in the Concepts section](https://micro-ros.github.io/docs/concepts/rtos/), as the present page is meant to solely provide a schematic overview. ## Real-Time Operating Systems officially supported by the project -In this section, we review the main features of the three RTOSes supported officially by the project, and link to useful documentation. +In this section, we review the main features of the three RTOSes supported officially by the project, and provide links to useful documentation. + +### **FreeRTOS** + +FreeRTOS is distributed under the MIT license. It is know particularly for is simplicity and the extension a:FreeRTOS provided by Amazon. For micro-ROS, we make use of the POSIX extension.
-

FreeRTOS

Key features:
    @@ -58,9 +63,14 @@ In this section, we review the main features of the three RTOSes supported offic
  • Standard and idle tasks available with assignable priorities
  • Transport resources: TCP/IP and lwIP
- Resources: + FreeRTOS resources: + + FreeRTOS & micro-ROS: @@ -72,9 +82,12 @@ In this section, we review the main features of the three RTOSes supported offic
+### **Zephyr** + +Zephyr is a fairly new open-source RTOS, developed in a Linux Foundation Project. The members of this project include several renowned semiconductor companies. Zephyr strives for a functional safety certification, which would make it the first open-source RTOS with such a certification. +
-

Zephyr

Key features:
    @@ -86,9 +99,15 @@ In this section, we review the main features of the three RTOSes supported offic
  • Highly configurable/Modular for flexibility
  • Native Linux, macOS, and Windows Development
- Resources: + Zephyr resources: + Zephyr & micro-ROS: +
+### **NuttX** + +NuttX emphasizes its compliance with standards - including POSIX - and small footprint. It can be fit on 8- to 32-bit microcontrollers. The use of POSIX and ANSI standards, together with the mimic it does to UNIX APIs, makes it friendly to the developers that are used to Linux. NuttX is licensed under BSD license and makes use of the GNU toolchain. +
-

NuttX

Key features:
    @@ -112,9 +134,14 @@ In this section, we review the main features of the three RTOSes supported offic
  • Highly scalable
  • Real-Time behavior: fully pre-emptible; fixed priority, round-robin, and “sporadic” scheduling
- Resources: + NuttX resources: + NuttX & micro-ROS: +
@@ -127,14 +154,15 @@ In this section, we review the main features of the three RTOSes supported offic ## Bare metal support -Based on the release of micro-ROS as a standalone library + header files, and on the support provided to the Arduino IDE, micro-ROS is available as a bare-metal application, too. -Fin more details in the dedicated [repo](https://github.com/micro-ROS/micro_ros_arduino). +Based on the release of micro-ROS as a standalone library with header files, and on the support provided to the Arduino IDE, micro-ROS is available as a bare-metal application, too. +Find more details in the dedicated [repo](https://github.com/micro-ROS/micro_ros_arduino). + +### **Arduino bare-metal support** The open-source Arduino Software (IDE) is a library making it easy to program any Arduino board.
-

Arduino bare-metal support

Key features:
    @@ -157,3 +185,4 @@ The open-source Arduino Software (IDE) is a library making it easy to program an
+{% include logos_disclaimer.md %} diff --git a/_includes/docs_nav.html b/_includes/docs_nav.html index ab7752ad..284e5fb2 100644 --- a/_includes/docs_nav.html +++ b/_includes/docs_nav.html @@ -10,7 +10,7 @@ {% if page.path contains "_docs/concepts" and section.title == "Middleware" %} {% assign should_show_this_menu = true %} {% endif %} - {% if page.path contains "_docs/concepts" and section.title == "RTOS" %} + {% if page.path contains "_docs/concepts" and section.title == "RTOSes" %} {% assign should_show_this_menu = true %} {% endif %} {% if page.path contains "_docs/concepts" and section.title == "Build System" %}