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.
Anonymous
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Any opinion on this patch?
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?
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.
Any idea how the command option should look like?
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.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Fix a small typo in the last patch.
Any comment on the updated patch?