# Chapter 1: Boot Sequence ## Sample code - Directory: `docs/os-on-arduino/code/01_boot` ```bash uv run pio run -d 01_boot -t upload uv run pio device monitor -b 115200 ``` ## Source code The sketch for this chapter. Click a file name to expand. The code is mirrored automatically from the manuscript repository, so what you see here is always current. ### `docs/os-on-arduino/code/01_boot` :::{dropdown} `src/main.cpp` — 63 lines :icon: code [Open on GitHub](https://github.com/iory/learning-os-from-arduino/blob/main/docs/os-on-arduino/code/01_boot/src/main.cpp) ```{literalinclude} ../../../../code/01_boot/src/main.cpp :language: cpp :linenos: ``` ::: ### `docs/os-on-arduino/code/01_boot_vector_dump` :::{dropdown} `src/main.cpp` — 60 lines :icon: code [Open on GitHub](https://github.com/iory/learning-os-from-arduino/blob/main/docs/os-on-arduino/code/01_boot_vector_dump/src/main.cpp) ```{literalinclude} ../../../../code/01_boot_vector_dump/src/main.cpp :language: cpp :linenos: ``` ::: ## On the board ```{figure} ../_static/ch01_boot.gif :name: fig-ch01-boot :width: 100% Nothing appears for a while after the monitor opens; everything comes out at once the moment you send `S`. If `data_var` reads `12345`, copying the initialized data worked. ``` ## Pitfalls (Collected from reader questions — ask via [GitHub Issues](https://github.com/iory/build-your-own-arduino-rtos/issues).)