Dear all,
I am trying to program at91sam7s257 using this cfg file:
[#
For more information about the configuration files, take a
look at the “Open On-Chip Debugger (openocd)” documentation.
daemon configuration
telnet_port 4444
gdb_port 3333
tcl_port 6666
tell gdb our flash memory map
and enable flash programming
gdb_memory_map enable
gdb_flash_program enable
#########################################################
Interface, if you want to use an other interface
you must replace this section here.
source [find interface/arm-usb-ocd.cfg]
#########################################################
Target section, this example was tested with an
Olimex SAM7-P256 board.
Start slow, speed up after reset
jtag_khz 30
#use combined on interfaces or targets that can’t set TRST/SRST separately
reset_config srst_only srst_pulls_trst
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME sam7s256
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x3f0f0f0f
}
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME [format “%s.cpu” $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
$_TARGETNAME configure -event reset-start {
jtag_khz 30
}
###################### target end #########################
commands below are specific to AT91sam7 Flash Programming
---------------------------------------------------------
Flash write routine is in the script.ocd file within the project.
$_TARGETNAME configure -event reset-init “script script.ocd”
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00400000 -work-area-size 0x4000 -work-area-backup 0
flash bank at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
init
reset init
]
but I get this error:
[lInfo : JTAG tap: sam7s256.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset.
target state: halted
target halted in Thumb state due to debug-request, current mode: Supervisor
cpsr: 0x600000b3 pc: 0x00200ace
core state: ARM
Error: error writing to flash at address 0x00100000 at offset 0x00000000 (-903)
]
any idea how to solve this bug?
Best, Alireza[/list][/code]