Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use FT232H for JTAG Debugging? #226

Unanswered
Discussion options

I would prefer not to spend 35ドル for a JTAG debugger. Is it possible to use a FT232H breakout board instead, like this one?
image

This tutorial uses a FT232H to debug a raspberry pi, but even that tutorial uses something different than the picutre above.

You must be logged in to vote

Replies: 2 comments 5 replies

Comment options

Any JTAG unit that OpenOCD deals with should be able to work reasonably. You may have to modify the OpenOCD settings for yours.

You must be logged in to vote
5 replies
Comment options

So should I just be able to copy the config from https://jacobncalvert.com/blog-archive/2020/03/05/better-jtag-on-the-cheap-with-the-ft232h/ to docker/rustembedded-osdev-utils/rpi3.cfg?

Comment options

Should work: give it a try and let us know.

Comment options

I tried it and I get this error:

Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'
DEPRECATED! use 'ftdi tdo_sample_edge' not 'ftdi_tdo_sample_edge'
DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'
DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'
DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'
Warn : Transport "jtag" was already selected
DEPRECATED! use 'adapter speed' not 'adapter_khz'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : JTAG tap: rpi3.tap tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x4)
Error: Invalid ACK (7) in DAP response
Comment options

Actually when I ran it through docker I now get this:

sudo make openocd
Launching OpenOCD
Open On-Chip Debugger 0.11.0+dev-g1ad6ed3 (2021年12月02日-20:10)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'
DEPRECATED! use 'ftdi tdo_sample_edge' not 'ftdi_tdo_sample_edge'
DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'
DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'
DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'
Warn : Transport "jtag" was already selected
DEPRECATED! use 'adapter speed' not 'adapter_khz'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : JTAG tap: rpi3.tap tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x4)
Info : rpi3.core0: hardware has 6 breakpoints, 4 watchpoints
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Info : rpi3.core2: hardware has 6 breakpoints, 4 watchpoints
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Info : rpi3.core3: hardware has 6 breakpoints, 4 watchpoints
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Error: JTAG-DP STICKY ERROR
Info : starting gdb server for rpi3.core0 on 3333
Info : Listening on port 3333 for gdb connections
Info : starting gdb server for rpi3.core1 on 3334
Info : Listening on port 3334 for gdb connections
Info : starting gdb server for rpi3.core2 on 3335
Info : Listening on port 3335 for gdb connections
Info : starting gdb server for rpi3.core3 on 3336
Info : Listening on port 3336 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : rpi3.core0 cluster 0 core 0 multi core
rpi3.core0 halted in AArch64 state due to debug-request, current mode: EL2H
cpsr: 0x600003c9 pc: 0x81ad4
MMU: disabled, D-Cache: disabled, I-Cache: disabled
Info : New GDB Connection: 1, Target rpi3.core0, state: halted
Error: Timeout waiting for aarch64_exec_opcode
Polling target rpi3.core1 failed, trying to reexamine
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Error: Opcode 0x0400d533, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: Opcode 0xd5330400, DSCR.ERR=1, DSCR.EL=2
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: Timeout waiting for aarch64_exec_opcode
Polling target rpi3.core1 failed, trying to reexamine
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: Timeout waiting for aarch64_exec_opcode
Polling target rpi3.core1 failed, trying to reexamine
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: Timeout waiting for aarch64_exec_opcode
Polling target rpi3.core1 failed, trying to reexamine
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: Timeout waiting for aarch64_exec_opcode
Polling target rpi3.core1 failed, trying to reexamine
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: Timeout waiting for aarch64_exec_opcode
Polling target rpi3.core1 failed, trying to reexamine
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Error: DSCR_DTR_RX_FULL, dscr 0x43047213
Error: Timeout waiting for aarch64_exec_opcode
Polling target rpi3.core1 failed, trying to reexamine
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
sudo make gdb
Launching GDB
Reading symbols from target/aarch64-unknown-none-softfloat/release/kernel...
(No debugging symbols found in target/aarch64-unknown-none-softfloat/release/kernel)
>>> target remote :3333
Remote debugging using :3333
0x0000000000081ad4 in core::fmt::Formatter::pad ()
─── Assembly ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 0x0000000000081ad4 ? .inst 0x00000000 ; undefined
 0x0000000000081ad8 ? .inst 0x00000000 ; undefined
 0x0000000000081adc ? .inst 0x00000000 ; undefined
 0x0000000000081ae0 ? .inst 0x00000000 ; undefined
 0x0000000000081ae4 ? .inst 0x00000000 ; undefined
 0x0000000000081ae8 ? .inst 0x00000000 ; undefined
 0x0000000000081aec ? .inst 0x00000000 ; undefined
 0x0000000000081af0 ? .inst 0x00000000 ; undefined
 0x0000000000081af4 ? .inst 0x00000000 ; undefined
 0x0000000000081af8 ? .inst 0x00000000 ; undefined
