Skip to content
/ octos Public

A compact RTOS built for educational purposes.

License

Notifications You must be signed in to change notification settings

Sped0n/octos

Repository files navigation

OCTOS

About

OCTOS is a compact real-time operating system (RTOS) featuring a preemptive kernel and an O(1) scheduler.

Currently, it supports only the ARM Cortex-M4 processor, but the system is designed to be extensible (see Core/Arch).

Features

  • FreeRTOS-like preemptive scheduler
    • Round-Robin within priority level
    • "Cooperative" between priority level
    • Support scheduler suspension
  • Basic Task Management
    • task_create, task_create_static, task_delete
    • task_delay, task_abort_delay
    • task_suspend, task_resume, task_resume_from_isr
    • task_yield, task_yield_from_isr
  • Python-like Sync Primitives
    • Sema_t: Semaphore (ISR-compatible)
    • Mutex_t: Mutex (Support Priority Inheritance)
    • Cond_t: Condition (ISR-compatible)
    • Barrier_t: Barrier
    • Event_t: Event (ISR-compatible)
  • Fexlible Inter-task Communication
    • Lightweight Task Notification (ISR-compatible)
    • Message Queue (ISR-compatible)

Usage

Prerequisites

Build

# Start from project root directory
mkdir build
cd build
cmake ..

# or `cmake --build . --target flash` (OpenOCD and ST-LINK required)
cmake --build . --target octos

Debugging

# Inside Build Directory
# Open a gdb server at :3333 (OpenOCD and ST-LINK required)
cmake --build . --target gdbhost

# Inside project root directory
# Try input `oinfo` and `otasks` in gdb
arm-none-eabi-gcc -x .gdbinit

Credits

About

A compact RTOS built for educational purposes.

Resources

License

Stars

Watchers

Forks