RTOS emulation module provides an API layer which can be used to simplify porting of existing RTOS applications to EVE platform. The API mostly resembles FreeRTOS API, but implementation has a lot of deviations.
- All tasks have same priority.
- Preemptive multitasking is not supported.
- Stacks are allocated dynamically from a pool.
- Implementation is thread-safe against soft irqs (EVE work, mwork), but not against hard irqs (the only exception is xTimerPendFunctionCallFromISR()).
Only xTimerPendFunctionCallFromISR() can be called from a hard irq context. Note that it can be used as a trampolino.
- Timers are implemented as EVE mworks, not as a RTOS task. Timers therefore can preempt tasks.
- There is no idle task in system.
- Task scheduler is initially started.
- Mutexes do not support priority inheritence and work as ordinary semaphores.
- Object handles are typed pointers, not void pointers.
- Most, if not all ...FromISR() functions alias their task-level analogs.
- taskENTER_CRITICAL() disables soft irqs to ensure a thread is not interrupted by a timer.
- taskDISABLE_INTERRUPTS() disables soft and hard irqs.
The layer is suboptimal and is not intended for creating either energy effective or real-time applications. At the same time it uses much less RAM per task due to stack sharing.