1source [find interface/cmsis-dap.cfg] 2transport select swd 3source [find target/swj-dp.tcl] 4 5adapter speed 5000 6 7set _CHIPNAME cortex_m3 8set _ENDIAN little 9set _WORKAREASIZE 0x4000 10set _CPUTAPID 0x412FC231 11 12swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID 13dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu 14 15set _TARGETNAME $_CHIPNAME.cpu 16target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap 17$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 18 19if {![using_hla]} { 20 cortex_m reset_config sysresetreq 21} 22