HI,
I am trying to debug/flash the CW308_FE310 board using OpenOCD and GDB.
I am using an adafruit FT232H multi-protocol USB GPIO chip as the JTAG interface.
To start the openOCD session I created this *.cfg file (based on the *.cfg of adamws):
# config file for generic FT232H based USB-serial adaptor
# TCK: D0
# TDI: D1
# TDO: D2
# TMS: D3
# TRST: D4
# SRST: D5
adapter driver ftdi
ftdi vid_pid 0x0403 0x6014
ftdi layout_init 0x0078 0x017b
adapter speed 1000
ftdi layout_signal nTRST -ndata 0x0010 -noe 0x0040
ftdi layout_signal nSRST -ndata 0x0020 -noe 0x0040
# change this to 'transport select swd' if required
#transport select jtag
#Reset Stretcher logic on FE310 is ~1 second long
#This doesn't apply if you use
# ftdi_set_signal, but still good to document
#adapter_nsrst_delay 1500
set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000913
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
flash bank onboard_spi_flash fespi 0x20000000 0 0 0 $_TARGETNAME
init
#reset -- This type of reset is not implemented yet
if {[ info exists pulse_srst]} {
ftdi_set_signal nSRST 0
ftdi_set_signal nSRST z
#Wait for the reset stretcher
#It will work without this, but
#will incur lots of delays for later commands.
sleep 1500
}
halt
#flash protect 0 64 last off
I also set the VREF to so that I measure 1.82V at SHUNTL.
The supply voltages for 1.8V and 3.3.V are also activated (LEDs are lit).
However, when I open OpenOCD with the CW308_FE310 baord, I always get the following warning: target riscv.cpu examination failed.
Followed by this error: [riscv.cpu] DMI operationdidn't complete in 2 seconds. The target is either very slow or broken....
When I try the setup with a ST32MF303 UFO board and the corresponding *.cfg file, OpenOCD runs fine and GDB is started.
Does anyone have any idea what I missed in my setup or what could be the problem?
With kind regards,
Marc