alexandreamat/TinyRTOS — reverse-engineered prompt
Reverse engineered prompt
Build me a tiny educational real time operating system in C for small embedded boards. I want it to run bare metal, starting with Arduino UNO using ATmega328p and Raspberry Pi 4 using BCM2711, with a clean hardware layer so the higher level code does not care which board it is on.
It should let a simple demo program print over serial, use GPIO pins, handle basic interrupts, use hardware timers, schedule small software timer callbacks, and include the start of a round robin thread scheduler with sleep support. Please add simple POSIX style wrappers for things like pthread and unistd where they make sense, plus small libc pieces like time or clock. Include basic utilities like queues, a min heap, Morse on an LED, and an optional HD44780 LCD driver.
Please set up the folders, headers, C source files, and Makefile so I can choose the target with an environment variable and compile it. Add a clear README explaining how to build and flash each board.
Want more depth? Deep Reverse