In the C code we have the functions
bool transport_is_jtag()
bool transport_is_swd()
bool transport_is_hla()
that return true only for the specific transport.
In TCL "src/target/startup.tcl" we have something equivalent but not
exactly the same:
using_jtag
using_swd
using_hla
The way these TCL procedures are implemented is by substring match on
the transport name (not by exact string match).
So "using_hla" returns true for every transport name containing "hla",
thus for both transport "hla_jtag" and "hla_swd", that matches the
behaviour of "transport_is_hla()".
But "using_jtag" returns true for every transport name containing
"jtag", thus both transport "jtag" and "hla_jtag", which is different
from "transport_is_jtag()"; plus it creates problems in several config
files when used with transport "hla_jtag".
e.g. "tcl/target/stm32f4x.cfg" defines a second TAP for on-chip boundary scan
if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5
}
but HLA only accepts a single TAP and does not enable the subcommand
"jtag newtap", thus triggering a fatal error in the script.
Question:
is it an error or is it the desired behaviour that "using_jtag"
returns true for both "jtag" and "hla_jtag"?
Regards
Antonio
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel