1 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Microchip (formerly Atmel) SAM L1x target
6 # Note: These devices support SWD only.
11 if { [info exists CHIPNAME] } {
12 set _CHIPNAME $CHIPNAME
17 if { [info exists WORKAREASIZE] } {
18 set _WORKAREASIZE $WORKAREASIZE
20 set _WORKAREASIZE 0x800
23 swd newdap $_CHIPNAME cpu -expected-id 0x0bf11477
24 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
26 set _TARGETNAME $_CHIPNAME.cpu
27 target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
29 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
32 cortex_m reset_config sysresetreq