Kernel
EoS Kernel — Real-Time Embedded OS
7 Architectures · 33 HAL Drivers · Deterministic IRQ Handling
The deterministic, preemptive real-time kernel at the heart of every EoS device. Supports ARM Cortex-M/A/R, RISC-V, x86, MIPS, ARC, and Xtensa — with a unified HAL, capability-based security, and a < 4 KB minimum footprint.
For a shorter introduction to EoS, see the EoS overview. This page is the engineering detail.
- C11
- MIT · v0.5.0
- Critical — Foundation Layer
- 7Supported Architectures
- 33HAL Peripheral Classes
- 41BSP Profiles
- < 4 KBMinimum Footprint
How It Works
- 1
Select a BSP Profile
Pick one of 41 ready-made Board Support Package profiles that matches your hardware target. Each profile bundles the right HAL drivers, linker script, and clock configuration for that board.
# List available profiles ebuild profile list --arch cortex-m4 # Apply a profile to your project ebuild profile apply stm32f4-discovery
- 2
Initialize the Kernel
Call eos_init() to set up the scheduler, memory allocator, and HAL. The kernel starts in privileged mode; your application tasks run in unprivileged mode with capability-checked access to peripherals.
#include <eos/kernel.h> #include <eos/hal/uart.h> int main(void) { eos_init(); // Init scheduler + HAL eos_task_create(sensor_task, STACK_SIZE, PRIORITY_HIGH); eos_task_create(comms_task, STACK_SIZE, PRIORITY_NORMAL); eos_start(); // Start preemptive scheduler } - 3
Write Tasks with HAL APIs
Each task runs as an independent thread. Use the 33 HAL peripheral classes (UART, SPI, I²C, GPIO, CAN, USB, ADC, DMA, …) through a unified API that works identically across all 7 supported architectures.
void sensor_task(void *arg) { eos_hal_spi_t spi = eos_hal_spi_open(SPI1, 8_MHZ, MODE_0); uint8_t buf[4]; for (;;) { eos_hal_spi_transfer(spi, cmd, buf, 4); float temp = decode_temp(buf); eos_queue_send(temp_queue, &temp, EOS_WAIT_FOREVER); eos_task_delay_ms(100); } } - 4
Use IPC Primitives for Safe Communication
Tasks communicate through message queues, semaphores, mutexes, and event flags — all with bounded worst-case timing. The EIPC module extends this to cross-board communication.
// Producer: sensor_task sends readings eos_queue_send(temp_queue, &temp, EOS_WAIT_FOREVER); // Consumer: comms_task receives and transmits void comms_task(void *arg) { float temp; for (;;) { eos_queue_recv(temp_queue, &temp, EOS_WAIT_FOREVER); char json[64]; snprintf(json, sizeof(json), "{\"temp\":%.2f}", temp); eos_hal_uart_write(UART1, json, strlen(json)); } } - 5
Flash and Monitor
Use eBuild to compile, sign, and flash the firmware. EoSim lets you run the same binary on a virtual board before touching real hardware.
# Build for the target board ebuild build --target stm32f4-discovery # Flash via OpenOCD / J-Link ebuild flash --target stm32f4-discovery # Or simulate first ebuild sim --platform stm32f4 --gui
Usage Examples
// EoS low-power sensor node example
#include <eos/kernel.h>
#include <eos/hal/i2c.h>
#include <eos/hal/lora.h>
#include <eos/power.h>
void sensor_task(void *arg) {
eos_hal_i2c_t i2c = eos_hal_i2c_open(I2C1, 400_KHZ);
eos_hal_lora_t lora = eos_hal_lora_open(SPI2, &lora_cfg);
for (;;) {
float temp, hum;
sht31_read(i2c, &temp, &hum);
uint8_t payload[8];
encode_sensor(payload, temp, hum);
eos_hal_lora_send(lora, payload, sizeof(payload));
eos_power_sleep_ms(60000); // Deep-sleep 60 s
}
}Features
Preemptive RT Scheduler
Priority-based preemptive scheduler with time-slicing. SMP and AMP multicore modes. Context-switch time is bounded and priority-driven, not left to chance.
33 HAL Peripheral Classes
UART, SPI, I²C, GPIO, CAN, USB, ETH, ADC, PWM, Timer, DMA, RTC, Crypto, and 20 more — identical API across all architectures.
7 CPU Architectures
ARM Cortex-M/A/R, RISC-V RV32/RV64, x86, MIPS, ARC, Xtensa. Same application code runs on all.
Capability-Based Security
Process isolation with capability tokens. Tasks can only access peripherals they hold a capability for. Secure world handoff for TrustZone.
< 4 KB Footprint
Bare scheduler + HAL fits in 4 KB flash and 2 KB RAM — suitable for the smallest Cortex-M0 devices.
41 BSP Profiles
Ready-made board support packages for sensor nodes, gateways, infotainment, robotics, and edge servers.
IPC Primitives
Message queues, shared memory, semaphores, mutexes, condition variables, and event flags — all with bounded timing.
Power Management
Tickless idle, dynamic voltage/frequency scaling, and deep-sleep modes. Integrates with eos_power API for < 5 µA standby.
Role in the EoS Ecosystem
EoS Kernel is the absolute foundation of the entire EmbeddedOS ecosystem. Every other component — eBoot, eAI, eNI, EIPC, eDB, eOffice, eFlow, EoStudio, EoSim — runs on top of EoS or depends on its HAL abstractions. Without EoS, none of the higher-level services can exist. It provides the scheduler, memory model, HAL, and security primitives that the entire stack is built upon. Choosing EoS means every device in your fleet — from a 4 KB microcontroller to a 64-core server — runs the same kernel API, enabling code reuse, unified tooling, and consistent security policies across the entire product line.
Depends On
- eBoot (eBootloader) — loads and verifies the EoS image before handing off control
- eBuild — compiles, links, and signs the EoS firmware binary
- Hardware BSP — board-specific clock, memory map, and peripheral configuration
Enables / Powers
- eAI — on-device ML inference runs as EoS tasks using the HAL NPU driver
- eNI — configuration-specific neural acquisition is an intended EoS integration
- EIPC — inter-process and inter-board communication built on EoS IPC primitives
- eDB — embedded database engine runs as an EoS service task
- eOffice — all 11 office apps are EoS application-layer processes
- eFlow — visual block programs compile to EoS task graphs
- EoSim — simulates the full EoS kernel on a virtual board
- eHealth365 — all health device firmware runs on EoS
- AeroSwift / eRadar360 — aerospace and radar systems use EoS real-time guarantees
Open source on GitHub
MIT licensed and developed in the open. Issues, discussions, and pull requests welcome.
- C11
- MIT
- v0.5.0
Every EmbeddedOS repository, with install commands, is listed on the downloads page.
In the EoS stack
EoS Kernel is highlighted in the layer below.
- App layer
- UI / browser layer
- Data layer
- AI runtime
- Neural interface
- IPC fabric
- EoS kernel + HAL
- eos-platform profile
- eBootloader
- Build / IDE / Sim
Pairs well with
Sibling components that EoS Kernel commonly works alongside.
- eBootloaderPortable, secure, fail-safe boot for 24 boards across 10 architectures.→
- EAIOn-device LLM inference, ReAct agents, LoRA, and federated learning — at edge power budgets.→
- EIPCCapability-secured IPC fabric: predictable latency, HMAC-authenticated messages.→
- EoS PlatformCloud-side fleet management: OTA firmware updates, device telemetry, and remote debug.→
Technical Specifications
| Kernel Language | C11 (ISO/IEC 9899:2011) |
| Scheduler | Preemptive priority-based RT scheduler with time-slicing; SMP and AMP multicore modes |
| HAL Peripheral Classes | 33 (UART, SPI, I²C, GPIO, CAN, USB, ETH, ADC, PWM, Timer, DMA, RTC, Crypto, …) |
| Product Profiles | 41 ready-made BSP profiles (sensor nodes, gateways, infotainment, robotics, edge servers) |
| Minimum Footprint | < 4 KB flash, < 2 KB RAM (bare scheduler + HAL) |
| Interrupt Handling | Priority-based, deterministic ISR dispatch |
| Supported Architectures | ARM Cortex-M/A/R, RISC-V RV32/RV64, x86, MIPS, ARC, Xtensa |
| IPC Primitives | Message queues, shared memory, semaphores, mutexes, condition variables, event flags |
| Security Model | Capability-based access control; process isolation; secure world handoff |
| License | MIT — commercial use permitted without royalty |
| Current Version | v0.5.0 |
| Build System | eBuild (CMake + Ninja); POSIX make fallback |
