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