Skip to content

Shreyas8317/Mini-RTOS-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mini RTOS Framework (C | Embedded Systems)

A modular Mini RTOS framework implemented in C, designed to simulate core real-time embedded system functionalities such as task scheduling, inter-process communication (IPC), timer services, peripheral abstraction, persistent logging, and a command-line interface.

The system is built using industry-standard embedded design principles with a focus on modularity, scalability, and maintainability.


Overview

This project models a lightweight RTOS environment where multiple application tasks are managed and executed through a cooperative scheduling mechanism. Each subsystem is implemented as an independent module, enabling easier testing, maintainability, and future extensibility.

The design approach reflects real-world embedded firmware architectures used in IoT, automotive, and low-level system software.


Core Capabilities

  • Task lifecycle management using function pointers
  • Cooperative scheduling for deterministic execution
  • Message queue-based inter-task communication
  • Timer abstraction for time-based operations
  • Peripheral abstraction layer for hardware independence
  • Persistent logging for debugging and traceability
  • Command-line shell for runtime interaction

Functional Description

Task Module (task)

Responsible for defining and managing tasks.

  • Encapsulates task metadata (ID, name, handler)
  • Uses function pointers for task execution
  • Provides APIs for task creation and initialization

Scheduler Module (schedular)

Controls execution of tasks.

  • Implements cooperative scheduling
  • Executes tasks sequentially
  • Maintains task list and execution order
  • Designed for extension to priority-based and preemptive scheduling

IPC Module (ipc)

Handles communication between tasks.

  • Implements message queue mechanism
  • Enables asynchronous communication
  • Reduces coupling between system components

Timer Module (timer)

Provides timing services.

  • Abstract interface for delays and timing
  • Can be extended to hardware timers (SysTick, RTC)
  • Supports periodic and time-based task execution

Storage Module (storage)

Manages system logging.

  • Centralized logging interface
  • Supports write and read operations
  • Enables debugging and system traceability

Peripheral Module (peripherals)

Provides hardware abstraction.

  • Interfaces with simulated or real hardware
  • Supports peripherals such as GPIO and UART
  • Decouples application logic from hardware

Shell Module (shell)

Provides runtime interaction.

  • Command-line interface for system control
  • Can be extended for diagnostics and debugging
  • Enables dynamic system interaction

Task Behavior

The system includes representative tasks to simulate embedded workflows:

  • SensorTask
    Simulates sensor data acquisition and logging

  • UARTTask
    Simulates communication and data transmission

  • LEDTask
    Simulates actuator control through LED toggling


Design Approach

The system is designed following production-grade embedded principles:

  • Clear separation between application and system layers
  • Modular and scalable architecture
  • Low coupling via IPC mechanisms
  • High cohesion within modules
  • Hardware abstraction for portability
  • Maintainable and testable code structure

Industry Relevance

This project demonstrates key concepts expected in embedded and firmware roles:

  • Task lifecycle and scheduling strategies
  • Inter-process communication design
  • Hardware abstraction layer implementation
  • System-level logging and debugging

The architecture aligns conceptually with systems such as FreeRTOS and embedded Linux.


Future Enhancements

  • Priority-based scheduling
  • Preemptive multitasking using timer interrupts
  • Integration with microcontrollers (STM32, PIC)
  • Interrupt-driven execution
  • Memory management (heap and stack tracking)
  • UART-based debugging interface

Author

Shreyas Pawangadkar

About

Designed and developed a modular Mini RTOS in C featuring task scheduling, IPC via message queues, timer services, peripheral abstraction, and a logging subsystem. Implemented a scalable architecture aligned with embedded system design principles, enabling future extension to preemptive scheduling and hardware integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors