raspberrypi / picotool

BSD 3-Clause "New" or "Revised" License
592 stars 106 forks source link

Compile picoboot_flash_id_cmd from source and add objdump #107

Closed Ferdi265 closed 2 months ago

Ferdi265 commented 2 months ago

This PR replaces the picoboot_flash_id_cmd from #86 with a freshly compiled version that is bytewise-identical, as well as adds an objdump disassembly as for the other cmd payloads.

The CMake project used to compile the code is in this gist. pico-sdk 2.0.0 and arm-none-eabi-gcc 14.1.0 were used to compile the project.

Commands used:

Please confirm that you can reproduce the same binary before merging.

will-v-pi commented 2 months ago

Thanks for this - I've pushed one more commit on top to build this as part of picotool. This is how we build the xip_ram_perms.elf binary as well.

If you're happy with this then I'll merge it - if you want to double check it's working correctly then just add -DUSE_PRECOMPILED=0 to your cmake command when configuring picotool, and it'll compile xip_ram_perms and flash_id from source. By default it uses the pre-compiled binaries, in case the user doesn't have a working pico toolchain.

Ferdi265 commented 2 months ago

Thanks for this - I've pushed one more commit on top to build this as part of picotool. This is how we build the xip_ram_perms.elf binary as well.

If you're happy with this then I'll merge it - if you want to double check it's working correctly then just add -DUSE_PRECOMPILED=0 to your cmake command when configuring picotool, and it'll compile xip_ram_perms and flash_id from source. By default it uses the pre-compiled binaries, in case the user doesn't have a working pico toolchain.

perfect!