SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By Davz
#143167
Hi! I'm David and I'm new in the forum.
Now I have a problem with ARM-USB-TINY-H device: http://www.olimex.com/dev/arm-usb-tiny-h.html and with SAM7-H256 board: http://www.olimex.com/dev/sam7-h256.html

And the problem is, that I don't get comunication with de computer but I have the drivers correctly instaled (that I think). I work with windows XP and I have read the Olimex tutorials, and I have done the steps, but I don't get nothing.
What could I do? What programs should I use to get comunication? I have used SAM-BA and SEGGER (I found this in YAGARTO webside)

I would be very grateful if you'll answer my questions. Thankyou very much.

Best regards and sorry for my english.
By hsutherl
#143203
Hello Davz,
If you view by connection in Device Manager, you should find your Olimex OpenOCD JTAG Device under one of the USB host controllers. If you don't find it anywhere, you have a driver issue. (It might also be available when you view by type, but I don't know where.)

Make an openocd.cfg file something like this:
Code: Select all
source [find interface/olimex-arm-usb-tiny-h.cfg]
source [find target/at91sam7x256.cfg]

gdb_port 3333
telnet_port 4444
Find openocd.exe, save your openocd.cfg file to that directory**, and then open a Command Prompt and CD to that directory. Start openocd.exe from the command prompt and look at the output. There may be enough information there that you can figure out what to do. If not, post the output either here or "next door" in the OpenOCD forum.

-Hugh

**Simple but probably not a good practice. If you have openocd in your path, you can put the .cfg file in a better location and start the program from there.
By Davz
#143216
Thank you for the answer hsutherl
I have already done that you said me, and this is the output:
Code: Select all
C:\gccfd\openocd\bin>openocd
Open On-Chip Debugger 0.3.0 (2009-11-07-14:18)
$URL$
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_dra
Warn : use 'sam7x256.cpu' as target identifier, not '0'
Error: flash driver 'sam7x256.flash' not found
do you know what it mean?

Thank you again!
By hsutherl
#143240
Ugh. No, sorry, I have no idea. i was hoping you'd get something like this (no target connected)
Code: Select all
Open On-Chip Debugger 0.5.0 (2012-04-16-12:48)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
500 kHz
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Info : clock speed 500 kHz
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: sam7x256.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : sam7x256.cpu: hardware has 2 breakpoint/watchpoint units
or this (wrong target connected)
Code: Select all
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Info : clock speed 500 kHz
Info : JTAG tap: sam7x256.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Warn : JTAG tap: sam7x256.cpu       UNEXPECTED: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Error: JTAG tap: sam7x256.cpu  expected 1 of 1: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Warn : Unexpected idcode after end of chain: 32 0x06414041
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: IR capture error at bit 4, saw 0x11 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : sam7x256.cpu: hardware has 2 breakpoint/watchpoint units
I have not worked much from Windows recently. Later I will try installing the most recent Yagarto and see if that gives a clue. I hope someone more knowledgeable sees your post in the meantime.

-Hugh
By hsutherl
#143268
Oh man. I thought I would never get my olimex-arm-usb-ocd set up to work with libftdi. (Even though all the files and instructions are included with OpenOCD, I spent 3 hours looking in all the wrong places and trying wrong things at random...] Another session or two like that would make a few $$ for Crossworks feel like a bargain.

Anyway I still can't duplicate anything like your output. Even when I intentionally corrupt at91sam7x256.cfg by adding set _TARGETNAME 0, I still get (with wrong cpu)
Code: Select all
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
Warn : Specify TAP 'sam7x256.cpu' by name, not number 0
Info : clock speed 500 kHz
Info : JTAG tap: sam7x256.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Warn : JTAG tap: sam7x256.cpu       UNEXPECTED: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Error: JTAG tap: sam7x256.cpu  expected 1 of 1: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Warn : Unexpected idcode after end of chain: 32 0x06414041
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: IR capture error at bit 4, saw 0x11 not 0x...3
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : 0: hardware has 2 breakpoint/watchpoint units
Ideas:
  • double check your at91sam7x256.cfg file to make sure it doesn't have garbage in it.
  • Download openocd-0.5.0 from the link above and see if it works better. Maybe your installation is completely messed up.
Of course if you installed an IDE at the same time as your version of openOCD, that complicates things. But, one step at a time.
By Davz
#143333
Thank you very much hsutherl and sorry that I'm late.

I don't know how but I have gotten to run the device with ecplipse :D

if I have any other problems, I'll ask in the forum

Thank you again!
By Davz
#143401
Now, when I click on to RUN the device, Eclipse give me an error and the consola write this:
Code: Select all
Open On-Chip Debugger 0.3.0 (2009-11-07-14:18)
$URL$
For bug reports, read
	http://openocd.berlios.de/doc/doxygen/bugs.html
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
jtag_nsrst_delay: 300
jtag_ntrst_delay: 200
RCLK - adaptive
Info : max TCK change to: 30000 kHz
Info : RCLK (adaptive clock speed)
Info : JTAG tap: at91sam9260.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Warn : JTAG tap: at91sam9260.cpu       UNEXPECTED: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Error: JTAG tap: at91sam9260.cpu  expected 1 of 1: 0x0792603f (mfg: 0x01f, part: 0x7926, ver: 0x0)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 6