Hi friends,
I want to try the new version of OpenOCD without moving my old version. Is it possible to install the secondone without problems? I work with yagartoEclipse, ARM-USB-JTAG from Olimex and an AT91SAM7XC board. In version 203 of OpenOCD is it possible to set and clear the NVM bits after FLASH programing? At the moment I flash the chip by SAM-BA only, but I want to move to a script and download the code over the JTAG-Adapter.
Can someone give me some advises?
Thanks a lot for help.
John
Hi,
as i now it´s only the openocd.exe file you need. i put several versions
in different folders and use batchfiles which start the different openocd
versions. it´s no problem.
best regards
martin
mlu
September 7, 2007, 9:52pm
3
For the NVM bits you can use:
at91sam7 gpnvm <set|clear>
set or clear a gpnvm bit for the processor
So you can can do flash proramming and nvm bit handling with OpenOCD.
/Magnus
Hi friends,
thanks a lot for help. But there is still a problem with the flash command.
If I connect me via telnet localhost 4444 to the OpenOCD Server, I can’t do any flash command. What can be the problem? I have tried with
version Open On-Chip Debugger (2007-08-25 12:00 CEST) and
version Open On-Chip Debugger (2006-01-26 13:30 CEST)
help flash
flash no help available
flash
Incomplete command
Command flash not found
flash banks
Command banks not found
flash info
Command info not found
at91sam7 gpnvm
Command at91sam7 not found
Thanks
John
mlu
September 8, 2007, 12:40pm
5
You must configure the flash memory in your openocd.cfg configuration file,
relevant parts of my config file are:
#target configuration
daemon_startup reset
#target
#target arm7tdmi
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30
working_area 0 0x40000000 0x4000 nobackup
#flash configuration
flash bank at91sam7 0 0 0 0 0
/magnus
Thanks a lot and excuse me for being late, now the instruction flash works fine.
But there are still a problem with the gpnvm bits. My thoughts:
build main.bin
program the flash via makefile instructions of martin thomas and others
start OpenOCD, start a second command window and take a connection via telnet localhost 4444
use the at91sam7 gpnvm instruction to clear the nvm bit
use the instruction reset run
And than I thought the chip run from flash and my program on the chip starts. But the LEDs don’t blink. Something is wrong in my thinking?
There are difference between SAM7X and SAM7XC? I can’t clear or set the gpnvm bit seeing the message below. I habe no hardware reset button.
Thanks for help.
John
flash info
usage: flash info
flash info 0
#1: at91sam7 at 0x00100000, size 0x00040000, buswidth 4, chipwidth 0
at91sam7 information: Chip is AT91SAM7XC256
cidr: 0x271b0940, arch: 0x0071, eproc: ARM7TDMI, version:0x000, flashsize: 0x00
040000
master clock(estimated): 21516kHz
pagesize: 256, lockbits: 16 0x0000, pages in lock region: 64
securitybit: 0, nvmbits: 0x0
at91sam7 gpnvm 0 2 set
gpnvm bit ‘#2 ’ is out of bounds for target AT91SAM7XC256
at91sam7 gpnvm 0 2 clear
gpnvm bit ‘#2 ’ is out of bounds for target AT91SAM7XC256
at91sam7 gpnvm 0 2 set
gpnvm bit ‘#2 ’ is out of bounds for target AT91SAM7XC256
mlu
September 11, 2007, 10:34am
7
For the GPNVM bit 2 to work on AT91SAM7XC you need OpenOCD revision 172 or later.
/Magnus
Thanks a lot, now I’m able to program the flash by the ARM-USB-OCD without switch to an other interface! Juhu
The next step is to download the program to the RAM, is this also able with something like this?
program the AT91SAM7X256 internal flash memory js inserted the 6th line
program: $(TARGET)
@echo “Preparing OpenOCD script…”
@cmd /c ‘echo wait_halt > $(OPENOCD_SCRIPT)’
@cmd /c ‘echo armv4_5 core_state arm >> $(OPENOCD_SCRIPT)’
@cmd /c ‘echo flash write 0 $(TARGET) 0x0 >> $(OPENOCD_SCRIPT)’
@cmd /c ‘echo at91sam7 gpnvm 0 2 set >> $(OPENOCD_SCRIPT)’
@cmd /c ‘echo mww 0xfffffd08 0xa5000401 >> $(OPENOCD_SCRIPT)’
@cmd /c ‘echo reset >> $(OPENOCD_SCRIPT)’
@cmd /c ‘echo shutdown >> $(OPENOCD_SCRIPT)’
@echo “Flash Programming with OpenOCD…”
$(OPENOCD) -f $(OPENOCD_CFG)
@echo “Flash Programming Finished.”