I am trying to run maix bit with openocd-kendryte and interface olimex arm-usb-ocd-h. The connection is not always stable and I have problems to issue a proper reset to stop the execution in a particular place.
Also don’t know how to choose particular core to be able to breake one or the other one.
Is it possible to prepare some kind of documentation howto use openocd-kendryte with jtag adapters?
What kind of affordable jtag interfaces are supported?


Try this?

adapter_khz     10000

gdb_port 3333
telnet_port 4444

#source [find interface/ftdi/olimex-arm-usb-tiny-h.cfg]

interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ftdi_vid_pid 0x15ba 0x002a

ftdi_layout_init 0x0808 0x0a1b
ftdi_layout_signal nSRST -oe 0x0200
ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
ftdi_layout_signal LED -data 0x0800

set _CHIPNAME riscv

jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x04e4796b

target create $_TARGETNAME riscv -chain-position $_TARGETNAME

if {[ info exists pulse_srst]} {
  ftdi_set_signal nSRST 0
  ftdi_set_signal nSRST z


Thank you. I’ve tried it, had to do some corrections, but it works - not perfectly stable either, but I think already better.
The nRST signal in maix bit is 1.8v when not active, so as far as I’ve noticed only nSRST output from arm-usb-ocd-h can be used because to reset the board, because only this reset output in arm-usb-ocd-h is of open-drain type - the nTRST from the other side is push-pull 3V3.
So I config openocd as well with line: reset_config srst_only

Next problem I don’t know how to perform reset-halt to be able to insert hardware breakpoint before main. I don’t know how to break in the beginning of main funcition? reset halt doesn’t provide me a solution.

And last but not least: how to choose a core for the debuggin session?