Flash-programming with OpenOCD doesn’t work

Hello,

I have purchased Olimex’ SAM7-P256 board (with AT91SAM7S256) together with ARM-USB-OCD JTAG-Interface but I cannot flash the microcontroller.

I have installed the toolchain from YAGARTO and used Jim Lynch’s very detailed manual, but for some reason it still doesn’t work.

Using Jim’s example files (“demo_at91sam7_blink_flash”), I can build the files for the uC, but as soon as I want to transfer the files into Flash-memory, the answer in the “console”-view is:

make program

Flash Programming with OpenOCD…

'C:\Programme\openocd-r247\bin'openocd-ftd2xx.exe -f 'C:\Programme\openocd-r247\bin'at91sam7s256-armusbocd-flash-program.cfg # program the onchip FLASH here

/usr/bin/sh: C:\Programme\openocd-r247\bin\openocd-ftd2xx.exe: command not found

make: *** [program] Error 127

It doesn’t matter if the board is actually connected to the PC or not, I always get the same response. Therefor I think the problem is somewhere in the toolchain setup rather than hardware.

As you might have guessed from this description, I’m quite new to the whole “embedded systems” world. Therefore I assume my problem is hopefully nothing more than a beginner’s mistake.

Any help is highly appreciated,

chris

P.S. I’m using the makefile and Open OCD-config files like available for download, therefore I didn’t attach them. If required, I can send them

Hello Chris,

/usr/bin/sh: C:\Programme\openocd-r247\bin\openocd-ftd2xx.exe: command not found

The openocd-ftd2xx binary is not found. Have you installed OpenOCD

on your PC? If not, take a look here:

http://www.yagarto.de/howto/openocd/index.html

Best regards,

Michael

Hi Michael,

thanks for the quick reply.

I have installed OpenOCD right from the beginning, or at least I followed all the steps mentioned in your link. I also tested successfully the installation like suggested (with C:\make --version and C:>openocd-pp -h), but I still get the same error.

You mention that the openocd-ftd2xx binary is not found. What exactly is the name of the missing file? - openocd-ftd2xx.bin?

I made a file search for openocd-ftd2xx.bin, nothing on my PC.

And when I start OpenOCD as external tool from Eclipse, it works and I can see the according process in windows task manager.

chris

Hello Chris,

What exactly is the name of the missing file? - openocd-ftd2xx.bin? 

It is openocd-ftd2xx.exe try to type in at your command:

openocd-ftd2xx -h

Regards,

Michael

Hi michael,

your command works, if I type in openocd-ftd2xx -h, i get the version number and a summary of all the commands i can use (-h, -f, -d, -l).

But I still get “error 127” when I try to program my board…

chris

Hi Michael,

just to inform you that my problem is solved!

Instead of using the standard-makefile code lines, I encoded the OpenOCD-parameters directly, so the program rule section looks like this:

program the AT91SAM7S256 internal flash memory

program: $(TARGET)

@echo “Flash Programming with OpenOCD…” #display a message on the console

C:\Programme\openocd-r247\bin\openocd-ftd2xx.exe -f C:\Programme\openocd-r247\bin\at91sam7s256-armusbocd-flash-program.cfg

$(OPENOCD) -f $(OPENOCD_CFG) # program the onchip FLASH here

@echo “Flash Programming Finished.” # display a message on the console

With this change flashing of uC worked perfectly.

If I have time, I will check again where the difference between the original code line and my code line is, but that’s only low priority

Once again, thanks for your suggestions,

chris