lpcxpresso55s69_flashiap1_debug.ld 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. /*
  2. * GENERATED FILE - DO NOT EDIT
  3. * Copyright (c) 2008 - 2013 Code Red Technologies Ltd,
  4. * Copyright 2015, 2018 NXP
  5. * (c) NXP Semiconductors 2013-2019
  6. * Generated linker script file for LPC55S69
  7. * Created from linkscript.ldt by FMCreateLinkLibraries
  8. * Using Freemarker v2.3.23
  9. * MCUXpresso IDE v10.3.1 [Build 2233] [2019-02-20] on 8-Mar-2019 10:16:00 AM
  10. */
  11. /* Previous MEMORY ld file */
  12. MEMORY
  13. {
  14. /* Define each memory region */
  15. PROGRAM_FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x98000 /* 608K bytes (alias Flash) */
  16. SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x44000 /* 272K bytes (alias RAM) */
  17. SRAMX (rwx) : ORIGIN = 0x4000000, LENGTH = 0x8000 /* 32K bytes (alias RAM2) */
  18. USB_RAM (rwx) : ORIGIN = 0x40100000, LENGTH = 0x4000 /* 16K bytes (alias RAM3) */
  19. }
  20. /* Define a symbol for the top of each memory region */
  21. __base_PROGRAM_FLASH = 0x0 ; /* PROGRAM_FLASH */
  22. __base_Flash = 0x0 ; /* Flash */
  23. __top_PROGRAM_FLASH = 0x0 + 0x98000 ; /* 608K bytes */
  24. __top_Flash = 0x0 + 0x98000 ; /* 608K bytes */
  25. __base_SRAM = 0x20000000 ; /* SRAM */
  26. __base_RAM = 0x20000000 ; /* RAM */
  27. __top_SRAM = 0x20000000 + 0x44000 ; /* 272K bytes */
  28. __top_RAM = 0x20000000 + 0x44000 ; /* 272K bytes */
  29. __base_SRAMX = 0x4000000 ; /* SRAMX */
  30. __base_RAM2 = 0x4000000 ; /* RAM2 */
  31. __top_SRAMX = 0x4000000 + 0x8000 ; /* 32K bytes */
  32. __top_RAM2 = 0x4000000 + 0x8000 ; /* 32K bytes */
  33. __base_USB_RAM = 0x40100000 ; /* USB_RAM */
  34. __base_RAM3 = 0x40100000 ; /* RAM3 */
  35. __top_USB_RAM = 0x40100000 + 0x4000 ; /* 16K bytes */
  36. __top_RAM3 = 0x40100000 + 0x4000 ; /* 16K bytes */
  37. /* Rest of file */
  38. ENTRY(ResetISR)
  39. SECTIONS
  40. {
  41. /* MAIN TEXT SECTION */
  42. .text : ALIGN(4)
  43. {
  44. FILL(0xff)
  45. __vectors_start__ = ABSOLUTE(.) ;
  46. KEEP(*(.isr_vector))
  47. /* Global Section Table */
  48. . = ALIGN(4) ;
  49. __section_table_start = .;
  50. __data_section_table = .;
  51. LONG(LOADADDR(.data));
  52. LONG( ADDR(.data));
  53. LONG( SIZEOF(.data));
  54. LONG(LOADADDR(.data_RAM2));
  55. LONG( ADDR(.data_RAM2));
  56. LONG( SIZEOF(.data_RAM2));
  57. LONG(LOADADDR(.data_RAM3));
  58. LONG( ADDR(.data_RAM3));
  59. LONG( SIZEOF(.data_RAM3));
  60. __data_section_table_end = .;
  61. __bss_section_table = .;
  62. LONG( ADDR(.bss));
  63. LONG( SIZEOF(.bss));
  64. LONG( ADDR(.bss_RAM2));
  65. LONG( SIZEOF(.bss_RAM2));
  66. LONG( ADDR(.bss_RAM3));
  67. LONG( SIZEOF(.bss_RAM3));
  68. __bss_section_table_end = .;
  69. __section_table_end = . ;
  70. /* End of Global Section Table */
  71. *(.after_vectors*)
  72. } > PROGRAM_FLASH
  73. .text : ALIGN(4)
  74. {
  75. *(.text*)
  76. *(.rodata .rodata.* .constdata .constdata.*)
  77. . = ALIGN(4);
  78. } > PROGRAM_FLASH
  79. /*
  80. * for exception handling/unwind - some Newlib functions (in common
  81. * with C++ and STDC++) use this.
  82. */
  83. .ARM.extab : ALIGN(4)
  84. {
  85. *(.ARM.extab* .gnu.linkonce.armextab.*)
  86. } > PROGRAM_FLASH
  87. __exidx_start = .;
  88. .ARM.exidx : ALIGN(4)
  89. {
  90. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  91. } > PROGRAM_FLASH
  92. __exidx_end = .;
  93. _etext = .;
  94. /* USB_RAM */
  95. .m_usb_data (NOLOAD) :
  96. {
  97. *(m_usb_global)
  98. } > USB_RAM
  99. /* DATA section for SRAMX */
  100. .data_RAM2 : ALIGN(4)
  101. {
  102. FILL(0xff)
  103. PROVIDE(__start_data_RAM2 = .) ;
  104. *(.ramfunc.$RAM2)
  105. *(.ramfunc.$SRAMX)
  106. *(.data.$RAM2*)
  107. *(.data.$SRAMX*)
  108. . = ALIGN(4) ;
  109. PROVIDE(__end_data_RAM2 = .) ;
  110. } > SRAMX AT>PROGRAM_FLASH
  111. /* DATA section for USB_RAM */
  112. .data_RAM3 : ALIGN(4)
  113. {
  114. FILL(0xff)
  115. PROVIDE(__start_data_RAM3 = .) ;
  116. *(.ramfunc.$RAM3)
  117. *(.ramfunc.$USB_RAM)
  118. *(.data.$RAM3*)
  119. *(.data.$USB_RAM*)
  120. . = ALIGN(4) ;
  121. PROVIDE(__end_data_RAM3 = .) ;
  122. } > USB_RAM AT>PROGRAM_FLASH
  123. /* MAIN DATA SECTION */
  124. .uninit_RESERVED : ALIGN(4)
  125. {
  126. KEEP(*(.bss.$RESERVED*))
  127. . = ALIGN(4) ;
  128. _end_uninit_RESERVED = .;
  129. } > SRAM
  130. /* Main DATA section (SRAM) */
  131. .data : ALIGN(4)
  132. {
  133. FILL(0xff)
  134. _data = . ;
  135. *(vtable)
  136. *(.ramfunc*)
  137. *(.data*)
  138. . = ALIGN(4) ;
  139. _edata = . ;
  140. } > SRAM AT>PROGRAM_FLASH
  141. /* BSS section for SRAMX */
  142. .bss_RAM2 : ALIGN(4)
  143. {
  144. PROVIDE(__start_bss_RAM2 = .) ;
  145. *(.bss.$RAM2*)
  146. *(.bss.$SRAMX*)
  147. . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
  148. PROVIDE(__end_bss_RAM2 = .) ;
  149. } > SRAMX
  150. /* BSS section for USB_RAM */
  151. .bss_RAM3 : ALIGN(4)
  152. {
  153. PROVIDE(__start_bss_RAM3 = .) ;
  154. *(.bss.$RAM3*)
  155. *(.bss.$USB_RAM*)
  156. . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */
  157. PROVIDE(__end_bss_RAM3 = .) ;
  158. } > USB_RAM
  159. /* MAIN BSS SECTION */
  160. .bss : ALIGN(4)
  161. {
  162. _bss = .;
  163. *(.bss*)
  164. *(COMMON)
  165. . = ALIGN(4) ;
  166. _ebss = .;
  167. PROVIDE(end = .);
  168. } > SRAM
  169. /* NOINIT section for SRAMX */
  170. .noinit_RAM2 (NOLOAD) : ALIGN(4)
  171. {
  172. *(.noinit.$RAM2*)
  173. *(.noinit.$SRAMX*)
  174. . = ALIGN(4) ;
  175. } > SRAMX
  176. /* NOINIT section for USB_RAM */
  177. .noinit_RAM3 (NOLOAD) : ALIGN(4)
  178. {
  179. *(.noinit.$RAM3*)
  180. *(.noinit.$USB_RAM*)
  181. . = ALIGN(4) ;
  182. } > USB_RAM
  183. /* DEFAULT NOINIT SECTION */
  184. .noinit (NOLOAD): ALIGN(4)
  185. {
  186. _noinit = .;
  187. *(.noinit*)
  188. . = ALIGN(4) ;
  189. _end_noinit = .;
  190. } > SRAM
  191. /* Reserve and place Heap within memory map */
  192. _HeapSize = 0x1000;
  193. .heap : ALIGN(4)
  194. {
  195. _pvHeapStart = .;
  196. . += _HeapSize;
  197. . = ALIGN(4);
  198. _pvHeapLimit = .;
  199. } > SRAM
  200. _StackSize = 0x1000;
  201. /* Reserve space in memory for Stack */
  202. .heap2stackfill :
  203. {
  204. . += _StackSize;
  205. } > SRAM
  206. /* Locate actual Stack in memory map */
  207. .stack ORIGIN(SRAM) + LENGTH(SRAM) - _StackSize - 0: ALIGN(4)
  208. {
  209. _vStackBase = .;
  210. . = ALIGN(4);
  211. _vStackTop = . + _StackSize;
  212. } > SRAM
  213. /* ## Create checksum value (used in startup) ## */
  214. PROVIDE(__valid_user_code_checksum = 0 -
  215. (_vStackTop
  216. + (ResetISR + 1)
  217. + (NMI_Handler + 1)
  218. + (HardFault_Handler + 1)
  219. + (( DEFINED(MemManage_Handler) ? MemManage_Handler : 0 ) + 1) /* MemManage_Handler may not be defined */
  220. + (( DEFINED(BusFault_Handler) ? BusFault_Handler : 0 ) + 1) /* BusFault_Handler may not be defined */
  221. + (( DEFINED(UsageFault_Handler) ? UsageFault_Handler : 0 ) + 1) /* UsageFault_Handler may not be defined */
  222. ) );
  223. /* Provide basic symbols giving location and size of main text
  224. * block, including initial values of RW data sections. Note that
  225. * these will need extending to give a complete picture with
  226. * complex images (e.g multiple Flash banks).
  227. */
  228. _image_start = LOADADDR(.text);
  229. _image_end = LOADADDR(.data) + SIZEOF(.data);
  230. _image_size = _image_end - _image_start;
  231. }