1.5 KiB
1.5 KiB
To build, develop and debug the firmware for the STM32L442 (WIP!) via cross-compilation on Linux, no vendor-specific software is necessary.
There exists a development board NUCLEO-L432KC you can use; the L432 chip differs from the L442 used for Solo only in that it lacks a cryptographic accelerator. The board does contain a debugger, so all you need is a USB cable (and some udev rules).
You will need the following packages (naming given for Arch Linux):
- arm-none-eabi-gcc
- arm-none-eabi-newlib
- arm-none-eabi-binutils
and one of
If you remove the .exe
extensions in the Makefile, and possibly add a -g
flag, compilation runs through.
To flash and step through the code:
- connect the Nucleo to your PC
- attach one of the debuggers:
st-util
(for stlink), oropenocd -f interface/stlink-v2-1.cfg -f target/stm32l4x.cfg
(for openocd) - launch
gdb
viaarm-none-eabi-gdb -q solo.elf
- connect gdb to the debugger via
target extended-remote :4242
(for stlink), ortarget remote :3333
(for openocd) - flash the firmware via
load
- optionally set a breakpoint via
break main
continue
, and start stepping 🙌
Note that the code for targets/stm32l442
currently consists of only a blinky hello world...