1 # script for ATMEL sam3, a CORTEX-M3 chip
20 if { [info exists CHIPNAME] } {
21 set _CHIPNAME $CHIPNAME
26 if { [info exists ENDIAN] } {
33 if { [info exists CPUTAPID] } {
34 set _CPUTAPID $CPUTAPID
36 set _CPUTAPID 0x4ba00477
39 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
41 set _TARGETNAME $_CHIPNAME.cpu
42 target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
44 # 16K is plenty, the smallest chip has this much
45 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
47 $_TARGETNAME configure -event gdb-flash-erase-start {