Solid Foundation
A nanokernel real-time operating system written in pure C (C11/C17).
When the foundation is solid, you're free to create.
Three core principles that guide every design decision
The kernel never calls malloc. All objects — tasks, semaphores, mutexes, queues — come from statically-sized pools determined at compile time. Predictable, no fragmentation.
No periodic timer interrupts. The kernel programs one-shot hardware alarms only when needed, minimizing power consumption and interrupt overhead.
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.
Key characteristics at a glance
| Feature | Details |
|---|---|
| Language | Pure C (C11/C17) |
| Time | 64-bit microseconds (br_time_t = uint64_t), ~584,000 years range |
| Scheduler | Priority-based preemptive + round-robin at equal priority |
| Max tasks | Configurable via CONFIG_MAX_TASKS (default 16) |
| Priorities | Configurable via CONFIG_NUM_PRIORITIES (default 8) |
| IPC | Semaphores, Mutexes (priority inheritance), Message Queues |
| Memory | Zero malloc in kernel; static pools only |
| Timer | Tickless — one-shot alarms via HAL |
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.
Get up and running in minutes
arm-none-eabi-gcc toolchainqemu-system-arm (for Cortex-M3 emulation)3rd/tools/chorus)git clone --recurse-submodules https://github.com/bedrockRTOS/bedrock-core
cd bedrock-core
chorus
qemu-system-arm -M lm3s6965evb -nographic -kernel bedrock_example.elf
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.
Per-directory licensing to maximize flexibility
| Directory | License | What 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 |