aboutsummaryrefslogtreecommitdiff
path: root/tcl
diff options
context:
space:
mode:
authorIan Thompson <ianst@cadence.com>2022-08-25 08:55:00 -0700
committerAntonio Borneo <borneo.antonio@gmail.com>2022-09-13 22:08:34 +0000
commit34a6a64920cb9f106a3a12542ac1297229833c1e (patch)
treeacd5c09530c34739cfdb089122c49adf5e40e3fa /tcl
parentb2b514be5bcca8b84736ed2abb8687477ade583c (diff)
downloadriscv-openocd-34a6a64920cb9f106a3a12542ac1297229833c1e.zip
riscv-openocd-34a6a64920cb9f106a3a12542ac1297229833c1e.tar.gz
riscv-openocd-34a6a64920cb9f106a3a12542ac1297229833c1e.tar.bz2
target/xtensa: DAP-based Xtensa config files
- Config files for DAP/JTAG and DAP/SWD systems - Xtensa core config definitions for NXP RT685 with Xtensa HiFi DSP Signed-off-by: Ian Thompson <ianst@cadence.com> Change-Id: I9c3280052073d86e09c7553de661eb8662a95c4a Reviewed-on: https://review.openocd.org/c/openocd/+/7145 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'tcl')
-rw-r--r--tcl/board/xtensa-kc705-ext-dap.cfg14
-rw-r--r--tcl/board/xtensa-rt685-ext.cfg15
-rw-r--r--tcl/target/xtensa-core-nxp_rt600.cfg247
-rw-r--r--tcl/target/xtensa.cfg7
4 files changed, 282 insertions, 1 deletions
diff --git a/tcl/board/xtensa-kc705-ext-dap.cfg b/tcl/board/xtensa-kc705-ext-dap.cfg
new file mode 100644
index 0000000..ac92c70
--- /dev/null
+++ b/tcl/board/xtensa-kc705-ext-dap.cfg
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Cadence KC705 FPGA Development Platform for Xtensa targets
+# Can be used with various external adapters that support DAP, e.g. JLink
+#
+
+adapter speed 5000
+
+# KC705 supports DAP/JTAG
+transport select jtag
+set XTENSA_DAP enable
+set XTENSA_DAP_BASE 0x10000
+
+# Create Xtensa target first
+source [find target/xtensa.cfg]
diff --git a/tcl/board/xtensa-rt685-ext.cfg b/tcl/board/xtensa-rt685-ext.cfg
new file mode 100644
index 0000000..03edb8d
--- /dev/null
+++ b/tcl/board/xtensa-rt685-ext.cfg
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# NXP RT6XX Developemnt Platform with Xtensa HiFi DSP
+# Can be used with various external adapters that support DAP, e.g. JLink
+#
+
+adapter speed 10000
+
+# RT6XX supports SWD only
+transport select swd
+set XTENSA_DAP enable
+
+# Create Xtensa target first
+source [find target/xtensa.cfg]
+
+source [find target/xtensa-core-nxp_rt600.cfg]
diff --git a/tcl/target/xtensa-core-nxp_rt600.cfg b/tcl/target/xtensa-core-nxp_rt600.cfg
new file mode 100644
index 0000000..abd961e
--- /dev/null
+++ b/tcl/target/xtensa-core-nxp_rt600.cfg
@@ -0,0 +1,247 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# OpenOCD configuration file for Xtensa HiFi DSP in NXP RT600 target
+
+
+# Core definition and ABI
+xtensa xtdef LX
+xtensa xtopt arnum 32
+xtensa xtopt windowed 1
+
+
+# Exception/Interrupt Options
+xtensa xtopt exceptions 1
+xtensa xtopt hipriints 1
+xtensa xtopt intlevels 4
+xtensa xtopt excmlevel 2
+
+
+# Cache Options
+xtensa xtmem icache 256 32768 4
+xtensa xtmem dcache 256 65536 4 1
+
+
+# Memory Options
+xtensa xtmem iram 0x24020000 65536
+xtensa xtmem dram 0x24000000 65536
+xtensa xtmem sram 0x00000000 603979776
+
+
+# Memory Protection/Translation Options
+
+
+# Debug Options
+xtensa xtopt debuglevel 4
+xtensa xtopt ibreaknum 2
+xtensa xtopt dbreaknum 2
+
+
+# Core Registers
+xtensa xtregs 208
+xtensa xtreg pc 0x0020
+xtensa xtreg ar0 0x0100
+xtensa xtreg ar1 0x0101
+xtensa xtreg ar2 0x0102
+xtensa xtreg ar3 0x0103
+xtensa xtreg ar4 0x0104
+xtensa xtreg ar5 0x0105
+xtensa xtreg ar6 0x0106
+xtensa xtreg ar7 0x0107
+xtensa xtreg ar8 0x0108
+xtensa xtreg ar9 0x0109
+xtensa xtreg ar10 0x010a
+xtensa xtreg ar11 0x010b
+xtensa xtreg ar12 0x010c
+xtensa xtreg ar13 0x010d
+xtensa xtreg ar14 0x010e
+xtensa xtreg ar15 0x010f
+xtensa xtreg ar16 0x0110
+xtensa xtreg ar17 0x0111
+xtensa xtreg ar18 0x0112
+xtensa xtreg ar19 0x0113
+xtensa xtreg ar20 0x0114
+xtensa xtreg ar21 0x0115
+xtensa xtreg ar22 0x0116
+xtensa xtreg ar23 0x0117
+xtensa xtreg ar24 0x0118
+xtensa xtreg ar25 0x0119
+xtensa xtreg ar26 0x011a
+xtensa xtreg ar27 0x011b
+xtensa xtreg ar28 0x011c
+xtensa xtreg ar29 0x011d
+xtensa xtreg ar30 0x011e
+xtensa xtreg ar31 0x011f
+xtensa xtreg lbeg 0x0200
+xtensa xtreg lend 0x0201
+xtensa xtreg lcount 0x0202
+xtensa xtreg sar 0x0203
+xtensa xtreg prefctl 0x0228
+xtensa xtreg windowbase 0x0248
+xtensa xtreg windowstart 0x0249
+xtensa xtreg configid0 0x02b0
+xtensa xtreg configid1 0x02d0
+xtensa xtreg ps 0x02e6
+xtensa xtreg threadptr 0x03e7
+xtensa xtreg br 0x0204
+xtensa xtreg scompare1 0x020c
+xtensa xtreg acclo 0x0210
+xtensa xtreg acchi 0x0211
+xtensa xtreg m0 0x0220
+xtensa xtreg m1 0x0221
+xtensa xtreg m2 0x0222
+xtensa xtreg m3 0x0223
+xtensa xtreg expstate 0x03e6
+xtensa xtreg f64r_lo 0x03ea
+xtensa xtreg f64r_hi 0x03eb
+xtensa xtreg f64s 0x03ec
+xtensa xtreg ae_ovf_sar 0x03f0
+xtensa xtreg ae_bithead 0x03f1
+xtensa xtreg ae_ts_fts_bu_bp 0x03f2
+xtensa xtreg ae_cw_sd_no 0x03f3
+xtensa xtreg ae_cbegin0 0x03f6
+xtensa xtreg ae_cend0 0x03f7
+xtensa xtreg ae_cbegin1 0x03f8
+xtensa xtreg ae_cend1 0x03f9
+xtensa xtreg aed0 0x1010
+xtensa xtreg aed1 0x1011
+xtensa xtreg aed2 0x1012
+xtensa xtreg aed3 0x1013
+xtensa xtreg aed4 0x1014
+xtensa xtreg aed5 0x1015
+xtensa xtreg aed6 0x1016
+xtensa xtreg aed7 0x1017
+xtensa xtreg aed8 0x1018
+xtensa xtreg aed9 0x1019
+xtensa xtreg aed10 0x101a
+xtensa xtreg aed11 0x101b
+xtensa xtreg aed12 0x101c
+xtensa xtreg aed13 0x101d
+xtensa xtreg aed14 0x101e
+xtensa xtreg aed15 0x101f
+xtensa xtreg u0 0x1020
+xtensa xtreg u1 0x1021
+xtensa xtreg u2 0x1022
+xtensa xtreg u3 0x1023
+xtensa xtreg aep0 0x1024
+xtensa xtreg aep1 0x1025
+xtensa xtreg aep2 0x1026
+xtensa xtreg aep3 0x1027
+xtensa xtreg fcr_fsr 0x1029
+xtensa xtreg mmid 0x0259
+xtensa xtreg ibreakenable 0x0260
+xtensa xtreg memctl 0x0261
+xtensa xtreg atomctl 0x0263
+xtensa xtreg ddr 0x0268
+xtensa xtreg ibreaka0 0x0280
+xtensa xtreg ibreaka1 0x0281
+xtensa xtreg dbreaka0 0x0290
+xtensa xtreg dbreaka1 0x0291
+xtensa xtreg dbreakc0 0x02a0
+xtensa xtreg dbreakc1 0x02a1
+xtensa xtreg epc1 0x02b1
+xtensa xtreg epc2 0x02b2
+xtensa xtreg epc3 0x02b3
+xtensa xtreg epc4 0x02b4
+xtensa xtreg epc5 0x02b5
+xtensa xtreg depc 0x02c0
+xtensa xtreg eps2 0x02c2
+xtensa xtreg eps3 0x02c3
+xtensa xtreg eps4 0x02c4
+xtensa xtreg eps5 0x02c5
+xtensa xtreg excsave1 0x02d1
+xtensa xtreg excsave2 0x02d2
+xtensa xtreg excsave3 0x02d3
+xtensa xtreg excsave4 0x02d4
+xtensa xtreg excsave5 0x02d5
+xtensa xtreg cpenable 0x02e0
+xtensa xtreg interrupt 0x02e2
+xtensa xtreg intset 0x02e2
+xtensa xtreg intclear 0x02e3
+xtensa xtreg intenable 0x02e4
+xtensa xtreg vecbase 0x02e7
+xtensa xtreg exccause 0x02e8
+xtensa xtreg debugcause 0x02e9
+xtensa xtreg ccount 0x02ea
+xtensa xtreg prid 0x02eb
+xtensa xtreg icount 0x02ec
+xtensa xtreg icountlevel 0x02ed
+xtensa xtreg excvaddr 0x02ee
+xtensa xtreg ccompare0 0x02f0
+xtensa xtreg ccompare1 0x02f1
+xtensa xtreg misc0 0x02f4
+xtensa xtreg misc1 0x02f5
+xtensa xtreg pwrctl 0x2024
+xtensa xtreg pwrstat 0x2025
+xtensa xtreg eristat 0x2026
+xtensa xtreg cs_itctrl 0x2027
+xtensa xtreg cs_claimset 0x2028
+xtensa xtreg cs_claimclr 0x2029
+xtensa xtreg cs_lockaccess 0x202a
+xtensa xtreg cs_lockstatus 0x202b
+xtensa xtreg cs_authstatus 0x202c
+xtensa xtreg pmg 0x203b
+xtensa xtreg pmpc 0x203c
+xtensa xtreg pm0 0x203d
+xtensa xtreg pm1 0x203e
+xtensa xtreg pmctrl0 0x203f
+xtensa xtreg pmctrl1 0x2040
+xtensa xtreg pmstat0 0x2041
+xtensa xtreg pmstat1 0x2042
+xtensa xtreg ocdid 0x2043
+xtensa xtreg ocd_dcrclr 0x2044
+xtensa xtreg ocd_dcrset 0x2045
+xtensa xtreg ocd_dsr 0x2046
+xtensa xtreg a0 0x0000
+xtensa xtreg a1 0x0001
+xtensa xtreg a2 0x0002
+xtensa xtreg a3 0x0003
+xtensa xtreg a4 0x0004
+xtensa xtreg a5 0x0005
+xtensa xtreg a6 0x0006
+xtensa xtreg a7 0x0007
+xtensa xtreg a8 0x0008
+xtensa xtreg a9 0x0009
+xtensa xtreg a10 0x000a
+xtensa xtreg a11 0x000b
+xtensa xtreg a12 0x000c
+xtensa xtreg a13 0x000d
+xtensa xtreg a14 0x000e
+xtensa xtreg a15 0x000f
+xtensa xtreg b0 0x0010
+xtensa xtreg b1 0x0011
+xtensa xtreg b2 0x0012
+xtensa xtreg b3 0x0013
+xtensa xtreg b4 0x0014
+xtensa xtreg b5 0x0015
+xtensa xtreg b6 0x0016
+xtensa xtreg b7 0x0017
+xtensa xtreg b8 0x0018
+xtensa xtreg b9 0x0019
+xtensa xtreg b10 0x001a
+xtensa xtreg b11 0x001b
+xtensa xtreg b12 0x001c
+xtensa xtreg b13 0x001d
+xtensa xtreg b14 0x001e
+xtensa xtreg b15 0x001f
+xtensa xtreg psintlevel 0x2006
+xtensa xtreg psum 0x2007
+xtensa xtreg pswoe 0x2008
+xtensa xtreg psexcm 0x2009
+xtensa xtreg pscallinc 0x200a
+xtensa xtreg psowb 0x200b
+xtensa xtreg acc 0x200c
+xtensa xtreg dbnum 0x2011
+xtensa xtreg ae_overflow 0x2014
+xtensa xtreg ae_sar 0x2015
+xtensa xtreg ae_cwrap 0x2016
+xtensa xtreg ae_bitptr 0x2017
+xtensa xtreg ae_bitsused 0x2018
+xtensa xtreg ae_tablesize 0x2019
+xtensa xtreg ae_first_ts 0x201a
+xtensa xtreg ae_nextoffset 0x201b
+xtensa xtreg ae_searchdone 0x201c
+xtensa xtreg roundmode 0x201d
+xtensa xtreg invalidflag 0x201e
+xtensa xtreg divzeroflag 0x201f
+xtensa xtreg overflowflag 0x2020
+xtensa xtreg underflowflag 0x2021
+xtensa xtreg inexactflag 0x2022
diff --git a/tcl/target/xtensa.cfg b/tcl/target/xtensa.cfg
index ef594f9..101e135 100644
--- a/tcl/target/xtensa.cfg
+++ b/tcl/target/xtensa.cfg
@@ -34,7 +34,12 @@ if { [info exists XTENSA_DAP] } {
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
set _TARGETNAME $_CHIPNAME.cpu
- target create $_TARGETNAME xtensa -dap $_CHIPNAME.dap
+ if { [info exists XTENSA_DAP_BASE] } {
+ # Specify fixed offset for accessing XDM via APB behind a DAP interface
+ target create $_TARGETNAME xtensa -dap $_CHIPNAME.dap -dbgbase $XTENSA_DAP_BASE
+ } else {
+ target create $_TARGETNAME xtensa -dap $_CHIPNAME.dap
+ }
} else {
# JTAG direct (without DAP)
eval jtag newtap $_CHIPNAME $_CPU0NAME -irlen 5 $_CPUTAPARGLIST