]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
tcl/target: Add support for Nordic nRF54L series
authorMarc Schink <dev@zapb.de>
Fri, 29 Nov 2024 20:29:18 +0000 (20:29 +0000)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 22 Dec 2024 09:57:09 +0000 (09:57 +0000)
The RISC-V coprocessor is currently not supported. It is attached to the
DAP via AP#2 but the AP implementation is unknown.

The nRFL54L series uses resistive RAM (RRAM) as non-volatile memory
which can be programmed directly. Since it does not fit in the current
flash memory infrastructure of OpenOCD there is no NVM support so far.

Change-Id: I9934af4fd3bb8b7272954fc4b17638c7dabbbee0
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8609
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
tcl/target/nordic/nrf54l.cfg [new file with mode: 0644]

diff --git a/tcl/target/nordic/nrf54l.cfg b/tcl/target/nordic/nrf54l.cfg
new file mode 100644 (file)
index 0000000..70ead13
--- /dev/null
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+#
+# Nordic nRF54L series
+#
+# Arm Cortex-M33 processor with RISC-V coprocessor
+#
+# The device uses resistive RAM (RRAM) as non-volatile memory.
+#
+
+if { [info exists CHIPNAME] } {
+       set _CHIPNAME $CHIPNAME
+} else {
+       set _CHIPNAME nrf54l
+}
+
+# Work-area is a space in RAM used for flash programming, by default use 16 KiB.
+if { [info exists WORKAREASIZE] } {
+   set _WORKAREASIZE $WORKAREASIZE
+} else {
+   set _WORKAREASIZE 0x4000
+}
+
+if { [info exists CPUTAPID] } {
+       set _CPUTAPID $CPUTAPID
+} else {
+       set _CPUTAPID 0x6ba02477
+}
+
+transport select swd
+
+swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
+
+set _TARGETNAME $_CHIPNAME.cpu
+target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap -ap-num 0
+
+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
+
+# Create target for the control access port (CTRL-AP).
+target create $_CHIPNAME.ctrl mem_ap -dap $_CHIPNAME.dap -ap-num 1
+
+adapter speed 1000
+
+# Use main processor as default target.
+targets $_TARGETNAME
+
+if {![using_hla]} {
+       $_TARGETNAME cortex_m reset_config sysresetreq
+}