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.
 
 
 
 
 
 

52 lines
1.5 KiB

  1. reset_config trst_and_srst
  2. if { [info exists CHIPNAME] } {
  3. set _CHIPNAME $CHIPNAME
  4. } else {
  5. set _CHIPNAME at91rm9200
  6. }
  7. if { [info exists ENDIAN] } {
  8. set _ENDIAN $ENDIAN
  9. } else {
  10. set _ENDIAN little
  11. }
  12. if { [info exists CPUTAPID ] } {
  13. set _CPUTAPID $CPUTAPID
  14. } else {
  15. set _CPUTAPID 0x05b0203f
  16. }
  17. # Never allow the following!
  18. if { $_CPUTAPID == 0x15b0203f } {
  19. puts "-------------------------------------------------------"
  20. puts "- ERROR: -"
  21. puts "- ERROR: TapID 0x15b0203f is wrong for at91rm9200 -"
  22. puts "- ERROR: The chip/board has a JTAG select pin/jumper -"
  23. puts "- ERROR: -"
  24. puts "- ERROR: In one position (0x05b0203f) it selects the -"
  25. puts "- ERROR: ARM CPU, in the other position (0x1b0203f) -"
  26. puts "- ERROR: it selects boundry-scan not the ARM -"
  27. puts "- ERROR: -"
  28. puts "-------------------------------------------------------"
  29. }
  30. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  31. # Create the GDB Target.
  32. set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
  33. target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME
  34. # AT91RM9200 has a 16K block of sram @ 0x0020.0000
  35. $_TARGETNAME configure -work-area-virt 0x00200000 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 1
  36. # This chip has a DCC ... use it
  37. arm7_9 dcc_downloads enable