tcl/target: add SPDX tag
[fw/openocd] / tcl / target / lpc1850.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 source [find target/swj-dp.tcl]
4
5 adapter speed 500
6
7 if { [info exists CHIPNAME] } {
8         set _CHIPNAME $CHIPNAME
9 } else {
10         set _CHIPNAME lpc1850
11 }
12
13 if { [info exists ENDIAN] } {
14    set _ENDIAN $ENDIAN
15 } else {
16    set _ENDIAN little
17 }
18 #
19 # M3 JTAG mode TAP
20 #
21 if { [info exists M3_JTAG_TAPID] } {
22    set _M3_JTAG_TAPID $M3_JTAG_TAPID
23 } else {
24    set _M3_JTAG_TAPID 0x4ba00477
25 }
26
27 swj_newdap $_CHIPNAME m3 -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_M3_JTAG_TAPID
28 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.m3
29
30 set _TARGETNAME $_CHIPNAME.m3
31 target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
32
33 if {![using_hla]} {
34    # if srst is not fitted use SYSRESETREQ to
35    # perform a soft reset
36    cortex_m reset_config sysresetreq
37 }