Show HN: TinyOS – A minimalist RTOS for Cortex-M written in C

hpscript 95 points 37 comments April 03, 2026
github.com · View on Hacker News

Discussion Highlights (12 comments)

hpscript

Hi HN, I’ve been working on a tiny RTOS as a personal project to better understand how operating systems and schedulers work internally. This project includes: - Basic task scheduler - Context switching - Simple memory management - Runs on (your target hardware or environment) Motivation: I wanted to learn OS internals by building everything from scratch rather than relying on existing frameworks. Challenges: - Implementing context switching correctly - Designing a minimal but usable scheduler - Keeping the codebase simple and readable I’d really appreciate feedback, especially on: - Architecture design - Scheduler implementation - Code structure GitHub: https://github.com/cmc-labo/tinyos-rtos

Yokohiii

I have no practical insight on RTOS in general, if anyone bothers to give me a hint, please. From all what I've looked into, RTOS does mean to create software systems that are almost perfectly predictable and safe to execute. Predictable latency, runtime and memory usage, plus maybe side channels to do the unpredictable stuff in between. It's actual rocket science, as no systemic mistakes are allowed. The confusion is that this project doesn't mention any of it. Is it just hijacking of a fancy acronym, are there two worlds side by side or am I completely misled?

nofunsir

What ever happened to μC/OS? Seemed both well documented and well suited to have taken over for the current MCU explosion. I almost never see anyone talk about it. Looks like it open-sourced in 2020. https://github.com/weston-embedded

mc7alazoun

I've learnt something new: RTOS stands for Real-Time Operating System. Thanks for sharing; your README is top-notch!

jockm

Question: Do you mean real time, meaning there is some kind of expectation of task switching time, nothing can stop other threads from executing, etc; or do you really mean embedded?

onetimeusename

How much of this was by AI?

synergy20

this reminds me of: https://github.com/tinyos/tinyos-main more than one decade ago

tvst

I thought this was about UC Berkeley's TinyOS: https://github.com/tinyos/tinyos-main This was a big deal in some academic circles in the early 2000s

m132

The README mentions ARMv7-M, RISC-V, and AVR, but no actual SoCs or boards, and the source code contains unconditional inline assembly for Arm. Similarly, there are measurements of context switch time on RISC-V, while the scheduler is one big stub that doesn't even enter a task, only returns from itself using Arm-specific assembly [0]. The examples rely on this scheduler never returning, so there's no way any of them can run [1]. The bootloader is also a stub [2]. Not a single exception vector table, but plenty of LLM-style comments explaining every single line. Others (well, two people really) have also noted the lack of a linker script, start-up code, and that the project doesn't even build. 82 points at the time of writing, which is 4 hours from the post's submission. Already on the main page. The only previous activity of the author? Two other vibe-coded projects of similar quality and a few comments with broken list formatting, suggesting that they were never even reviewed by a human prior to posting. Does anybody read past the headline these days? Had my hopes higher for this site. [0] https://github.com/cmc-labo/tinyos-rtos/blob/2a47496047fdb45... [1] https://github.com/cmc-labo/tinyos-rtos/blob/2a47496047fdb45... [2] https://github.com/cmc-labo/tinyos-rtos/blob/2a47496047fdb45...

throwawaypath

Interesting this kernel implements kernel message queues, which are almost never used out in the wild. Are there any examples of popular software projects that use POSIX/SysV message queues?

nurettin

There is already a TinyOS in the sensor networks space. I've used it with MicaZ motes over a decade ago. https://github.com/tp-freeforall/prod

jaylew1997

Thanks for sharing

Semantic search powered by Rivestack pgvector
3,471 stories · 32,344 chunks indexed