This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OpenOCD and BeagleBone Black in CCS

Genius 5820 points

 Hi,

 I try to debug on my BBB using OpenOCD (connector is already mounted on lower side of the board and OpenOCD-USB probe connected). Unfortunately I run into two problems. After starting OpenOCD with

arm-none-linux-gnueabi-gdb

I get some messages

Open On-Chip Debugger 0.7.0 (2013-05-22-13:14)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 16000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
Warn : unable to open ftdi device (trying more): device not found
Info : clock speed 6000 kHz
Info : JTAG tap: am335x.jrc tap/device found: 0x1b94402f (mfg: 0x017, part: 0xb944, ver: 0x1)
Info : JTAG tap: am335x.dap enabled
Info : am335x.cpu: hardware has 6 breakpoints, 2 watchpoints
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x800011c0
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x800011c0

Looks like it connects to BBB but has some problems?

Next when I try to configure OpenOCD in CCS I chosse "OpenOCD (via pipe)" in debug setting / Debugger. Amazingly the predefined "GDB Command" there is simply "gdb". Shouldn't that be an ARM-GDB? Or a TI-specific GDB since my code is compiled with the TI-compiler?

When I ignore these problem and try to load a program to BBB I get an error message in CCS and OpenOCD shows following output:

Error: ftdi_write_data: usb bulk write failed
Error: couldn't write MPSSE commands to FT2232
Polling target am335x.cpu failed, GDB will be halted. Polling again in 100ms
Error: ftdi_write_data: usb bulk write failed
Error: couldn't write MPSSE commands to FT2232
Polling target am335x.cpu failed, GDB will be halted. Polling again in 300ms
Error: ftdi_write_data: usb bulk write failed
Error: couldn't write MPSSE commands to FT2232
Polling target am335x.cpu failed, GDB will be halted. Polling again in 700ms
Error: ftdi_write_data: usb bulk write failed
Error: couldn't write MPSSE commands to FT2232
Polling target am335x.cpu failed, GDB will be halted. Polling again in 1500ms
Error: ftdi_write_data: usb bulk write failed
Error: couldn't write MPSSE commands to FT2232
Polling target am335x.cpu failed, GDB will be halted. Polling again in 3100ms
Error: ftdi_write_data: usb bulk write failed
Error: couldn't write MPSSE commands to FT2232
Polling target am335x.cpu failed, GDB will be halted. Polling again in 6300ms
Error: ftdi_write_data: usb bulk write failed
Error: couldn't write MPSSE commands to FT2232
Polling target am335x.cpu failed, GDB will be halted. Polling again in 6300ms

Any help is appreciated :-)

 

  • Hi,

    We do not support OpenOCD in CCS (nor are very familiar with it), therefore you will have better chances if you contact the experts either on the device forum or any OpenOCD discussion forum throughout the internet.

    That said, I have just one remark: TI compilers do not generate Linux-compatible code but instead "baremetal", therefore the arm-none-linux-gnueabi-gdb will not understand what the code does in the target, as it expects a Linux environment.

    Obviously this remark stems from my lack of knowledge of OpenOCD, which may possibly have a Linux distro built into the emulation dongle and therefore accept standard Linux GDB commands from the host and translate them to be used in a device running "baremetal" code.

    Regards,

    Rafael

  • Hi Hans,

    could you solve the problem? I have the same issue with OpenOCD 0.8.0. See my thread on the OpenOCD mailing list.

  • Unfortunately not. Meanwhile I bought the TI-USB-probe which comes for about US$ 80 and works fine.