Add binary info to link to additional images #591
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#591
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've implemented a flashloader similar to what was suggested in #545 and noticed that using pico-tool to read what's flashed only returns information about the flashloader.
It would be nice if a binary info field could be used to chain from one image to the next so that pico-tool could also show information about the main application (or additional images if appropriate).
From my limited understanding of how the binary info fields work, this could be done by a third-party but it would be nice to have the functionality directly in pico-tool.
so a "there's another executable at this fixed address" BI type? - and it'd just look within that for a binary info root as it does with the start of flash?
Yes, exactly. The flashloader knows that the main application should be at 0x1001000, so it could just include that pointer.
If it were a multi-stage flashloader (to allow the flashloader itself to be updated) either the first stage could include pointers to both the second stage and the main application, or just to the second stage and the second stage points to the main application.
In my case, chaining would be sufficient but I could imagine a scenario where, for example, the flashloader (or similar) could decide at boot time which application image to boot (from a selection of fixed addresses). In that case you'd want to be able to list the addresses of all the application images in the flashloader.
GRUB for RP2040? 😉
EDIT: I've just read through your flashloader README, and it sounds pretty neat 👍 🙂
I've no idea whether that's either feasible or practical but I can certainly imagine a multi-stage bootloader/flashloader (since I've been there and done that).
Thank you! I've no doubt it could be improved on but I tried to make it as usable as possible. Either directly or as a basis for going in a different direction.
Moving this out of the closing 1.3.0 ... need to think some more about use cases.
I did start and added a link to a physical address with flags. those included whether to show the target program ahead of the source in picotool (or whether to hide the source completely).
this would allow you to link to multiple sub images, but we might want more control...
I guess this links to https://github.com/raspberrypi/picotool/issues/82