davidgfnet / stm32-dfu-bootloader

A DFU bootloader targeting STM32F103 in just 4KB
GNU General Public License v3.0
113 stars 40 forks source link

to upgrade an application, i must upgrade it twice #13

Closed cqc-elycio closed 1 year ago

cqc-elycio commented 1 year ago

if i want to upgrade an app(app already exists), i must upgrade it twice. the first time i program the new app, bootloader only erase flash. before try it again, i must reconnect the device The second time it was successfully written.

i can`t fix this , can you help me? Thank you very much!

davidgfnet commented 1 year ago

Hey, you are right! This happens indeed. Never noticed in the past due to using SAFE_WRITE which does mass erases and seems not to suffer from this? Anyway I sent out a fix. Took me a while to figure it out!

cqc-elycio commented 1 year ago

Hey, you are right! This happens indeed. Never noticed in the past due to using SAFE_WRITE which does mass erases and seems not to suffer from this? Anyway I sent out a fix. Took me a while to figure it out!

thank you very much!