Skip to content

[STM32CubeProg.sh] mass erase bug #81

Closed
@olikraus

Description

@olikraus

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}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions