raspberrypi / openocd

Other
148 stars 88 forks source link

RP2350 - Upload to and run from SRAM not working #110

Open ChristianIvarsson opened 1 week ago

ChristianIvarsson commented 1 week ago

Hi!

It has previously been possible to upload to and run from SRAM on the older rp2040 but it seems no longer possible on the new sibling.

Is there any planned support in the pipeline or would it be better if init were performed by the script itself?

Expected working configuration:

<CMakeLists.txt>
add_compile_definitions(PICO_NO_FLASH=1)
.. ..
pico_set_binary_type(${PROJECT_NAME} no_flash)

<ramload.cfg>
source [find interface/cmsis-dap.cfg]
adapter speed 4000
source [find target/rp2350.cfg]

transport select swd
init
reset halt

load_image image.elf
resume 0x20000000
shutdown

~I'm really sorry if this is a PEBCAK

ChristianIvarsson commented 1 day ago

Did a test on the built elf just to verify and it seems the sdk does what it should arm-none-eabi-size -A -x yields

section                  size         addr
.text                  0x5338   0x20000000
.rodata                 0x410   0x20005338
.binary_info             0x1c   0x20005748
.data                   0x218   0x20005770
.tdata                    0x0   0x20005988
.uninitialized_data       0x0   0x20005988
.tbss                     0x0   0x20005988
.bss                    0x54c   0x20005988
.heap                 0x3a12c   0x20005ed4
.. ..

Also tried openocd on a pi through its gpio interface and it was the same result there.

lurch commented 21 hours ago

This might be related to https://github.com/raspberrypi/pico-feedback/issues/153 ? :man_shrugging: