add stm32 dev template
This commit is contained in:
parent
5340e71dd1
commit
93c8d40a98
8 changed files with 322 additions and 0 deletions
28
templates/dev/stm32-blink/README.md
Normal file
28
templates/dev/stm32-blink/README.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# STM32G4 blink template
|
||||
|
||||
Blinks the LD2 LED (PA5) on a [Nucleo-G474RE](https://www.st.com/en/evaluation-tools/nucleo-g474re.html) using [libopencm3](https://github.com/libopencm3/libopencm3).
|
||||
|
||||
Set `BLINK_PORT` / `BLINK_PIN` for your board in [`src/main.c`](./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
|
||||
|
||||
```bash
|
||||
make
|
||||
```
|
||||
|
||||
## Flash
|
||||
|
||||
```bash
|
||||
make flash
|
||||
```
|
||||
|
||||
This uses OpenOCD with the built-in ST-Link interface config.
|
||||
Loading…
Add table
Add a link
Reference in a new issue