Hi Hacksters!
In my free time, I love to learn new things and programming paradigms One of my favorite techniques to obtain a new or to reinforce a previous knowledge is to write my own tools. I finally wrote uLipeRtosPico, a small footprint, but modular real time operating system for microcontrollers.
Overview:In uLipeRtosPico, you will find the main basics of multithreading programming like threads, semaphores and messaging The kernel uses a dual policy execution, for different priority valued threads ready or running. The preemptive policy will use the top valued priority and take the CPU. In the case of same valued ones, the Kernel automatically switches to cooperative policy, allowing the application to have explicit control when it releases CPU to next thread. The kernel supports up to 4 user priority levels, and 3 high performance levels.
The kernel is low power friendly due to its tickless construction, so no tick timer fires periodically a interrupt waking CPU when is not necessary.
A more deep look:The kernel counts with useful features.
A thread management component, which allow application to create, abort, suspend, resume and send bitwise signals.
The synchronization services accomplish counting and binary semaphores, also a priority ceiling for optional use This provides mutual exclusion semaphores primitive which the user can synchronize his/hers task and set execution with other executions context (interrupt services for example).
Also a lightweight, but efficient queue messaging is provided to pass messages between tasks. Optionally the user can create a queue to support only pointers, getting a Zero copy structure for highest performance on message passing.
Powerful but small:The kernel itself occupies 80 bytes of RAM plus 1KB of CODE memory with typical GCC flags enabled for optimizations. All the kernel objects are statically allocated giving the memory consumption control for the user.
The current kernel version, has port for ARM cotex M CPU, but new processors are planned to enter in for support, code contributions are always welcome and it is free for use!
So enjoy!
Comments
Please log in or sign up to comment.