1 # script for ATMEL sam3, a CORTEX-M3 chip
10 if { [info exists CHIPNAME] } {
11 set _CHIPNAME $CHIPNAME
16 if { [info exists ENDIAN] } {
24 if { [info exists CPUTAPID ] } {
25 set _CPUTAPID $CPUTAPID
27 set _CPUTAPID 0x4ba00477
30 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
32 set _TARGETNAME $_CHIPNAME.cpu
33 target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
35 # 16K is plenty, the smallest chip has this much
36 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
38 $_TARGETNAME configure -event gdb-flash-erase-start {