Witam, od kilku dni nie moge skonfigurować opneocd 0.2.0 aby mozna bylo zaprogramować procka z Eclipsa. W H-Jtag wszystko dziala ok (wykrywa i programuje flash). plyta i programator(wiggler lpt) tak jak w tytule proc at91sam7s256 Moja konfiguracja jest następująca:
wiggler.cfg:
sam7s256.cfg
script.script:
uruchamamiam to tak:-f interface/wiggler.cfg -f target/sam7s256.cfg -f script.script
i dostaje takie komunikaty w eclipsie
Wg mnie jest cos nie tak z resetowaniem układu i możliwe ze tymi linijkami :
reset_config srst_only srst_pulls_trst mozliwe ze powinno byc inaczej (kombinowalem na różne sposoby ale bez rezultatu). Konfiguracja działająca z H-jtaga wyglada następująco:
Nie potrafie pozbyc sie tego błędu Error: Translation from khz to jtag_speed not implemented ale jak odkomentuje linijke jtag_khz 1000 to nie wykrywa układu.
A generalnie to chyba problem leży tutaj:
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset
Prosze o pomoc.
wiggler.cfg:
# 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
#commands specific to the Amontec JTAGKey
interface parport
parport_port 0xBD00
parport_cable wiggler
jtag_speed 4
jtag_nsrst_delay 200
jtag_ntrst_delay 200sam7s256.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.texiscript.script:
# OpenOCD Target Script for Atmel AT91SAM7S256
#
# Programmer: James P Lynch
#
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)
wait 100 # wait 100 ms
mww 0xfffffc2c 0x00480a0e # set PLL register (AT91C_PMC_PLLR)
wait 200 # wait 200 ms
mww 0xfffffc30 0x7 # set master clock to PLL (AT91C_PMC_MCKR)
wait 100 # wait 100 ms
mww 0xfffffd08 0xa5000401 # enable user reset AT91C_RSTC_RMR
flash write 0 main.bin 0x0 # program the onchip flash
reset # reset processor
shutdown # stop OpenOCD
uruchamamiam to tak:-f interface/wiggler.cfg -f target/sam7s256.cfg -f script.script
i dostaje takie komunikaty w eclipsie
Open On-Chip Debugger 0.2.0 (2009-07-18-09:50) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
parport port = 48384
jtag_speed: 4
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
Error: Translation from khz to jtag_speed not implemented
Info : JTAG tap: sam7s256.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Info : JTAG Tap/device matched
Info : JTAG tap: sam7s256.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x3)
Info : JTAG Tap/device matched
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: System
cpsr: 0xefffffff pc: 0xffffffef
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x00007f13 pc: 0x00007efb
core state: ARM
Warn : target not halted
Runtime error, file "script.script", line 8:
Wg mnie jest cos nie tak z resetowaniem układu i możliwe ze tymi linijkami :
reset_config srst_only srst_pulls_trst mozliwe ze powinno byc inaczej (kombinowalem na różne sposoby ale bez rezultatu). Konfiguracja działająca z H-jtaga wyglada następująco:
Nie potrafie pozbyc sie tego błędu Error: Translation from khz to jtag_speed not implemented ale jak odkomentuje linijke jtag_khz 1000 to nie wykrywa układu.
A generalnie to chyba problem leży tutaj:
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset
Prosze o pomoc.