Skip to main content
Topic: openocd, buspirate and RZUSB (AT90USB1287) (Read 2566 times) previous topic - next topic

openocd, buspirate and RZUSB (AT90USB1287)

I use buspirate to update the firmware of RZUSB stick (AT90USB1287), but it goes wrong.  (Use buspirate v3.6 and update its firmware to v6.1, linux in parallels)  The first time, I got:
Code: [Select]
parallels@parallels-vm:~/Downloads$ sudo openocd -f openocd_bp.cfg
[sudo] password for parallels:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read

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
adapter_nsrst_delay: 100
Info : Buspirate switched to FAST mode
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: avr.cpu tap/device found: 0x4978203f (mfg: 0x01f (Atmel), part: 0x9782, ver: 0x4)
Error: avr.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : TAP avr.cpu does not have IDCODE
Info : TAP auto0.tap does not have IDCODE
Info : TAP auto1.tap does not have IDCODE
Info : TAP auto2.tap does not have IDCODE
Info : TAP auto3.tap does not have IDCODE
Info : TAP auto4.tap does not have IDCODE
Info : TAP auto5.tap does not have IDCODE
Info : TAP auto6.tap does not have IDCODE
Info : TAP auto7.tap does not have IDCODE
Info : TAP auto8.tap does not have IDCODE
Info : TAP auto9.tap does not have IDCODE
Info : TAP auto10.tap does not have IDCODE
Info : TAP auto11.tap does not have IDCODE
Info : TAP auto12.tap does not have IDCODE
Info : TAP auto13.tap does not have IDCODE
Info : TAP auto14.tap does not have IDCODE
Info : TAP auto15.tap does not have IDCODE
Info : TAP auto16.tap does not have IDCODE
Info : TAP auto17.tap does not have IDCODE
Info : TAP auto18.tap does not have IDCODE
Info : TAP auto19.tap does not have IDCODE
Warn : Unexpected idcode after end of chain: 21 0x00000000
Warn : Unexpected idcode after end of chain: 53 0x00000000
Warn : Unexpected idcode after end of chain: 85 0x00000000
Warn : Unexpected idcode after end of chain: 117 0x00000000
Warn : Unexpected idcode after end of chain: 149 0x00000000
Warn : Unexpected idcode after end of chain: 181 0x00000000
Warn : Unexpected idcode after end of chain: 213 0x00000000
Warn : Unexpected idcode after end of chain: 245 0x00000000
Warn : Unexpected idcode after end of chain: 277 0x00000000
Warn : Unexpected idcode after end of chain: 309 0x00000000
Warn : Unexpected idcode after end of chain: 341 0x00000000
Warn : Unexpected idcode after end of chain: 373 0x00000000
Warn : Unexpected idcode after end of chain: 405 0x00000000
Warn : Unexpected idcode after end of chain: 437 0x00000000
Warn : Unexpected idcode after end of chain: 469 0x00000000
Warn : Unexpected idcode after end of chain: 501 0x00000000
Warn : Unexpected idcode after end of chain: 533 0x00000000
Warn : Unexpected idcode after end of chain: 565 0x00000000
Warn : Unexpected idcode after end of chain: 597 0x00000000
Warn : Unexpected idcode after end of chain: 629 0x00000000
Error: double-check your JTAG setup (interface, speed, ...)
Error: Trying to use configured scan chain anyway...
Error: avr.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
verify Capture-IR is disabled
background polling: on
TAP: avr.cpu (enabled)
Info : device id = 0x00000000
Error: 0x0 is invalid Manufacturer for avr, 0x1F is expected
Error: 0x0 is not support for avr

Info : Shutting down buspirate.
Info : Buspirate switched to normal mode


When I plug the RZUSB stick into the computer, the stick went really hot. So I tried to re-flash the RZUSB stick, but I got:
Code: [Select]
parallels@parallels-vm:~/Downloads$ sudo openocd -f openocd_bp.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read

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
adapter_nsrst_delay: 100
Info : Buspirate switched to FAST mode
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: avr.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: avr.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
verify Capture-IR is disabled
background polling: on
TAP: avr.cpu (enabled)
Info : device id = 0x00000000
Error: 0x0 is invalid Manufacturer for avr, 0x1F is expected
Error: 0x0 is not support for avr

Info : Shutting down buspirate.
Info : Buspirate switched to normal mode

I search the problem on the Internet about 2 days, but I got nothing. Thanks a lot! The following is my script:

Code: [Select]

set  _CHIPNAME avr
set  _ENDIAN little
set  _FIRMWARE_LOCATION /home/samuel/Downloads/killerbee/firmware/kb-rzusbstick-002.hex

interface buspirate

# buspirate port
buspirate_port /dev/ttyUSB0

buspirate_speed fast

reset_config srst_only
adapter_nsrst_delay 100

if { [info exists CPUTAPID ] } {
    set _CPUTAPID $CPUTAPID
} else {
    set _CPUTAPID 0x4978203f
}

jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME avr -endian $_ENDIAN -chain-position $_TARGETNAME

$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000  -work-area-size 16384 -work-area-backup 0
flash bank avr1.flash avr 0 0 0 0 $_TARGETNAME

telnet_port 4444
gdb_port 3333
tcl_port 6666
init
reset init
verify_ircapture disable
halt
wait_halt
poll
flash probe 0
flash write_image erase $_FIRMWARE_LOCATION
reset run
shutdown

I check the pins (TDO,TDI ,TMS,TCK) of RZUSB stick, they are short circuit. Before I update the firmware, such pins are open circuit. What should I do?

Re: openocd, buspirate and RZUSB (AT90USB1287)

Reply #1
Hi rosenzhu.
Sadly I know nothig about RZUSB (AT90USB1287), but it seems to me really weird that after a firmware update the pins TDO,TDI ,TMS,TCK of RZUSB stick are short circuited among them or other signal.
I found this but I know nothing if it can be useful at you or not and maybe already you know it:

http://esver.free.fr/blog/?p=637

Since you wrote your stick becomes hot, has short circuits on some of its pins and it can not be recognized by the computer, then I guess it is broken.
Are you sure you did performed upgrade using the right pins and settings on the Bus Pirate?

Be seeing you.

U.Sb

Re: openocd, buspirate and RZUSB (AT90USB1287)

Reply #2
[quote author="USBEprom"]Hi rosenzhu.
Sadly I know nothig about RZUSB (AT90USB1287), but it seems to me really weird that after a firmware update the pins TDO,TDI ,TMS,TCK of RZUSB stick are short circuited among them or other signal.
I found this but I know nothing if it can be useful at you or not and maybe already you know it:


Since you wrote your stick becomes hot, has short circuits on some of its pins and it can not be recognized by the computer, then I guess it is broken.
Are you sure you did performed upgrade using the right pins and settings on the Bus Pirate?

Be seeing you.

U.Sb[/quote]


Thanks for your reply!
I connect the pins just as same as the blog. the script I use is a little different to the blog.
I don't know if the difference affect the result.