- Mon Sep 05, 2016 8:30 am
#191548
Hello,
I' m trying to use openOCD 0.9.0 on linux (Ubuntu 16.04) to connect to my PI2 with the FTDI RPi HUB Module. That module is very similar to the TFDI FT2232H mini-module (it just provides an additional USB HUB: I do not use it yet).
When starting openOCD, It cannot get connected properly:
I'm very new to openOCD and have no exact idea of what could be wrong.
Is it possible openOCD has a driver conflict with the FTDI D2xx driver - preventing a proper connection ?
On the PI2 board, is there anything special to do more than just enabling the GPIO in JTAG mode ?
Thanks in advance for any hint...
Alexandre
I' m trying to use openOCD 0.9.0 on linux (Ubuntu 16.04) to connect to my PI2 with the FTDI RPi HUB Module. That module is very similar to the TFDI FT2232H mini-module (it just provides an additional USB HUB: I do not use it yet).
When starting openOCD, It cannot get connected properly:
Code: Select all
The first configuration file contains:
alex@ALeX-VirtualBox:~$ openocd -f RPi_HUB_Module.cfg -f raspi2.cfg
Open On-Chip Debugger 0.9.0 (2015-09-02-10:42)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
jtag
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: bcmrpi2.dap: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Warn : Invalid ACK 0x7 in JTAG-DP transaction
.../...
Code: Select all
The second one:
#
# FTDI RPi HUB Module
interface ftdi
ftdi_device_desc "FT2232H RPi HUB Module"
ftdi_channel 0
ftdi_vid_pid 0x0403 0x6010
transport select jtag
Code: Select all
The PI2 board is properly configured in JTAG mode (connected GPIO are in JTAG mode) since when I use FTDI examples program I can get some outputs which seem correct - at least not all ones or all zeroes unlike with openOCD above...telnet_port 4444
#TODO: Verify gdb setup works as intended.
#TODO: With the command "cache_config" we could configure the L2 cache and avoid the problem which occurs if you wait too long to connect via JTAG...
gdb_port 3333
#tcl_port 0 #No Tcl port needed...
#jtag_khz 1000 #Not needed?
adapter_khz 1000
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME bcmrpi2
}
if { [info exists DAP_TAPID] } {
set _DAP_TAPID $DAP_TAPID
} else {
set _DAP_TAPID 0x4ba00477
}
jtag newtap $_CHIPNAME dap -expected-id $_DAP_TAPID -irlen 4 -ircapture 0x01 -irmask 0x0f
set _TARGETNAME0 $_CHIPNAME.cpu0
set _TARGETNAME1 $_CHIPNAME.cpu1
set _TARGETNAME2 $_CHIPNAME.cpu2
set _TARGETNAME3 $_CHIPNAME.cpu3
target create $_TARGETNAME0 cortex_a -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x80010000
target create $_TARGETNAME1 cortex_a -chain-position $_CHIPNAME.dap -coreid 1 -dbgbase 0x80012000
target create $_TARGETNAME2 cortex_a -chain-position $_CHIPNAME.dap -coreid 2 -dbgbase 0x80014000
target create $_TARGETNAME3 cortex_a -chain-position $_CHIPNAME.dap -coreid 3 -dbgbase 0x80016000
target smp $_TARGETNAME0 $_TARGETNAME1 $_TARGETNAME2 $_TARGETNAME3
$_TARGETNAME0 configure -event gdb-attach {
cortex_a dbginit
}
$_TARGETNAME1 configure -event gdb-attach {
cortex_a dbginit
}
$_TARGETNAME2 configure -event gdb-attach {
cortex_a dbginit
}
$_TARGETNAME3 configure -event gdb-attach {
cortex_a dbginit
}
I'm very new to openOCD and have no exact idea of what could be wrong.
Is it possible openOCD has a driver conflict with the FTDI D2xx driver - preventing a proper connection ?
On the PI2 board, is there anything special to do more than just enabling the GPIO in JTAG mode ?
Thanks in advance for any hint...
Alexandre
Last edited by AALLeeXX on Mon Sep 12, 2016 4:04 am, edited 2 times in total.