-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Soft-DFU upload protocol tested to work on STM32F072B-DISCO #1175
[Enhancement] Soft-DFU upload protocol tested to work on STM32F072B-DISCO #1175
Conversation
…lling BOOT0 to 3.3V nor pressing RESET button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR anyway this is not enough generic and bring some conflict in the menu.
@fpistm I think we can keep the variant.cpp as it were by moving all of those changes out as a new file, somewhere not in each variant folders. And then all 3 macro definitions are defined as compiler flags in boards.txt The second option, we may be able to merge the code, like with bootloader.c maybe? SInce it uses the same magic word The last thing about the startup code, it is basically the exact same copy from CMSIS, but I added one liner in there: |
Honestly, modifying only one variant for this stuff is not the proper way. I will soon works on this PR: #710 which I guess is more generic to achieve the same goal. |
Just a quick though, as it seems |
It is not gonna work, because EDIT: confirmed that it does not work when I put it at the beginning of |
I have SnapBloks specific variants that use F072C8T6, and those will reside in Arduino/hardware as customized boards. This pull request, however, is an enhancement on STM32F072B-DISCOVERY. If you guys can implement this somehow and become mainline, then the rest of Discovery kits may get the same benefit of Soft-DFU upload protocol. I can help to work on the rest of Discovery kits out there. But you are right, it needs to be generic. First thing we need to figure out, is how we can replace The startup codes do not change at all, and look the same from when I compared it to my old work with HALMX. In the old HALMX startups, there are additional two liners that allows user to insert C code very early and right before SystemInit():
Not sure if it is a good idea to bring it back. There must be a good reason of removing these in the past. But in order to jump into any built-in bootloader, |
The current built-in STM32 DFU upload requires user to pull BOOT0 pin to 3.3V and perform system reset. With this enhancement, users do not require to press reset button nor pulling BOOT0 pin to 3.3V to upload new binary. The protocol is based on reading magic number over USBCDC (same magic number as Maple board '1EAF') and then it jumps to built-in DFU mode and ready to accept binary from there.
This enhancement has been tested to work on STM32F072B Discovery board with softdfu_upload from here:
https://github.com/SnapBloks/Arduino_Tools/tree/feature/softdfu_upload
Uploading with Soft-DFU on STM32F072B-DISCO requires dependency of upload tool from here:
stm32duino/Arduino_Tools#69
Please review and comment. Thank you.