bedrock[RTOS]

Solid Foundation

A nanokernel real-time operating system written in pure C (C11/C17).
When the foundation is solid, you're free to create.

Philosophy

Three core principles that guide every design decision

Zero Dynamic Allocation

The kernel never calls malloc. All objects — tasks, semaphores, mutexes, queues — come from statically-sized pools determined at compile time. Predictable, no fragmentation.

Tickless by Design

No periodic timer interrupts. The kernel programs one-shot hardware alarms only when needed, minimizing power consumption and interrupt overhead.

Clean Separation

Hardware details are strictly isolated in /arch and /boards. The kernel source has zero platform-specific code. Adding a new architecture requires zero kernel changes.

Technical Specs

Key characteristics at a glance

FeatureDetails
LanguagePure C (C11/C17)
Time64-bit microseconds (br_time_t = uint64_t), ~584,000 years range
SchedulerPriority-based preemptive + round-robin at equal priority
Max tasksConfigurable via CONFIG_MAX_TASKS (default 16)
PrioritiesConfigurable via CONFIG_NUM_PRIORITIES (default 8)
IPCSemaphores, Mutexes (priority inheritance), Message Queues
MemoryZero malloc in kernel; static pools only
TimerTickless — one-shot alarms via HAL

HAL Interface

The kernel accesses hardware exclusively through three timer functions

void      br_hal_timer_init(void);
br_time_t br_hal_timer_get_us(void);
void      br_hal_timer_set_alarm(br_time_t abs_us);

Plus interrupt control and context switch primitives defined in include/bedrock/br_hal.h. See Porting Guide for the full HAL specification.

Quick Start

Get up and running in minutes

1

Prerequisites

  • arm-none-eabi-gcc toolchain
  • qemu-system-arm (for Cortex-M3 emulation)
  • chorus build system (included as 3rd/tools/chorus)
2

Clone & Build

git clone --recurse-submodules https://github.com/bedrockRTOS/bedrock-core
cd bedrock-core
chorus
3

Run on QEMU

qemu-system-arm -M lm3s6965evb -nographic -kernel bedrock_example.elf
4

Configuration

Edit Kconfig values or pass them as -D flags in chorus.build CFLAGS.

chorus clean

For detailed build options and platform-specific setup, see the Building guide.

Multi-License Model

Per-directory licensing to maximize flexibility

DirectoryLicenseWhat it means
/kernel, /arch, /boards, /include BSD 3-Clause Use freely in any project
/lib LGPL 2.1 Link freely, share modifications to lib itself
/examples GPL 3.0 Reference templates, replace with your own code
/docs CC BY-SA 4.0 Share and adapt with attribution