SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By LinkerDude
#71473
Hello folks,

I just bougt a Olimex ARM-USB-OCD and installed the Eclipce platform that came with the CD.
I thought that the installer should fix everything for me and just enable me to hock that up to my target board and start program and debuging.
Not so.
Setting up the OCD in the RUN menu seams to be the right way to go so I tried to set that up as instructed in the pdf file Using GNU tools.
I found the exact path to the C:\gccfd\openocd\bin\openocd-ftd2xx.exe.
Working directory set to C:\gccfd\openocd\bin
Then:
In the “Arguments” pane, enter the argument “-f at91sam7s256-armusbocd.cfg” to specify the OpenOCD configuration file designed for the Olimex ARM-USB-OCD.

Apply and Run: Error message.
Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
$URL: http://svn.berlios.de/svnroot/repos/ope ... /openocd.c $
Info: options.c:50 configuration_output_handler(): couldn't open script file at91sam7s256-armusbocd.cfg
Error: jtag.c:1511 jtag_interface_init(): JTAG interface has to be specified, see "interface" command

I have searched my computer for a config file named:” at91sam7s256-armusbocd.cfg”
I have not found that file.

Please can anyone help me?

My target is the Matrix Multimedia C for ARM package and that have AT91SAM7S128 solder to the board and ideally I would like the debugger to work with that.
The demo example uses the 256 dough but maybe it works anyway as the program is not so big for blinking a led. I really don’t know.
Well the first step is to be able to communicate with the debugger right?

Can anyone help me?


Ok no one sems to be able to help me.

The project thats available is for a ATSAM7S256 including headerfile, makefile, debugfile, boardfile etc for this MCU.
My guess is that I will have to set the variable to armusbocd.cfg thats in the project file and not a at91sam7s256-armusbocd.cfg

I simplify:
Have anyone a project for Eclipse that uses ATSAM7S128 and the Olimex USB OCD that can send that to me. A simple LED blinking program will do.
I nead the right includefiles etc.
By Blackfin
#118234
Sorry for bringing this back from the dead but I just received my LCD-08858 "Bluescreen" LPC2378 ARM7 development board along with an ARM-USB-OCD (SF# PGM-07834) and am having exactly the same issues.

I installed the software on the Olimex CD and attempted to follow the instructions in the file "HOW_TO_INSTALL" on the CD. However, this file is woefully lacking and seemingly incorrect or is making huge assumptions. For instance, instruction 7 says:

"7. Start OpenOCD program from Run -> External Tools -> OpenOCD or OpenOCDTiny ."

When I went to that menu, I didn't find "OpenOCD" or anything else. I had to search the web for references to OpenOCD and Eclipse and found the following:

http://www.makingthings.com/documentati ... re-eclipse

that at least got me to the point that following instruction 7 actually shows me something. When I click on it, the console window shows me the following:

Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
$URL: http://svn.berlios.de/svnroot/repos/ope ... /openocd.c $
Info: options.c:50 configuration_output_handler(): couldn't open script file makeController-debug.cfg
Error: jtag.c:1511 jtag_interface_init(): JTAG interface has to be specified, see "interface" command



Like the OP, LinkerDude, I have searched my computer for the file specified -- makeController-debug.cfg -- and it's no where to be seen.

As well, what is this "interface" command they speak of?

The OP got no responses -- pretty sad, really -- and I'm hoping someone will chime in with a suggestion. Surely someone at SF has run the contents of the Olimex CD and figured this out.
By krkan
#118520
"interface" is used for specifying JTAG interface (hardware) that you are using.

Take a look inside of the folder where you have installed openOCD.

Are there any subfolders with names like "interface","target or "board"?

If they exist, in there you'll find configuration scripts for the microcontroller (target) and JTAG (interface), or if you have somewhat popular board, look in that subfolder (board).

And if they are in those folders, pass their names as parameters (-f flag) when starting openOCD.

Try to find user manual for the openOCD version you're using.
By Blackfin
#118530
Thanks. That's basically it.

I created an openocd folder in my project, created the scripts necessary to debug and burn the flash and configured "External Tools" in Eclipse to use them. So far so good as I am able to do both now.

Still learning :)
By krkan
#118534
Been there, done that...
Lost a couple of days searching through forums, and then decided to actually read the user manual. :D

You have to also take care about a couple of things.

openOCD does not keep backwards compatibility with config scripts from its older versions. So, if you decide to use new openOCD version, you'll probably have to make some changes (for example - jtag_speed is in version 0.4.0 replaced with jtag_kHz).
Copying this specific version into the project folder is a good idea.

I see that you are using ARM7, but also take a look at this:

ARM-USB-OCD can not use JTAG adaptive speed setting. That can be a problem if used with some ARM Cortex-M3 (NXP) chips in case when their internal RC oscillator is used as main clock source.
And if you use that RC generated clock, then you'll have to make some adjustments to JTAG speed (in that case it has to be at least 5 or 6 times slower than target system clock).
If you use some stable clock source, it can ran at 1000kHz (or even more) without problems.


-------
http://dimkoelectronics.wordpress.com