My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ldscript.ld 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. /*
  2. ******************************************************************************
  3. **
  4. ** File : LinkerScript.ld
  5. **
  6. ** Author : Auto-generated by STM32CubeIDE
  7. **
  8. ** Abstract : Linker script for STM32H743VI Device from STM32H7 series
  9. ** 2048Kbytes FLASH
  10. ** 128Kbytes DTCMRAM
  11. ** 64Kbytes ITCMRAM
  12. ** 512Kbytes RAM_D1
  13. ** 288Kbytes RAM_D2
  14. ** 64Kbytes RAM_D3
  15. **
  16. ** Set heap size, stack size and stack location according
  17. ** to application requirements.
  18. **
  19. ** Set memory bank area and size if external memory is used.
  20. **
  21. ** Target : STMicroelectronics STM32
  22. **
  23. ** Distribution: The file is distributed as is without any warranty
  24. ** of any kind.
  25. **
  26. *****************************************************************************
  27. ** @attention
  28. **
  29. ** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
  30. **
  31. ** Redistribution and use in source and binary forms, with or without modification,
  32. ** are permitted provided that the following conditions are met:
  33. ** 1. Redistributions of source code must retain the above copyright notice,
  34. ** this list of conditions and the following disclaimer.
  35. ** 2. Redistributions in binary form must reproduce the above copyright notice,
  36. ** this list of conditions and the following disclaimer in the documentation
  37. ** and/or other materials provided with the distribution.
  38. ** 3. Neither the name of STMicroelectronics nor the names of its contributors
  39. ** may be used to endorse or promote products derived from this software
  40. ** without specific prior written permission.
  41. **
  42. ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  43. ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  44. ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  45. ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  46. ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  47. ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  48. ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  49. ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  50. ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  51. ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  52. **
  53. *****************************************************************************
  54. */
  55. /* Entry Point */
  56. ENTRY(Reset_Handler)
  57. /* Highest address of the user mode stack */
  58. _estack = 0x24080000; /* end of "RAM_D1" Ram type memory */
  59. _Min_Heap_Size = 0x200; /* required amount of heap */
  60. _Min_Stack_Size = 0x400; /* required amount of stack */
  61. /* Memories definition */
  62. MEMORY
  63. {
  64. DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
  65. ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
  66. RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
  67. RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
  68. RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
  69. FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
  70. }
  71. /* Sections */
  72. SECTIONS
  73. {
  74. /* The startup code into "FLASH" Rom type memory */
  75. .isr_vector :
  76. {
  77. . = ALIGN(4);
  78. KEEP(*(.isr_vector)) /* Startup code */
  79. . = ALIGN(4);
  80. } >FLASH
  81. /* The program code and other data into "FLASH" Rom type memory */
  82. .text :
  83. {
  84. . = ALIGN(4);
  85. *(.text) /* .text sections (code) */
  86. *(.text*) /* .text* sections (code) */
  87. *(.glue_7) /* glue arm to thumb code */
  88. *(.glue_7t) /* glue thumb to arm code */
  89. *(.eh_frame)
  90. KEEP (*(.init))
  91. KEEP (*(.fini))
  92. . = ALIGN(4);
  93. _etext = .; /* define a global symbols at end of code */
  94. } >FLASH
  95. /* Constant data into "FLASH" Rom type memory */
  96. .rodata :
  97. {
  98. . = ALIGN(4);
  99. *(.rodata) /* .rodata sections (constants, strings, etc.) */
  100. *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
  101. . = ALIGN(4);
  102. } >FLASH
  103. .ARM.extab : {
  104. . = ALIGN(4);
  105. *(.ARM.extab* .gnu.linkonce.armextab.*)
  106. . = ALIGN(4);
  107. } >FLASH
  108. .ARM : {
  109. . = ALIGN(4);
  110. __exidx_start = .;
  111. *(.ARM.exidx*)
  112. __exidx_end = .;
  113. . = ALIGN(4);
  114. } >FLASH
  115. .preinit_array :
  116. {
  117. . = ALIGN(4);
  118. PROVIDE_HIDDEN (__preinit_array_start = .);
  119. KEEP (*(.preinit_array*))
  120. PROVIDE_HIDDEN (__preinit_array_end = .);
  121. . = ALIGN(4);
  122. } >FLASH
  123. .init_array :
  124. {
  125. . = ALIGN(4);
  126. PROVIDE_HIDDEN (__init_array_start = .);
  127. KEEP (*(SORT(.init_array.*)))
  128. KEEP (*(.init_array*))
  129. PROVIDE_HIDDEN (__init_array_end = .);
  130. . = ALIGN(4);
  131. } >FLASH
  132. .fini_array :
  133. {
  134. . = ALIGN(4);
  135. PROVIDE_HIDDEN (__fini_array_start = .);
  136. KEEP (*(SORT(.fini_array.*)))
  137. KEEP (*(.fini_array*))
  138. PROVIDE_HIDDEN (__fini_array_end = .);
  139. . = ALIGN(4);
  140. } >FLASH
  141. /* Used by the startup to initialize data */
  142. _sidata = LOADADDR(.data);
  143. /* Initialized data sections into "RAM_D1" Ram type memory */
  144. .data :
  145. {
  146. . = ALIGN(4);
  147. _sdata = .; /* create a global symbol at data start */
  148. *(.data) /* .data sections */
  149. *(.data*) /* .data* sections */
  150. . = ALIGN(4);
  151. _edata = .; /* define a global symbol at data end */
  152. } >RAM_D1 AT> FLASH
  153. /* Uninitialized data section into "RAM_D1" Ram type memory */
  154. . = ALIGN(4);
  155. .bss :
  156. {
  157. /* This is used by the startup in order to initialize the .bss section */
  158. _sbss = .; /* define a global symbol at bss start */
  159. __bss_start__ = _sbss;
  160. *(.bss)
  161. *(.bss*)
  162. *(COMMON)
  163. . = ALIGN(4);
  164. _ebss = .; /* define a global symbol at bss end */
  165. __bss_end__ = _ebss;
  166. } >RAM_D1
  167. /* User_heap_stack section, used to check that there is enough "RAM_D1" Ram type memory left */
  168. ._user_heap_stack :
  169. {
  170. . = ALIGN(8);
  171. PROVIDE ( end = . );
  172. PROVIDE ( _end = . );
  173. . = . + _Min_Heap_Size;
  174. . = . + _Min_Stack_Size;
  175. . = ALIGN(8);
  176. } >RAM_D1
  177. /* Remove information from the compiler libraries */
  178. /DISCARD/ :
  179. {
  180. libc.a ( * )
  181. libm.a ( * )
  182. libgcc.a ( * )
  183. }
  184. .ARM.attributes 0 : { *(.ARM.attributes) }
  185. }