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.

sram.ld 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /* ----------------------------------------------------------------------------
  2. * SAM Software Package License
  3. * ----------------------------------------------------------------------------
  4. * Copyright (c) 2012, Atmel Corporation
  5. *
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following condition is met:
  10. *
  11. * - Redistributions of source code must retain the above copyright notice,
  12. * this list of conditions and the disclaimer below.
  13. *
  14. * Atmel's name may not be used to endorse or promote products derived from
  15. * this software without specific prior written permission.
  16. *
  17. * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
  18. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
  20. * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
  21. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  22. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  23. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  24. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  25. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  26. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. * ----------------------------------------------------------------------------
  28. */
  29. OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
  30. OUTPUT_ARCH(arm)
  31. SEARCH_DIR(.)
  32. /* Memory Spaces Definitions */
  33. MEMORY
  34. {
  35. rom (rx) : ORIGIN = 0x00080000, LENGTH = 0x00080000 /* Flash, 512K */
  36. sram0 (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00010000 /* sram0, 64K */
  37. sram1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x00008000 /* sram1, 32K */
  38. ram (rwx) : ORIGIN = 0x20070000, LENGTH = 0x00018000 /* sram, 96K */
  39. }
  40. /* The stack size used by the application. NOTE: you need to adjust */
  41. STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : 0x2000 ;
  42. /* Section Definitions */
  43. SECTIONS
  44. {
  45. .text :
  46. {
  47. . = ALIGN(4);
  48. _sfixed = .;
  49. KEEP(*(.vectors .vectors.*))
  50. *(.text .text.* .gnu.linkonce.t.*)
  51. *(.glue_7t) *(.glue_7)
  52. *(.rodata .rodata* .gnu.linkonce.r.*)
  53. *(.ARM.extab* .gnu.linkonce.armextab.*)
  54. /* Support C constructors, and C destructors in both user code
  55. and the C library. This also provides support for C++ code. */
  56. . = ALIGN(4);
  57. KEEP(*(.init))
  58. . = ALIGN(4);
  59. __preinit_array_start = .;
  60. KEEP (*(.preinit_array))
  61. __preinit_array_end = .;
  62. . = ALIGN(4);
  63. __init_array_start = .;
  64. KEEP (*(SORT(.init_array.*)))
  65. KEEP (*(.init_array))
  66. __init_array_end = .;
  67. . = ALIGN(0x4);
  68. KEEP (*crtbegin.o(.ctors))
  69. KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
  70. KEEP (*(SORT(.ctors.*)))
  71. KEEP (*crtend.o(.ctors))
  72. . = ALIGN(4);
  73. KEEP(*(.fini))
  74. . = ALIGN(4);
  75. __fini_array_start = .;
  76. KEEP (*(.fini_array))
  77. KEEP (*(SORT(.fini_array.*)))
  78. __fini_array_end = .;
  79. KEEP (*crtbegin.o(.dtors))
  80. KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
  81. KEEP (*(SORT(.dtors.*)))
  82. KEEP (*crtend.o(.dtors))
  83. . = ALIGN(4);
  84. _efixed = .; /* End of text section */
  85. } > ram
  86. . = ALIGN(4);
  87. _etext = .;
  88. .relocate : AT (_etext)
  89. {
  90. . = ALIGN(4);
  91. _srelocate = .;
  92. *(.ramfunc .ramfunc.*);
  93. *(.data .data.*);
  94. . = ALIGN(4);
  95. _erelocate = .;
  96. } > ram
  97. /* .bss section which is used for uninitialized data */
  98. .bss (NOLOAD) :
  99. {
  100. . = ALIGN(4);
  101. _sbss = . ;
  102. _szero = .;
  103. *(.bss .bss.*)
  104. *(COMMON)
  105. . = ALIGN(4);
  106. _ebss = . ;
  107. _ezero = .;
  108. } > ram
  109. /* stack section */
  110. .stack (NOLOAD):
  111. {
  112. . = ALIGN(8);
  113. _sstack = .;
  114. . = . + STACK_SIZE;
  115. . = ALIGN(8);
  116. _estack = .;
  117. } > ram
  118. /* .ARM.exidx is sorted, so has to go in its own output section. */
  119. PROVIDE_HIDDEN (__exidx_start = .);
  120. .ARM.exidx :
  121. {
  122. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  123. } > ram
  124. PROVIDE_HIDDEN (__exidx_end = .);
  125. . = ALIGN(4);
  126. _end = . ;
  127. }