cfg: add ST-LINK TRANSPORT config override

This enables the user to override the transport used for st-link.
If JTAG is selected it will also change the default id used to the JTAG id
rather than the SW-DP id.

Change-Id: I4fe352e4932e2f4ec278168e99ba2d2d50fd850a
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/443
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
This commit is contained in:
Spencer Oliver 2012-02-10 12:29:31 +00:00 committed by Peter Stuge
parent 4db24acb93
commit d608dcaa62
1 changed files with 13 additions and 1 deletions

View File

@ -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