Skip to content
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

Add dfu-util as a standard upload method #718

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jgillick
Copy link
Contributor

@jgillick jgillick commented Oct 22, 2019

Summary

This PR implements the following features:

  • Adds dfu-util as a standard menu upload option.

This is a follow-up to (and dependant on) PR stm32duino/Arduino_Tools#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.

Copy link
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some remarks about the PR.
Anyway, I will not merge this until the automatic reset in BL mode is not finished.
I'm also thinking about merge the STM32CubeProgrammer script and the dfu-util.

platform.txt Outdated Show resolved Hide resolved
platform.txt Outdated Show resolved Hide resolved
boards.txt Outdated Show resolved Hide resolved
jgillick and others added 3 commits October 23, 2019 06:39
Co-Authored-By: Frederic Pillon <frederic.pillon@st.com>
Co-Authored-By: Frederic Pillon <frederic.pillon@st.com>
@jgillick
Copy link
Contributor Author

The automatic reset in BL mode PR looks cool. Let me know if there's anything I can do to help with that, too.

@alextrical
Copy link
Contributor

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?

@fpistm
Copy link
Member

fpistm commented Aug 30, 2022

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.

@alextrical
Copy link
Contributor

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

@jerkey
Copy link

jerkey commented Jul 24, 2023

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!

@fpistm
Copy link
Member

fpistm commented Jul 24, 2023

@jerkey Which board was removed ?

@fpistm fpistm marked this pull request as draft July 24, 2023 09:11
@jerkey
Copy link

jerkey commented Jul 24, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants