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.
 
 
 
 
 
 

43 lines
889 B

  1. # script for ATMEL sam3, a CORTEX-M3 chip
  2. #
  3. # at91sam3u4e
  4. # at91sam3u2e
  5. # at91sam3u1e
  6. # at91sam3u4c
  7. # at91sam3u2c
  8. # at91sam3u1c
  9. if { [info exists CHIPNAME] } {
  10. set _CHIPNAME $CHIPNAME
  11. } else {
  12. set _CHIPNAME sam3
  13. }
  14. if { [info exists ENDIAN] } {
  15. set _ENDIAN $ENDIAN
  16. } else {
  17. set _ENDIAN little
  18. }
  19. #jtag scan chain
  20. if { [info exists CPUTAPID ] } {
  21. set _CPUTAPID $CPUTAPID
  22. } else {
  23. set _CPUTAPID 0x4ba00477
  24. }
  25. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  26. set _TARGETNAME $_CHIPNAME.cpu
  27. target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
  28. # 16K is plenty, the smallest chip has this much
  29. $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
  30. reset_config srst_only
  31. $_TARGETNAME configure -event gdb-flash-erase-start {
  32. halt
  33. }