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.
 
 
 
 
 
 

49 lines
1.0 KiB

  1. #
  2. # Freescale Kinetis KL25 devices
  3. #
  4. #
  5. # KL25 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 kl25
  12. }
  13. if { [info exists ENDIAN] } {
  14. set _ENDIAN $ENDIAN
  15. } else {
  16. set _ENDIAN little
  17. }
  18. # Work-area is a space in RAM used for flash programming
  19. # By default use 4kB
  20. if { [info exists WORKAREASIZE] } {
  21. set _WORKAREASIZE $WORKAREASIZE
  22. } else {
  23. set _WORKAREASIZE 0x1000
  24. }
  25. if { [info exists CPUTAPID] } {
  26. set _CPUTAPID $CPUTAPID
  27. } else {
  28. set _CPUTAPID 0x0bc11477
  29. }
  30. swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
  31. set _TARGETNAME $_CHIPNAME.cpu
  32. target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_CHIPNAME.cpu
  33. $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
  34. set _FLASHNAME $_CHIPNAME.flash
  35. flash bank $_FLASHNAME kinetis 0 0 0 0 $_TARGETNAME
  36. # if srst is not fitted use SYSRESETREQ to
  37. # perform a soft reset
  38. cortex_m reset_config sysresetreq