Make sure you have the right Development Environment. Once that is covered, you can build all bootloaders with a single CMake workflow command:
cmake --workflow STM32H7-DevEBox-dbgNext, see the bootloader-specific documentation:
The rest of the sections below are common for all bootloaders.
Using ST-LINK/V2 via SWD:
st-flash --format ihex --reset write .build/Core/<BOOTLOADER_NAME>.hex
Using J-Link via SWD:
JLinkExe -CommandFile flash.<BOOTLOADER_NAME>.jlinkReset the board and within 3 seconds run the following command:
.venv/bin/python3 tools/comm/comm.py upload_app <fw_path>E.g.:
.venv/bin/python3 tools/comm/comm.py upload_app ../m8ec/.build/platform/STM32H750/STM32H750.bin
If you have an SWD debugger connected to the board with a reset pin, you can run this without the need to reset the board:
st-flash reset && sleep 1 && .venv/bin/python3 tools/comm/comm.py upload_app <fw_path>E.g.:
st-flash reset && sleep 1 && .venv/bin/python3 tools/comm/comm.py upload_app ../m8ec/.build/platform/STM32H750/STM32H750.bin
You can debug your application together with the bootloader in VSCode using
ST-LINK/V2 via SWD, openOCD and cortex-debug extension. Add your application
ELF path to the symbolFiles list of the bl_iram
launch.json configuration and start debugging by
hitting F5.