Menu

#128 Cannot write file after commit 5dbb767

0.6
Fixed
nobody
None
Medium
Defect
2021-02-02
2021-02-01
No

After commit 5dbb767 Do not erase more than file contents indicate I am unable to write file to the memory with error Failed to write memory at address 0x00000000
On commit e69b2a6 Assume STM32L1xxxD and STM32L0x1 have no mass-erase command everything works fine.
In the attachment you can see me cloning the repository, compiling stm32flash and resetting commits back until it starts working. I did it on Manjaro Linux with USB to TTL adapter, however, on Raspberry PI 4 with built-in GPIO the same problem occurs.
Tested on STM32G03 and STM32G07, both devices behave the same way.

1 Attachments

Discussion

  • Tormod Volden

    Tormod Volden - 2021-02-01
    • Milestone: none --> 0.6
     
  • Tormod Volden

    Tormod Volden - 2021-02-01

    Thanks for the report! What is the exact size of your output.bin file?

     
  • Tormod Volden

    Tormod Volden - 2021-02-01

    OK, I see where this was going wrong. I had only been testing with a -S start address. Without a start address (but getting the length from the file) it was taking start address = 0.

    As a quick fix I will limit the "Do not erase more than file contents indicate" feature to the case where a start address has been given.

     

    Last edit: Tormod Volden 2021-02-01
  • Tormod Volden

    Tormod Volden - 2021-02-01

    I changed it to pick flash start as start address unless a start address was given by the user (commit 90e570c). Testing is very much welcome.

     
  • Stanisław Krowicki

    Hi, thanks for responding so quickly.

    I played a bit with the new version on my devices. Everything seems to work flawlessly under Windows, Manjaro and Raspbian with and without -S parameter.

    Best regards.

     
  • Tormod Volden

    Tormod Volden - 2021-02-02
    • status: New --> Fixed
     
  • Tormod Volden

    Tormod Volden - 2021-02-02

    Thanks a lot for all the testing!

    One thing that has changed is when not using the -S option and writing to flash, previously the whole flash was erased with mass erase, now it only erases what is needed from the file size, but if the file size equals flash size, there will be a mass erase (when supported) like before. I believe this is an improvement.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB