How 1919884213/tinyrtos works
TinyRTOS is a small, statically allocated preemptive RTOS kernel for STM32F407. Firmware startup initializes the board, registers an idle task and a selected demo’s tasks, then starts scheduling; tasks exercise delays and synchronization, while the tick drives wakeups and time slicing. The README documents PendSV context switching and kernel behavior, but the tree lists no switch.s file and excerpts do not expose all interrupt or primitive internals, so uncertain implementation links are omitted.
Main entry points: kernel.c Scheduler and tasks · os_examples.c Demo and idle tasks · main.c Boot and main · usart.c USART1 driver
Components 12
Firmware startup
- Boot and main
Core/Src/main.c - USART1 driver
Core/Src/usart.c - Interrupt handlers
Core/Src/stm32f4xx_it.c
RTOS kernel
- Scheduler and tasks
Core/User/rtos/kernel.c - Task state
Core/User/rtos/tcb.h - Critical sections
Core/User/rtos/port.h
Synchronization
- Semaphore
Core/User/rtos/sem.c - Message queue
Core/User/rtos/queue.c - Mutex and inheritance
Core/User/rtos/mutex.c
Demo tasks
- Demo setup
Core/User/app/os_examples.c - Demo and idle tasks
Core/User/app/os_examples.c
Other components
- STM32F407
Connections 16
- STM32F407 → Boot and main: boots
- Boot and main → Demo setup: initializes demos
- Boot and main → Scheduler and tasks: starts OS
- Boot and main → USART1 driver: initializes UART
- Demo setup → Scheduler and tasks: creates tasks
- Demo setup → Semaphore: initializes
- Demo setup → Message queue: initializes
- Demo setup → Mutex and inheritance: initializes
- Demo and idle tasks → Scheduler and tasks: delays, yields, deletes
- Demo and idle tasks → Semaphore: signals and waits
- Demo and idle tasks → Message queue: sends and receives
- Demo and idle tasks → Mutex and inheritance: locks and unlocks
- Demo and idle tasks → USART1 driver: prints via UART
- Interrupt handlers → Scheduler and tasks: ticks scheduler
- Scheduler and tasks → Task state: updates task state
- Scheduler and tasks → Critical sections: protects kernel