X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=tcl%2Ftarget%2Fat91sam3uXX.cfg;h=985e052ae74aa3259b6c5a35ba8627386c30a132;hp=37f6b8ef25903e0d06136714cb80fbb2f56f33ce;hb=3e6f9e8d1e65c4da505ff78481d54a115520d3d1;hpb=2eff86ab23a2388f9bf375aeed94a84d267478e7 diff --git a/tcl/target/at91sam3uXX.cfg b/tcl/target/at91sam3uXX.cfg index 37f6b8ef25..985e052ae7 100644 --- a/tcl/target/at91sam3uXX.cfg +++ b/tcl/target/at91sam3uXX.cfg @@ -7,15 +7,15 @@ # at91sam3u2c # at91sam3u1c -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { set _CHIPNAME sam3 } -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { +if { [info exists ENDIAN] } { + set _ENDIAN $ENDIAN +} else { set _ENDIAN little } @@ -29,19 +29,14 @@ if { [info exists CPUTAPID ] } { jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID -set _TARGETNAME [format "%s.cpu" $_CHIPNAME] +set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME # 16K is plenty, the smallest chip has this much -$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0 +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0 reset_config srst_only -# GDB can use this -gdb_memory_map enable -# And GDB can flash the chip -gdb_flash_program enable - $_TARGETNAME configure -event gdb-flash-erase-start { halt }