diff --git a/tcl/target/rp2040.cfg b/tcl/target/rp2040.cfg index 939f514af..b032f0567 100644 --- a/tcl/target/rp2040.cfg +++ b/tcl/target/rp2040.cfg @@ -39,6 +39,12 @@ set _FLASHBASE 0x10000000 # name driver base, size in bytes, chip_width, bus_width, target used to access flash bank $_FLASHNAME rp2040_flash $_FLASHBASE $_FLASHSIZE 1 32 $_TARGETNAME_0 +# Openocd associates a flash bank with a target (in our case a core) and +# running `openocd -c "program foo.elf"` just grabs the last selected core +# from the TCL context. Select `core0` by default so that flash probe +# succeeds. Note gdb understands there are 2 cores -- this is only for TCL. +targets rp2040.core0 + # srst is not fitted so use SYSRESETREQ to perform a soft reset reset_config srst_nogate