stm8-multi-tasker
FreeSTM8-Multi-Tasker - Preemptive/Cooperative Round Robin Scheduler for STM8
About stm8-multi-tasker
STM8-Multi-Tasker is a tiny preemptive/cooperative round robin scheduler for STM8 microprocessors, implemented in mixed C and assembler using the SDCC compiler. It features stack-based context switching, circular linked list queues, mutexes, semaphores, timers, events, and global state preservation options. The core is written in assembler to reduce code size, and with all features enabled it clocks in just over 1k of code with low data usage. However, the project is marked as unstable and broken (version 0.0) and not ready for use. It is designed for use with CMake and JetBrains CLion IDE, and includes limitations such as interrupts being disabled during library calls, which increases interrupt response latency.
Key Features
Pros & Cons
- Very small code footprint (just over 1k) suitable for limited flash memory
- Low data memory overhead (34 bytes base + minimal per task)
- Supports both preemptive and cooperative scheduling modes
- Includes synchronization primitives (mutexes, semaphores, queues)
- Built-in timer and event handling
- Core in assembler optimized for size
- Currently marked as unstable and broken (version 0.0) – not production ready
- Interrupts disabled during library calls, increasing latency
- Assembly routines assume default SDCC caller-saves register convention – not easily portable
- Requires specific toolchain (SDCC, CMake, CLion) for setup
- Limited documentation and support