STM32CubeProgrammer secret sauce
Today I finally figured out how to get the STM32CubeProgrammer CLI to work!
This is pretty awesome, the CLI tool is much faster than any of the GUI tools. For some reason the erase, program, and verify steps zip past way faster than in the GUI.
Using the old ST-Link utility in windows, I had tens of seconds, with this script it’s down to about 2 seconds, and that includes the sound + delay. Plus I don’t have to keep an eye on the ST-Link console to see if there was an error, this just won’t play the sound and I can focus on shuffling boards.
#!/bin/bash binfile=$1 while true do echo next STM32_Programmer_CLI -c port=SWD -e all -w $binfile -v && afplay sm64_1-up.wav echo sleep for 1 and next sleep 1 done
This opens up all kinds of possibilities, like scripting automatic programming + test jigs.