Closed
Description
The ststm32 core for platformio defines a dependency on tool-dfuutil, but that package does not seem to be available for linux_aarch64 so installing the platform fails. I am not actually using dfu for uploading code (I am using the stlinkv2 programmer), so for me a workaround is to manually remove the dependency from ~/.platformio/platforms/ststm32/platform.json. For me that works, but it is definitely not an ideal workaround, and others might actually use dfu. So would it be possible to release an arm64 linux package for it?
Metadata
Metadata
Assignees
Labels
No labels
Activity
thinkyhead commentedon Sep 9, 2021
Also, we need a Darwin arm_64 version of tool-dfuutil for the M1 Mac system.
If a set of binaries is needed, maybe I can cobble them together.
jhaand commentedon May 31, 2022
It would be nice if the latest dfu-util would be added to the tool-dfuutil package. At this moment only an old revision is used and the latest 0.11 only seems available for Macos Arm64.
The dfu-util project has released 0.11 and it's not integrated in platformio for other platforms.
As you can see here:
https://registry.platformio.org/tools/platformio/tool-dfuutil/compatibility
See also this issue.
sipeed/platform-gd32v#17
Although this points to a Sipeed archive, this tool is owned by Platformio and in the top 100 of used packages.
jhaand commentedon Jun 1, 2022
Today a new version of dfu-util 0.11 was introduced in the registry. Unfortunately not for linux_aarch64.
thinkyhead commentedon Jun 30, 2022
It's not helping me either. The chart on their page says arm64 is supported, but we're still not picking up a universal binary.
thijstriemstra commentedon Jul 12, 2022
Same on issue on Raspberry Pi 3b+:
Unable to compile Marlin 2.1.x, sigh.
Update: Marlin fixed this literally 2 hrs ago and all seems to work again 🥳 when applying this patch: MarlinFirmware/Marlin@068624a
loozhengyuan commentedon Oct 20, 2024
I am still encountering this issue for macOS ARM64. Based on the registry, it looks like
darwin_arm64
is available the wrong binary is downloaded?Is it a case of wrong binary is fetched? Or the binary for
darwin_arm64
does not exist? Or the wrong binary was uploaded to the registry?valeros commentedon Oct 25, 2024
Hi @loozhengyuan, could you run
pio pkg update -g -t platformio/tool-dfuutil
and try again?loozhengyuan commentedon Oct 25, 2024
@valeros Thanks for looking into this! 🙇
I was able to confirm that the
arm64
binaries are installed now:However, it does not seem to work correctly:
valeros commentedon Oct 27, 2024
@thijstriemstra I've uploaded a new package, please run
pio pkg update -g -t platformio/tool-dfuutil
again.thinkyhead commentedon Oct 28, 2024
@loozhengyuan , @valeros —
At the moment, for many of our Marlin builds PlatformIO is downloading and running
tool-dfuutil@1.9.211020
. Is this because of the version spec in our environment? We're currently sticking to STSTM32 version 12.1 because a newer version would require us to update all our boards and variants.I added
platform_packages
for testing……and I'm getting back a rather sad error message:
Someone please explain why PlatformIO is looking for a folder named
tool-dfuutil@1.11.0/variants/MARLIN_FYSETC_S6
– appending the path to the board variants folder to the path of the dfu tool ??Anyway, since PlatformIO was insisting on being difficult, or using
tool-dfuutil@1.9.211020
I tried copying the contents of tool-dfuutil-1.11.0 intotool-dfuutil@1.9.211020
. The results were the same, as it was unable to findlibusb-1.0.0.dylib
in various fixed paths (including/System/Volumes/Preboot/Cryptexes/OS/tmp
which I'm sure we all have).I then tried version
1.11.23411026
and got the same results. However, when I used thedfu-prefix
,dfu-suffix
, anddfu-util
files installed bysudo port install dfu-util
the build finally succeeded. I followed up withsudo port uninstall usblib
to see if it would causedfu-util
to fail, and it did not cause any problems.Here are the binaries that finally worked for me:
dfuutil-darwin-arm64.zip
Now, how can we get these reliable and non-weirdly-linked binaries to download when building Marlin on macOS?
thinkyhead commentedon Oct 28, 2024
Note that proper macOS binaries will not only need proper linkage, but must also be Universal binaries (not just arm64), presuming that PlatformIO does not distinguish between Darwin on ARM versus Intel for these tools.
Universal binaries from
sudo port install dfu-util +universal
:dfuutil-darwin-universal.zip
Edit: These do appear to rely on
/opt/local/lib/libusb-1.0.0.dylib
being present, after all. So ultimately we need a set of binaries that include/opt/local/lib/libusb-1.0.0.dylib
in the dynamic linker search paths. The1.11.241026
binaries do not seem to look here.thinkyhead commentedon Oct 28, 2024
That rather weird error message still deserves a look. But the download was at least made to work by adding
platformio/
in front of the tool name.platform_packages = platformio/tool-dfuutil@^1.11.241026
However, as previously mentioned, the October 26 binaries still produce the same dynamic linking error, so the updated Universal binaries are definitely needed, along with a new "
1.11.241028
" version.valeros commentedon Oct 29, 2024
Hi @thinkyhead,
That's right,
tool-dfuutil
v1.9.211020 is the default choice for theststm32
dev-platform v12.1.Not sure where's this error coming from. Maybe you have a custom build command added via an extra script or something?
I've uploaded a new package for MacOS ARM64, so the missing
libusb-1.0.0.dylib
shouldn't be a problem now. You can pull the latest version viapio pkg update -g -t platformio/tool-dfuutil
.6 remaining items