SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By aff-man
#77760
OK getting back into a bit of embedded stuff so just getting set up.

Following through the "Using Open Source Tools for AT91SAM7S Cross Development" and done everything.

Unfortunately Yagarto OpenOCD is no longer available but they give a link to a suitable substitute. After changing all the links in the makefile I still can't get it to work and comes up with the following error.

make program
Flash Programming with OpenOCD...
'C:\Program Files\OpenOCD\0.2.0\bin\'openocd.exe -f 'C:\Program Files\OpenOCD\0.2.0\bin\'at91sam7s256-wiggler-flash-program.cfg # program the onchip FLASH here
"C:/Program Files/yagarto-tools-20070303/bin/sh.exe": C:\Program Files\OpenOCD\0.2.0\bin\openocd.exe: command not found
make: *** [program] Error 127


Has anyone had this problem adn if so what is the cause and solution.

Cheers
By bobpaul
#115022
aff-man wrote: Has anyone had this problem
Yes
aff-man wrote:adn if so what is the cause and solution.
Let me know if you find out. :-/
By bobpaul
#115024
HUZZAH! I got it.

On a whim I switched the "\"s to "/"s, since that's how the error showed the path for sh.exe. So now that section of my makefile looks like:
Code: Select all
# specify output filename here (must be *.bin file)
TARGET = main.bin

# specify the directory where openocd executable and configuration files reside
OPENOCD_DIR = C:/openocd-2007re141/bin

# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debuggers)
OPENOCD = "$(OPENOCD_DIR)/openocd-pp.exe"

# specify OpenOCD configuration file (pick the one for your device)
OPENOCD_CFG = $(OPENOCD_DIR)/at91sam7s256-wiggler-flash-program.cfg

# program the AT91SAM7S256 internal flash memory
program: $(TARGET)
	@echo "Flash Programming with OpenOCD..."			# display a message on the console
	$(OPENOCD) -f $(OPENOCD_CFG)						# program the onchip FLASH here
	@echo "Flash Programming Finished."					# display a message on the console
and all is good in the universe again.