QuantumLeaps/Super-Simple-Tasker — reverse-engineered prompt
Reverse engineered prompt
Build me a tiny embedded real time tasker library for ARM Cortex M boards, with both C and C++ versions if possible. I want tasks to be event driven, priority based, and run to completion, so they never block while running. Higher priority ready tasks should run first, and tasks should be able to receive multiple events through simple queues.
Please also include a simpler cooperative version that uses the same basic API, for cases where I do not need preemption. Add a small blinky button demo that shows a few tasks communicating with each other, suitable for a GNU ARM build, and keep the code easy to read for embedded developers.
Include the core headers, source files, a minimal port for Cortex M, and clear build instructions. I care about predictable hard real time behavior and very low overhead more than fancy features. Look up current embedded toolchain docs online if you need to.
Want more depth? Deep Reverse