Bare-metal microcontroller experiments using the Zig programming language.
This repository contains minimal, low-level examples for ARM microcontrollers, focused on understanding the hardware directly:
- No HAL
- No CMSIS
- No vendor startup code
- Just Zig, linker scripts and direct register access
Each project is self-contained and documented in its own directory.
Bare-metal โHello Worldโ for STM32F0 (Cortex-M0)
- Target: STM32F0 (Bluepill-style board)
- Result: Red LED permanently ON
- Purpose: minimal viable bare-metal Zig binary
- Topics:
- MCU identification (CPUID)
- Vector table setup
- GPIO configuration
- Custom linker script
โก๏ธ See helloworld-stm32f0/README.md
Bare-metal LED blink for STM32F0 (Cortex-M0)
- Target: STM32F0 (Bluepill-style board)
- Result: Red LED blinking
- Purpose: extend Hello World with timing logic
- Topics:
- Busy-wait delay loops
- GPIO toggling
- Pure MMIO access
โก๏ธ See blink-stm32f0/README.md
- Zig 0.15.2
- OpenOCD 0.12.0
- ST-LINK (SWD)
- Demonstrate that Zig is viable for bare-metal ARM
- Keep examples small, readable and hackable
- Avoid abstraction layers to expose real hardware behaviour
- Serve as a learning and experimentation playground
MIT