Menu

#44 [PATCH] Force option on not-announced flash does not erase

0.12
open
nobody
None
2021-09-19
2017-05-01
Uwe Bonnes
No

Using the force option to write above the announced flash does not erase pages above the announced flashsize.

Most STM32F103C8 have (perhaps untested ot tested bad) flash above 64 k. As the blackmagic image size has grown above the 64 k limit and all Stlink below V2.1 have a F103C8 on board, user should be able to write above the 64 k limit, but should do that explicit.. For the blackmagic debugger, we intend to announce only the flashsize given in the flash size register. That way a normal upload of the image bigger than 64 k (minus the bootloader) would fail. User should have to give explicit the "force" option, so that user proves is aware of the risks.

Appended patch reuses the last segment for erase of pages above the segment area.

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2017-05-30

    Any opinion on this patch?

     
  • Tormod Volden

    Tormod Volden - 2017-05-30

    Hmm, at first sight I think it frankly looks like an ugly hack (pardon my French) for breaking specifications, even though I see the utility. I would much more welcome a way to provide a fake (fixed up) memory map string on the command line... What do you think about that possibility?

     
  • Tormod Volden

    Tormod Volden - 2017-05-30

    Ah I reread the first summary: So we currently allow writing above the limit but not erasing there - that's inconsistent and I see your patch in a new light. However the alternative approach remains a possible powerful option.

     
  • Uwe Bonnes

    Uwe Bonnes - 2017-05-31

    Any idea how the command option should look like?

     
  • Tormod Volden

    Tormod Volden - 2017-06-01

    I haven't thought that through, but thinking aloud, I kind of prefer to have all dfuse stuff in the -s option but in this case it might get very long and ugly. Or use a separate command option, or add it to the -a option, e.g. dfu-util -a 0:"@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg".

    In the latter case I guess all changes can be contained in dfu_util.c and it is not strictly bound to dfuse.

     
  • Tormod Volden

    Tormod Volden - 2017-06-03
    • labels: git head -->
     
  • Uwe Bonnes

    Uwe Bonnes - 2018-02-09

    Any comment on the updated patch?

     
  • Tormod Volden

    Tormod Volden - 2020-10-25
    • summary: Force option on not-announced flash does not erase --> [PATCH] Force option on not-announced flash does not erase
     
  • Tormod Volden

    Tormod Volden - 2020-11-15
    • Milestone: none --> 1.1
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB