1 #use combined on interfaces or targets that can't set TRST/SRST separately
2 reset_config srst_only srst_pulls_trst
5 #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
6 jtag_device 4 0x1 0xf 0xe
8 target create target0 arm7tdmi -endian little -chain-position 0 -variant arm7tdmi
9 [new_target_name] configure -event reset-init {
11 mww 0xfffffd44 0x00008000
13 mww 0xfffffd08 0xa5000001
14 # CKGR_MOR : enable the main oscillator
15 mww 0xfffffc20 0x00000601
17 # CKGR_PLLR: 96.1097 MHz
18 mww 0xfffffc2c 0x00481c0e
20 # PMC_MCKR : MCK = PLL / 2 ~= 48 MHz
21 mww 0xfffffc30 0x00000007
23 # MC_FMR: flash mode (FWS=1,FMCN=60)
24 mww 0xffffff60 0x003c0100
28 [new_target_name] configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
30 #flash bank <driver> <base> <size> <chip_width> <bus_width>
31 flash bank at91sam7 0 0 0 0 0
33 # For more information about the configuration files, take a look at: