You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.2 KiB

  1. # ATMEL sam7se512
  2. # Example: the "Elektor Internet Radio" - EIR
  3. # http://www.ethernut.de/en/hardware/eir/index.html
  4. if { [info exists CHIPNAME] } {
  5. set _CHIPNAME $CHIPNAME
  6. } else {
  7. set _CHIPNAME sam7se512
  8. }
  9. if { [info exists ENDIAN] } {
  10. set _ENDIAN $ENDIAN
  11. } else {
  12. set _ENDIAN little
  13. }
  14. if { [info exists CPUTAPID ] } {
  15. set _CPUTAPID $CPUTAPID
  16. } else {
  17. # force an error till we get a good number
  18. set _CPUTAPID 0xffffffff
  19. }
  20. #use combined on interfaces or targets that can't set TRST/SRST separately
  21. reset_config srst_only srst_pulls_trst
  22. #jtag scan chain
  23. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  24. # The target
  25. set _TARGETNAME $_CHIPNAME.cpu
  26. target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi
  27. $_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
  28. #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>]
  29. set _FLASHNAME $_CHIPNAME.flash
  30. flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 18432