Skip to content

Commit 169d463

Browse files
committed
tcl/target/nordic/nrf54l: minor corrections
Add SWD multidrop setting. Fix the name of AP arduino#1 to AUX-AP Set AUX-AP CSW Prot bit[0] to make RISC-V debug accessible on AUX-AP. Change-Id: I496e07acfe90dd858e4403176a8330d8c1a0b560 Signed-off-by: Tomas Vanek <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8752 Tested-by: jenkins Reviewed-by: zapb <[email protected]>
1 parent fe3aa0a commit 169d463

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

tcl/target/nordic/nrf54l.cfg

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,35 @@ if { [info exists CPUTAPID] } {
2727
set _CPUTAPID 0x6ba02477
2828
}
2929

30+
# Multidrop instance ID should be configurable by FW in TAD TINSTANCE register.
31+
# Writes to the register are ignored due to a silicon erratum.
32+
if { [info exists SWD_INSTANCE_ID] } {
33+
set _SWD_INSTANCE_ID $SWD_INSTANCE_ID
34+
} else {
35+
set _SWD_INSTANCE_ID 0
36+
}
37+
3038
transport select swd
3139

3240
swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
33-
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
41+
42+
if { [info exists SWD_MULTIDROP] } {
43+
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu -dp-id 0x001c0289 -instance-id $_SWD_INSTANCE_ID
44+
} else {
45+
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
46+
}
3447

3548
set _TARGETNAME $_CHIPNAME.cpu
3649
target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap -ap-num 0
3750

3851
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
3952

40-
# Create target for the control access port (CTRL-AP).
41-
target create $_CHIPNAME.ctrl mem_ap -dap $_CHIPNAME.dap -ap-num 1
53+
# Create target for the AUX access port (AUX-AP).
54+
target create $_CHIPNAME.aux mem_ap -dap $_CHIPNAME.dap -ap-num 1
55+
56+
# AUX-AP is accessible only if CSW Prot[0] bit (Data Access) is set
57+
$_CHIPNAME.dap apsel 1
58+
$_CHIPNAME.dap apcsw 0x01000000 0x01000000
4259

4360
adapter speed 1000
4461

0 commit comments

Comments
 (0)