Witam
Mam problem z wgraniem programu do sam7s256 za pomocą JTAG i programu Openocd dostaje taki błąd:
moje pliki konfiguracyjne:
ft.cfg
sam7s256.cfg
flash.script
Próbowałem zmienić reset-init na reset-halt ale nic to nie pomogło. Proszę o pomoc w rozwiązaniu tego problemu.
Mam problem z wgraniem programu do sam7s256 za pomocą JTAG i programu Openocd dostaje taki błąd:
moje pliki konfiguracyjne:
ft.cfg
#interface
interface ft2232
ft2232_layout oocdlink
ft2232_vid_pid 0x0403 0x6010
ft2232_device_desc "OOCDLink A"
sam7s256.cfg
#########################################################
#
# Target section, this example was tested with an
# Olimex SAM7-P256 board.
#
# Start slow, speed up after reset
jtag_khz 1000
#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-init {
# disable watchdog
mww 0xfffffd44 0x00008000
# enable user reset
mww 0xfffffd08 0xa5000001
# CKGR_MOR : enable the main oscillator
mww 0xfffffc20 0x00000601
sleep 10
# CKGR_PLLR: 96.1097 MHz
mww 0xfffffc2c 0x00481c0e
sleep 10
# PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
mww 0xfffffc30 0x00000007
sleep 10
# MC_FMR: flash mode (FWS=1,FMCN=60)
mww 0xffffff60 0x003c0100
sleep 100
}
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank at91sam7 0 0 0 0 0
init
reset halt
# For more information about the configuration files, take a look at:
# openocd.texi
flash.script
wait_halt # halt the processor and wait
armv4_5 core_state arm # select the core state
mww 0xffffff60 0x00320100 # set flash wait state (AT91C_MC_FMR)
mww 0xfffffd44 0xa0008000 # watchdog disable (AT91C_WDTC_WDMR)
mww 0xfffffc20 0xa0000601 # enable main oscillator (AT91C_PMC_MOR)
sleep 100 # wait 100 ms
mww 0xfffffc2c 0x00480a0e # set PLL register (AT91C_PMC_PLLR)
sleep 200 # wait 200 ms
mww 0xfffffc30 0x7 # set master clock to PLL (AT91C_PMC_MCKR)
sleep 100 # wait 100 ms
mww 0xfffffd08 0xa5000401 # enable user reset AT91C_RSTC_RMR
flash write_image erase main.elf 0x00100000 # program the onchip flash
reset run # reset processor
shutdown # stop OpenOCD
Próbowałem zmienić reset-init na reset-halt ale nic to nie pomogło. Proszę o pomoc w rozwiązaniu tego problemu.