Hold bootloader in DFU when uploading from the IDE

Post here first, or if you can't find a relevant section!
Post Reply
User avatar
RogerClark
Posts: 7440
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Hold bootloader in DFU when uploading from the IDE

Post by RogerClark » Wed Nov 08, 2017 5:06 am

Recently quite a few people have been experiencing problems with the time that the Bootloader holds in DFU being too short for their PC / Mac/ Linux box.

There is already a partial fix for this in the bootloader as it checks for a magic number in one of the backup registers, and I think its probably now time to modify the core so that it sets the magic number before it reboots into the bootloader

The only impact I can see is for anyone who uses the battery backed register for some other purpose, but it seems unlikely to me that they would really need the backup register when they have it connected to the PC and are uploading etc

If someone was developing some software using the backup register(s), they'd probably have to disable this feature my modifying the core, so I to help under these circumstances I could wrap the code in a #ifndef block, so that if a define was added to boards.txt or platform.txt it would disable this feature.

If anyone can think of a reason I should not add the code to the core (for the bootloader upload) please could you let me know.

Post Reply