From e56595e06f8e61c81eb92f6ef721fd6338c23e00 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 18 Mar 2020 11:31:56 +0100 Subject: [PATCH 1/7] Added comparison table --- _docs/concepts/rtos/comparison/index.md | 105 +++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/_docs/concepts/rtos/comparison/index.md b/_docs/concepts/rtos/comparison/index.md index 72903c4a..4f502abf 100644 --- a/_docs/concepts/rtos/comparison/index.md +++ b/_docs/concepts/rtos/comparison/index.md @@ -3,4 +3,107 @@ title: Comparison of these RTOS permalink: /docs/concepts/rtos/comparison/ --- -Work in progress. \ No newline at end of file +The table below compares RTOS +* NuttX +* FreeRTOS +* Zephyr + +regarding the following features: +* Standardized API to Application level +* Maturity +* Supported Hardware +* Scheduling options +* IO Support (native or vendor-specific module needed) +* Networking stack +* Storage and Display +* Memory Footprint +* Safety Certification +* License +* POSIX level support + +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: + +| **OS** | [NuttX](http://nuttx.org/) | [FreeRTOS](https://sourceforge.net/projects/freertos/) | [Zephyr](https://www.zephyrproject.org/) | +|--------------------------------------------------------------|---------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------| +| **Feature** | | | | +| **Standardization** | | | | +| POSIX | yes | partial | partial | +| POSIX.1 1 | [yes](http://nuttx.org/) | [wrapper](https://interactive.freertos.org/hc/en-us/community/posts/210029046-POSIX-Wrapper-for-FreeRTOS) | partial | +| POSIX.1b 2 | yes | partial | partial | +| POSIX.1c 3 | yes | yes | partial | +| | | | | +| OSEK/VDX | no | no | no | +| **Maturity** | | | | +| First release | 2007 | 2014 | 2016 | +| Last release | 2019 | 2019 | 2019 | +| Update rate | about 3 months | irregular | 3 months | +| Community | open-source | open-source | Linux Foundation Collaboration Project, (Intel, Linaro (ARM), nordic, NXP, Synopsys) | +| | | | | +| **Supported Hardware** | | | | +| Olimex STM32-E407 (Cortex-M4) | yes | yes | yes, [explicitly](https://docs.zephyrproject.org/latest/reference/kernel/scheduling/index.html) | +| Bosch XDK 5 | not explicitly, but similar 6 | yes | yes, [explicitly](https://github.com/zephyrproject-rtos/zephyr/blob/master/ext/hal/README) | +| MPC57xx | no | no | no | +| **Scheduling** | | | | +| Priority-based | FIFO | yes | yes | +| Round-Robin 4 | yes | yes 6 | [co-operative](https://docs.zephyrproject.org/latest/reference/kernel/scheduling/index.html) | +| Sporadic Server | yes | no | no | +| RBS | no | ? | no | +| Semaphore /Mutex Management | yes (Priority Inheritance) | yes | yes | +| **IO** | | | | +| I2C | yes | vendor-specific | yes | +| SPI | yes | vendor-specific | yes | +| UART | hw-specific | vendor-specific | yes | +| USB | yes | vendor-specific | yes | +| CAN | yes | vendor-specific | yes | +| CAnopen | no | vendor-specific | yes | +| Modbus | yes | vendor-specific | ? | +| **Networking** 7 | | | | +| BLE-Stack | unclear | no | yes | +| 6LoWPAN | yes | no | yes | +| TLS | | yes | yes | +| Thread | | ? | ? | +| Ethernet | yes | no | yes | +| Wifi | yes | no | yes | +| NFC | unclear | no | yes | +| RFID | yes | no | yes | +| **Storage & Display** 7 | | | | +| File System | yes | ? | yes | +| Graphical User Interface | | ? | ? | +| **Memory Footprint** | | | | +| RAM | "small footprint" | 236 B scheduler + 64 B / task | "small footprint" | +| ROM | "small footprint" | 5 - 10 kB | "small footprint" | +| **Safety Certification** | | | | +| Software Development Process DO178B Level A / EUROCAE ED-12B | no | [SafeRTOS: DO178C (Aerspace) by Wittenstein](https://www.highintegritysystems.com/safertos/certification-and-standards/) | no | +| Functional Safety IEC-61508 | no | [SafeRTOS (SIL 3)](https://www.freertos.org/FreeRTOS-Plus/Safety_Critical_Certified/SafeRTOS.shtml) | soon | +| **License** | BSD | MIT and Commercial | Apache 2 | + +1 Processes, signals, fpe, segmentation, bus errors, timers, file and directory ops, pipes, c library, IO Port Interface + +2 Real-time, clocks, semaphores, messages, shared mem, async io, memory locking. + +3 Threads. + +4 Executing every task in round-robin fashion but only for a pre-defined time slice. + +5 ARM Cortex M3 EFM32GG390F1024 Giant Gecko family (Silicon Labs). [EFM32G880F120-STK](http://nuttx.org/doku.php?id=documentation:about) ARM Cortex M3 EFM32GG390F1024 Giant Gecko family (Silicon Labs). + +6 [Note: Time slicing](https://www.freertos.org/Documentation/161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf) + +7 Hardware-support for Networking and Storage often depends on the platform and sometimes packages of hardware-vendors are available, which work for a particular operating system. But it is in general difficult to determine the harware-support of a given RTOS. + +Some Related Work: +* [Choosing the right RTOS for IoT platform, Milinkovic et al, INFOTEH-JAHORINA Vol. 14, 2015](http://infoteh.rs.ba/zbornik/2015/radovi/RSS-2/RSS-2-2.pdf): comparison of FreeRTOS, ChibiOS/RT, Erika, RIOT +* [FreeRTOS Architecture](http://www.aosabook.org/en/freertos.html) + +## 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/basic/getting_started/). From f7fc5356c65ecea9e1d38c4940b9909677b03b83 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 18 Mar 2020 11:36:07 +0100 Subject: [PATCH 2/7] Minor fixes --- _docs/concepts/rtos/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_docs/concepts/rtos/index.md b/_docs/concepts/rtos/index.md index 54114255..e69ee629 100644 --- a/_docs/concepts/rtos/index.md +++ b/_docs/concepts/rtos/index.md @@ -3,17 +3,17 @@ 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 deadline or deterministic response is required. +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. 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. ## 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 is expected that several of them could replace it. +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. -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 complies at a good degree with POSIX standards, making the porting effort minimal. +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. -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 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. By now, micro-ROS supports three RTOSes, which all come with (basic) POSIX implementations: From 636c7e03cdecde9d2ebeba7aae96e9fbf0786f88 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 18 Mar 2020 12:38:55 +0100 Subject: [PATCH 3/7] Removed duplicated info --- _docs/concepts/rtos/comparison/index.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/_docs/concepts/rtos/comparison/index.md b/_docs/concepts/rtos/comparison/index.md index 4f502abf..ef0596cc 100644 --- a/_docs/concepts/rtos/comparison/index.md +++ b/_docs/concepts/rtos/comparison/index.md @@ -98,12 +98,4 @@ Table: Some Related Work: * [Choosing the right RTOS for IoT platform, Milinkovic et al, INFOTEH-JAHORINA Vol. 14, 2015](http://infoteh.rs.ba/zbornik/2015/radovi/RSS-2/RSS-2-2.pdf): comparison of FreeRTOS, ChibiOS/RT, Erika, RIOT -* [FreeRTOS Architecture](http://www.aosabook.org/en/freertos.html) - -## 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/basic/getting_started/). +* [FreeRTOS Architecture](http://www.aosabook.org/en/freertos.html) \ No newline at end of file From bed83a50079eda0060f2493dee4e67b808131aa0 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 18 Mar 2020 12:51:28 +0100 Subject: [PATCH 4/7] Fix URLs --- _docs/concepts/rtos/comparison/index.md | 2 +- _docs/overview/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_docs/concepts/rtos/comparison/index.md b/_docs/concepts/rtos/comparison/index.md index ef0596cc..8b4c1c69 100644 --- a/_docs/concepts/rtos/comparison/index.md +++ b/_docs/concepts/rtos/comparison/index.md @@ -90,7 +90,7 @@ Table: 4 Executing every task in round-robin fashion but only for a pre-defined time slice. -5 ARM Cortex M3 EFM32GG390F1024 Giant Gecko family (Silicon Labs). [EFM32G880F120-STK](http://nuttx.org/doku.php?id=documentation:about) ARM Cortex M3 EFM32GG390F1024 Giant Gecko family (Silicon Labs). +5 ARM Cortex M3 EFM32GG390F1024 Giant Gecko family (Silicon Labs). EFM32G880F120-STK ARM Cortex M3 EFM32GG390F1024 Giant Gecko family (Silicon Labs). 6 [Note: Time slicing](https://www.freertos.org/Documentation/161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf) diff --git a/_docs/overview/index.md b/_docs/overview/index.md index 3ca4cfad..d59521e9 100644 --- a/_docs/overview/index.md +++ b/_docs/overview/index.md @@ -20,7 +20,7 @@ Major repositories in order of the layers are: * Applications: * Kobuki demo: [embedded robot driver](https://github.com/micro-ROS/apps/tree/kobuki_rcl_port/examples/kobuki) and [remote ROS 2 software](https://github.com/micro-ROS/micro-ROS_kobuki_demo) - * [Temperature demo](https://github.com/micro-ROS/micro-ROS_temperature_publisher_demo) + * Broken URL: Temperature demo * Client library: * Extensions to rcl, i.e. the ROS 2 C API: [rcl_executor](https://github.com/micro-ROS/rcl_executor), ... * Extensions for rclcpp: [system_modes](https://github.com/micro-ROS/system_modes/), [TF improvements](https://github.com/micro-ROS/geometry2), ... From c8ba8e7572172d99c97ab7d8ef986f294ecdd281 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 18 Mar 2020 13:10:09 +0100 Subject: [PATCH 5/7] Fix URL --- _docs/concepts/rtos/comparison/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_docs/concepts/rtos/comparison/index.md b/_docs/concepts/rtos/comparison/index.md index 8b4c1c69..a639495e 100644 --- a/_docs/concepts/rtos/comparison/index.md +++ b/_docs/concepts/rtos/comparison/index.md @@ -98,4 +98,4 @@ Table: Some Related Work: * [Choosing the right RTOS for IoT platform, Milinkovic et al, INFOTEH-JAHORINA Vol. 14, 2015](http://infoteh.rs.ba/zbornik/2015/radovi/RSS-2/RSS-2-2.pdf): comparison of FreeRTOS, ChibiOS/RT, Erika, RIOT -* [FreeRTOS Architecture](http://www.aosabook.org/en/freertos.html) \ No newline at end of file +* [FreeRTOS Architecture](https://www.freertos.org/) \ No newline at end of file From a665b943333c9d462b84c8cb65f9146bd2887b97 Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 18 Mar 2020 13:31:45 +0100 Subject: [PATCH 6/7] Update URL --- _posts/2019-06-03-micro-ROS_temperature_publisher_demo.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/_posts/2019-06-03-micro-ROS_temperature_publisher_demo.md b/_posts/2019-06-03-micro-ROS_temperature_publisher_demo.md index 76853428..438a3614 100644 --- a/_posts/2019-06-03-micro-ROS_temperature_publisher_demo.md +++ b/_posts/2019-06-03-micro-ROS_temperature_publisher_demo.md @@ -15,5 +15,3 @@ The next video shows this demo running. **(This video doesn't work on Chrome)** -You can find all the details and how to reproduce in the next link: -[micro-ROS temperature publisher demo](https://github.com/micro-ROS/micro-ROS_temperature_publisher_demo) From 086e726ce1295472e3c373232baba7ab3dbadb63 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 18 Mar 2020 13:31:49 +0100 Subject: [PATCH 7/7] Removed temperature demo completely for now. --- _docs/overview/index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/_docs/overview/index.md b/_docs/overview/index.md index d59521e9..55e841ef 100644 --- a/_docs/overview/index.md +++ b/_docs/overview/index.md @@ -20,7 +20,6 @@ Major repositories in order of the layers are: * Applications: * Kobuki demo: [embedded robot driver](https://github.com/micro-ROS/apps/tree/kobuki_rcl_port/examples/kobuki) and [remote ROS 2 software](https://github.com/micro-ROS/micro-ROS_kobuki_demo) - * Broken URL: Temperature demo * Client library: * Extensions to rcl, i.e. the ROS 2 C API: [rcl_executor](https://github.com/micro-ROS/rcl_executor), ... * Extensions for rclcpp: [system_modes](https://github.com/micro-ROS/system_modes/), [TF improvements](https://github.com/micro-ROS/geometry2), ... @@ -44,4 +43,3 @@ Most repositories can be found in GitHub's micro-ROS organization at [github.com | micro-ROS-Agent | [![](https://img.shields.io/badge/read-the%20docs-blue)](https://github.com/micro-ROS/micro-ROS-Agent/blob/master/README.md) | [![](https://img.shields.io/badge/ROS-crystal-brightgreen)](https://github.com/micro-ROS/micro-ROS-Agent/blob/release-crystal-20190312/README.md) | [![](http://build.ros2.org/buildStatus/icon?job=Cbin_uB64__micro-xrce-dds-agent__ubuntu_bionic_amd64__binary)](https://github.com/micro-ROS/micro-ROS-doc/blob/crystal/Installation/repos/agent_minimum.repos) | [![](https://img.shields.io/github/issues/micro-ROS/micro-ROS-Agent)](https://github.com/micro-ROS/micro-ROS-Agent/issues) | | Micro XRCE-DDS | [![](https://img.shields.io/badge/read-the%20docs-blue)](https://micro-xrce-dds.readthedocs.io/en/latest/) | [![](https://img.shields.io/badge/ROS-crystal-brightgreen)](https://github.com/eProsima/Micro-XRCE-DDS/tree/v1.0.3) [![](https://img.shields.io/badge/ROS-dashing-brightgreen)](https://github.com/eProsima/Micro-XRCE-DDS/tree/v1.1.0) | | [![](https://img.shields.io/github/issues/eProsima/Micro-XRCE-DDS.svg)](https://github.com/eProsima/Micro-XRCE-DDS/issues) | | system_modes | [![](https://img.shields.io/badge/read-the%20docs-blue)](https://github.com/micro-ROS/system_modes/blob/master/README.md) | [![](https://img.shields.io/badge/ROS-crystal-brightgreen)](https://github.com/micro-ROS/system_modes/releases) [![](https://img.shields.io/badge/ROS-dashing-brightgreen)](https://github.com/micro-ROS/system_modes/releases) [![](https://img.shields.io/badge/ROS-eloquent-brightgreen)](https://github.com/micro-ROS/system_modes/releases) | [![Build Status](http://build.ros2.org/job/Ddev__system_modes__ubuntu_bionic_amd64/badge/icon)](http://build.ros2.org/job/Ddev__system_modes__ubuntu_bionic_amd64/) | [![](https://img.shields.io/github/issues/micro-ROS/system_modes.svg)](https://github.com/micro-ROS/system_modes/issues) | -