您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. //#include "imxrt.h"
  2. #include <stdint.h>
  3. extern void ResetHandler(void);
  4. extern unsigned long _estack;
  5. extern unsigned long _flashimagelen;
  6. __attribute__ ((section(".vectors"), used))
  7. const uint32_t vector_table[2] = {
  8. (uint32_t)&_estack,
  9. (uint32_t)&ResetHandler
  10. };
  11. __attribute__ ((section(".bootdata"), used))
  12. const uint32_t BootData[3] = {
  13. 0x60000000,
  14. (uint32_t)&_flashimagelen,
  15. 0
  16. };
  17. __attribute__ ((section(".ivt"), used))
  18. const uint32_t ImageVectorTable[8] = {
  19. 0x402000D1, // header
  20. (uint32_t)vector_table, // docs are wrong, needs to be vec table, not start addr
  21. 0, // reserved
  22. 0, // dcd
  23. (uint32_t)BootData, // abs address of boot data
  24. (uint32_t)ImageVectorTable, // self
  25. 0, // command sequence file
  26. 0 // reserved
  27. };
  28. __attribute__ ((section(".flashconfig"), used))
  29. uint32_t FlexSPI_NOR_Config[128] = {
  30. // 448 byte common FlexSPI configuration block, 8.6.3.1 page 223 (RT1060 rev 0)
  31. // MCU_Flashloader_Reference_Manual.pdf, 8.2.1, Table 8-2, page 72-75
  32. 0x42464346, // Tag 0x00
  33. 0x56010000, // Version
  34. 0, // reserved
  35. 0x00020101, // columnAdressWidth,dataSetupTime,dataHoldTime,readSampleClkSrc
  36. 0x00000000, // waitTimeCfgCommands,-,deviceModeCfgEnable
  37. 0, // deviceModeSeq
  38. 0, // deviceModeArg
  39. 0x00000000, // -,-,-,configCmdEnable
  40. 0, // configCmdSeqs 0x20
  41. 0,
  42. 0,
  43. 0,
  44. 0, // cfgCmdArgs 0x30
  45. 0,
  46. 0,
  47. 0,
  48. 0x00000000, // controllerMiscOption 0x40
  49. 0x00030401, // lutCustomSeqEnable,serialClkFreq,sflashPadType,deviceType
  50. 0, // reserved
  51. 0, // reserved
  52. 0x00200000, // sflashA1Size 0x50
  53. 0, // sflashA2Size
  54. 0, // sflashB1Size
  55. 0, // sflashB2Size
  56. 0, // csPadSettingOverride 0x60
  57. 0, // sclkPadSettingOverride
  58. 0, // dataPadSettingOverride
  59. 0, // dqsPadSettingOverride
  60. 0, // timeoutInMs 0x70
  61. 0, // commandInterval
  62. 0, // dataValidTime
  63. 0x00000000, // busyBitPolarity,busyOffset
  64. 0x0A1804EB, // lookupTable[0] 0x80
  65. 0x26043206, // lookupTable[1]
  66. 0, // lookupTable[2]
  67. 0, // lookupTable[3]
  68. 0x24040405, // lookupTable[4] 0x90
  69. 0, // lookupTable[5]
  70. 0, // lookupTable[6]
  71. 0, // lookupTable[7]
  72. 0, // lookupTable[8] 0xA0
  73. 0, // lookupTable[9]
  74. 0, // lookupTable[10]
  75. 0, // lookupTable[11]
  76. 0x00000406, // lookupTable[12] 0xB0
  77. 0, // lookupTable[13]
  78. 0, // lookupTable[14]
  79. 0, // lookupTable[15]
  80. 0, // lookupTable[16] 0xC0
  81. 0, // lookupTable[17]
  82. 0, // lookupTable[18]
  83. 0, // lookupTable[19]
  84. 0x08180420, // lookupTable[20] 0xD0
  85. 0, // lookupTable[21]
  86. 0, // lookupTable[22]
  87. 0, // lookupTable[23]
  88. 0, // lookupTable[24] 0xE0
  89. 0, // lookupTable[25]
  90. 0, // lookupTable[26]
  91. 0, // lookupTable[27]
  92. 0, // lookupTable[28] 0xF0
  93. 0, // lookupTable[29]
  94. 0, // lookupTable[30]
  95. 0, // lookupTable[31]
  96. 0x081804D8, // lookupTable[32] 0x100
  97. 0, // lookupTable[33]
  98. 0, // lookupTable[34]
  99. 0, // lookupTable[35]
  100. 0x08180402, // lookupTable[36] 0x110
  101. 0x00002004, // lookupTable[37]
  102. 0, // lookupTable[38]
  103. 0, // lookupTable[39]
  104. 0, // lookupTable[40] 0x120
  105. 0, // lookupTable[41]
  106. 0, // lookupTable[42]
  107. 0, // lookupTable[43]
  108. 0x00000460, // lookupTable[44] 0x130
  109. 0, // lookupTable[45]
  110. 0, // lookupTable[46]
  111. 0, // lookupTable[47]
  112. 0, // lookupTable[48] 0x140
  113. 0, // lookupTable[49]
  114. 0, // lookupTable[50]
  115. 0, // lookupTable[51]
  116. 0, // lookupTable[52] 0x150
  117. 0, // lookupTable[53]
  118. 0, // lookupTable[54]
  119. 0, // lookupTable[55]
  120. 0, // lookupTable[56] 0x160
  121. 0, // lookupTable[57]
  122. 0, // lookupTable[58]
  123. 0, // lookupTable[59]
  124. 0, // lookupTable[60] 0x170
  125. 0, // lookupTable[61]
  126. 0, // lookupTable[62]
  127. 0, // lookupTable[63]
  128. 0, // LUT 0: Read 0x180
  129. 0, // LUT 1: ReadStatus
  130. 0, // LUT 3: WriteEnable
  131. 0, // LUT 5: EraseSector
  132. 0, // LUT 9: PageProgram 0x190
  133. 0, // LUT 11: ChipErase
  134. 0, // LUT 15: Dummy
  135. 0, // LUT unused?
  136. 0, // LUT unused? 0x1A0
  137. 0, // LUT unused?
  138. 0, // LUT unused?
  139. 0, // LUT unused?
  140. 0, // reserved 0x1B0
  141. 0, // reserved
  142. 0, // reserved
  143. 0, // reserved
  144. // 64 byte Serial NOR configuration block, 8.6.3.2, page 346
  145. 256, // pageSize 0x1C0
  146. 4096, // sectorSize
  147. 1, // ipCmdSerialClkFreq
  148. 0, // reserved
  149. 0x00010000, // block size 0x1D0
  150. 0, // reserved
  151. 0, // reserved
  152. 0, // reserved
  153. 0, // reserved 0x1E0
  154. 0, // reserved
  155. 0, // reserved
  156. 0, // reserved
  157. 0, // reserved 0x1F0
  158. 0, // reserved
  159. 0, // reserved
  160. 0 // reserved
  161. };