forked from auracaster/openocd
tcl/target/at91samd, atsame5x: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.
No board files referring these targets select swd transport.
While on it remove useless endianness option handling.
Change-Id: I3b47750cc69fc9009fdd4cfdccfc213792d1b7ee
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9433
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
committed by
Antonio Borneo
parent
9b21a31eb7
commit
2374db956b
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user