Skip to content

antoniogiacomelli/RK0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RK0 - The Real-Time Kernel '0' image


Know it

RK0 is a lean, feature-rich, highly deterministic Real-Time Kernel for deeply embedded solutions.

  • See the RK0 Docbook for a thorough design description and usage examples.
  • Check the RK0 Blog for some quick reads.

Supported Architectures: ARMv6M (Cortex-M0/0+) and ARMv7M (Cortex-M3/4/7).

RK0 Main Features (0.6.6-dev)

  • O(1)¹ Scheduler: priority preemptive (RMS)

  • Truly Transitive Priority Inheritance for Mutexes: Handles chained priority inversion scenarios.

  • Most-Recent Message Protocol: Lock-Free, purpose-built for real-time control loops: producers never block, consumers always get the freshest data.

  • High-Precision Timers: Minimal Tick Handling overhead for Bounded Waiting, Periodic Sleeps and Application Timers.

  • Highly Modular with clean and consistent API.

  • Low Footprint: Less than 3KiB ROM²

¹ Next-task Selection takes 4 cycles in ARMv7M, ~11 cycles in ARMv6M. ² Core system, does not account optional services and application size.

Use it


System Architecture

If no more details are to be provided, the kernel has a top and a bottom layer. On the top, the Executive manages the resources needed by the application. On the bottom, the Low-level Scheduler works as a software extension of the CPU. Together, they implement the Task abstraction — the Concurrency Unit that enables a multitasking environment.

In systems design jargon, the Executive enforces policy (what should happen). The Low-level Scheduler provides the mechanism (how it gets done). The services are the primitives that transform policy decisions into concrete actions executed by the Scheduler.


Code Quality

RK0 source code compiles cleanly with the following GCC flags:

-Wall -Wextra -Wsign-compare -Wsign-conversion -pedantic

Static Analysis (Cppcheck) is clean with no warnings, errors, or style issues.


Dependencies

  • ARM-GCC, CMSIS-GCC

Feels like contributing?

Drop a message: 📫


Copyright (C) 2025 Antonio Giacomelli | All Rights Reserved | www.kernel0.org