tcl/target: add SPDX tag
[fw/openocd] / tcl / target / at91sam3nXX.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 #
4 # Configuration for Atmel's SAM3N series
5 #
6
7 source [find target/swj-dp.tcl]
8
9 if { [info exists CHIPNAME] } {
10         set _CHIPNAME $CHIPNAME
11 } else {
12         set _CHIPNAME at91sam3n
13 }
14
15 if { [info exists CPUTAPID] } {
16         set _CPUTAPID $CPUTAPID
17 } else {
18         set _CPUTAPID 0x4ba00477
19 }
20
21 swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
22 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
23
24 set _TARGETNAME $_CHIPNAME.cpu
25 target create $_TARGETNAME cortex_m -endian little -dap $_CHIPNAME.dap
26
27 set _FLASHNAME $_CHIPNAME.flash
28 flash bank flash0 at91sam3 0x00400000 0 0 0 $_TARGETNAME
29
30 if {![using_hla]} {
31    # if srst is not fitted use SYSRESETREQ to
32    # perform a soft reset
33    cortex_m reset_config sysresetreq
34 }