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.
 
 
 
 
 
 

61 lines
1.6 KiB

  1. source [find target/c100.cfg]
  2. # basic register defintion for C100
  3. source [find target/c100regs.tcl]
  4. # board-config info
  5. source [find target/c100config.tcl]
  6. # C100 helper functions
  7. source [find target/c100helper.tcl]
  8. # Telo board & C100 support trst and srst
  9. # Note that libftd2xx.so tries to assert srst
  10. # which break this script
  11. # use libftdi.so library instead with this script
  12. # make the reset asserted to
  13. # allow RC circuit to discharge for: [ms]
  14. adapter_nsrst_assert_width 100
  15. jtag_ntrst_assert_width 100
  16. # don't talk to JTAG after reset for: [ms]
  17. adapter_nsrst_delay 100
  18. jtag_ntrst_delay 100
  19. reset_config trst_and_srst separate
  20. # issue telnet: reset init
  21. # issue gdb: monitor reset init
  22. $_TARGETNAME configure -event reset-init {
  23. adapter_khz 100
  24. # this will setup Telo board
  25. setupTelo
  26. #turn up the JTAG speed
  27. adapter_khz 3000
  28. echo "JTAG speek now 3MHz"
  29. echo "type helpC100 to get help on C100"
  30. }
  31. $_TARGETNAME configure -event reset-deassert-post {
  32. # Force target into ARM state.
  33. # soft_reset_halt # not implemented on ARM11
  34. echo "Detected SRSRT asserted on C100.CPU"
  35. }
  36. $_TARGETNAME configure -event reset-assert-post {
  37. echo "Assering reset"
  38. #sleep 10
  39. }
  40. proc power_restore {} { echo "Sensed power restore. No action." }
  41. proc srst_deasserted {} { echo "Sensed nSRST deasserted. No action." }
  42. # boots from NOR on CS0: 8 MBytes CFI flash, 16-bit bus
  43. # it's really 16MB but the upper 8mb is controller via gpio
  44. # openocd does not support 'complex reads/writes' to NOR
  45. set _FLASHNAME $_CHIPNAME.flash
  46. flash bank $_FLASHNAME cfi 0x20000000 0x01000000 2 2 $_TARGETNAME
  47. # writing data to memory does not work without this
  48. arm11 memwrite burst disable