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.
 
 
 
 
 
 

39 lines
844 B

  1. #
  2. # efm32 stlink pseudo target
  3. #
  4. if { [info exists CHIPNAME] } {
  5. set _CHIPNAME $CHIPNAME
  6. } else {
  7. set _CHIPNAME efm32
  8. }
  9. # Work-area is a space in RAM used for flash programming
  10. # By default use 16kB
  11. if { [info exists WORKAREASIZE] } {
  12. set _WORKAREASIZE $WORKAREASIZE
  13. } else {
  14. set _WORKAREASIZE 0x4000
  15. }
  16. if { [info exists CPUTAPID] } {
  17. set _CPUTAPID $CPUTAPID
  18. } else {
  19. set _CPUTAPID 0x2ba01477
  20. }
  21. # EFM32 MCUs only support SW interface
  22. set _TRANSPORT hla_swd
  23. transport select $_TRANSPORT
  24. hla newtap $_CHIPNAME cpu -expected-id $_CPUTAPID
  25. set _TARGETNAME $_CHIPNAME.cpu
  26. target create $_TARGETNAME hla_target -chain-position $_TARGETNAME
  27. $_TARGETNAME configure -work-area-phys 0x10000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
  28. set _FLASHNAME $_CHIPNAME.flash
  29. flash bank $_FLASHNAME efm32 0 0 0 0 $_TARGETNAME