EoS Kernel — Real-Time Embedded OS
7 Architectures · 33 HAL Drivers · < 1 µs IRQ Latency
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.
How It Works
Step-by-step flow — from initialization to output.
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
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
}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);
}
}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));
}
}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
Real-world scenarios showing EoS Kernel in action.
A battery-powered temperature + humidity sensor that wakes every 60 s, reads the sensor, and transmits over LoRa.
// 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
The shape of EoS Kernel at a glance.
Preemptive RT Scheduler
Priority-based preemptive scheduler with time-slicing. SMP and AMP multicore modes. Deterministic context switch < 200 ns.
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
Why EoS Kernel matters — and what breaks without it.
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
Enables / Powers
Open source on GitHub
MIT licensed and developed in the open. Issues, discussions, and pull requests welcome.
In the EoS stack
EoS Kernel is highlighted in the layer below.
Pairs well with
Sibling components that EoS Kernel commonly works alongside.
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) |
| IRQ Latency | < 1 µs on Cortex-M4 @ 168 MHz |
| 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.1.0 (active development) |
| Build System | eBuild (CMake + Ninja); POSIX make fallback |

