evkmimxrt1060_debug.ld 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. /*
  2. * GENERATED FILE - DO NOT EDIT
  3. * Copyright (c) 2008-2013 Code Red Technologies Ltd,
  4. * Copyright 2015, 2018-2019 NXP
  5. * (c) NXP Semiconductors 2013-2020
  6. * Generated linker script file for MIMXRT1062xxxxA
  7. * Created from linkscript.ldt by FMCreateLinkLibraries
  8. * Using Freemarker v2.3.23
  9. * MCUXpresso IDE v11.1.0 [Build 3209] [2019-12-12] on 15-Jan-2020 10:49:25 PM
  10. */
  11. /********* DEBUG_LIBRARY.LD ***********/
  12. /*
  13. "libcr_nohost_nf.a"
  14. "libcr_c.a"
  15. "libcr_eabihelpers.a"
  16. */
  17. GROUP (
  18. "libgcc.a"
  19. )
  20. /********** DEBUG_MEMORY.LD **********/
  21. MEMORY
  22. {
  23. /* Define each memory region */
  24. BOARD_FLASH (rx) : ORIGIN = 0x60000000, LENGTH = 0x800000 /* 8M bytes (alias Flash) */
  25. SRAM_DTC (rwx) : ORIGIN = 0x20000000, LENGTH = 0x20000 /* 128K bytes (alias RAM) */
  26. SRAM_ITC (rwx) : ORIGIN = 0x0, LENGTH = 0x20000 /* 128K bytes (alias RAM2) */
  27. SRAM_OC (rwx) : ORIGIN = 0x20200000, LENGTH = 0xc0000 /* 768K bytes (alias RAM3) */
  28. BOARD_SDRAM (rwx) : ORIGIN = 0x80000000, LENGTH = 0x1e00000 /* 30M bytes (alias RAM4) */
  29. NCACHE_REGION (rwx) : ORIGIN = 0x81e00000, LENGTH = 0x200000 /* 2M bytes (alias RAM5) */
  30. }
  31. /* Define a symbol for the top of each memory region */
  32. __base_BOARD_FLASH = 0x60000000 ; /* BOARD_FLASH */
  33. __base_Flash = 0x60000000 ; /* Flash */
  34. __top_BOARD_FLASH = 0x60000000 + 0x800000 ; /* 8M bytes */
  35. __top_Flash = 0x60000000 + 0x800000 ; /* 8M bytes */
  36. __base_SRAM_DTC = 0x20000000 ; /* SRAM_DTC */
  37. __base_RAM = 0x20000000 ; /* RAM */
  38. __top_SRAM_DTC = 0x20000000 + 0x20000 ; /* 128K bytes */
  39. __top_RAM = 0x20000000 + 0x20000 ; /* 128K bytes */
  40. __base_SRAM_ITC = 0x0 ; /* SRAM_ITC */
  41. __base_RAM2 = 0x0 ; /* RAM2 */
  42. __top_SRAM_ITC = 0x0 + 0x20000 ; /* 128K bytes */
  43. __top_RAM2 = 0x0 + 0x20000 ; /* 128K bytes */
  44. __base_SRAM_OC = 0x20200000 ; /* SRAM_OC */
  45. __base_RAM3 = 0x20200000 ; /* RAM3 */
  46. __top_SRAM_OC = 0x20200000 + 0xc0000 ; /* 768K bytes */
  47. __top_RAM3 = 0x20200000 + 0xc0000 ; /* 768K bytes */
  48. __base_BOARD_SDRAM = 0x80000000 ; /* BOARD_SDRAM */
  49. __base_RAM4 = 0x80000000 ; /* RAM4 */
  50. __top_BOARD_SDRAM = 0x80000000 + 0x1e00000 ; /* 30M bytes */
  51. __top_RAM4 = 0x80000000 + 0x1e00000 ; /* 30M bytes */
  52. __base_NCACHE_REGION = 0x81e00000 ; /* NCACHE_REGION */
  53. __base_RAM5 = 0x81e00000 ; /* RAM5 */
  54. __top_NCACHE_REGION = 0x81e00000 + 0x200000 ; /* 2M bytes */
  55. __top_RAM5 = 0x81e00000 + 0x200000 ; /* 2M bytes */
  56. /********* MAIN LINKER FILE **********/
  57. ENTRY(ResetISR)
  58. SECTIONS
  59. {
  60. /* Image Vector Table and Boot Data for booting from external flash */
  61. .boot_hdr : ALIGN(4)
  62. {
  63. FILL(0xff)
  64. __boot_hdr_start__ = ABSOLUTE(.) ;
  65. KEEP(*(.boot_hdr.conf))
  66. . = 0x1000 ;
  67. KEEP(*(.boot_hdr.ivt))
  68. . = 0x1020 ;
  69. KEEP(*(.boot_hdr.boot_data))
  70. . = 0x1030 ;
  71. KEEP(*(.boot_hdr.dcd_data))
  72. __boot_hdr_end__ = ABSOLUTE(.) ;
  73. . = 0x2000 ;
  74. } >BOARD_FLASH
  75. /* MAIN TEXT SECTION */
  76. .text : ALIGN(4)
  77. {
  78. FILL(0xff)
  79. __vectors_start__ = ABSOLUTE(.) ;
  80. KEEP(*(.isr_vector))
  81. /* Global Section Table */
  82. . = ALIGN(4) ;
  83. __section_table_start = .;
  84. __data_section_table = .;
  85. LONG(LOADADDR(.data));
  86. LONG( ADDR(.data));
  87. LONG( SIZEOF(.data));
  88. LONG(LOADADDR(.data_RAM2));
  89. LONG( ADDR(.data_RAM2));
  90. LONG( SIZEOF(.data_RAM2));
  91. LONG(LOADADDR(.data_RAM3));
  92. LONG( ADDR(.data_RAM3));
  93. LONG( SIZEOF(.data_RAM3));
  94. LONG(LOADADDR(.data_RAM4));
  95. LONG( ADDR(.data_RAM4));
  96. LONG( SIZEOF(.data_RAM4));
  97. LONG(LOADADDR(.data_RAM5));
  98. LONG( ADDR(.data_RAM5));
  99. LONG( SIZEOF(.data_RAM5));
  100. __data_section_table_end = .;
  101. __bss_section_table = .;
  102. LONG( ADDR(.bss));
  103. LONG( SIZEOF(.bss));
  104. LONG( ADDR(.bss_RAM2));
  105. LONG( SIZEOF(.bss_RAM2));
  106. LONG( ADDR(.bss_RAM3));
  107. LONG( SIZEOF(.bss_RAM3));
  108. LONG( ADDR(.bss_RAM4));
  109. LONG( SIZEOF(.bss_RAM4));
  110. LONG( ADDR(.bss_RAM5));
  111. LONG( SIZEOF(.bss_RAM5));
  112. __bss_section_table_end = .;
  113. __section_table_end = . ;
  114. /* End of Global Section Table */
  115. *(.after_vectors*)
  116. } > BOARD_FLASH
  117. .text : ALIGN(4)
  118. {
  119. *(.text*)
  120. *(.rodata .rodata.* .constdata .constdata.*)
  121. . = ALIGN(4);
  122. } > BOARD_FLASH
  123. /*
  124. * for exception handling/unwind - some Newlib functions (in common
  125. * with C++ and STDC++) use this.
  126. */
  127. .ARM.extab : ALIGN(4)
  128. {
  129. *(.ARM.extab* .gnu.linkonce.armextab.*)
  130. } > BOARD_FLASH
  131. __exidx_start = .;
  132. .ARM.exidx : ALIGN(4)
  133. {
  134. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  135. } > BOARD_FLASH
  136. __exidx_end = .;
  137. _etext = .;
  138. /* DATA section for SRAM_ITC */
  139. .data_RAM2 : ALIGN(4)
  140. {
  141. FILL(0xff)
  142. PROVIDE(__start_data_RAM2 = .) ;
  143. PROVIDE(__start_data_SRAM_ITC = .) ;
  144. *(.ramfunc.$RAM2)
  145. *(.ramfunc.$SRAM_ITC)
  146. *(.data.$RAM2)
  147. *(.data.$SRAM_ITC)
  148. *(.data.$RAM2.*)
  149. *(.data.$SRAM_ITC.*)
  150. . = ALIGN(4) ;
  151. PROVIDE(__end_data_RAM2 = .) ;
  152. PROVIDE(__end_data_SRAM_ITC = .) ;
  153. } > SRAM_ITC AT>BOARD_FLASH
  154. /* DATA section for SRAM_OC */
  155. .data_RAM3 : ALIGN(4)
  156. {
  157. FILL(0xff)
  158. PROVIDE(__start_data_RAM3 = .) ;
  159. PROVIDE(__start_data_SRAM_OC = .) ;
  160. *(.ramfunc.$RAM3)
  161. *(.ramfunc.$SRAM_OC)
  162. *(.data.$RAM3)
  163. *(.data.$SRAM_OC)
  164. *(.data.$RAM3.*)
  165. *(.data.$SRAM_OC.*)
  166. . = ALIGN(4) ;
  167. PROVIDE(__end_data_RAM3 = .) ;
  168. PROVIDE(__end_data_SRAM_OC = .) ;
  169. } > SRAM_OC AT>BOARD_FLASH
  170. /* DATA section for BOARD_SDRAM */
  171. .data_RAM4 : ALIGN(4)
  172. {
  173. FILL(0xff)
  174. PROVIDE(__start_data_RAM4 = .) ;
  175. PROVIDE(__start_data_BOARD_SDRAM = .) ;
  176. *(.ramfunc.$RAM4)
  177. *(.ramfunc.$BOARD_SDRAM)
  178. *(.data.$RAM4)
  179. *(.data.$BOARD_SDRAM)
  180. *(.data.$RAM4.*)
  181. *(.data.$BOARD_SDRAM.*)
  182. . = ALIGN(4) ;
  183. PROVIDE(__end_data_RAM4 = .) ;
  184. PROVIDE(__end_data_BOARD_SDRAM = .) ;
  185. } > BOARD_SDRAM AT>BOARD_FLASH
  186. /* DATA section for NCACHE_REGION */
  187. .data_RAM5 : ALIGN(4)
  188. {
  189. FILL(0xff)
  190. PROVIDE(__start_data_RAM5 = .) ;
  191. PROVIDE(__start_data_NCACHE_REGION = .) ;
  192. *(.ramfunc.$RAM5)
  193. *(.ramfunc.$NCACHE_REGION)
  194. *(.data.$RAM5)
  195. *(.data.$NCACHE_REGION)
  196. *(.data.$RAM5.*)
  197. *(.data.$NCACHE_REGION.*)
  198. . = ALIGN(4) ;
  199. PROVIDE(__end_data_RAM5 = .) ;
  200. PROVIDE(__end_data_NCACHE_REGION = .) ;
  201. } > NCACHE_REGION AT>BOARD_FLASH
  202. /* MAIN DATA SECTION */
  203. .uninit_RESERVED (NOLOAD) : ALIGN(4)
  204. {
  205. _start_uninit_RESERVED = .;
  206. KEEP(*(.bss.$RESERVED*))
  207. . = ALIGN(4) ;
  208. _end_uninit_RESERVED = .;
  209. } > SRAM_DTC AT> SRAM_DTC
  210. /* Main DATA section (SRAM_DTC) */
  211. .data : ALIGN(4)
  212. {
  213. FILL(0xff)
  214. _data = . ;
  215. PROVIDE(__start_data_RAM = .) ;
  216. PROVIDE(__start_data_SRAM_DTC = .) ;
  217. *(vtable)
  218. *(.ramfunc*)
  219. KEEP(*(CodeQuickAccess))
  220. KEEP(*(DataQuickAccess))
  221. *(RamFunction)
  222. *(NonCacheable.init)
  223. *(.data*)
  224. . = ALIGN(4) ;
  225. _edata = . ;
  226. PROVIDE(__end_data_RAM = .) ;
  227. PROVIDE(__end_data_SRAM_DTC = .) ;
  228. } > SRAM_DTC AT>BOARD_FLASH
  229. /* BSS section for SRAM_ITC */
  230. .bss_RAM2 : ALIGN(4)
  231. {
  232. PROVIDE(__start_bss_RAM2 = .) ;
  233. PROVIDE(__start_bss_SRAM_ITC = .) ;
  234. *(.bss.$RAM2)
  235. *(.bss.$SRAM_ITC)
  236. *(.bss.$RAM2.*)
  237. *(.bss.$SRAM_ITC.*)
  238. . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
  239. PROVIDE(__end_bss_RAM2 = .) ;
  240. PROVIDE(__end_bss_SRAM_ITC = .) ;
  241. } > SRAM_ITC AT> SRAM_ITC
  242. /* BSS section for SRAM_OC */
  243. .bss_RAM3 : ALIGN(4)
  244. {
  245. PROVIDE(__start_bss_RAM3 = .) ;
  246. PROVIDE(__start_bss_SRAM_OC = .) ;
  247. *(.bss.$RAM3)
  248. *(.bss.$SRAM_OC)
  249. *(.bss.$RAM3.*)
  250. *(.bss.$SRAM_OC.*)
  251. . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
  252. PROVIDE(__end_bss_RAM3 = .) ;
  253. PROVIDE(__end_bss_SRAM_OC = .) ;
  254. } > SRAM_OC AT> SRAM_OC
  255. /* BSS section for BOARD_SDRAM */
  256. .bss_RAM4 : ALIGN(4)
  257. {
  258. PROVIDE(__start_bss_RAM4 = .) ;
  259. PROVIDE(__start_bss_BOARD_SDRAM = .) ;
  260. *(.bss.$RAM4)
  261. *(.bss.$BOARD_SDRAM)
  262. *(.bss.$RAM4.*)
  263. *(.bss.$BOARD_SDRAM.*)
  264. . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
  265. PROVIDE(__end_bss_RAM4 = .) ;
  266. PROVIDE(__end_bss_BOARD_SDRAM = .) ;
  267. } > BOARD_SDRAM AT> BOARD_SDRAM
  268. /* BSS section for NCACHE_REGION */
  269. .bss_RAM5 : ALIGN(4)
  270. {
  271. PROVIDE(__start_bss_RAM5 = .) ;
  272. PROVIDE(__start_bss_NCACHE_REGION = .) ;
  273. *(.bss.$RAM5)
  274. *(.bss.$NCACHE_REGION)
  275. *(.bss.$RAM5.*)
  276. *(.bss.$NCACHE_REGION.*)
  277. . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
  278. PROVIDE(__end_bss_RAM5 = .) ;
  279. PROVIDE(__end_bss_NCACHE_REGION = .) ;
  280. } > NCACHE_REGION AT> NCACHE_REGION
  281. /* MAIN BSS SECTION */
  282. .bss : ALIGN(4)
  283. {
  284. _bss = .;
  285. PROVIDE(__start_bss_RAM = .) ;
  286. PROVIDE(__start_bss_SRAM_DTC = .) ;
  287. *(NonCacheable)
  288. *(.bss*)
  289. *(COMMON)
  290. . = ALIGN(4) ;
  291. _ebss = .;
  292. PROVIDE(__end_bss_RAM = .) ;
  293. PROVIDE(__end_bss_SRAM_DTC = .) ;
  294. PROVIDE(end = .);
  295. } > SRAM_DTC AT> SRAM_DTC
  296. /* NOINIT section for SRAM_ITC */
  297. .noinit_RAM2 (NOLOAD) : ALIGN(4)
  298. {
  299. PROVIDE(__start_noinit_RAM2 = .) ;
  300. PROVIDE(__start_noinit_SRAM_ITC = .) ;
  301. *(.noinit.$RAM2)
  302. *(.noinit.$SRAM_ITC)
  303. *(.noinit.$RAM2.*)
  304. *(.noinit.$SRAM_ITC.*)
  305. . = ALIGN(4) ;
  306. PROVIDE(__end_noinit_RAM2 = .) ;
  307. PROVIDE(__end_noinit_SRAM_ITC = .) ;
  308. } > SRAM_ITC AT> SRAM_ITC
  309. /* NOINIT section for SRAM_OC */
  310. .noinit_RAM3 (NOLOAD) : ALIGN(4)
  311. {
  312. PROVIDE(__start_noinit_RAM3 = .) ;
  313. PROVIDE(__start_noinit_SRAM_OC = .) ;
  314. *(.noinit.$RAM3)
  315. *(.noinit.$SRAM_OC)
  316. *(.noinit.$RAM3.*)
  317. *(.noinit.$SRAM_OC.*)
  318. . = ALIGN(4) ;
  319. PROVIDE(__end_noinit_RAM3 = .) ;
  320. PROVIDE(__end_noinit_SRAM_OC = .) ;
  321. } > SRAM_OC AT> SRAM_OC
  322. /* NOINIT section for BOARD_SDRAM */
  323. .noinit_RAM4 (NOLOAD) : ALIGN(4)
  324. {
  325. PROVIDE(__start_noinit_RAM4 = .) ;
  326. PROVIDE(__start_noinit_BOARD_SDRAM = .) ;
  327. *(.noinit.$RAM4)
  328. *(.noinit.$BOARD_SDRAM)
  329. *(.noinit.$RAM4.*)
  330. *(.noinit.$BOARD_SDRAM.*)
  331. . = ALIGN(4) ;
  332. PROVIDE(__end_noinit_RAM4 = .) ;
  333. PROVIDE(__end_noinit_BOARD_SDRAM = .) ;
  334. } > BOARD_SDRAM AT> BOARD_SDRAM
  335. /* NOINIT section for NCACHE_REGION */
  336. .noinit_RAM5 (NOLOAD) : ALIGN(4)
  337. {
  338. PROVIDE(__start_noinit_RAM5 = .) ;
  339. PROVIDE(__start_noinit_NCACHE_REGION = .) ;
  340. *(.noinit.$RAM5)
  341. *(.noinit.$NCACHE_REGION)
  342. *(.noinit.$RAM5.*)
  343. *(.noinit.$NCACHE_REGION.*)
  344. . = ALIGN(4) ;
  345. PROVIDE(__end_noinit_RAM5 = .) ;
  346. PROVIDE(__end_noinit_NCACHE_REGION = .) ;
  347. } > NCACHE_REGION AT> NCACHE_REGION
  348. /* DEFAULT NOINIT SECTION */
  349. .noinit (NOLOAD): ALIGN(4)
  350. {
  351. _noinit = .;
  352. PROVIDE(__start_noinit_RAM = .) ;
  353. PROVIDE(__start_noinit_SRAM_DTC = .) ;
  354. *(.noinit*)
  355. . = ALIGN(4) ;
  356. _end_noinit = .;
  357. PROVIDE(__end_noinit_RAM = .) ;
  358. PROVIDE(__end_noinit_SRAM_DTC = .) ;
  359. } > SRAM_DTC AT> SRAM_DTC
  360. /* Reserve and place Heap within memory map */
  361. _HeapSize = 0x1000;
  362. .heap : ALIGN(4)
  363. {
  364. _pvHeapStart = .;
  365. . += _HeapSize;
  366. . = ALIGN(4);
  367. _pvHeapLimit = .;
  368. } > SRAM_DTC
  369. _StackSize = 0x1000;
  370. /* Reserve space in memory for Stack */
  371. .heap2stackfill :
  372. {
  373. . += _StackSize;
  374. } > SRAM_DTC
  375. /* Locate actual Stack in memory map */
  376. .stack ORIGIN(SRAM_DTC) + LENGTH(SRAM_DTC) - _StackSize - 0: ALIGN(4)
  377. {
  378. _vStackBase = .;
  379. . = ALIGN(4);
  380. _vStackTop = . + _StackSize;
  381. } > SRAM_DTC
  382. /* Provide basic symbols giving location and size of main text
  383. * block, including initial values of RW data sections. Note that
  384. * these will need extending to give a complete picture with
  385. * complex images (e.g multiple Flash banks).
  386. */
  387. _image_start = LOADADDR(.text);
  388. _image_end = LOADADDR(.data) + SIZEOF(.data);
  389. _image_size = _image_end - _image_start;
  390. }