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

Tools: Switch from elf2uf2 to modern picotool #21269

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AnnsAnns
Copy link
Contributor

@AnnsAnns AnnsAnns commented Mar 5, 2025

Contribution description

The Pi Pico 2 requires a more modern version of elf2uf2 called picotool, in a first effort to get the Raspberry Pi Pico 2 to be compatible with Riot I thus needed to update it.

While this PR is intended to allow me to work on the Pi Pico 2, picotool also offers advantages for the Pico 1 such as easier device detection, loading/flashing and the ability to easily verify the integrity of a file after loading it onto the device. I have incorporated these advantages into the existing workflow so hopefully the flashing process should have become easier for everyone 😄

Testing procedure

I verified it working with examples using the pi pico 1, the expected outcome is that the user should not experience any differences while flashing (aside from the tool being different)

Issues/PRs references

@AnnsAnns AnnsAnns requested review from aabadie and jia200x as code owners March 5, 2025 14:14
@github-actions github-actions bot added Area: doc Area: Documentation Area: build system Area: Build system Area: tools Area: Supplementary tools Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports labels Mar 5, 2025
@AnnsAnns AnnsAnns changed the title Picotool DRAFT: Tools: Switch from elf2uf2 to modern picotool Mar 5, 2025
@AnnsAnns AnnsAnns marked this pull request as draft March 5, 2025 14:20
picotool: start elf2uf2 migration

picotool: Replace elf2uf2 usage with picotool

picotool: Fix incorrect filename for flash utility

picotool: fix compilation when arm g++ is installed

picotool: picotool-ify flash process

picotool: Adjust documentation to new workflow
@AnnsAnns
Copy link
Contributor Author

AnnsAnns commented Mar 6, 2025

I have tested this working properly on a Pi Pico 1 now. I am not too confident in my understanding of the RIOT packages makefile system so I am happy to hear feedback 😄

@AnnsAnns AnnsAnns marked this pull request as ready for review March 6, 2025 11:11
@crasbe
Copy link
Contributor

crasbe commented Mar 6, 2025

Wouldn't it be easier to use the precompiled binaries of picotool instead of compiling it on demand: https://github.com/raspberrypi/pico-sdk-tools/releases ?

@AnnsAnns
Copy link
Contributor Author

AnnsAnns commented Mar 6, 2025

Given the way elf2uf2 worked and looking into other packages + the documentation I would have assumed that the preference is to avoid binaries when possible

@AnnsAnns AnnsAnns changed the title DRAFT: Tools: Switch from elf2uf2 to modern picotool Tools: Switch from elf2uf2 to modern picotool Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: tools Area: Supplementary tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants