STM32F769NIHX_FLASH.ld 4.6 KB

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