1 # SPDX-License-Identifier: GPL-2.0-or-later
4 # OpenOCD Target Configuration for eMAG ARMv8 Processor
6 # Copyright (c) 2019-2021, Ampere Computing LLC
10 # Configure defaults for target
11 # Can be overriden in board configuration file
14 if { [info exists CHIPNAME] } {
15 set _CHIPNAME $CHIPNAME
20 if { [info exists NUMCORES] } {
21 set _NUMCORES $NUMCORES
26 if { [info exists ENDIAN] } {
32 if { [info exists CPUTAPID ] } {
33 set _CPUTAPID $CPUTAPID
35 set _CPUTAPID 0x4BA00477
42 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x3 -expected-id $_CPUTAPID
43 set _TAPNAME $_CHIPNAME.cpu
45 set _DAPNAME ${_TAPNAME}_dap
47 dap create $_DAPNAME -chain-position $_TAPNAME
48 $_DAPNAME apsel $_APNUM
50 # Create the DAP AP0 MEM-AP AHB-AP target
51 target create AHB mem_ap -endian $_ENDIAN -dap $_DAPNAME -ap-num 0
53 # Create the DAP AP1 MEM-AP APB-AP target
54 target create APB mem_ap -endian $_ENDIAN -dap $_DAPNAME -ap-num 1
57 # Configure target CPUs
60 # Build string used to enable smp mode
61 set _SMP_STR "target smp"
63 for {set _i 0} {$_i < $_NUMCORES} {incr _i} {
64 # Format a string to reference which CPU target to use
65 set _TARGETNAME [format "${_TAPNAME}_%02d" $_i]
67 # Create and configure Cross Trigger Interface (CTI) - required for halt and resume
68 set _CTINAME $_TARGETNAME.cti
69 cti create $_CTINAME -dap $_DAPNAME -ap-num $_APNUM -baseaddr [expr {0xFC020000 + ($_i << 20)}]
72 target create $_TARGETNAME aarch64 -endian $_ENDIAN -dap $_DAPNAME -ap-num $_APNUM -cti $_CTINAME -coreid $_i
73 set _SMP_STR "$_SMP_STR $_TARGETNAME"
75 # Clear CTI output/input enables that are not configured by OpenOCD for aarch64
76 $_TARGETNAME configure -event examine-start [subst {
77 $_CTINAME write INEN0 0x00000000
78 $_CTINAME write INEN1 0x00000000
79 $_CTINAME write INEN2 0x00000000
80 $_CTINAME write INEN3 0x00000000
81 $_CTINAME write INEN4 0x00000000
82 $_CTINAME write INEN5 0x00000000
83 $_CTINAME write INEN6 0x00000000
84 $_CTINAME write INEN7 0x00000000
85 $_CTINAME write INEN8 0x00000000
87 $_CTINAME write OUTEN2 0x00000000
88 $_CTINAME write OUTEN3 0x00000000
89 $_CTINAME write OUTEN4 0x00000000
90 $_CTINAME write OUTEN5 0x00000000
91 $_CTINAME write OUTEN6 0x00000000
92 $_CTINAME write OUTEN7 0x00000000
93 $_CTINAME write OUTEN8 0x00000000
96 # Enable OpenOCD HWTHREAD RTOS feature for GDB thread (CPU) selection support
97 # This feature presents CPU cores ("hardware threads") in an SMP system as threads to GDB
98 $_TARGETNAME configure -rtos hwthread
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)