2009-09-21 13:48:22 -05:00
|
|
|
# ATMEL sam7se512
|
2008-11-30 16:25:43 -06:00
|
|
|
# Example: the "Elektor Internet Radio" - EIR
|
|
|
|
# http://www.ethernut.de/en/hardware/eir/index.html
|
|
|
|
|
2009-09-21 13:48:22 -05:00
|
|
|
if { [info exists CHIPNAME] } {
|
2011-10-29 16:32:17 -05:00
|
|
|
set _CHIPNAME $CHIPNAME
|
2009-09-21 13:48:22 -05:00
|
|
|
} else {
|
2011-10-29 16:32:17 -05:00
|
|
|
set _CHIPNAME sam7se512
|
2008-11-30 16:25:43 -06:00
|
|
|
}
|
|
|
|
|
2009-09-21 13:48:22 -05:00
|
|
|
if { [info exists ENDIAN] } {
|
2011-10-29 16:32:17 -05:00
|
|
|
set _ENDIAN $ENDIAN
|
2009-09-21 13:48:22 -05:00
|
|
|
} else {
|
2011-10-29 16:32:17 -05:00
|
|
|
set _ENDIAN little
|
2008-11-30 16:25:43 -06:00
|
|
|
}
|
|
|
|
|
2011-10-29 16:32:17 -05:00
|
|
|
if { [info exists CPUTAPID] } {
|
2008-11-30 16:25:43 -06:00
|
|
|
set _CPUTAPID $CPUTAPID
|
|
|
|
} else {
|
2011-10-29 15:58:12 -05:00
|
|
|
# Force an error until we get a good number.
|
2008-11-30 16:25:43 -06:00
|
|
|
set _CPUTAPID 0xffffffff
|
|
|
|
}
|
|
|
|
|
|
|
|
#use combined on interfaces or targets that can't set TRST/SRST separately
|
|
|
|
reset_config srst_only srst_pulls_trst
|
|
|
|
|
|
|
|
#jtag scan chain
|
|
|
|
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
|
|
|
|
|
|
|
|
# The target
|
2009-09-04 00:17:03 -05:00
|
|
|
set _TARGETNAME $_CHIPNAME.cpu
|
2014-09-08 15:11:02 -05:00
|
|
|
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME
|
2008-11-30 16:25:43 -06:00
|
|
|
|
2009-11-08 10:52:40 -06:00
|
|
|
$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
|
2008-11-30 16:25:43 -06:00
|
|
|
|
2009-05-23 13:26:06 -05:00
|
|
|
#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
|
2009-11-18 04:15:52 -06:00
|
|
|
set _FLASHNAME $_CHIPNAME.flash
|
2009-12-17 04:53:09 -06:00
|
|
|
flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 18432
|
2008-11-30 16:25:43 -06:00
|
|
|
|