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