Closed Ferdi265 closed 1 year ago
Tagging relevant issues: #12, #54
Converted into a draft to signify incompleteness. I am open to suggestions on how to best work this into picotool. See this PR as an RFC of sorts on how to implement this.
For devices still in application mode, the serial number could be read directly from the serial device, since the default serial for that is the flash unique id.
Optimally it would be great to be able to select devices not only by --bus B --addr A
, but potentially by --serial SERIAL
to simplify working with multiple picos at once.
Seeing as this is executing raw flash commands on any attached RP2040, regardless of the actually attached flash chip, this can of course potentially go badly on custom boards that do flash differently (however, the internal tinyusb code from pico-sdk
would be similarly scary if not patched accordingly).
I'm not sure what to make of this; executing (a nontrivial amount of) code on any attached RP2040 at random just to figure out its serial number is a bit scary.
Optimally it would be great to be able to select devices not only by
--bus B --addr A
, but potentially by--serial SERIAL
to simplify working with multiple picos at once.
I implemented this in PR #84.
I know this is only a draft, but it should probably be targeting the develop
branch?
Oh yes, I basically made this in a hurry; will rebase this when I get home today :)
Rebased; since I forgot to create a feature branch before I pushed this into my fork, this now looks like a merge from master into develop, but the master branch in Ferdi265/picotool now actually tracks develop.
Okay, in fixing my repo I accidently closed this branch since I renamed the master branch in my repo; I will recreate this PR later
This PR adds a command to display the flash unique id from boards currently in BOOTSEL mode.
Since the bootrom RPC interface does not have a way to directly issue flash commands such as
CMD_RUID
, the only way I found to fix this is to copy thefash_get_unique_id
function to RAM and use theEXEC
command to read out the unique id.the code blob uploaded to the pico was compiled using the following C and ASM code: