Skip to content

Custom Preemptive RTOS Kernel for ARM Cortex‑M4 (STM32F401VE), optimized for smart parking management systems

Notifications You must be signed in to change notification settings

MohamedAliHaoufa/My-Custom-RTOS-Kernel

Repository files navigation

My-Custom-RTOS-Kernel-for-Smart-Parking-Management-on-STM32F401VE

My Custom RTOS Kernel for Smart Parking Management on STM32F401VE is a lightweight, preemptive real‑time kernel engineered specifically for ARM Cortex‑M4 microcontrollers. Designed with automotive‑grade precision in mind, this scheduler provides deterministic task management, minimal latency, and an ultra‑small memory footprint, making it ideal for embedded control in smart Parking management systems. The scheduler core is written in C, ensuring portability across all Cortex‑M4 devices, and features:

  • Priority‑based Scheduling: Implements a fixed‑priority preemptive algorithm with round‑robin time slicing to guarantee timely task execution.
  • Dynamic Task Management: Supports runtime task creation, deletion, and priority adjustment for flexible application workflows.
  • Inter‑Task Synchronization: Includes mutexes, semaphores, and event flags to coordinate resource sharing without race conditions.
  • Low Overhead: Optimized context switch routines and configurable tick rates yield a minimal RAM and flash footprint.

This project comes with comprehensive documentation, example integrations for smart car sensor and actuator modules, and a modular architecture that allows easy extension or adaptation to other Cortex‑M4 platforms.


Key Highlights

  • Target Platform: STM32F401VE (ARM Cortex‑M4) and compatible Cortex‑M4 MCUs.
  • Use Case: Embedded control for smart Parking management, including real‑time sensor sampling, actuator control, and communication scheduling.
  • Language & Toolchain: C (GNU11), GNU Arm Embedded Toolchain (arm-none-eabi-gcc), CMSIS-compliant startup code.​

This update adds a dedicated Project File Structure section to clearly document the repository layout, and refines the Getting Started instructions to align with that structure—covering cloning, configuration, build, and flash steps using CMake and the GCC ARM Embedded toolchain.


Project File Structure

A clear overview of directories and key files helps contributors navigate your codebase efficiently. Here’s the top‑level layout:

My-Custom-RTOS-Scheduler-for-Smart-Car-Management-on-STM32F401VE/
├── bin/                        # Compiled binaries and firmware images
├── bsp/                        # Board Support Package (startup, drivers)
├── build/                      # CMake-generated build files and outputs
├── CMakeFiles/                 # CMake’s internal metadata
├── CMSIS/                      # ARM Cortex‑M CMSIS headers and startup
├── drivers/                    # MCU peripheral drivers and HAL wrappers
├── Inc/                        # Public header files (API definitions)
├── RTOS/                       # Core RTOS scheduler source code
├── Src/                        # Application source files
├── startup/                    # MCU startup scripts and linker configuration
├── tests/                      # Unit and integration tests
├── CMakeLists.txt              # Top‑level CMake project descriptor
├── Makefile                    # Alternative build script
├── Doxyfile                    # Doxygen documentation configuration
├── stm32f401vetx_FLASH.ld      # Linker script for STM32F401VE flash layout
├── .gitignore                  # Git ignore patterns
└── Project Backups/            # Optional IDE backup files (e.g., `.pdsprj`)

Getting Started

Follow these steps to clone, configure, build, and flash the scheduler on an STM32F401VE (or any Cortex‑M4 MCU):

  1. Prerequisites

  2. Clone the Repository

    git clone https://github.com/yourusername/My-Custom-RTOS-Scheduler-for-Smart-Car-Management-on-STM32F401VE.git
    cd My-Custom-RTOS-Scheduler-for-Smart-Car-Management-on-STM32F401VE
  3. Configure the Build

    mkdir -p build && cd build
    cmake .. -DMCU=STM32F401VE
  4. Build the Project

    make
  5. Flash to Target

    # Adjust path/name of the generated binary as needed
    st-flash write bin/firmware.bin 0x08000000
  6. Run Tests

    cd ../tests
    ./run_tests.sh

Topics & Tags

rtos · cortex-m4 · stm32f401ve · embedded · smart-car-management

About

Custom Preemptive RTOS Kernel for ARM Cortex‑M4 (STM32F401VE), optimized for smart parking management systems

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published