| .. | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| build.sh | ||
| flake.nix | ||
| Makefile | ||
| README.md | ||
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(viagcc-arm-embedded)openocdfor flashing and debuggingstlinkutilities (st-flash,st-info)libopencm3built forstm32/g4(exposed as$LIBOPENCM3_DIR)
Build
make
Flash
make flash
This uses OpenOCD with the built-in ST-Link interface config.