Skip to content

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

Step-by-step flow — from initialization to output.
  1. 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. 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. 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. 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. 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

Real-world scenarios showing EoS Kernel in action.
IoT Sensor NodeA 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. 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

Why EoS Kernel matters — and what breaks without it. See how the pieces fit together in the EmbeddedOS ecosystem overview.

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.

⌥ embeddedos-org/EoS
Real-Time Embedded OS
  • C11
  • MIT
  • v0.5.0
Open the embeddedos-org/EoS repository on GitHub ↗

Every EmbeddedOS repository, with install commands, is listed on the downloads page.

In the EoS stack

EoS Kernel is highlighted in the layer below.

  1. App layer
  2. UI / browser layer
  3. Data layer
  4. AI runtime
  5. Neural interface
  6. IPC fabric
  7. EoS kernel + HAL
  8. eos-platform profile
  9. eBootloader
  10. Build / IDE / Sim

Technical Specifications

Kernel LanguageC11 (ISO/IEC 9899:2011)
SchedulerPreemptive priority-based RT scheduler with time-slicing; SMP and AMP multicore modes
HAL Peripheral Classes33 (UART, SPI, I²C, GPIO, CAN, USB, ETH, ADC, PWM, Timer, DMA, RTC, Crypto, …)
Product Profiles41 ready-made BSP profiles (sensor nodes, gateways, infotainment, robotics, edge servers)
Minimum Footprint< 4 KB flash, < 2 KB RAM (bare scheduler + HAL)
Interrupt HandlingPriority-based, deterministic ISR dispatch
Supported ArchitecturesARM Cortex-M/A/R, RISC-V RV32/RV64, x86, MIPS, ARC, Xtensa
IPC PrimitivesMessage queues, shared memory, semaphores, mutexes, condition variables, event flags
Security ModelCapability-based access control; process isolation; secure world handoff
LicenseMIT — commercial use permitted without royalty
Current Versionv0.5.0
Build SystemeBuild (CMake + Ninja); POSIX make fallback

Ask your AI about EmbeddedOS

See where open-source embedded software and hardware fit your industry, in the assistant you already use.