board: arc: Enable selection of FTDI instance by its serial number
To be used in setups with multiple boards attached to the same one host we need to have an ability to specify precisely which JTAG probe to use for a particular board. This is done by passing "ftdi_serial XXX" command to OpenOCD. And the serial ("XXX") is supposed to be passed from higher level, typically via west's options. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
This commit is contained in:
parent
5a4237ed3b
commit
946ed0e369
4 changed files with 30 additions and 3 deletions
|
@ -2,6 +2,12 @@
|
|||
# EM Starter Kit has built-in FT2232 chip, which is similar to Digilent HS-1.
|
||||
source [find interface/ftdi/digilent-hs1.cfg]
|
||||
|
||||
# Only specify FTDI serial number if it is specified via
|
||||
# "set _ZEPHYR_BOARD_SERIAL 12345" before reading this script
|
||||
if { [info exists _ZEPHYR_BOARD_SERIAL] } {
|
||||
ftdi_serial $_ZEPHYR_BOARD_SERIAL
|
||||
}
|
||||
|
||||
# EM11D reportedly requires 5 MHz. Other cores and board can work faster.
|
||||
adapter_khz 5000
|
||||
|
||||
|
|
|
@ -9,6 +9,13 @@
|
|||
# Configure JTAG cable
|
||||
# EM SDP has built-in FT2232 chip, which is similiar to Digilent HS-1.
|
||||
interface ftdi
|
||||
|
||||
# Only specify FTDI serial number if it is specified via
|
||||
# "set _ZEPHYR_BOARD_SERIAL 12345" before reading this script
|
||||
if { [info exists _ZEPHYR_BOARD_SERIAL] } {
|
||||
ftdi_serial $_ZEPHYR_BOARD_SERIAL
|
||||
}
|
||||
|
||||
ftdi_vid_pid 0x0403 0x6010
|
||||
ftdi_layout_init 0x0088 0x008b
|
||||
ftdi_channel 0
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
# SDP has built-in FT2232 chip, which is similar to Digilent HS-1, except that
|
||||
# it uses channgel B for JTAG, instead of channel A.
|
||||
interface ftdi
|
||||
|
||||
# Only specify FTDI serial number if it is specified via
|
||||
# "set _ZEPHYR_BOARD_SERIAL 12345" before reading this script
|
||||
if { [info exists _ZEPHYR_BOARD_SERIAL] } {
|
||||
ftdi_serial $_ZEPHYR_BOARD_SERIAL
|
||||
}
|
||||
|
||||
ftdi_vid_pid 0x0403 0x6010
|
||||
ftdi_layout_init 0x0088 0x008b
|
||||
ftdi_channel 1
|
||||
|
|
|
@ -9,6 +9,13 @@
|
|||
# Configure JTAG cable
|
||||
# IoT DK has built-in FT2232 chip, which is similar to Digilent HS-1.
|
||||
interface ftdi
|
||||
|
||||
# Only specify FTDI serial number if it is specified via
|
||||
# "set _ZEPHYR_BOARD_SERIAL 12345" before reading this script
|
||||
if { [info exists _ZEPHYR_BOARD_SERIAL] } {
|
||||
ftdi_serial $_ZEPHYR_BOARD_SERIAL
|
||||
}
|
||||
|
||||
ftdi_vid_pid 0x0403 0x6010
|
||||
ftdi_layout_init 0x0088 0x008b
|
||||
ftdi_channel 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue