diff options
| author | Phil Howard <github@gadgetoid.com> | 2025-07-08 14:02:42 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-08-02 00:36:50 +1000 |
| commit | e6739fc87e9d633484aeb72fa2efac14e4ff7681 (patch) | |
| tree | de69bf2e4d1491f5227e3ec4afd55dc70f38f352 | |
| parent | a9dd741e66a6afba3a6e862d134246d157a56777 (diff) | |
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>
| -rw-r--r-- | ports/rp2/rp2_flash.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ports/rp2/rp2_flash.c b/ports/rp2/rp2_flash.c index d6b9e1365..4d41d4573 100644 --- a/ports/rp2/rp2_flash.c +++ b/ports/rp2/rp2_flash.c @@ -103,6 +103,18 @@ bi_decl(bi_block_device( BINARY_INFO_BLOCK_DEV_FLAG_WRITE | 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 // which means the multicore_lockout_victim_is_initialized returns true even after core1 is reset. static bool use_multicore_lockout(void) { |
