How lordaftereight/armos works
ArmOS is a bare-metal STM32H745 OS, booted from MCU flash into an XIP image in NOR and using SDRAM as main memory. The principal path is bootloader handoff, OS startup, then process execution and display/log output. Its runtime also includes board/HAL support, a process scheduler and registry, heap management, and NAND storage. The README documents the boot stages and storage role; the sampled code shows selected scheduler, UI, display, and UART relationships, so unsampled internal wiring is not inferred.
Main entry points: kui/mod.rs Window UI · display/mod.rs Framebuffer display · proctracker.rs Process tracker · uart.rs UART output
Components 20
Boot and startup
- Stage-0 bootloader
src/bin/bootloader.rs - ArmOS entry
src/main.rs - Reset and vectors
src/startup/reset.rs
OS core
- Heap allocator
src/heap.rs - NAND storage
src/storage/mod.rs - Kernel logging
src/klog/mod.rs
Processes and apps
- Process scheduler
src/proc/csched.rs - Process registry
src/proc/registry.rs - Process tracker
src/apps/proctracker.rs
Board and I/O
- Board configuration
src/board/mod.rs - STM32 HAL
src/hal/pac.rs - Board GPIO map
src/board/gpio.rs - UART output
src/hal/uart.rs
Display UI
- Framebuffer drawing
src/kui/kdraw.rs - UI fonts
src/kui/kfont.rs - Window UI
src/kui/mod.rs - Framebuffer display
src/drivers/display/mod.rs - LTDC scanout
src/drivers/display/ltdc.rs - Software scanout
src/drivers/display/soft.rs
Other components
- STM32H745
Connections 17
- STM32H745 → Stage-0 bootloader: boots
README.md - Stage-0 bootloader → ArmOS entry: jumps to
README.md - ArmOS entry → Reset and vectors: enters
src/main.rs - Board configuration → Board GPIO map: maps pins
src/board/mod.rs - Board GPIO map → STM32 HAL: uses GPIO HAL
src/board/gpio.rs - UART output → STM32 HAL: accesses peripherals
src/hal/uart.rs - UART output → Board configuration: uses pin config
src/hal/uart.rs - Process scheduler → Process registry: updates processes
src/proc/csched.rs - Process tracker → Process registry: reads process table
src/apps/proctracker.rs - Process tracker → Window UI: renders tracker
src/apps/proctracker.rs - Process tracker → Kernel logging: logs status
src/apps/proctracker.rs - Window UI → Framebuffer drawing: draws chrome
src/kui/mod.rs - Window UI → UI fonts: uses fonts
src/kui/mod.rs - Window UI → Framebuffer display: presents frame
src/kui/mod.rs - Framebuffer display → Framebuffer drawing: installs framebuffer
src/drivers/display/mod.rs - Framebuffer display → LTDC scanout: starts or updates
src/drivers/display/mod.rs - Framebuffer display → Software scanout: starts or updates
src/drivers/display/mod.rs