RTOS的好壞端看應用場景,以及在場景下的各種庫的支持程度。
應用在汽車火箭醫療等特殊領域,需要對安全等級的支持,應用在IOT領域,需要對網路相關庫的支持。此外,好安裝、低學習成本是企業選擇RTOS的一大條件。
在做藍牙項目的時候,覺得Zephyr是最前沿的,最新的 Stack和Codec都會在Zephyr上看到。Zephyr還提供了安全等級的驗證信息,有安全要求的系統是不錯的考量。
若要說好移植、好學習,基於原生 POSIX 規範的 Nuttx是不錯的項目。基本上Nuttx就是沒有MMU的unix like系統, 很適合做IoT,大部分的POSIX應用都能在上面很好的移植。開發工程的設定也很像Linux呢。
如果應用是架在micropython環境上,那麼RTOS的選擇似乎就不是那麼重要了,micropython可以在小型系統原生的執行,也可以安裝在多種 RTOS上。
不考慮商業授權金的話,微軟的Azure/ThreadX看起來是萬靈丹,安全、功能庫都相當齊全,或許產品也能更快速的符合上市要求吧。
汽車產業用得最多的QNX,是非開源的產品,但這樣可能也更難被發現漏洞,維持系統的安全吧。。。
以下是搜集整理的、我比較有興趣的 RTOS比較表。咦?AGL Linux亂入了。。。。懶得刪了,就這樣吧。。。
RTOS 比较表
| Zephyr | Azure ThreadX | FreeRTOS=> SafeRTOS | AGL (Linux) | QNX | LynxOS | NuttX | |
|---|---|---|---|---|---|---|---|
| License | Apache 2.0 | Comerical free for proto/edu |
MIT=> Comerical | GPL | Comerical | Comerical | Apache 2.0 |
| SMP/AMP | SMP/OpenAMP | SMP/ OpenAMP | SMP AMP | SMP | SMP AMP | SMP AMP | SMP |
| POSIX | subset of PSE51 PSE52 BSD Sockets |
OK | partially IEEE 1003.1-2017 | OK | OK | native PSE 53 PSE 54 | native POSIX API ANSI BSD Sockets |
| FileSystem | VFS: NFFS FATFS FCB |
FileX (FAT/exFAT) | FatFs | various | DOS EXT2 QNX6 UDF FFSv3 ETFS | VFAT ROMFS NXFFS NFSv3 | |
| GUI | lvgl | GuiX+tools | lvgl | X11 Qt HTML5 | nx、lvgl | ||
| Loadable app | NA | NA | NA | OK | NXFLAT (cortex m3/m4 only) |
||
| Bluetooth BLE |
BLE 5.0 compliant (ESR10) BLE5.2 LEAudio、Mesh BR/EDR:rfcomm |
Yes | NimBLE Mesh BTStack | BlueZ | BTStack(SONY) BLE from zephyr |
||
| Platform Security | PSA Certified TF-M | PSA Certified | – | – | – | CSfC FACE™ 2.0 | – |
| Industrial IEC61508 | SIL 3 | SIL 4 | SIL 3 | SIL 2? | SIL 3 | NA | |
| Automotive ISO26262 | ASIL D | ASIL D | ASIL D | ASIL B ? | ASIL D | NA | |
| Medical FDA510(k) IEC62304 | – | FDA510(k)IEC62304 Cls.C IEC60601 ISO14971 | FDA510(k) IEC62304 | – | – | NA | |
| Aerospace | – | DO-178B,ED-12B,DO-278 | DO178C | – | – | DO 178B DO 178C ARINC 653-1 | NA |
| MISRA | MISRA C:2020 | MISRA C:2012 | misra C:2004 | ? | MISRA C/C++ 2012 | ||
| Pros | free safty certs lots MCU ports BLE 5.x ref. Bd. |
Stable ThreadX perfact safty cert | FreeRTOS API safety cert |
Focus on CAR AP | safty cert Hypervisor middleware | safty cert Hypervisor Aerospace | Free Easy to Porting |
| Cons | Price? | Price? | GPL poor safety cert | Price? | Price? | No safety cert |
FreeRTOS POSIX: https://www.freertos.org/Documentation/api-ref/POSIX/index.html
NuttX: Think of NuttX is a tiny Linux work-alike with a much reduced feature set.
Zephyr POSIX : Implements a subset of the embedded profiles PSE51 and PSE52, and BSD Sockets API.
List of open source RTOS: 收集开源的RTOS信息
留言