avr32dev1.ld 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /****************************************************************************
  2. * configs/avr32dev1/scripts/avr32dev1.ld
  3. *
  4. * Copyright (C) 2010, 2017 Gregory Nutt. All rights reserved.
  5. * Author: Gregory Nutt <gnutt@nuttx.org>
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in
  15. * the documentation and/or other materials provided with the
  16. * distribution.
  17. * 3. Neither the name NuttX nor the names of its contributors may be
  18. * used to endorse or promote products derived from this software
  19. * without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  31. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  32. * POSSIBILITY OF SUCH DAMAGE.
  33. *
  34. ****************************************************************************/
  35. OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
  36. OUTPUT_ARCH(avr32:uc)
  37. ENTRY(_stext)
  38. /* The following assumes that the bootloader resides at 0x8000:0000 and so
  39. * links the application to execute after the bootloader at 0x8000:2000.
  40. * To link so that NuttX boots directly without using the bootloader,
  41. * change the flash definition to:
  42. *
  43. * flash (rxai!w) : ORIGIN = 0x80000000, LENGTH = 256K
  44. */
  45. MEMORY
  46. {
  47. flash (rxai!w) : ORIGIN = 0x80002000, LENGTH = 256K - 8K
  48. intram (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 32K
  49. userpage : ORIGIN = 0x80800000, LENGTH = 512
  50. factorypage : ORIGIN = 0x80800200, LENGTH = 512
  51. }
  52. SECTIONS
  53. {
  54. .text : {
  55. _stext = ABSOLUTE(.);
  56. *(.vectors)
  57. *(.text .text.*)
  58. *(.fixup)
  59. *(.gnu.warning)
  60. *(.rodata .rodata.*)
  61. *(.gnu.linkonce.t.*)
  62. *(.glue_7)
  63. *(.glue_7t)
  64. *(.got)
  65. *(.gcc_except_table)
  66. *(.gnu.linkonce.r.*)
  67. _etext = ABSOLUTE(.);
  68. } > flash
  69. _eronly = ABSOLUTE(.); /* See below */
  70. .data : {
  71. _sdata = ABSOLUTE(.);
  72. *(.data .data.*)
  73. *(.gnu.linkonce.d.*)
  74. CONSTRUCTORS
  75. _edata = ABSOLUTE(.);
  76. } > intram AT > flash
  77. .bss : { /* BSS */
  78. _sbss = ABSOLUTE(.);
  79. *(.bss .bss.*)
  80. *(.gnu.linkonce.b.*)
  81. *(COMMON)
  82. _ebss = ABSOLUTE(.);
  83. } > intram
  84. /* Stabs debugging sections. */
  85. .stab 0 : { *(.stab) }
  86. .stabstr 0 : { *(.stabstr) }
  87. .stab.excl 0 : { *(.stab.excl) }
  88. .stab.exclstr 0 : { *(.stab.exclstr) }
  89. .stab.index 0 : { *(.stab.index) }
  90. .stab.indexstr 0 : { *(.stab.indexstr) }
  91. .comment 0 : { *(.comment) }
  92. .debug_abbrev 0 : { *(.debug_abbrev) }
  93. .debug_info 0 : { *(.debug_info) }
  94. .debug_line 0 : { *(.debug_line) }
  95. .debug_pubnames 0 : { *(.debug_pubnames) }
  96. .debug_aranges 0 : { *(.debug_aranges) }
  97. }