2 # The following command wills be executed on
\r
3 # reset (because of run_and_init in the config-file)
\r
6 # - flash content of file main.bin into target-memory
\r
9 # created by Martin Thomas
\r
10 # http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects
\r
11 # based on information from Dominic Rath
\r
17 # Init - taken form the script openocd_at91sam7_ecr.script
\r
18 mww 0xfffffd44 0x00008000 # disable watchdog
\r
19 mww 0xfffffd08 0xa5000001 # enable user reset
\r
20 mww 0xfffffc20 0x00000601 # CKGR_MOR : enable the main oscillator
\r
22 mww 0xfffffc2c 0x00481c0e # CKGR_PLLR: 96.1097 MHz
\r
24 mww 0xfffffc30 0x00000007 # PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
\r
26 mww 0xffffff60 0x003c0100 # MC_FMR: flash mode (FWS=1,FMCN=60)
\r
27 # arm7_9 force_hw_bkpts enable # program resides in flash
\r
29 # AT91SAM7 flash command-"batch"
\r
30 # adapted by Martin Thomas based on information from Dominic Rath - Thanks
\r
31 arm7_9 dcc_downloads enable
\r
35 flash write 0 ../../../images/at91sam7s.bin 0x0
\r