pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Add support for using XIP cache as SRAM

Open will-v-pi opened this issue 4 months ago • 1 comments

Draft for now, as it includes changes from https://github.com/raspberrypi/pico-sdk/pull/2645 and https://github.com/raspberrypi/pico-sdk/pull/2137, requires the xip-sram branch of picotool (otherwise UF2 creation and signing fails), and is still WIP - just raising so it can be viewed early, and maybe some of these bits can be added to https://github.com/raspberrypi/pico-sdk/pull/2137

This should fix https://github.com/raspberrypi/pico-sdk/issues/2653 for both RP2040 and RP2350

This adds new binary types xip_sram (whole binary in XIP SRAM), and copy_to_ram_using_xip_ram/no_flash_using_xip_ram (time critical functions placed in XIP SRAM)

Also adds parsing of addressmap.h so variables in it can be accessed by using pico_get_addressmap_value, to remove hardcoded SRAM addresses from the CMake

will-v-pi avatar Sep 11 '25 17:09 will-v-pi

These changes are now working as expected for me and my test program running on an RP2040 using in following configurations: pico_set_binary_type(main copy_to_ram_using_xip_ram) pico_set_binary_type(main copy_to_ram) pico_set_binary_type(main no_flash_using_xip_ram) pico_set_binary_type(main no_flash)

steffenyount avatar Sep 18 '25 17:09 steffenyount