rp2/rp2_flash: Add binary info for ROMFS.

This describes the ROMFS location and size in Pico SDK's binary declaration
format, so it can be read from a .uf2 file for use with various tools.

Signed-off-by: Phil Howard <github@gadgetoid.com>
This commit is contained in:
Phil Howard 2025-07-08 14:02:42 +01:00 committed by Damien George
parent a9dd741e66
commit e6739fc87e

View file

@ -103,6 +103,18 @@ bi_decl(bi_block_device(
BINARY_INFO_BLOCK_DEV_FLAG_WRITE | BINARY_INFO_BLOCK_DEV_FLAG_WRITE |
BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN)); BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN));
#if MICROPY_HW_ROMFS_BYTES
// Tag the ROMFS partition in the binary
bi_decl(bi_block_device(
BINARY_INFO_TAG_MICROPYTHON,
"ROMFS",
XIP_BASE + MICROPY_HW_ROMFS_BASE,
MICROPY_HW_ROMFS_BYTES,
NULL,
BINARY_INFO_BLOCK_DEV_FLAG_READ |
BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN));
#endif
// This is a workaround to pico-sdk #2201: https://github.com/raspberrypi/pico-sdk/issues/2201 // This is a workaround to pico-sdk #2201: https://github.com/raspberrypi/pico-sdk/issues/2201
// which means the multicore_lockout_victim_is_initialized returns true even after core1 is reset. // which means the multicore_lockout_victim_is_initialized returns true even after core1 is reset.
static bool use_multicore_lockout(void) { static bool use_multicore_lockout(void) {