target/xtensa: add dual-core support
[openocd.git] / tcl / target / xtensa.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2 # Target Support for Xtensa Processors
3 #
4
5 set xtensa_ids { 0x120034e5 0x120134e5
6 0x209034e5 0x209134e5 0x209234e5 0x209334e5 0x209434e5 0x209534e5 0x209634e5 0x209734e5
7 0x20a034e5 0x20a134e5 0x20a234e5 0x20a334e5 0x20a434e5 0x20a534e5 0x20a634e5 0x20a734e5 0x20a834e5
8 0x20b034e5 0x20b33ac5 0x20b33ac7 }
9 set expected_xtensa_ids {}
10 foreach i $xtensa_ids {
11 lappend expected_xtensa_ids -expected-id $i
12 }
13
14 if { [info exists CHIPNAME] } {
15 set _CHIPNAME $CHIPNAME
16 } else {
17 set _CHIPNAME xtensa
18 }
19
20 if { [info exists CPUTAPID] } {
21 set _CPUTAPARGLIST "-expected-id $CPUTAPID"
22 } else {
23 set _CPUTAPARGLIST [join $expected_xtensa_ids]
24 }
25
26 if { [info exists XTENSA_NUM_CORES] } {
27 set _XTENSA_NUM_CORES $XTENSA_NUM_CORES
28 } else {
29 set _XTENSA_NUM_CORES 1
30 }
31
32 set _TARGETNAME $_CHIPNAME
33 set _CPU0NAME cpu
34 set _TAPNAME $_CHIPNAME.$_CPU0NAME
35
36 if { [info exists XTENSA_DAP] } {
37 source [find target/swj-dp.tcl]
38 # SWD mode ignores the -irlen parameter
39 eval swj_newdap $_CHIPNAME cpu -irlen 4 $_CPUTAPARGLIST
40 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
41
42 set _TARGETNAME $_CHIPNAME.cpu
43 if { [info exists XTENSA_DAP_BASE] } {
44 # Specify fixed offset for accessing XDM via APB behind a DAP interface
45 target create $_TARGETNAME xtensa -dap $_CHIPNAME.dap -dbgbase $XTENSA_DAP_BASE
46 } else {
47 target create $_TARGETNAME xtensa -dap $_CHIPNAME.dap
48 }
49 } elseif { $_XTENSA_NUM_CORES > 1 } {
50 # JTAG direct (without DAP)
51 for {set i 0} {$i < $_XTENSA_NUM_CORES} {incr i} {
52 set _LCPUNAME $_CPU0NAME$i
53 set _LTAPNAME $_CHIPNAME.$_LCPUNAME
54 eval jtag newtap $_CHIPNAME $_LCPUNAME -irlen 5 $_CPUTAPARGLIST
55 target create $_LTAPNAME xtensa -chain-position $_LTAPNAME -coreid $i
56
57 $_LTAPNAME configure -event reset-assert-post { soft_reset_halt }
58 }
59 } else {
60 # JTAG direct (without DAP) - for legacy xtensa-config-XXX.cfg format
61 eval jtag newtap $_CHIPNAME $_CPU0NAME -irlen 5 $_CPUTAPARGLIST
62 target create $_TARGETNAME xtensa -chain-position $_TAPNAME
63 }
64
65 if { $_XTENSA_NUM_CORES == 1 } {
66 # DAP and single-core legacy JTAG
67 $_TARGETNAME configure -event reset-assert-post { soft_reset_halt }
68 }
69
70 gdb_report_register_access_error enable

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)