Announcing the "Toys" operating system
Posted: Tue Aug 20, 2024 1:27 pm
This is a toy, monotasking, self-hosted operating system for the Arduino Due (ARM-v7M microcontroller, 96KB RAM, 512KB flash), in less than 3300 lines, for educational purposes(*). It is made of:
- a boot loader (~70 lines)
- a monolithic kernel with 3 drivers, a file system, and 10 system calls (~1080 lines)
- a small, statically typed, C-like compiler with only unsigned 32-bit ints and struct pointers (~1330 lines)
- a text editor (~220 lines), a shell (~230 lines), and 5 commands (ls, cp, rm, etc -- ~200 lines)
Links:
- book: https://ebruneton.github.io/toypc/toypc.pdf
- companion website: https://ebruneton.github.io/toypc/
- emulator: https://ebruneton.github.io/toypc/emula ... /final.txt
- source code: https://ebruneton.github.io/toypc/toys.zip
(*) the goal is not to teach how to write an OS. Instead, it is to introduce this topic via a practical example.
- a boot loader (~70 lines)
- a monolithic kernel with 3 drivers, a file system, and 10 system calls (~1080 lines)
- a small, statically typed, C-like compiler with only unsigned 32-bit ints and struct pointers (~1330 lines)
- a text editor (~220 lines), a shell (~230 lines), and 5 commands (ls, cp, rm, etc -- ~200 lines)
Links:
- book: https://ebruneton.github.io/toypc/toypc.pdf
- companion website: https://ebruneton.github.io/toypc/
- emulator: https://ebruneton.github.io/toypc/emula ... /final.txt
- source code: https://ebruneton.github.io/toypc/toys.zip
(*) the goal is not to teach how to write an OS. Instead, it is to introduce this topic via a practical example.