Naze32 clone with Frysky receiver
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

LPC1768.ld 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /* Linker script for mbed LPC1768 */
  2. /* Linker script to configure memory regions. */
  3. MEMORY
  4. {
  5. FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
  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. /* Check if data + heap + stack exceeds RAM limit */
  126. ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
  127. /* Code can explicitly ask for data to be
  128. placed in these higher RAM banks where
  129. they will be left uninitialized.
  130. */
  131. .AHBSRAM0 (NOLOAD):
  132. {
  133. Image$$RW_IRAM2$$Base = . ;
  134. *(AHBSRAM0)
  135. Image$$RW_IRAM2$$ZI$$Limit = .;
  136. } > USB_RAM
  137. .AHBSRAM1 (NOLOAD):
  138. {
  139. Image$$RW_IRAM3$$Base = . ;
  140. *(AHBSRAM1)
  141. Image$$RW_IRAM3$$ZI$$Limit = .;
  142. } > ETH_RAM
  143. }