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...
I reflexively reload HN many times per day, but I'm wondering if I need a walled garden with some sort of curation of individuals - which sucks - to get the signal level I want.
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
"Context switch (to be implemented in assembly for target architecture)"
There's no asm in the repo so I can only assume this is not something that actually compiles and runs.
Other things that are missing:
- No startup code (stack setup etc.)
- No linker script ("to be created", per makefile comment)
I would appreciate an honest comparison with FreeRTOS. Building something like this is an excellent learning exercise for the coder, but someone who has to balance the risks, learning curve and feature set has to justify the adventure in a different way.
One thing that would be interesting to hear more about would be your own recounting of the places where you made opinionated decisions about how things should work.
Nice try, OpenClaw
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.
This was a big deal in some academic circles in the early 2000s
You might execute formally verified code within an RTOS, which is your two worlds? Consider you have some critical control loop, like an autopilot (see Ardupilot). That control loop must run at some minimum rate, and the action of the system must be well characterized. Similarly you might want to guarantee that you sample a bunch of sensors frequently enough (so the most recent reading is no older than some time period).
I would suggest that a slightly more approachable way to view an RTOS for MCUs is a library that sits on your bare metal that takes primary responsibility for efficiently dividing up available resources across multiple task functions.
An RTOS will usually provide a well documented SDK with support for memory safe queues, semaphores and message brokering.
Think of it as a software enforced contract + best practices to ensure that you get stable, predictable timing loops without ugly polling and blocking.
For soft real-time, you basically only need low latency.
Threads with priorities, synchronization primitives and some way of handling interrupts is generally considered good enough.
From the description, this sounds like the kind of RTOS that runs most embedded RT applications currently if perhaps a bit heavier in features than the average with filesystem and networking support.
Why would someone make a context switch HIGH latency? That defeats the purpose.
Lots of everyday stuff is running on bare metal code that exceeds so-called "real time" requirements without an OS at all, and those programmers are definitely not rocket scientists! :)