My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

LPC1768.ld 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* Linker script for mbed LPC1768 */
  2. MEMORY
  3. {
  4. //FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
  5. FLASH (rx) : ORIGIN = 16K, LENGTH = (512K - 16K)
  6. RAM (rwx) : ORIGIN = 0x100000C8, LENGTH = (32K - 0xC8)
  7. USB_RAM(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K
  8. ETH_RAM(rwx) : ORIGIN = 0x20080000, LENGTH = 16K
  9. }
  10. /* Linker script to place sections and symbol values. Should be used together
  11. * with other linker script that defines memory regions FLASH and RAM.
  12. * It references following symbols, which must be defined in code:
  13. * Reset_Handler : Entry of reset handler
  14. *
  15. * It defines following symbols, which code can use without definition:
  16. * __exidx_start
  17. * __exidx_end
  18. * __etext
  19. * __data_start__
  20. * __preinit_array_start
  21. * __preinit_array_end
  22. * __init_array_start
  23. * __init_array_end
  24. * __fini_array_start
  25. * __fini_array_end
  26. * __data_end__
  27. * __bss_start__
  28. * __bss_end__
  29. * __end__
  30. * end
  31. * __HeapLimit
  32. * __StackLimit
  33. * __StackTop
  34. * __stack
  35. */
  36. ENTRY(Reset_Handler)
  37. SECTIONS
  38. {
  39. .text :
  40. {
  41. KEEP(*(.isr_vector))
  42. *(.text*)
  43. KEEP(*(.init))
  44. KEEP(*(.fini))
  45. /* .ctors */
  46. *crtbegin.o(.ctors)
  47. *crtbegin?.o(.ctors)
  48. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
  49. *(SORT(.ctors.*))
  50. *(.ctors)
  51. /* .dtors */
  52. *crtbegin.o(.dtors)
  53. *crtbegin?.o(.dtors)
  54. *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
  55. *(SORT(.dtors.*))
  56. *(.dtors)
  57. *(.rodata*)
  58. KEEP(*(.eh_frame*))
  59. } > FLASH
  60. .ARM.extab :
  61. {
  62. *(.ARM.extab* .gnu.linkonce.armextab.*)
  63. } > FLASH
  64. __exidx_start = .;
  65. .ARM.exidx :
  66. {
  67. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  68. } > FLASH
  69. __exidx_end = .;
  70. __etext = .;
  71. .data : AT (__etext)
  72. {
  73. __data_start__ = .;
  74. Image$$RW_IRAM1$$Base = .;
  75. *(vtable)
  76. *(.data*)
  77. . = ALIGN(4);
  78. /* preinit data */
  79. PROVIDE (__preinit_array_start = .);
  80. KEEP(*(.preinit_array))
  81. PROVIDE (__preinit_array_end = .);
  82. . = ALIGN(4);
  83. /* init data */
  84. PROVIDE (__init_array_start = .);
  85. KEEP(*(SORT(.init_array.*)))
  86. KEEP(*(.init_array))
  87. PROVIDE (__init_array_end = .);
  88. . = ALIGN(4);
  89. /* finit data */
  90. PROVIDE (__fini_array_start = .);
  91. KEEP(*(SORT(.fini_array.*)))
  92. KEEP(*(.fini_array))
  93. PROVIDE (__fini_array_end = .);
  94. . = ALIGN(4);
  95. /* All data end */
  96. __data_end__ = .;
  97. } > RAM
  98. .bss :
  99. {
  100. __bss_start__ = .;
  101. *(.bss*)
  102. *(COMMON)
  103. __bss_end__ = .;
  104. Image$$RW_IRAM1$$ZI$$Limit = . ;
  105. } > RAM
  106. .heap :
  107. {
  108. __end__ = .;
  109. end = __end__;
  110. *(.heap*)
  111. __HeapLimit = .;
  112. } > RAM
  113. /* .stack_dummy section doesn't contains any symbols. It is only
  114. * used for linker to calculate size of stack sections, and assign
  115. * values to stack symbols later */
  116. .stack_dummy :
  117. {
  118. *(.stack)
  119. } > RAM
  120. /* Set stack top to end of RAM, and stack limit move down by
  121. * size of stack_dummy section */
  122. __StackTop = ORIGIN(RAM) + LENGTH(RAM);
  123. __StackLimit = __StackTop - SIZEOF(.stack_dummy);
  124. PROVIDE(__stack = __StackTop);
  125. PROVIDE(__heapLimit = __HeapLimit);
  126. PROVIDE(__stackSize = __StackTop - __HeapLimit);
  127. /* Area of memory, heap and stack, to fill on startup - 8 bytes at a time. */
  128. __FillStart = ALIGN(__end__, 8);
  129. /* Check if data + heap + stack exceeds RAM limit */
  130. ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
  131. /* Code can explicitly ask for data to be
  132. placed in these higher RAM banks where
  133. they will be left uninitialized.
  134. */
  135. .AHBSRAM0 (NOLOAD):
  136. {
  137. Image$$RW_IRAM2$$Base = . ;
  138. PROVIDE(__AHB0_block_start = .);
  139. *(AHBSRAM0)
  140. Image$$RW_IRAM2$$ZI$$Limit = .;
  141. PROVIDE(__AHB0_dyn_start = .);
  142. PROVIDE(__AHB0_end = ORIGIN(USB_RAM) + LENGTH(USB_RAM));
  143. } > USB_RAM
  144. .AHBSRAM1 (NOLOAD):
  145. {
  146. Image$$RW_IRAM3$$Base = . ;
  147. PROVIDE(__AHB1_block_start = .);
  148. *(AHBSRAM1)
  149. Image$$RW_IRAM3$$ZI$$Limit = .;
  150. PROVIDE(__AHB1_dyn_start = .);
  151. PROVIDE(__AHB1_end = ORIGIN(ETH_RAM) + LENGTH(ETH_RAM));
  152. } > ETH_RAM
  153. }