tcl/target: add SPDX tag
[fw/openocd] / tcl / target / imx7.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 if { [info exists CHIPNAME] } {
4    set  _CHIPNAME $CHIPNAME
5 } else {
6    set  _CHIPNAME imx7
7 }
8
9 # CoreSight Debug Access Port
10 if { [info exists DAP_TAPID] } {
11         set _DAP_TAPID $DAP_TAPID
12 } else {
13         set _DAP_TAPID 0x5ba00477
14 }
15
16 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f \
17         -expected-id $_DAP_TAPID
18
19 #
20 # Cortex-A7 target
21 #
22 # GDB target: Cortex-A7, using DAP, configuring only one core
23 # Base addresses of cores:
24 # core 0  -  0x80070000
25 # core 1  -  0x80072000
26 set _TARGETNAME $_CHIPNAME.cpu_a7
27
28 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
29
30 target create $_TARGETNAME.0 cortex_a -dap $_CHIPNAME.dap \
31         -coreid 0 -dbgbase 0x80070000
32
33 target create $_TARGETNAME.1 cortex_a -dap $_CHIPNAME.dap \
34         -coreid 1 -dbgbase 0x80072000 -defer-examine
35 #
36 # Cortex-M4 target
37 #
38 set _TARGETNAME_2 $_CHIPNAME.cpu_m4
39 target create $_TARGETNAME_2 cortex_m -dap $_CHIPNAME.dap -ap-num 4 \
40         -defer-examine
41
42 #
43 # AHB mem-ap target
44 #
45 target create $_CHIPNAME.ahb mem_ap -dap $_CHIPNAME.dap -ap-num 0
46
47 targets $_TARGETNAME.0