mt6580-evb.cmm 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. ;*****************************************************************************
  2. ; Copyright Statement:
  3. ; --------------------
  4. ; This software is protected by Copyright and the information contained
  5. ; herein is confidential. The software may not be copied and the information
  6. ; contained herein may not be used or disclosed except with the written
  7. ; permission of MediaTek Inc. (C) 2011
  8. ;
  9. ;*****************************************************************************
  10. ;;================================================
  11. ;; PURPOSE: EVB Bring Up
  12. ;; CREATE_DATE: 2015/1/28
  13. ;; NOTE:
  14. ;;================================================
  15. ; Specify Core Number
  16. ;=================================================
  17. ;;-> # Option: Serial Wire or Parallel JTAG
  18. ;; OPT_JTAG
  19. ;; 0: Parallel
  20. ;; 1: Serial Wire
  21. &OPT_JTAG=0
  22. ;;-> # Option: Number of CPUs to be connected
  23. ;; OPT_NR_CPUS
  24. &OPT_NR_CPUS=1
  25. &NR_CPUS=1
  26. ; cluster 0 corebase: 0x8007000, 0x8007200, 0x8007400, 0x8007600
  27. ; cluster 1 corebase: 0x8009000, 0x8009200, 0x8009400, 0x8009600
  28. ;=================================================
  29. ; Initialize CPU
  30. ;=================================================
  31. &WDT_TEST=0
  32. if &WDT_TEST==0
  33. (
  34. RESET
  35. SYSTEM.OPTION ENRESET ON
  36. )
  37. SYStem.Down
  38. SYSTEM.RESET
  39. SYSTEM.OPTION ENRESET ON
  40. SYSTEM.OPTION RESBREAK OFF
  41. SYSTEM.OPTION WAITRESET OFF
  42. SYSTEM.JTAGCLOCK 1.MHz;
  43. IF &OPT_JTAG==0
  44. (
  45. SYStem.Config SWDP OFF
  46. )
  47. ELSE IF &OPT_JTAG==1
  48. (
  49. SYStem.Config SWDP ON
  50. )
  51. SYSTEM.CPU CortexA7MPCore
  52. ;SYStem.CPU CORTEXA53;
  53. SYStem.Config CORENUMBER &OPT_NR_CPUS
  54. SYStem.Config COREBASE 0x80070000
  55. ;R-T Memory Access
  56. ;SYSTEM.MULTICORE MEMORYACCESSPORT 0
  57. ;SYSTEM.MULTICORE DEBUGACCESSPORT 1
  58. ;=================================================
  59. ; Attach and Stop CPU
  60. ;=================================================
  61. SYStem.Up
  62. MMU.OFF
  63. D.S C15:0x1 0 ; Turn off MMU
  64. wait 200.us
  65. SETUP.IMASKHLL ON
  66. SETUP.IMASKASM ON
  67. ; Disable DABORT and PABORT breakpoint
  68. TrOnchip.Set dabort off
  69. TrOnchip.Set pabort off
  70. TrOnchip.Set undef off
  71. TrOnchip.Set irq off
  72. ; set_hw_breakpoint_by_def
  73. ; setting attribute of breakpoints
  74. Break.Select Program OnChip
  75. Break.Select Hll OnChip
  76. Break.Select Spot OnChip
  77. Break.Select Read OnChip
  78. Break.Select Write OnChip
  79. ;
  80. ; board init
  81. ;
  82. ; Disable acinactm
  83. ;D.S c:0x1020011C %LE %LONG 0x1
  84. ;D.S c:0x1020011C %LE %LONG 0x1
  85. ;Disable acinactm
  86. ;d.s c:0x1020002c %le %long 0x8
  87. ;d.s c:0x1020022c %le %long 0x8
  88. ; Disable wdt
  89. D.S c:0x10007000 %LE %LONG 0x22000004
  90. ;enable L2C 256KB
  91. D.S SD:0x10200000 %LE %LONG 0x00000020 ;Enable L2C share SRAM, cluster 0
  92. ; init DRAM by cmm script (FPGA only)
  93. ;do Rainier_FPGA_DDR.cmm
  94. ; board init
  95. print "loading pre-loader image"
  96. ;d.load.elf ../../bin/preloader.elf
  97. ; ABTC change the ouput folder
  98. ;d.load.elf ../../../../out/target/product/evb6580/obj/PRELOADER_OBJ/bin/preloader.elf
  99. d.load.elf ../../../../../out/target/product/evb6580/obj/PRELOADER_OBJ/bin/preloader_evb6580.elf
  100. ;d.load.elf ../../../../../out/target/product/evb6580/obj/PRELOADER_OBJ/bin/preloader.elf /nocode
  101. Y.SPATH.RESET ; reset all source path
  102. Y.SPATH.SRD ../../platform/mt6580/src/init
  103. Y.SPATH.SRD ../../platform/mt6580/src/core
  104. Y.SPATH.SRD ../../platform/mt6580/src/drivers
  105. Y.SPATH.SRD ../../platform/mt6580/src/security
  106. Y.SPATH.SRD ../../custom/evb6580/
  107. ;Y.SPATH.SRD ../../../protect-private/security/ASF/preloader
  108. R.S T 0
  109. ;winclear
  110. d.l
  111. enddo