Openocd + FT2232H + Zynq Anyone get this working?

Open source ARM Debugger

Moderator: phalanx

Openocd + FT2232H + Zynq Anyone get this working?

Postby wade.patrick » Wed Feb 15, 2017 6:00 pm

Openocd version 0.10.0
FT2232H
Zynq, Xilinx part
GDB arm-none-eabi-gdb 7.11.1

JTag hooked up TDI/ TDO, TCK, TMS, and srst and trst connected to init_b and program_b on Zynq and FTDI

Anyone get this working?

Just for reference, I can connect a Xilinx Platform JTag cable to this Zynq and make it work using XSDB and XSCT, I can do most whatever I want to the Zynq. That isn't the question.

I can openocd into the zynq and dump lots of registers, and even write them under the correct circumstances. I can under some instances even load OCM and DDR memory.
I have a working ftdi config file.
A config file for setting srst up.
A config file from the RTEMS project.
A config file that lets me mask_write and read registers in the part, and presents a xilinx_ps7_init() call, that calls ps7_debug/ps7_init/ps7_post_config.
This all lets me flash LEDs on the board and load code, but I just can't seem to make the code run. ELF files don''t seem to load properly.
I've connected remotely with telnet :3333 and tried everything.

I've loaded up arm-none-eabi-gdb and arm-xilinx-eabi-gdb and tried that route with port 4444.

terminal remote computer: linux
>openocd -d -f my.cfg -c "load_board" -c "init; reset init; halt"
# had best luck with init; reset init; halt so far.

terminal on local computer: linux
>arm-none-eabi-gdb
(gdb) set debug remote 1
(gdb) target remote 192.168.0.1:3333
# tried 4444 also

OPENOCD: DEBUG
Code: Select all
Debug: 11173 41516 cortex_a.c:2215 cortex_a_write_cpu_memory(): Writing CPU memory address 0xf8000004 size 4 count 1
Debug: 11174 41518 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xee160f10
Debug: 11175 41519 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xee000e15
Debug: 11176 41520 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xee150f10
Debug: 11177 41521 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xee000e15
Debug: 11178 41523 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xee100e15
Debug: 11179 41526 cortex_a.c:500 cortex_a_write_dcc(): write DCC 0x800f001f
Debug: 11180 41526 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xee100e15
Debug: 11181 41527 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xe12ff000
Debug: 11182 41528 cortex_a.c:271 cortex_a_exec_opcode(): exec opcode 0xee070f95
Debug: 11183 41529 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_poll on
Debug: 11184 41529 command.c:143 script_debug(): command - poll ocd_poll on
Debug: 11186 47306 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_exit
Debug: 11187 47306 command.c:143 script_debug(): command - exit ocd_exit
Info : 11189 47307 server.c:503 server_loop(): dropped 'telnet' connection
Info : 11190 69353 server.c:96 add_connection(): accepting 'telnet' connection on tcp/4444
Info : 11191 85367 server.c:503 server_loop(): dropped 'telnet' connection
Info : 11192 97414 server.c:96 add_connection(): accepting 'telnet' connection on tcp/4444
Info : 11193 113428 server.c:503 server_loop(): dropped 'telnet' connection
Info : 11194 117125 server.c:96 add_connection(): accepting 'gdb' connection on tcp/3333
Debug: 11195 117125 breakpoints.c:357 breakpoint_clear_target_internal(): Delete all breakpoints for target: zynq.pl
Debug: 11196 117125 breakpoints.c:497 watchpoint_clear_target(): Delete all watchpoints for target: zynq.pl
Debug: 11197 117125 target.c:1517 target_call_event_callbacks(): target event 23 (gdb-attach)
Debug: 11198 117125 gdb_server.c:996 gdb_new_connection(): New GDB Connection: 1, Target zynq.pl, state: halted
Debug: 11199 117125 gdb_server.c:2812 gdb_input_inner(): received packet: 'qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+'
Segmentation fault (core dumped)



GDB: DEBUG
Code: Select all
(gdb) target remote 192.168.0.107:3333
Remote debugging using 192.168.0.107:3333
Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Ack
Remote connection closed
(gdb)


I also tried telnet into openocd port 4444, and couldn't get this to work either. Anyone have examples of how to debug code with Openocd on a Zynq part, that works?
wade.patrick
 
Posts: 1
Joined: Wed Feb 15, 2017 5:14 pm


Return to OpenOCD

Who is online

Users browsing this forum: No registered users and 1 guest