diff options
Diffstat (limited to 'tcl')
-rw-r--r-- | tcl/target/stm32_stlink.cfg | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tcl/target/stm32_stlink.cfg b/tcl/target/stm32_stlink.cfg index 9a67b99..4b8abeb 100644 --- a/tcl/target/stm32_stlink.cfg +++ b/tcl/target/stm32_stlink.cfg @@ -23,10 +23,22 @@ if { [info exists CPUTAPID] } { set _CPUTAPID 0x1ba01477 } +if { [info exists TRANSPORT] } { + set _TRANSPORT $TRANSPORT + if { $TRANSPORT == "stlink_jtag" } { + if { [info exists CPUTAPID] == 0 } { + # jtag requires us to use the jtag tap id + set _CPUTAPID 0x3ba00477 + } + } +} else { + set _TRANSPORT stlink_swd +} + # # possibles value are stlink_swd or stlink_jtag # -transport select stlink_swd +transport select $_TRANSPORT stlink newtap $_CHIPNAME cpu -expected-id $_CPUTAPID |