Hi Everybody!
I would like to introduce a thread scheduling library which could be very useful for RP2040 and RP2350 projects - STK (SuperTinyKernel). Its GitHub repo is here: https://github.com/dmitrykos/stk
You can check capabilities in detail on GitHub but briefly STK can:![😁]()
STK can be particularly interesting for projects which did not have multithreading, willing to get it but adding fully fledged RTOS (FreeRTOS, Zephyr, ...) is not an option - STK's source-code footprint is minimal (it is only a scheduling kernel), without 3-rd party dependencies, uses pico-sdk base defines (although pico-sdk is not a hard requirement).
Of course, if you start a new project but do not want to bind self to some RTOS, STK can be a choice as it does not have overwhelming API requiring a steep learning curve.
Multi-core support is tested on RP2350 (RP2040 should be ok too) and can be done in AMP (asymmetric processing) way, i.e. STK instance per CPU core, or you can even have STK running on one of CPU cores, for example - main logic is on CPU0 and STK with asynchronous tasks on CPU1. There is no difference in STK's API between Cortex-M and RISC-V, thus you can try your Pico project on one CPU platform and then change transparently to another.
There are ready to use Pico 2 W examples for Eclipse (https://eclipse-embed-cdt.github.io) demonstrating STK in action:
https://github.com/dmitrykos/stk/tree/m ... clipse/rpi
Will be glad to answer you questions.
I would like to introduce a thread scheduling library which could be very useful for RP2040 and RP2350 projects - STK (SuperTinyKernel). Its GitHub repo is here: https://github.com/dmitrykos/stk
You can check capabilities in detail on GitHub but briefly STK can:
- Soft and hard real-time support: STK supports cooperative scheduling for “soft real-time” tasks, you can also enable hard real-time mode (KERNEL_HRT) for periodic tasks with guaranteed deadlines.
- Static and dynamic tasks: Define all tasks at startup (KERNEL_STATIC) or allow tasks to be created and destroyed at runtime (KERNEL_DYNAMIC).
- Low-power friendliness: STK puts MCU into a low-power mode when there are no runnable tasks (task calls Sleep).
- Tiny footprint: Minimal C++ abstractions (no STL, no heavy namespaces) keep the kernel small and simple.
- Portability: Supports ARM Cortex-M0/M33 and RISC-V RV32I out of the box, so you can try it with your RP2040 and RP2350 projects.
- Multi-core support: Fully implemented for Cortex-M and RISC-V (tested on Raspberry Pi Pico 2 W with RP2350 MCU).
- x86 development mode: Compile & debug your code on a PC before flashing to the MCU, which helps with early testing and unit tests.
- Open-source License: MIT: Open for commercial, closed-source, open-source - your choice.
STK can be particularly interesting for projects which did not have multithreading, willing to get it but adding fully fledged RTOS (FreeRTOS, Zephyr, ...) is not an option - STK's source-code footprint is minimal (it is only a scheduling kernel), without 3-rd party dependencies, uses pico-sdk base defines (although pico-sdk is not a hard requirement).
Multi-core support is tested on RP2350 (RP2040 should be ok too) and can be done in AMP (asymmetric processing) way, i.e. STK instance per CPU core, or you can even have STK running on one of CPU cores, for example - main logic is on CPU0 and STK with asynchronous tasks on CPU1. There is no difference in STK's API between Cortex-M and RISC-V, thus you can try your Pico project on one CPU platform and then change transparently to another.
There are ready to use Pico 2 W examples for Eclipse (https://eclipse-embed-cdt.github.io) demonstrating STK in action:
https://github.com/dmitrykos/stk/tree/m ... clipse/rpi
Will be glad to answer you questions.
Statistics: Posted by neutroncode — Tue Dec 02, 2025 12:22 pm