synix/templates/dev/stm32-blink/README.md
sid 93c8d40a98
Some checks failed
Flake check / flake-check (pull_request) Failing after 6s
Build tests / build-hosts (pull_request) Successful in 24s
add stm32 dev template
2026-05-07 18:57:46 +02:00

640 B

STM32G4 blink template

Blinks the LD2 LED (PA5) on a Nucleo-G474RE using libopencm3.

Set BLINK_PORT / BLINK_PIN for your board in src/main.c.

Toolchain

The Nix dev shell provides:

  • arm-none-eabi-gcc (via gcc-arm-embedded)
  • openocd for flashing and debugging
  • stlink utilities (st-flash, st-info)
  • libopencm3 built for stm32/g4 (exposed as $LIBOPENCM3_DIR)

Build

make

Flash

make flash

This uses OpenOCD with the built-in ST-Link interface config.