2

I am getting this output when I am issuing this command:

$ sudo openocd -f board/MyBuspirate.cfg -f board/linksys-wrt54gl.cfg

Open On-Chip Debugger 0.10.0+dev-00092-g77189db (2017-02-25-13:44)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: bcm5352e.cpu tap/device found: 0xe09a91ff (mfg: 0x0ff (<invalid>), part: 0x09a9, ver: 0xe)
Warn : JTAG tap: bcm5352e.cpu       UNEXPECTED: 0xe09a91ff (mfg: 0x0ff (<invalid>), part: 0x09a9, ver: 0xe)
Error: JTAG tap: bcm5352e.cpu  expected 1 of 1: 0x0535217f (mfg: 0x0bf (Broadcom), part: 0x5352, ver: 0x0)
Warn : Unexpected idcode after end of chain: 544 0x7fffffff
Warn : Unexpected idcode after end of chain: 576 0xfff82648
Error: double-check your JTAG setup (interface, speed, ...)
Error: Trying to use configured scan chain anyway...
Error: bcm5352e.cpu: IR capture error; saw 0xfe not 0x1
Warn : Bypassing JTAG setup events due to errors
^CInfo : Shutting down buspirate.
Info : Buspirate switched to normal mode

where, board/MyBuspirate.cfg:

buspirate_port /dev/ttyUSB0
buspirate_vreg 0
buspirate_mode normal
buspirate_pullup 1
buspirate_speed normal
reset_config srst_only

and the board/linksys-wrt54gl.cfg:

# Linksys WRT54GL v1.1
#
source [find target/bcm5352e.cfg]
set partition_list {
    CFE         { Bootloader                    0x1c000000 0x00040000 }
    firmware    { "Kernel+rootfs"               0x1c040000 0x003b0000 }
    nvram       { "Config space"                0x1c3f0000 0x00010000 }
}

# External 4MB NOR Flash (Intel TE28F320C3BD90 or similar)
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME cfi 0x1c000000 0x00400000 2 2 $_TARGETNAME

and the source, target/bcm5352e.cfg , it refers to:

set _CHIPNAME bcm5352e
set _CPUID 0x0535217f

jtag newtap $_CHIPNAME cpu -irlen 8 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUID

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME mips_m4k -endian little -chain-position $_TARGETNAME

gdb_memory_map disable
$_TARGETNAME configure -event gdb-attach {
   reset
   halt
}

I want to be able to Debug the JTAG tap: bcm5352e.cpu that i have defined using gdb. I am able to connect to the gdb server that openocd listens on, but looking at the registers, and instruction pointers etc. is saying garbage.

I am not sure, if the Bus Pirate is working as expected and it is in JTAG mode?? I assume yes, because in the output it says: Info : only one transport option; autoselect 'jtag'.

Do you have any ideas about why i am getting the errors, the unexpected ID codes? And greatly appreciated for generally other points, tips and tricks?

  • Did you ever solve this? I'm running into an issue with getting it to halt. – Polynomial Sep 7 '18 at 12:42
  • Yes i got it to work but I dont remember what was the actual cause. It was probably because of wrong wiring. If you haven't experience with hardware and electronics, I really recommend you go and ask a analog/digital expert that can trace the wirings and the setup using digital oscillator etc – ot0 Sep 9 '18 at 21:00
  • 1
    Wiring was fine in the end. For anyone who finds this in future when running into problems using a HydraBus with openocd, particularly with it getting stuck during startup and not replying when you connect on port 4444, compile openocd from source and patch src/jtag/drivers/buspirate.c to not call read_and_discard_all_data in the buspirate_init function. I'm not sure if this is specific to WSL or the HydraBus but it allowed me to connect to the JTAG tap. I ran into problems halting the BCM5352E, which sadly I never fixed. I hope you fair better than I did. – Polynomial Sep 12 '18 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.