diff --git a/tcl/target/at91samdXX.cfg b/tcl/target/at91samdXX.cfg index 5132109ba..893854309 100644 --- a/tcl/target/at91samdXX.cfg +++ b/tcl/target/at91samdXX.cfg @@ -7,7 +7,7 @@ # # samdXX devices only support SWD transports. # -source [find target/swj-dp.tcl] +transport select swd if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME @@ -15,12 +15,6 @@ if { [info exists CHIPNAME] } { set _CHIPNAME at91samd } -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} - # Work-area is a space in RAM used for flash programming # By default use 2kB if { [info exists WORKAREASIZE] } { @@ -35,11 +29,11 @@ if { [info exists CPUTAPID] } { set _CPUTAPID 0x4ba00477 } -swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID +swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap +target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 diff --git a/tcl/target/atsame5x.cfg b/tcl/target/atsame5x.cfg index 5093d41b0..0f759a242 100644 --- a/tcl/target/atsame5x.cfg +++ b/tcl/target/atsame5x.cfg @@ -8,7 +8,7 @@ # # Devices only support SWD transports. # -source [find target/swj-dp.tcl] +transport select swd if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME @@ -16,12 +16,6 @@ if { [info exists CHIPNAME] } { set _CHIPNAME atsame5 } -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} - # Work-area is a space in RAM used for flash programming # By default use 32kB (the smallest RAM size is 128kB) if { [info exists WORKAREASIZE] } { @@ -36,11 +30,11 @@ if { [info exists CPUTAPID] } { set _CPUTAPID 0x4ba00477 } -swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID +swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap +target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0