Question

I've looked for a simple scheduler for the said ARM Cortex M3 for the past two days and although I've found some RTOS solutions I didn't find a standalone task scheduler.

I don't need anything too fancy as my application does not necessarily require one but it would help future proof the product (don't flame this last statement, I'm well aware of it's problems).

Edit:

As @Clifford suggested, I wasn't very clear what I mean by simple. I would say that it has very little code and doesn't consume very much SRAM.

Was it helpful?

Solution

At its simplest an RTOS kernel comprises a scheduler and a number of task synchronisation and IPC mechanisms. Since these are usually provided as libraries, if you only use the scheduler component of such a library, nothing else will be linked to your code. Moreover the option to add synchronisation, timers, and IPC later will more truly "future proof" the application, or at least its architecture.

It is not clear what you mean bu a "simple scheduler", but most RTOS schedulers support round-robin scheduling (uC/OS-II being a notable exception) for tasks at the same priority; if you make all your tasks the same priority, it does not get much simpler than that.

Note also that the ARM CMSIS includes an RTOS API that is very low-level and intended as the basis for higher-level operating systems, but which provides all the building blocks you need to create a kernel for your precise needs, including thread control (i.e. scheduling).

If you really want to avoid an RTOS altogether, then a state-machine architecture such as that supported by Quantum Leaps' QP Frameworks is an alternative.

OTHER TIPS

Of the popular RTOSes ChibiOS/RT claims to be really small and it is "static" (you have to allocate all data it uses as normal variables, it doesn't call malloc() or things like that). At the first sight it may seem "big" because of the HAL it includes, but you may as well delete that (;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top