tcl/target: add SPDX tag
[fw/openocd] / tcl / target / atsaml1x.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 #
4 # Microchip (formerly Atmel) SAM L1x target
5 #
6 # Note: These devices support SWD only.
7 #
8
9 transport select swd
10
11 if { [info exists CHIPNAME] } {
12     set _CHIPNAME $CHIPNAME
13 } else {
14     set _CHIPNAME saml1x
15 }
16
17 if { [info exists WORKAREASIZE] } {
18    set _WORKAREASIZE $WORKAREASIZE
19 } else {
20    set _WORKAREASIZE 0x800
21 }
22
23 swd newdap $_CHIPNAME cpu -expected-id 0x0bf11477
24 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
25
26 set _TARGETNAME $_CHIPNAME.cpu
27 target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
28
29 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
30
31 if {![using_hla]} {
32     cortex_m reset_config sysresetreq
33 }