u/Rough_Evening3853

I wrote a small preemptive RTOS from scratch for ARM Cortex-M with STM32 Nucleo-F756ZG BSP
▲ 1 r/stm32

I wrote a small preemptive RTOS from scratch for ARM Cortex-M with STM32 Nucleo-F756ZG BSP

a demonstration of TinyRTOS running on an STM32 Nucleo-F756ZG, rendering and dispatching all currently supported OSI commands over USART3 as of version 2026.5.21+2.

yo

Over the past couple weeks, I’ve been building a compact preemptive RTOS kernel completely from scratch in C for ARM Cortex-M (currently targeting the STM32F756ZG).

The original goal was purely educational: I wanted to deeply understand how RTOS kernels actually work internally instead of treating them like a black box.

Current features include:

  • preemptive priority scheduler
  • PendSV/SVC context switching
  • separate PSP task stacks
  • queues
  • semaphores
  • mutexes
  • ISR-safe synchronization APIs
  • stack watermarking
  • runtime task diagnostics
  • HardFault register dump + fault decoding
  • UART-based OSI (Operating System Interface)

The project intentionally stays very close to the hardware and avoids heavy abstraction layers.

I’m fully aware it is NOT production-ready yet; there’s still no MPU support, stack overflow protection, priority inheritance, dynamic allocation, etc, but the core functionality is now stable enough that I’d love to open it up to contributors and discussion from people more experienced than me.

One of my main goals moving forward is exploring what it would take to evolve TinyRTOS into something significantly more robust while still keeping it small and understandable.

I’d genuinely appreciate:

  • architecture critiques
  • RTOS design feedback
  • embedded debugging advice
  • Cortex-M exception handling discussion
  • contributors interested in helping improve it

Repo: https://github.com/iwilkey/tinyrtos

Let me know what you think!

reddit.com
u/Rough_Evening3853 — 1 day ago
▲ 2 r/osdev

I wrote a small preemptive RTOS from scratch for ARM Cortex-M

a demonstration of TinyRTOS running on an STM32 Nucleo-F756ZG, rendering and dispatching all currently supported OSI commands over USART3 as of version 2026.5.21+2.

Repo: https://github.com/iwilkey/tinyrtos

yo

Over the past couple weeks, I’ve been building a compact preemptive RTOS kernel completely from scratch in C for ARM Cortex-M (currently targeting the STM32F756ZG).

The original goal was purely educational: I wanted to deeply understand how RTOS kernels actually work internally instead of treating them like a black box.

Current features include:

  • preemptive priority scheduler
  • PendSV/SVC context switching
  • separate PSP task stacks
  • queues
  • semaphores
  • mutexes
  • ISR-safe synchronization APIs
  • stack watermarking
  • runtime task diagnostics
  • HardFault register dump + fault decoding
  • UART-based OSI (Operating System Interface)

The project intentionally stays very close to the hardware and avoids heavy abstraction layers.

I’m fully aware it is NOT production-ready yet; there’s still no MPU support, stack overflow protection, priority inheritance, dynamic allocation, etc, but the core functionality is now stable enough that I’d love to open it up to contributors and discussion from people more experienced than me.

One of my main goals moving forward is exploring what it would take to evolve TinyRTOS into something significantly more robust while still keeping it small and understandable.

I’d genuinely appreciate:

  • architecture critiques
  • RTOS design feedback
  • embedded debugging advice
  • Cortex-M exception handling discussion
  • contributors interested in helping improve it

Let me know what you think!

reddit.com
u/Rough_Evening3853 — 1 day ago

I wrote a small preemptive RTOS from scratch for ARM Cortex-M

a demonstration of TinyRTOS running on an STM32 Nucleo-F756ZG, rendering and dispatching all currently supported OSI commands over USART3 as of version 2026.5.21+2.

Repo: https://github.com/iwilkey/tinyrtos

yo

Over the past couple weeks, I’ve been building a compact preemptive RTOS kernel completely from scratch in C for ARM Cortex-M (currently targeting the STM32F756ZG).

The original goal was purely educational: I wanted to deeply understand how RTOS kernels actually work internally instead of treating them like a black box.

Current features include:

  • preemptive priority scheduler
  • PendSV/SVC context switching
  • separate PSP task stacks
  • queues
  • semaphores
  • mutexes
  • ISR-safe synchronization APIs
  • stack watermarking
  • runtime task diagnostics
  • HardFault register dump + fault decoding
  • UART-based OSI (Operating System Interface)

The project intentionally stays very close to the hardware and avoids heavy abstraction layers.

I’m fully aware it is NOT production-ready yet; there’s still no MPU support, stack overflow protection, priority inheritance, dynamic allocation, etc, but the core functionality is now stable enough that I’d love to open it up to contributors and discussion from people more experienced than me.

One of my main goals moving forward is exploring what it would take to evolve TinyRTOS into something significantly more robust while still keeping it small and understandable.

I’d genuinely appreciate:

  • architecture critiques
  • RTOS design feedback
  • embedded debugging advice
  • Cortex-M exception handling discussion
  • contributors interested in helping improve it

Let me know what you think!

reddit.com
u/Rough_Evening3853 — 1 day ago