I’m stumped on how to use OpenOCD and Bus Blaster to write to my AT91SAM7XC512
The document “using open source tools for at91sam7s cross development” appears to be very outdated as many of the commands have different parameters now. Many of the command names appears to have changed as well. Many guides I found are completely useless, since many of the commands they have used no longer exist, such as “jtag_device”.
Running this in a cfg
interface ft2232
ft2232_device_desc "Dual RS232-HS"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x6010
jtag_khz 30000
results in
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x7f1f1f1f ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Info : JTAG tap: auto0.tap tap/device found: 0x7f1f1f1f (mfg: 0x78f, part: 0xf1f1, ver: 0x7)
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined
and if I tie JTAGSEL to enable boundary scan
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x0b63207f ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Info : JTAG tap: auto0.tap tap/device found: 0x0b63207f (mfg: 0x03f, part: 0xb632, ver: 0x0)
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined
Note, my target is powered and appears to be responding, as I am able to see its identifiers
Also notice the line “Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001”
From the OpenOCD manual says “The bit pattern loaded by the TAP into the JTAG shift register on entry to the ir capture state, such as 0x01. JTAG requires the two LSBs of this value to be 01.”
So I added the line
jtag newtap at91samx512 cpu -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id 0x7f1f1f1f
or if the jumper is in
jtag newtap at91samx512 cpu -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id 0x0b63207f
and then got
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Warn : at91samx512.cpu: nonstandard IR mask
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined
I double checked the power, and also even tried 2000 kHz instead of 30000 kHz
Also note that I am specifying at91sam7x512 instead of at91sam7xc512 because OpenOCD told me I should (I forgot when I got an warning, but it did tell me to use x instead of xc)
it got the ID just fine at 30000 kHz, I think the speed and connections and power are all fine. I can still use SAM-BA with the TST and ERASE pins.
Can anybody help me simply write a .bin file into my AT91SAM7XC512?