There are many different RTOS available for microcontrollers. I am specifically looking for RTOS that support the ARM Cortex M processors. Also, I am not interested in closed source solutions.
Attempting to compare the relative merits of each RTOS from websites and mailing lists seems pretty difficult as they mostly seem to have equivalent features and do the same thing. The real differences become apparently only after trying to use each RTOS for some tasks.
I know this is somewhat subjective question and probably hard to answer - but there must be many people out there who have actually tried several different RTOS and formed an opinion of the relative merits of each one.
I am specifically interested in FreeRTOS, ChibiOS and Coocox CoOS, but other choices are also very welcome.
For example: it would seem that in ChibiOS, ISRs can call any system functions, but those calls must be wrapped in chSysLockFromIsr()
/chSysUnlockFromIsr()
and the code is not preemptable during those sections. In CoOS, the only functions callable are the ones starting with isr_
such as isr_PostSem()
, isr_PostMail()
, isr_PostQueueMail()
and
isr_SetFlag()
, but those functions internally use a service request queue which means most of the request is preemptable.
Some of the features that one could take into account while choosing the RTOS:
- context-switch time
- interrupt latency
- synchronization mechanisms (flags, semaphores, mutexes, mailboxes, queues, ...)
- priority inversion handling
- memory management support (i.e. memory pools)
- scheduling policies support
- MMU support
- process support
- memory footprint
- efficiency of the kernel itself
- POSIX vs. non-POSIX API's
- software eco-system available (a.k.a middleware)
- ...
Which point(s) to put more focus, depends on the very application you're going to run. But generally, these are the things I can remember of which make difference between various RTOS's.
来源:https://stackoverflow.com/questions/21694729/quantifiable-differences-between-rtos-kernels-for-small-arm-microcontrollers