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.
 
 
 
 
 
 

62 lines
1.6 KiB

  1. ## -*- tcl -*-
  2. ##
  3. if { [info exists CHIPNAME] } {
  4. set _CHIPNAME $CHIPNAME
  5. } else {
  6. set _CHIPNAME s3c2410
  7. }
  8. if { [info exists ENDIAN] } {
  9. set _ENDIAN $ENDIAN
  10. } else {
  11. # This config file was defaulting to big endian..
  12. set _ENDIAN little
  13. }
  14. if { [info exists CPUTAPID] } {
  15. set _CPUTAPID $CPUTAPID
  16. } else {
  17. set _CPUTAPID 0xffffffff
  18. }
  19. jtag_nsrst_delay 200
  20. jtag_ntrst_delay 200
  21. # This is for the case that TRST/SRST is not wired on your JTAG adaptor.
  22. # Don't really need them anyways.
  23. reset_config none
  24. ## JTAG scan chain
  25. #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
  26. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  27. ##
  28. ## Target configuration
  29. ##
  30. set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
  31. target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME
  32. # allocate the entire SRAM as working area
  33. $_TARGETNAME configure -work-area-phys 0x10000 -work-area-size 0x2000
  34. ## flash configuration
  35. # only target number is needed
  36. flash bank aduc702x 0 0 0 0 0
  37. ## If you use the watchdog, the following code makes sure that the board
  38. ## doesn't reboot when halted via JTAG. Yes, on the older generation
  39. ## AdUC702x, timer3 continues running even when the CPU is halted.
  40. proc watchdog_service {} {
  41. global watchdog_hdl
  42. mww 0xffff036c 0
  43. # puts "watchdog!!"
  44. set watchdog_hdl [after 500 watchdog_service]
  45. }
  46. $_TARGETNAME configure -event reset-halt-post { watchdog_service }
  47. $_TARGETNAME configure -event old-pre_resume { global watchdog_hdl; after cancel $watchdog_hdl }