1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # RP2040 is a microcontroller with dual Cortex-M0+ core.
4 # https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html
6 # The device requires multidrop SWD for debug.
9 source [find target/swj-dp.tcl]
11 if { [info exists CHIPNAME] } {
12 set _CHIPNAME $CHIPNAME
17 if { [info exists WORKAREASIZE] } {
18 set _WORKAREASIZE $WORKAREASIZE
20 set _WORKAREASIZE 0x10000
23 if { [info exists CPUTAPID] } {
24 set _CPUTAPID $CPUTAPID
26 set _CPUTAPID 0x01002927
29 # Set to '0' or '1' for single core configuration,
30 # anything else for isolated debugging of both cores
31 if { [info exists USE_CORE] } {
32 set _USE_CORE $USE_CORE
36 set _BOTH_CORES [expr { $_USE_CORE != 0 && $_USE_CORE != 1 }]
38 swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
41 if { $_USE_CORE != 1 } {
42 dap create $_CHIPNAME.dap0 -chain-position $_CHIPNAME.cpu -dp-id $_CPUTAPID -instance-id 0
43 set _TARGETNAME_0 $_CHIPNAME.core0
44 target create $_TARGETNAME_0 cortex_m -dap $_CHIPNAME.dap0 -coreid 0
45 # srst does not exist; use SYSRESETREQ to perform a soft reset
46 $_TARGETNAME_0 cortex_m reset_config sysresetreq
50 if { $_USE_CORE != 0 } {
51 dap create $_CHIPNAME.dap1 -chain-position $_CHIPNAME.cpu -dp-id $_CPUTAPID -instance-id 1
52 set _TARGETNAME_1 $_CHIPNAME.core1
53 target create $_TARGETNAME_1 cortex_m -dap $_CHIPNAME.dap1 -coreid 1
54 $_TARGETNAME_1 cortex_m reset_config sysresetreq
57 if { $_USE_CORE == 1 } {
58 set _FLASH_TARGET $_TARGETNAME_1
60 set _FLASH_TARGET $_TARGETNAME_0
62 # Backup the work area. The flash probe runs an algorithm on the target CPU.
63 # The flash is probed during gdb connect if gdb_memory_map is enabled (by default).
64 $_FLASH_TARGET configure -work-area-phys 0x20010000 -work-area-size $_WORKAREASIZE -work-area-backup 1
65 set _FLASHNAME $_CHIPNAME.flash
66 flash bank $_FLASHNAME rp2040_flash 0x10000000 0 0 0 $_FLASH_TARGET
69 # Alias to ensure gdb connecting to core 1 gets the correct memory map
70 flash bank $_CHIPNAME.alias virtual 0x10000000 0 0 0 $_TARGETNAME_1 $_FLASHNAME
73 targets $_TARGETNAME_0
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)