Examples written using STM32Cube, which are the official hardware extraction layer (HAL) and libraries from STMicroelectronics.
The base configurations (clock, gpio, etc) are generated using the STM32CubeMX code generator.
- GCC build essentials.
- Mac: Run
xcode-select --install
in your terminal. - Linux: Install build-essential
- Windows: make or via cygwin
- Mac: Run
- The ARM gcc toolchain, 7.3.1 or above
- dfu-util
To compile each example, you should only need to run make
from within the example directory.
cd ./Blink
make
Put the board into bootloader (DFU) mode by pressing the user button while turning the board on. Now you can run the following command to flash the program to the board:
make flash
This command is a wrapper for the dfu-util
command. The full command would be:
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/program.bin