An Ultra Small Real Time Multi Tasking Kernel for Embedded Applications
In the need to implement several concurrent tasks within the same application firmware I decided that there is some more or less common multi tasking needed - for the sake of structure and simplicity. Else the overall firmware is getting just mess and can be hardly understood. Well, this is nothing new. But on the other hand one has to make compromises because of the very limited resources with regard to memory space and CPU power.
The investigation regarding a suitable and freely available operating system or multi tasking kernel that would fit my needs did not really yield anything suitable. So I decided to build up such a system from the scratch on my own. The result is a quite handy and simple to understood kernel. It cannot really be considered as an RTOS (Real Time Operating System) that is usually providing much more functionality. It is rather comparable to a micro kernel that is strapped down to the most elementary functionality.
Later on I found the result quite good and decided to refine it slightly and made it more general. So it can be better used as basis for future projects in that direction. I also decided to make it open-source and publish it accordingly so that others can make use of it as well.
Nonetheless I want to give a short overview about the most important facts here.
Apart from the application within actual firmware designs it might be usable for educational purposes as well. This is, because the kernel is very small and easy to understand. Its main implementation source file stretches across approx. 1300 lines of code, where roughly 80% are explanatory comments.
I think it would be useful to port this kernel also to the larger Microchip PIC and Atmel AVR micro controllers. Porting it to the smaller devices from these series probably does not make much sense. First of all, the firmware for these devices is usually not that complex so that it would ask for a dedicated multi tasking. Secondly, there are very likely no resources available to afford the overhead of a kernel.
Porting the kernel into the other direction, say PowerPC, ARM, etc., is no problem at all. Even more, the kernel could be implemented much more efficient, as this processor category usually supports features that are very helpful for an efficient multi tasking implementation - not to mention the capability for a clear isolation of the tasks. However, these systems usually provide more resources so that it is mostly better to use uCLinux or Linux directly. Using this kernel there seems to make only sense in case the extra overhead needs to be reduced to an absolute minimum.
Apart from any porting efforts there are also some other points where the kernel might be extended. However, any extension does automatically mean that it is getting more complicated and more resource-demanding....
Right now there are no specific plans for any ports or extensions. I'll do that in case it appears necessary or when I'm filled up with stuffiness (which is not to happen very likely ;-)
Licensing and Availability:
Also notice that I cannot guarantee any support in case of problems or questions. In case you've got a question or you think you have discovered a bug, you are invited to contact me. But I cannot promise that I've got the time to check and/or fix this. But let's see....
The kernel sources including a ready-to-compile example can be downloaded via the link below. It is coming as a simple bzipped tar archive. The archive does also include the white paper that might be used as documentation.
Notice that you also need the SDCC C compliler which is available from
kernel has been specifically tested with SDCC 2.9.0. Other compilers might
work as well, but there are needed some precautions to be taken so that they
might not work out of the box.
For comments or questions you can contact me by email.