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.
 
 
 
 
 
 

72 lines
1.9 KiB

  1. #
  2. # Configuration script for Arm CoreLink SSE-200 Subsystem based IoT SoCs.
  3. #
  4. global TARGET
  5. set TARGET $_CHIPNAME
  6. swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
  7. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  8. #
  9. # SRAM on ARM CoreLink SSE-200 can be 4 banks of 8/16/32/64 KB
  10. # We will configure work area assuming 8-KB bank size in SRAM bank 1.
  11. # Also SRAM start addresses defaults to secure mode alias.
  12. # These values can be overridden as per board configuration
  13. #
  14. global _WORKAREASIZE_CPU0
  15. if { [info exists WORKAREASIZE_CPU0] } {
  16. set _WORKAREASIZE_CPU0 $WORKAREASIZE_CPU0
  17. } else {
  18. set _WORKAREASIZE_CPU0 0x1000
  19. }
  20. global _WORKAREAADDR_CPU0
  21. if { [info exists WORKAREAADDR_CPU0] } {
  22. set _WORKAREAADDR_CPU0 $WORKAREAADDR_CPU0
  23. } else {
  24. set _WORKAREAADDR_CPU0 0x30008000
  25. }
  26. #
  27. # Target configuration for Cortex M33 Core 0 on ARM CoreLink SSE-200
  28. # Core 0 is the boot core and will always be configured.
  29. #
  30. target create ${TARGET}.CPU0 cortex_m -dap $_CHIPNAME.dap -ap-num 1 -coreid 0
  31. ${TARGET}.CPU0 configure -work-area-phys $_WORKAREAADDR_CPU0 -work-area-size $_WORKAREASIZE_CPU0 -work-area-backup 0
  32. ${TARGET}.CPU0 cortex_m reset_config sysresetreq
  33. #
  34. # Target configuration for Cortex M33 Core 1 on ARM CoreLink SSE-200
  35. # Core 1 is optional and locked at boot until core 0 unlocks it.
  36. #
  37. if { $_ENABLE_CPU1 } {
  38. global _WORKAREASIZE_CPU1
  39. if { [info exists WORKAREASIZE_CPU1] } {
  40. set _WORKAREASIZE_CPU1 $WORKAREASIZE_CPU1
  41. } else {
  42. set _WORKAREASIZE_CPU1 0x1000
  43. }
  44. global _WORKAREAADDR_CPU1
  45. if { [info exists WORKAREAADDR_CPU1] } {
  46. set _WORKAREAADDR_CPU1 $WORKAREAADDR_CPU1
  47. } else {
  48. set _WORKAREAADDR_CPU1 0x30009000
  49. }
  50. target create ${TARGET}.CPU1 cortex_m -dap $_CHIPNAME.dap -ap-num 2 -coreid 1
  51. ${TARGET}.CPU1 configure -work-area-phys $_WORKAREAADDR_CPU1 -work-area-size $_WORKAREASIZE_CPU1 -work-area-backup 0
  52. ${TARGET}.CPU1 cortex_m reset_config vectreset
  53. }
  54. # Make sure the default target is the boot core
  55. targets ${TARGET}.CPU0