Others have also noted that there's no linker script, no 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. Does anybody read past the headline anymore? 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’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.
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
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.
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! :)