Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STM32CubeProg.sh] mass erase bug #81

Closed
olikraus opened this issue Feb 3, 2022 · 1 comment
Closed

[STM32CubeProg.sh] mass erase bug #81

olikraus opened this issue Feb 3, 2022 · 1 comment
Labels
invalid This doesn't seem right

Comments

@olikraus
Copy link

olikraus commented Feb 3, 2022

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:

${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE:+"-e all"} -q -d "${FILEPATH}" ${ADDRESS} "${OPTS}"

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
Copy link
Member

fpistm commented Feb 4, 2022

Already answer in stm32duino/Arduino_Core_STM32#1637

@olikraus please avoid to open several issues while we investigate the first one.

@fpistm fpistm closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants