Sections | |
RTOS Fibers | |
Currently the Netcruzer RTOS is very basic, and only implements Fibers. We plan to extend this in future releases to include light tasks called "FSM Tasks" (State Machine Tasks) and possibly full co-operative or pre-emptive Tasks.
All RTOS file are located in the "lib/rtos" folder, and are written in a way so that they are independent of the main Netcruzer code. Meaning it will be possible replacing it for a different operating system like Free RTOS for example.
In the current state, with only Fibers implemented, it will not clash with the majority of 3rd party RTOS implementations (Free RTOS, NTKernel...). The 3rd party RTOS can simply be added without removing the current Netcruzer RTOS.
The code of the Netcruzer RTOS consists of two main modules, the "RTOS Timer ISR", and the "RTOS Kernel". The "RTOS Timer ISR" is called from the main system tick interrupt, and has the same priority. The "RTOS Kernel" is ran as a Fiber at the lowest interrupt priority. See the System Interrupts section for details on interrupt priorities used by the system.
One of the most useful and basic features of the Netcruzer RTOS are Fibers. They are used by many project to add low priority processing of data stored via high priority interrupts. To add the Netcruzer RTOS with Fiber support to a project, do the following: