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.
 
 
 
 
 
 

40 lines
830 B

  1. #
  2. # Freescale Kinetis K40 devices
  3. #
  4. #
  5. # K40 devices support both JTAG and SWD transports.
  6. #
  7. source [find target/swj-dp.tcl]
  8. if { [info exists CHIPNAME] } {
  9. set _CHIPNAME $CHIPNAME
  10. } else {
  11. set _CHIPNAME k40
  12. }
  13. if { [info exists ENDIAN] } {
  14. set _ENDIAN $ENDIAN
  15. } else {
  16. set _ENDIAN little
  17. }
  18. if { [info exists CPUTAPID] } {
  19. set _CPUTAPID $CPUTAPID
  20. } else {
  21. set _CPUTAPID 0x4ba00477
  22. }
  23. set _TARGETNAME $_CHIPNAME.cpu
  24. swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  25. target create $_TARGETNAME cortex_m -chain-position $_CHIPNAME.cpu
  26. $_CHIPNAME.cpu configure -event examine-start { puts "START..." ; }
  27. $_CHIPNAME.cpu configure -event examine-end { puts "END..." ; }
  28. # if srst is not fitted use SYSRESETREQ to
  29. # perform a soft reset
  30. cortex_m reset_config sysresetreq