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(Erase memory when using DFU) #98

Closed
wants to merge 1 commit into from

Conversation

narzul
Copy link

@narzul narzul commented Jun 5, 2024

Programming problems when using DFU.

  • When programming with DFU, unable to write non-zero data to already programmed memory.
  • Resulting in memory map error, validation error and incorrect data.

Added

  • Added: ERASE="yes"
  • When DFU is selected

@fpistm
Copy link
Member

fpistm commented Jun 6, 2024

Hi @narzul
It seems more a workaround than a real solution.
Erasing the whole flash each time will reduce life of the flash cycle.
Which board you used?

@narzul
Copy link
Author

narzul commented Jun 6, 2024

Greetings @fpistm
The board that I'm currently working on is the adafruit stm32f405.
However this is a persistent problem for all stm32f4xx chips when programming using DFU.
It is also a general problem for many other stm32 chips, when programming using DFU.

But if you think that this is something that should be addressed a different place, would you be able to point me in the right direction, so I can write a fix there.

@fpistm
Copy link
Member

fpistm commented Jun 6, 2024

I have the Adafruit F405 and never had this issue same for other series. Which version of cubeprogrammer you used?

@narzul
Copy link
Author

narzul commented Jun 6, 2024

I'm running STM32CubeProgrammer v2.16.0

@fpistm fpistm added the wontfix This will not be worked on label Jun 27, 2024
@fpistm
Copy link
Member

fpistm commented Jun 27, 2024

Hi @narzul
Since the script was reworked, see stm32duino/Arduino_Core_STM32#2323 and #97 .

The simplest way is to use the boards.local.txt

# Add erase option to dfu upload method, --erase could also be used
GenF4.menu.upload_method.dfuMethod.upload.options=-v {upload.vid} -p {upload.pid} -e

@fpistm fpistm closed this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
Development

Successfully merging this pull request may close these issues.

3 participants