Note, orthogonal to where the discussion is going, the bootrom does provide some (very terse) information to help you determine what happened if you don't boot as expected. How to use this is not well documented currently.
You can see the information returned in RP2350 datasheet: 5.4.8.17. get_sys_info
Basically, when rebooting you can select a partition number (or slot number) to get diagnostics for after the reboot. there are two 16 bit words (for slot 0/1 or partition A/B) that indicate what happened.
If you end up in a binary, you can call the get_sys_info() API to get the results; if you end up in the bootloader you can get the same info via `picotool info -a`
e.g.
we should probably add a picotool command to decode these (and also decode inline here)
--
You can select the diagnostic source either by `picotool reboot -g` or via the reboot API when booting to BOOTSEL mode
You can see the information returned in RP2350 datasheet: 5.4.8.17. get_sys_info
Basically, when rebooting you can select a partition number (or slot number) to get diagnostics for after the reboot. there are two 16 bit words (for slot 0/1 or partition A/B) that indicate what happened.
If you end up in a binary, you can call the get_sys_info() API to get the results; if you end up in the bootloader you can get the same info via `picotool info -a`
e.g.
Code:
boot type: bootsel last booted partition: slot 0 diagnostic source: slot 0 last boot diagnostics: 0x0000500d--
You can select the diagnostic source either by `picotool reboot -g` or via the reboot API when booting to BOOTSEL mode
Statistics: Posted by kilograham — Thu May 01, 2025 3:53 pm