mt6768-fpga.cmm 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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: FPGA Bring Up
  12. ;; CREATE_DATE: 2014/08/28
  13. ;; NOTE:
  14. ;;================================================
  15. ; Specify Core Number
  16. ;=================================================
  17. &NR_CPUS=1
  18. ; cluster 0 corebase: 0x8007000, 0x8007200, 0x8007400, 0x8007600
  19. ; cluster 1 corebase: 0x8009000, 0x8009200, 0x8009400, 0x8009600
  20. ;=================================================
  21. ; Initialize CPU
  22. ;=================================================
  23. &WDT_TEST=0
  24. if &WDT_TEST==0
  25. (
  26. RESET
  27. SYSTEM.OPTION ENRESET ON
  28. )
  29. SYSTEM.RESET
  30. SYSTEM.OPTION ENRESET ON
  31. SYSTEM.OPTION RESBREAK OFF
  32. SYSTEM.OPTION WAITRESET OFF
  33. SYSTEM.JTAGCLOCK 10.MHz;
  34. ;SYSTEM.CPU CortexA7MPCore
  35. SYStem.CPU CORTEXA53;
  36. ;R-T Memory Access
  37. SYSTEM.MULTICORE MEMORYACCESSPORT 0
  38. SYSTEM.MULTICORE DEBUGACCESSPORT 1
  39. ;SYSTEM.MULTICORE COREBASE APB:0x80070000
  40. ;Setting Core debug register access
  41. if &NR_CPUS==1
  42. (
  43. SYStem.CONFIG CORENUMBER 1;
  44. SYStem.CONFIG COREBASE 0x80410000;
  45. SYStem.CONFIG CTIBASE 0x80420000;
  46. )
  47. else
  48. (
  49. SYSTEM.CONFIG CORENUMBER 2;
  50. SYSTEM.CONFIG COREBASE 0x80810000 0x80910000;
  51. SYStem.CONFIG CTIBASE 0x80820000 0x80920000;
  52. )
  53. ;=================================================
  54. ; Attach and Stop CPU
  55. ;=================================================
  56. SYStem.Up
  57. wait 200.us
  58. SETUP.IMASKHLL ON
  59. SETUP.IMASKASM ON
  60. ;enable L2C 256KB
  61. D.S SD:0x10200000 %LE %LONG 0x00000100 ;Enable L2C share SRAM, cluster 0
  62. D.S SD:0x10200000 %LE %LONG 0x00001100 ;Enable L2C share SRAM, cluster 0
  63. ;enable DMA access on L2C share path
  64. D.S SD:0x1000108c %LE %LONG 0x00404400 ;l2c_sram_cg_clr bit 22 set 1
  65. ; set_hw_breakpoint_by_def
  66. ; setting attribute of breakpoints
  67. Break.Select Program OnChip
  68. Break.Select Hll OnChip
  69. Break.Select Spot OnChip
  70. Break.Select Read OnChip
  71. Break.Select Write OnChip
  72. D.S C15:0x1 0 ; Turn off MMU
  73. ; disable wdt (debug purpose)
  74. D.S SD:0x10007000 %LE %LONG 0x22000000
  75. ; Init DRAM
  76. do OLYMPUS_FPGA_DDR_1G
  77. print "loading pre-loader image"
  78. d.load.elf ../../../../../../../../out/target/product/fpga6757_64/obj/PRELOADER_OBJ/bin/preloader_fpga6757_64.elf
  79. Y.SPATH.RESET ; reset all source path
  80. Y.SPATH.SRD ../../platform/mt6768/src/init
  81. Y.SPATH.SRD ../../platform/mt6768/src/core
  82. Y.SPATH.SRD ../../platform/mt6768/src/drivers
  83. Y.SPATH.SRD ../../platform/mt6768/src/security
  84. Y.SPATH.SRD ../../custom/fpga6757_64
  85. ;Y.SPATH.SRD ../../protect-private/security/ASF/preloader
  86. Break.Select Program OnChip
  87. Break.Select Hll OnChip
  88. Break.Select Spot OnChip
  89. Break.Select Read OnChip
  90. Break.Select Write OnChip
  91. R.S T 0
  92. ;winclear
  93. d.l
  94. enddo