fsp_ram_execution.ld 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. /*
  2. Linker File for Renesas RZ/N2L FSP
  3. */
  4. MEMORY
  5. {
  6. ATCM : ORIGIN = 0x00000000, LENGTH = 0x00020000
  7. BTCM : ORIGIN = 0x00100000, LENGTH = 0x00020000
  8. SYSTEM_RAM : ORIGIN = 0x10000000, LENGTH = 0x00180000
  9. SYSTEM_RAM_MIRROR : ORIGIN = 0x30000000, LENGTH = 0x00180000
  10. xSPI0_CS0_SPACE_MIRROR : ORIGIN = 0x40000000, LENGTH = 0x04000000
  11. xSPI0_CS1_SPACE_MIRROR : ORIGIN = 0x44000000, LENGTH = 0x04000000
  12. xSPI1_CS0_SPACE_MIRROR : ORIGIN = 0x48000000, LENGTH = 0x04000000
  13. xSPI1_CS1_SPACE_MIRROR : ORIGIN = 0x4C000000, LENGTH = 0x04000000
  14. CS0_SPACE_MIRROR : ORIGIN = 0x50000000, LENGTH = 0x04000000
  15. CS2_SPACE_MIRROR : ORIGIN = 0x54000000, LENGTH = 0x04000000
  16. CS3_SPACE_MIRROR : ORIGIN = 0x58000000, LENGTH = 0x04000000
  17. CS5_SPACE_MIRROR : ORIGIN = 0x5C000000, LENGTH = 0x04000000
  18. xSPI0_CS0_SPACE : ORIGIN = 0x60000000, LENGTH = 0x04000000
  19. xSPI0_CS1_SPACE : ORIGIN = 0x64000000, LENGTH = 0x04000000
  20. xSPI1_CS0_SPACE : ORIGIN = 0x68000000, LENGTH = 0x04000000
  21. xSPI1_CS1_SPACE : ORIGIN = 0x6C000000, LENGTH = 0x04000000
  22. CS0_SPACE : ORIGIN = 0x70000000, LENGTH = 0x04000000
  23. CS2_SPACE : ORIGIN = 0x74000000, LENGTH = 0x04000000
  24. CS3_SPACE : ORIGIN = 0x78000000, LENGTH = 0x04000000
  25. CS5_SPACE : ORIGIN = 0x7C000000, LENGTH = 0x04000000
  26. }
  27. SECTIONS
  28. {
  29. .loader_text 0x00102000 : AT (0x00102000)
  30. {
  31. *(.loader_text)
  32. */fsp/src/bsp/cmsis/Device/RENESAS/Source/*.o(.text*)
  33. */fsp/src/bsp/mcu/all/bsp_clocks.o(.text*)
  34. */fsp/src/bsp/mcu/all/bsp_irq.o(.text*)
  35. */fsp/src/bsp/mcu/all/bsp_register_protection.o(.text*)
  36. */fsp/src/r_ioport/r_ioport.o(.text*)
  37. KEEP(*(.warm_start))
  38. } > BTCM
  39. .loader_data :
  40. {
  41. */fsp/src/bsp/cmsis/Device/RENESAS/Source/*.o(.data*)
  42. */fsp/src/bsp/mcu/all/bsp_clocks.o(.data*)
  43. */fsp/src/bsp/mcu/all/bsp_irq.o(.data*)
  44. */fsp/src/bsp/mcu/all/bsp_register_protection.o(.data*)
  45. */fsp/src/r_ioport/r_ioport.o(.data*)
  46. __loader_bss_start = .;
  47. */fsp/src/bsp/cmsis/Device/RENESAS/Source/*.o(.bss*)
  48. */fsp/src/bsp/mcu/all/bsp_clocks.o(.bss*)
  49. */fsp/src/bsp/mcu/all/bsp_irq.o(.bss*)
  50. */fsp/src/bsp/mcu/all/bsp_register_protection.o(.bss*)
  51. */fsp/src/r_ioport/r_ioport.o(.bss*)
  52. */fsp/src/bsp/cmsis/Device/RENESAS/Source/*.o(COMMON)
  53. */fsp/src/bsp/mcu/all/bsp_clocks.o(COMMON)
  54. */fsp/src/bsp/mcu/all/bsp_irq.o(COMMON)
  55. */fsp/src/bsp/mcu/all/bsp_register_protection.o(.COMMON)
  56. */fsp/src/r_ioport/r_ioport.o(.COMMON)
  57. __loader_bss_end = . ;
  58. } > BTCM
  59. .intvec 0x00000000 : AT (0x00000000)
  60. {
  61. _fvector_start = .;
  62. KEEP(*(.intvec))
  63. _fvector_end = .;
  64. } > ATCM
  65. .text 0x30000000 : AT (0x30000000)
  66. {
  67. _text_start = .;
  68. *(.text*)
  69. KEEP(*(.init))
  70. KEEP(*(.fini))
  71. /* .ctors */
  72. *crtbegin.o(.ctors)
  73. *crtbegin?.o(.ctors)
  74. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
  75. *(SORT(.ctors.*))
  76. *(.ctors)
  77. _ctor_end = .;
  78. /* .dtors */
  79. *crtbegin.o(.dtors)
  80. *crtbegin?.o(.dtors)
  81. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
  82. *(SORT(.dtors.*))
  83. *(.dtors)
  84. _dtor_end = .;
  85. *(.rodata*)
  86. _erodata = .;
  87. KEEP(*(.eh_frame*))
  88. } > SYSTEM_RAM_MIRROR
  89. .rvectors :
  90. {
  91. _rvectors_start = .;
  92. KEEP(*(.rvectors))
  93. _rvectors_end = .;
  94. } > SYSTEM_RAM_MIRROR
  95. .ARM.extab :
  96. {
  97. *(.ARM.extab* .gnu.linkonce.armextab.*)
  98. } > SYSTEM_RAM_MIRROR
  99. __exidx_start = .;
  100. .ARM.exidx :
  101. {
  102. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  103. } > SYSTEM_RAM_MIRROR
  104. __exidx_end = .;
  105. .got :
  106. {
  107. *(.got)
  108. *(.got.plt)
  109. _text_end = .;
  110. } > SYSTEM_RAM_MIRROR
  111. .data :
  112. {
  113. _data_start = .;
  114. *(vtable)
  115. *(.data.*)
  116. *(.data)
  117. . = ALIGN(4);
  118. /* preinit data */
  119. PROVIDE_HIDDEN (__preinit_array_start = .);
  120. KEEP(*(.preinit_array))
  121. PROVIDE_HIDDEN (__preinit_array_end = .);
  122. . = ALIGN(4);
  123. /* init data */
  124. PROVIDE_HIDDEN (__init_array_start = .);
  125. KEEP(*(SORT(.init_array.*)))
  126. KEEP(*(.init_array))
  127. PROVIDE_HIDDEN (__init_array_end = .);
  128. . = ALIGN(4);
  129. /* finit data */
  130. PROVIDE_HIDDEN (__fini_array_start = .);
  131. KEEP(*(SORT(.fini_array.*)))
  132. KEEP(*(.fini_array))
  133. PROVIDE_HIDDEN (__fini_array_end = .);
  134. KEEP(*(.jcr*))
  135. . = ALIGN(4);
  136. /* All data end */
  137. _data_end = .;
  138. } > SYSTEM_RAM_MIRROR
  139. .bss :
  140. {
  141. . = ALIGN(4);
  142. __bss_start__ = .;
  143. _bss = .;
  144. *(.bss*)
  145. *(COMMON)
  146. . = ALIGN(4);
  147. __bss_end__ = .;
  148. _ebss = .;
  149. _end = .;
  150. } > SYSTEM_RAM_MIRROR
  151. .heap (NOLOAD) :
  152. {
  153. . = ALIGN(8);
  154. __HeapBase = .;
  155. /* Place the STD heap here. */
  156. KEEP(*(.heap))
  157. __HeapLimit = .;
  158. } > SYSTEM_RAM_MIRROR
  159. .thread_stack (NOLOAD):
  160. {
  161. . = ALIGN(8);
  162. __ThreadStackBase = .;
  163. /* Place the Thread stacks here. */
  164. KEEP(*(.stack*))
  165. __ThreadStackLimit = .;
  166. } > SYSTEM_RAM_MIRROR
  167. .sys_stack (NOLOAD) :
  168. {
  169. . = ALIGN(8);
  170. __SysStackBase = .;
  171. /* Place the sys_stack here. */
  172. KEEP(*(.sys_stack))
  173. __SysStackLimit = .;
  174. } > BTCM
  175. .svc_stack (NOLOAD) :
  176. {
  177. . = ALIGN(8);
  178. __SvcStackBase = .;
  179. /* Place the svc_stack here. */
  180. KEEP(*(.svc_stack))
  181. __SvcStackLimit = .;
  182. } > BTCM
  183. .irq_stack (NOLOAD) :
  184. {
  185. . = ALIGN(8);
  186. __IrqStackBase = .;
  187. /* Place the irq_stack here. */
  188. KEEP(*(.irq_stack))
  189. __IrqStackLimit = .;
  190. } > BTCM
  191. .fiq_stack (NOLOAD) :
  192. {
  193. . = ALIGN(8);
  194. __FiqStackBase = .;
  195. /* Place the fiq_stack here. */
  196. KEEP(*(.fiq_stack))
  197. __FiqStackLimit = .;
  198. } > BTCM
  199. .und_stack (NOLOAD) :
  200. {
  201. . = ALIGN(8);
  202. __UndStackBase = .;
  203. /* Place the und_stack here. */
  204. KEEP(*(.und_stack))
  205. __UndStackLimit = .;
  206. } > BTCM
  207. .abt_stack (NOLOAD) :
  208. {
  209. . = ALIGN(8);
  210. __AbtStackBase = .;
  211. /* Place the abt_stack here. */
  212. KEEP(*(.abt_stack))
  213. __AbtStackLimit = .;
  214. } > BTCM
  215. .shared_noncache_buffer 0x300C0000 : AT (0x300C0000)
  216. {
  217. . = ALIGN(32);
  218. _sncbuffer_start = .;
  219. KEEP(*(.shared_noncache_buffer*))
  220. _sncbuffer_end = .;
  221. } > SYSTEM_RAM_MIRROR
  222. .noncache_buffer 0x30100000 : AT (0x30100000)
  223. {
  224. . = ALIGN(32);
  225. _ncbuffer_start = .;
  226. KEEP(*(.noncache_buffer*))
  227. _ncbuffer_end = .;
  228. } > SYSTEM_RAM_MIRROR
  229. }