Updates for tool packages

Both the GD32V and STM32 MCU’s can use DFU for uploading the code to the microprocessors.
Platformio uses a package called tool-dfuutil with dfu-util. This package is also maintained by platformio.

However the current revision has only compatibility for Macos ARM64. No Linux x64 or anything else. The dfu-util for Linux x86 is still based on version 0.9, while version 0.11 was released last September.

How does a new version of these packages with support for all architectures get incorporated in the Platformio registry? The only information I can find is about pio pkg publish but that’s about it. There’s no documentation or tutorial on writing or assisting on these packages.

Is the process on creating packages described anywhere?
How do we get an updated package of dfu-util in Platformio?

The PlatformIO Registry version is fine, all others seem to have broken manifests?

CC @ivankravets

Only the 1.9.200310 version has more targets and is what most people get now. The latest version only has the MacOS arm64 version.

Also the version numbers seem different than the one used by dfu-util.

Oh actually, thinking about it again, it seems fine. Platforms always use the ~ operator when refering to which version shall be installed

and ~ ignores the minor version, so ~1.9.190708 matches any 1.9.x version. And so even though one particular 1.9.x versions might not be for a specific OS, one of the 1.9.x is, and that will be used + downloaded.

Probably, the oldest version was uploaded first most for most OSes, but was missing some, and so new versions with a new date code (the 190708 e.g. standars for 2019, July 8th) were uploaded for the remaning OSes.

1 Like

Thank you for the explanation.

Somehow it still doesn’t look fine to me.
But how can it be that in the default situation on Linux - x64 I still get dfu-util 0.9 and not the latest 0.11 release of dfu-util.

Is it so that 1.9.X corresponds to dfu-util 0.9? Looks a bit confusing to me.

pio run in a gd32v project shows the following for the dfu-util tool under Linux-x64:
- tool-dfuutil @ 1.9.200310
Which is from March 10, 2020.

When looking at the specific package this is the version.

~/.platformio/packages/tool-dfuutil/bin$ ./dfu-util --version
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 Tormod Volden and Stefan Schmidt

Then I come back to the question. What is the procedure to request an update to a tool that is maintained by the Platformio project?
Do I submit an issue on github on platformio-core or for the specific platform?
Is there an automated toolchain for upgrading these packages or is it still manual labor?

I hope you can help me with these questions.

Best regards,
Jelle

Yes, e.g. GitHub - sipeed/platform-gd32v: GD32V: development platform for PlatformIO. But it looks like it’s already tracked in dfu-util Error: 74 -- please update dfu-util · Issue #30 · sipeed/platform-gd32v · GitHub.

I think it’s rather manual.

We will upload new packages soon.

Great to see that this will be picked up.
Thank you.

Looking forward to it.

Ok. I had submitted my issue in 2020. But something must have mixed up. Lately I wanted to pick up the project and saw the current situation.

Thank you for giving this attention and answering my questions.

Please re-test the new version

1 Like

Hi,

I tested both platforms with the boards I had available. GD32V with a Sipeed Longan Nano and ststm32 with an Weact 3.0 with an STM32F411CEU6.
For both boards the new dfu-util works great under Linux x64.

Unfortunately I don’t have Windows or MacOS available.

I still need to manually add this dfu-util to the platformio.ini with platform_packages = platformio/tool-dfuutil@^1.11.0

I will leave a comment in my issue ( Example programs don't run when using dfu download · Issue #17 · sipeed/platform-gd32v · GitHub) for the maintainers of gd32v to finish it.
Or do I need to create a PR?

OT: Having support for Linux arm32 and arm64 also help for people who download firmware from a Raspberry Pi or other SBC? Like this issue Dfuutil missing for arm64 · Issue #436 · platformio/platform-ststm32 · GitHub

Thank you for picking this up so fast.

1 Like

Closed with PR 36 for platform-gd32v.