Refactor BeRTOS to be in his own directory.
[bertos.git] / cpu / arm / scripts / openocd_at91sam7_flash.script
1\r
2 # The following command wills be executed on\r
3 # reset (because of run_and_init in the config-file)\r
4 # - halt target\r
5 # - init ecr\r
6 # - flash content of file main.bin into target-memory\r
7 # - shutdown openocd\r
8 #\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
12 #\r
13 \r
14 halt\r
15 sleep 10\r
16 \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
21 sleep 10\r
22 mww 0xfffffc2c 0x00481c0e       # CKGR_PLLR: 96.1097 MHz\r
23 sleep 10\r
24 mww 0xfffffc30 0x00000007       # PMC_MCKR : MCK = PLL / 2 ~= 48 MHz\r
25 sleep 10\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
28 \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
32 sleep 10\r
33 poll\r
34 flash probe 0\r
35 flash write 0 ../../../images/at91sam7.bin 0x0\r
36 reset run\r
37 sleep 10\r
38 #shutdown\r