STM32F429IGTX_RAM.ld 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /*
  2. ******************************************************************************
  3. **
  4. ** @file : LinkerScript.ld (debug in RAM dedicated)
  5. **
  6. ** @author : Auto-generated by STM32CubeIDE
  7. **
  8. ** @brief : Linker script for STM32F429IGTx Device from STM32F4 series
  9. ** 1024Kbytes FLASH
  10. ** 64Kbytes CCMRAM
  11. ** 192Kbytes RAM
  12. **
  13. ** Set heap size, stack size and stack location according
  14. ** to application requirements.
  15. **
  16. ** Set memory bank area and size if external memory is used
  17. **
  18. ** Target : STMicroelectronics STM32
  19. **
  20. ** Distribution: The file is distributed as is, without any warranty
  21. ** of any kind.
  22. **
  23. ******************************************************************************
  24. ** @attention
  25. **
  26. ** <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  27. ** All rights reserved.</center></h2>
  28. **
  29. ** This software component is licensed by ST under BSD 3-Clause license,
  30. ** the "License"; You may not use this file except in compliance with the
  31. ** License. You may obtain a copy of the License at:
  32. ** opensource.org/licenses/BSD-3-Clause
  33. **
  34. ******************************************************************************
  35. */
  36. /* Entry Point */
  37. ENTRY(Reset_Handler)
  38. /* Highest address of the user mode stack */
  39. _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
  40. _Min_Heap_Size = 0x200; /* required amount of heap */
  41. _Min_Stack_Size = 0x400; /* required amount of stack */
  42. /* Memories definition */
  43. MEMORY
  44. {
  45. CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
  46. RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
  47. FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
  48. }
  49. /* Sections */
  50. SECTIONS
  51. {
  52. /* The startup code into "RAM" Ram type memory */
  53. .isr_vector :
  54. {
  55. . = ALIGN(4);
  56. KEEP(*(.isr_vector)) /* Startup code */
  57. . = ALIGN(4);
  58. } >RAM
  59. /* The program code and other data into "RAM" Ram type memory */
  60. .text :
  61. {
  62. . = ALIGN(4);
  63. *(.text) /* .text sections (code) */
  64. *(.text*) /* .text* sections (code) */
  65. *(.glue_7) /* glue arm to thumb code */
  66. *(.glue_7t) /* glue thumb to arm code */
  67. *(.eh_frame)
  68. *(.RamFunc) /* .RamFunc sections */
  69. *(.RamFunc*) /* .RamFunc* sections */
  70. KEEP (*(.init))
  71. KEEP (*(.fini))
  72. . = ALIGN(4);
  73. _etext = .; /* define a global symbols at end of code */
  74. } >RAM
  75. /* Constant data into "RAM" Ram type memory */
  76. .rodata :
  77. {
  78. . = ALIGN(4);
  79. *(.rodata) /* .rodata sections (constants, strings, etc.) */
  80. *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
  81. . = ALIGN(4);
  82. } >RAM
  83. .ARM.extab : {
  84. . = ALIGN(4);
  85. *(.ARM.extab* .gnu.linkonce.armextab.*)
  86. . = ALIGN(4);
  87. } >RAM
  88. .ARM : {
  89. . = ALIGN(4);
  90. __exidx_start = .;
  91. *(.ARM.exidx*)
  92. __exidx_end = .;
  93. . = ALIGN(4);
  94. } >RAM
  95. .preinit_array :
  96. {
  97. . = ALIGN(4);
  98. PROVIDE_HIDDEN (__preinit_array_start = .);
  99. KEEP (*(.preinit_array*))
  100. PROVIDE_HIDDEN (__preinit_array_end = .);
  101. . = ALIGN(4);
  102. } >RAM
  103. .init_array :
  104. {
  105. . = ALIGN(4);
  106. PROVIDE_HIDDEN (__init_array_start = .);
  107. KEEP (*(SORT(.init_array.*)))
  108. KEEP (*(.init_array*))
  109. PROVIDE_HIDDEN (__init_array_end = .);
  110. . = ALIGN(4);
  111. } >RAM
  112. .fini_array :
  113. {
  114. . = ALIGN(4);
  115. PROVIDE_HIDDEN (__fini_array_start = .);
  116. KEEP (*(SORT(.fini_array.*)))
  117. KEEP (*(.fini_array*))
  118. PROVIDE_HIDDEN (__fini_array_end = .);
  119. . = ALIGN(4);
  120. } >RAM
  121. /* Used by the startup to initialize data */
  122. _sidata = LOADADDR(.data);
  123. /* Initialized data sections into "RAM" Ram type memory */
  124. .data :
  125. {
  126. . = ALIGN(4);
  127. _sdata = .; /* create a global symbol at data start */
  128. *(.data) /* .data sections */
  129. *(.data*) /* .data* sections */
  130. . = ALIGN(4);
  131. _edata = .; /* define a global symbol at data end */
  132. } >RAM
  133. _siccmram = LOADADDR(.ccmram);
  134. /* CCM-RAM section
  135. *
  136. * IMPORTANT NOTE!
  137. * If initialized variables will be placed in this section,
  138. * the startup code needs to be modified to copy the init-values.
  139. */
  140. .ccmram :
  141. {
  142. . = ALIGN(4);
  143. _sccmram = .; /* create a global symbol at ccmram start */
  144. *(.ccmram)
  145. *(.ccmram*)
  146. . = ALIGN(4);
  147. _eccmram = .; /* create a global symbol at ccmram end */
  148. } >CCMRAM AT> RAM
  149. /* Uninitialized data section into "RAM" Ram type memory */
  150. . = ALIGN(4);
  151. .bss :
  152. {
  153. /* This is used by the startup in order to initialize the .bss section */
  154. _sbss = .; /* define a global symbol at bss start */
  155. __bss_start__ = _sbss;
  156. *(.bss)
  157. *(.bss*)
  158. *(COMMON)
  159. . = ALIGN(4);
  160. _ebss = .; /* define a global symbol at bss end */
  161. __bss_end__ = _ebss;
  162. } >RAM
  163. /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
  164. ._user_heap_stack :
  165. {
  166. . = ALIGN(8);
  167. PROVIDE ( end = . );
  168. PROVIDE ( _end = . );
  169. . = . + _Min_Heap_Size;
  170. . = . + _Min_Stack_Size;
  171. . = ALIGN(8);
  172. } >RAM
  173. /* Remove information from the compiler libraries */
  174. /DISCARD/ :
  175. {
  176. libc.a ( * )
  177. libm.a ( * )
  178. libgcc.a ( * )
  179. }
  180. .ARM.attributes 0 : { *(.ARM.attributes) }
  181. }