Skip to content

[linux] Create dfu-util script to select correct program (32/64-bit) #46

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

Merged
merged 7 commits into from
Dec 19, 2019

Conversation

jgillick
Copy link
Contributor

@jgillick jgillick commented Oct 20, 2019

In order to support dfu-util as a first-class upload option in linux, there needs to be a script that will choose the correct compiled program (x86_64/i386). This PR was inspired by this PR comment.

Why
Since dfu-util is already bundled when installing the STM32 core, this PR removes any outside software dependency necessary for the end-user. 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.

Directory Change
Part of this PR is to rename the dfu-util directory to dfu-util_i386 so the main script could be called dfu-util in the linux directory. (this makes the platform.txt config more straight forward) I'm not sure if this changes any kind of build step necessary for the releases.

Related Issue
While testing this PR, I noticed a related issue. It seems like the i386 compiled binary is actually compiled for x86_64 systems. That issue can be ignored if this is expected.
I have updated the i386 binaries from the official distribution and tested them on a virtualized 32-bit system.

@fpistm
Copy link
Member

fpistm commented Oct 21, 2019

This is not really needed to rename the dfu-util directory.
Main issue is t provide a 32bits version of the binaries.

@jgillick
Copy link
Contributor Author

I'm not really sure I understand your comment on this PR. From this comment on my other PR, don't we need to create a script to call the correct binary? Since all other OSes will look for a dfu-util program, it would make sense to name this script the same.

@jgillick
Copy link
Contributor Author

The binaries have been updated to work for 32-bit systems in this PR as well.

@jgillick
Copy link
Contributor Author

I have reversed the directory name change and name the chooser script dfu-util.sh. (it'll proxy the command to the correct binary)

@fpistm fpistm self-requested a review December 19, 2019 16:37
@fpistm
Copy link
Member

fpistm commented Dec 19, 2019

Fixes #45

@fpistm fpistm merged commit 201e809 into stm32duino:master Dec 19, 2019
@fpistm fpistm added this to the 1.3.2 milestone Dec 19, 2019
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.

2 participants