Teensy 4.1 core updated for C++20
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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