sim3x.cfg 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. #
  3. # Silicon Laboratories SiM3x Cortex-M3
  4. #
  5. # SiM3x devices support both JTAG and SWD transports.
  6. source [find target/swj-dp.tcl]
  7. if { [info exists CHIPNAME] } {
  8. set _CHIPNAME $CHIPNAME
  9. } else {
  10. set _CHIPNAME SiM3x
  11. }
  12. if { [info exists CPUTAPID] } {
  13. set _CPUTAPID $CPUTAPID
  14. } else {
  15. set _CPUTAPID 0x4ba00477
  16. }
  17. if { [info exists CPURAMSIZE] } {
  18. set _CPURAMSIZE $CPURAMSIZE
  19. } else {
  20. # Minimum size of RAM in the Silicon Labs product matrix (8KB)
  21. set _CPURAMSIZE 0x2000
  22. }
  23. if { [info exists CPUROMSIZE] } {
  24. set _CPUROMSIZE $CPUROMSIZE
  25. } else {
  26. # Minimum size of FLASH in the Silicon Labs product matrix (32KB)
  27. set _CPUROMSIZE 0x8000
  28. }
  29. if { [info exists WORKAREASIZE] } {
  30. set _WORKAREASIZE $WORKAREASIZE
  31. } else {
  32. set _WORKAREASIZE $_CPURAMSIZE
  33. }
  34. swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
  35. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  36. set _TARGETNAME $_CHIPNAME.cpu
  37. target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
  38. $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE
  39. set _FLASHNAME $_CHIPNAME.flash
  40. flash bank $_FLASHNAME sim3x 0 $_CPUROMSIZE 0 0 $_TARGETNAME
  41. adapter speed 1000
  42. adapter srst delay 100
  43. if {[using_jtag]} {
  44. jtag_ntrst_delay 100
  45. }