─── Expressions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── History ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Memory ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Registers ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 x0 0x0000000000000000 x1 0x0000000000082686 x2 0x0000000000000032 x3 0x0000000000080270
 x4 0x0000000000000034 x5 0x44e4f80800000000 x6 0x0000000000000000 x7 0xe50be40a80200f1c
 x8 0x00000000000827d0 x9 0x0000000000082686 x10 0x000000000000003f x11 0x000000003f201000
 x12 0x0000000000000019 x13 0x0000000000000031 x14 0x00000000ffffff9c x15 0x000000000007fe38
 x16 0x0000000005f5e0ff x17 0xfffffffffffffffc x18 0x0000000000000000 x19 0x0000000000000000
 x20 0x00000000000827e8 x21 0x0000000000000000 x22 0x0000000000000000 x23 0x00000000020821f8
 x24 0x00000000000027e8 x25 0xb806d0011da23909 x26 0xca2f444465c375c0 x27 0xb004001d5444dee8
 x28 0xaa9261b8b6a53890 x29 0xdc12283083005d49 x30 0x0000000000081acc sp 0x000000000007ff30
 pc 0x0000000000081ad4 cpsr [ SP=1 EL=0 nRW=0 F I A D C Z ] fpsr 0x00000000 fpcr 0x00000000
 ELR_EL1 0xa61250308801b097 ESR_EL1 0x8801b097 SPSR_EL1 0x8801b097 ELR_EL2 0x2a42020135449138
 ESR_EL2 0x4ca77f71 SPSR_EL2 0xfc27d067 ELR_EL3 0xa61250308801b097 ESR_EL3 0x8801b097
 SPSR_EL3 0x8801b097
─── Source ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─── Stack ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[0] from 0x0000000000081ad4 in core::fmt::Formatter::pad
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Comment options

After following this tutorial I now get this error: Error: abort occurred - dscr = 0x03047253

sudo openocd -f ./ft232h-2.cfg -f ../docker/rustembedded-osdev-utils/rpi3.cfg
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Warn : DEPRECATED! use '-baseaddr' not '-ctibase'
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : JTAG tap: rpi3.tap tap/device found: 0x4ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x4)
Info : rpi3.core0: hardware has 6 breakpoints, 4 watchpoints
Info : rpi3.core1: hardware has 6 breakpoints, 4 watchpoints
Info : rpi3.core2: hardware has 6 breakpoints, 4 watchpoints
Info : rpi3.core3: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for rpi3.core0 on 3333
Info : Listening on port 3333 for gdb connections
Info : starting gdb server for rpi3.core1 on 3334
Info : Listening on port 3334 for gdb connections
Info : starting gdb server for rpi3.core2 on 3335
Info : Listening on port 3335 for gdb connections
Info : starting gdb server for rpi3.core3 on 3336
Info : Listening on port 3336 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : rpi3.core0 cluster 0 core 0 multi core
rpi3.core0 halted in AArch64 state due to debug-request, current mode: EL2H
cpsr: 0x600003c9 pc: 0x2080464
MMU: disabled, D-Cache: disabled, I-Cache: disabled
Info : New GDB Connection: 1, Target rpi3.core0, state: halted
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Error: abort occurred - dscr = 0x03047253
Error: abort occurred - dscr = 0x03047253
Error: Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Error: Failed to read ELR_EL3 register
Error: Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Error: Failed to read ESR_EL3 register
Error: Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Error: Failed to read SPSR_EL3 register
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1004 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : Haven't made progress in mpsse_flush() for 2002ms.
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : Haven't made progress in mpsse_flush() for 4004ms.
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : Haven't made progress in mpsse_flush() for 8004ms.
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : Haven't made progress in mpsse_flush() for 16003ms.
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1001 ms). Workaround: increase "set remotetimeout" in GDB
Warn : Haven't made progress in mpsse_flush() for 32001ms.
Warn : Haven't made progress in mpsse_flush() for 64001ms.

I think this is closer to working but load in GBD doesn't work.

Comment options

I will try to find the hardware and software to replicate this. In the meantime, please let us know if you figure out anything.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /