[STM32CubeProg.sh] mass erase bug
olikraus opened this issue · 1 comments
olikraus commented
Followup for stm32duino/Arduino_Core_STM32#1637
Problem:
Some devices (at least the STM32G031J6) require a full mass erase for proper uploads.
However the mass erase is not executed due to a problem in STM32CubeProg.sh
Fix:
The mass erase is already foreseen here:
Arduino_Tools/stm32CubeProg.sh
Line 141 in d0ccf25
However, the sh syntax is not correct. In order to apply "-e all" in case of an empty "ERASE" variable, the "-" sign must be used:
${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE:-"-e all"} -q -d "${FILEPATH}" ${ADDRESS} "${OPTS}"
fpistm commented
Already answer in stm32duino/Arduino_Core_STM32#1637
@olikraus please avoid to open several issues while we investigate the first one.