SpinalHDL / openocd_riscv

Spen's Official OpenOCD Mirror
Other
47 stars 34 forks source link

Lockup on ubuntu 20.04 #12

Closed mubes closed 4 years ago

mubes commented 4 years ago

Hi there,

...bit of an odd one. When running on Ubuntu 20.04 with a 115k UART connection to the target, on startup I get the following (using strace to see what is happening internally);

write(2, "Info : TAP auto17.tap does not h"..., 43Info : TAP auto17.tap does not have IDCODE
) = 43
write(2, "Info : TAP auto18.tap does not h"..., 43Info : TAP auto18.tap does not have IDCODE
) = 43
write(2, "Info : TAP auto19.tap does not h"..., 43Info : TAP auto19.tap does not have IDCODE
) = 43
write(2, "Warn : Unexpected idcode after e"..., 59Warn : Unexpected idcode after end of chain: 21 0xfffff800
) = 59
write(2, "Error: double-check your JTAG se"..., 60Error: double-check your JTAG setup (interface, speed, ...)
) = 60
write(2, "Error: Trying to use configured "..., 53Error: Trying to use configured scan chain anyway...
) = 53
brk(0x559d54151000)                     = 0x559d54151000
write(2, "Error: lx.cpu: IR capture error;"..., 51Error: lx.cpu: IR capture error; saw 0x0f not 0x01
) = 51
write(2, "Warn : Bypassing JTAG setup even"..., 49Warn : Bypassing JTAG setup events due to errors
) = 49
write(4, "No\20D\0\0\0\0\0\17\1\0\360\17\0\0\0\2\0\0", 20) = 20
write(4, "No\20D\0\0\0\0\0\17\1\0\360\17\0\0\0\3\0\0", 20) = 20
write(4, "No\20D\0\0\0\0\0\17\1\0\360\17\0\0\1\0\0\0", 20) = 20
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=200000000}, NULL) = 0
write(4, "No\20D\0\0\0\0\0\17\0\1\0\0\0\0\360\17\0\0", 20) = 20
read(4, 

...it literally just stops at that read(4, point. CTRL-C doesn't work, I need to CTRL-Z then kill -9 to get out of it.

Will investigate further, but suggestions gratefully received.

mubes commented 4 years ago

OK, the problem occurs if your wiring is dodgy, so you're not actually connecting to the target :-/ What is confusing is that the jtag scan is all working fine, which an innocent bystander might assume means it's got communication with the target...it doesn't.