Arduino_Core_STM32
Arduino_Core_STM32 copied to clipboard
Add dfu-util as a standard upload method
Summary
This PR implements the following features:
- [ ] Adds
dfu-utilas a standard menu upload option.
This is a follow-up to (and dependant on) PR https://github.com/stm32duino/Arduino_Tools/pull/46.
Motivation
The dfu-util program is already bundled with the stm32duino packages, so setting it as a primary supported upload tool reduces the need for outside software dependencies and gets the end-user setup and running quicker. Additionally, the STM32CubeProgrammer installer is known to have issues on the mac -- there are workarounds, but it's one more hurdle for the end-user to jump through.
Validation
- Ensure Travis CI build is passed.
- Upload a sketch to a board using the dfu-util upload option.
The automatic reset in BL mode PR looks cool. Let me know if there's anything I can do to help with that, too.
Any updates on this, I also believe that dfu-util will be a great feature to have as a default.
It looks like the dependencies have been merged, what is outstanding to get this pull merged?
Any updates on this, I also believe that dfu-util will be a great feature to have as a default.
Same answer as before:
Anyway, I will not merge this until the automatic reset in BL mode is not finished.
Unfortunately, I had no time to work on this soon but it will come.
Is there anything I can do to help? My free time is a bit sporadic, and im not the most experienced in this field, but i want to help with the project in general. In the mean time I will have a look through the list of requested boards and see if i can get some of them added as PR's
Any updates on this, I also believe that dfu-util will be a great feature to have as a default.
Same answer as before:
Anyway, I will not merge this until the automatic reset in BL mode is not finished.
Unfortunately, I had no time to work on this soon but it will come.
Unfortunately i just spent all night figuring out how to do exactly what jgillick had already done because i didn't know about this PR, and I was about to make the same PR. The automatic reset works on my board with :leave (which was removed) so I don't know what the holdup is. Please merge the work!
@jerkey Which board was removed ?
@jerkey Which board was removed ?
i was referring to this commit where ":leave" was removed from the dfu command. "The device automatically leaves DFU mode after flashing is complete and runs the program"
I don't understand why that commit was made, and you said "Anyway, I will not merge this until the automatic reset in BL mode is not finished" and since :leave makes the board start the user program after flashing, it seemed like the right thing to do but maybe this is accomplished somehow in the present PR. FYI the hardware will enter dfu mode if boot0 is pulled high during power/reset (via a button for example) and the :leave leaves dfu mode and runs the program. I don't see how you could improve on this, we don't have a DTR toggle or anything like that - the device doesn't even enable USB unless the user program chooses to do that. The user has to hold their dfu button and press reset to enter dfu mode. That or they can jump boot0 high and always enter dfu mode, but then their program only runs when they flash or otherwise use dfu-util to leave the bootloader.