# OpenOCD config for APP project # $Id: openocd-olimex.cfg,v 1.1 2009-08-11 15:13:56 mwilson Exp $ # {source parport.cfg} telnet_port 4444 gdb_port 2001 # interface parport # parport_port 0 # parport_cable wiggler # jtag_speed 0 source [find interface/olimex-jtag-tiny.cfg] reset_config srst_only # {source sam7s256.cfg} 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 { # WDTC_WDMR : disable watchdog mww 0xfffffd44 0x00008000 # RSTC_RMR : enable user reset mww 0xfffffd08 0xa5000001 # CKGR_MOR : enable the off-chip oscillator (MPW 2009-7-3) mww 0xfffffc20 0x00000602 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 flash bank at91sam7 0 0 0 0 0 # For more information about the configuration files, take a look at: # openocd.texi