]> rtime.felk.cvut.cz Git - sysless.git/blob - board/arm/oc8n/scripts/AT91SAM7XC256.cfg
Build framework for the AT91SAM7 architecture
[sysless.git] / board / arm / oc8n / scripts / AT91SAM7XC256.cfg
1 # OpenOCD Configuration Script
2 # Target: Atmel AT91SAM7XC256
3
4 # Delay times of the Software- and Target reset lines
5 jtag_nsrst_delay 200
6 jtag_ntrst_delay 200
7
8 #reset_config <signals> [combination] [trst_type] [srst_type]
9 reset_config srst_only
10
11 if { [info exists CHIPNAME] } { 
12         set  _CHIPNAME $CHIPNAME    
13 } else {         
14         set  _CHIPNAME sam7x256
15 }
16
17 if { [info exists ENDIAN] } {   
18         set  _ENDIAN $ENDIAN    
19 } else {         
20         set  _ENDIAN little
21 }
22
23 if { [info exists CPUTAPID ] } {
24         set _CPUTAPID $CPUTAPID
25 } else {
26         set _CPUTAPID 0x3f0f0f0f
27 }
28
29 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
30
31 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
32
33 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
34
35 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
36
37 # Bank is 256KB - auto config
38 flash bank at91sam7 0 0 0 0 0