]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/AtmelFiles/target/sama5d2/toolchain/gnu/sram.ld
Add SAMA5D2 Xplained IAR demo.
[freertos] / FreeRTOS / Demo / CORTEX_A5_SAMA5D2x_Xplained_IAR / AtmelFiles / target / sama5d2 / toolchain / gnu / sram.ld
diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/AtmelFiles/target/sama5d2/toolchain/gnu/sram.ld b/FreeRTOS/Demo/CORTEX_A5_SAMA5D2x_Xplained_IAR/AtmelFiles/target/sama5d2/toolchain/gnu/sram.ld
new file mode 100644 (file)
index 0000000..1f121e7
--- /dev/null
@@ -0,0 +1,194 @@
+/* ----------------------------------------------------------------------------\r
+ *         SAM Software Package License\r
+ * ----------------------------------------------------------------------------\r
+ * Copyright (c) 2015, Atmel Corporation\r
+ *\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions are met:\r
+ *\r
+ * - Redistributions of source code must retain the above copyright notice,\r
+ * this list of conditions and the disclaimer below.\r
+ *\r
+ * Atmel's name may not be used to endorse or promote products derived from\r
+ * this software without specific prior written permission.\r
+ *\r
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR\r
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE\r
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ * ----------------------------------------------------------------------------\r
+ */\r
+\r
+/*------------------------------------------------------------------------------\r
+ *      Linker script for running in internal SRAM on the SAMA5D2\r
+ *----------------------------------------------------------------------------*/\r
+\r
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")\r
+OUTPUT_ARCH(arm)\r
+ENTRY(entry)\r
+SEARCH_DIR(.)\r
+\r
+/* Memory Spaces Definitions */\r
+MEMORY\r
+{\r
+       sram        (W!RX) : ORIGIN = 0x200000,   LENGTH = 128K /* sram */\r
+       ddr         (W!RX) : ORIGIN = 0x20000000, LENGTH = 64M  /* ddr */\r
+       ddr_nocache  (RWX) : ORIGIN = 0x24000000, LENGTH = 16M  /* ddr (non-cached) */\r
+}\r
+\r
+/* Sizes of the stacks used by the application. NOTE: you need to adjust */\r
+C_STACK_SIZE   = 0x3000;\r
+IRQ_STACK_SIZE = 0x60;\r
+FIQ_STACK_SIZE = 0x60;\r
+SYS_STACK_SIZE = 0x40;\r
+ABT_STACK_SIZE = 0x40;\r
+UND_STACK_SIZE = 0x40;\r
+HEAP_SIZE      = 0x200;\r
+\r
+/* Section Definitions */\r
+SECTIONS\r
+{\r
+       .fixed0 :\r
+       {\r
+               . = ALIGN(4);\r
+               _sfixed = .;\r
+               KEEP(*(.vectors .vectors.*))\r
+               *(.textEntry)\r
+               *(.text .text.* .gnu.linkonce.t.*)\r
+               *(.glue_7t) *(.glue_7)\r
+               *(.cp15_*)\r
+               *(.rodata .rodata* .gnu.linkonce.r.*)\r
+               *(.ARM.extab* .gnu.linkonce.armextab.*)\r
+\r
+               /* Support C constructors, and C destructors in both user code\r
+                  and the C library. This also provides support for C++ code. */\r
+               . = ALIGN(4);\r
+               KEEP(*(.init))\r
+               . = ALIGN(4);\r
+               __preinit_array_start = .;\r
+               KEEP (*(.preinit_array))\r
+               __preinit_array_end = .;\r
+\r
+               . = ALIGN(4);\r
+               __init_array_start = .;\r
+               KEEP (*(SORT(.init_array.*)))\r
+               KEEP (*(.init_array))\r
+               __init_array_end = .;\r
+\r
+               . = ALIGN(0x4);\r
+               KEEP (*crtbegin.o(.ctors))\r
+               KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))\r
+               KEEP (*(SORT(.ctors.*)))\r
+               KEEP (*crtend.o(.ctors))\r
+\r
+               . = ALIGN(4);\r
+               KEEP(*(.fini))\r
+\r
+               . = ALIGN(4);\r
+               __fini_array_start = .;\r
+               KEEP (*(.fini_array))\r
+               KEEP (*(SORT(.fini_array.*)))\r
+               __fini_array_end = .;\r
+\r
+               KEEP (*crtbegin.o(.dtors))\r
+               KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))\r
+               KEEP (*(SORT(.dtors.*)))\r
+               KEEP (*crtend.o(.dtors))\r
+               *(.data .data.*);\r
+               . = ALIGN(4);\r
+               _efixed = .;            /* End of text section */\r
+\r
+               /* no relocation when running from sram */\r
+               _srelocate = .;\r
+               _erelocate = .;\r
+       } >sram\r
+\r
+       /* .ARM.exidx is sorted, so has to go in its own output section.  */\r
+       PROVIDE_HIDDEN (__exidx_start = .);\r
+       .ARM.exidx :\r
+       {\r
+               *(.ARM.exidx* .gnu.linkonce.armexidx.*)\r
+       } >sram\r
+       PROVIDE_HIDDEN (__exidx_end = .);\r
+\r
+       . = ALIGN(4);\r
+       _etext = .;\r
+\r
+       .region_sram (NOLOAD) :\r
+       {\r
+               . = ALIGN(4);\r
+               *(.region_sram)\r
+       } >sram\r
+\r
+       .region_ddr (NOLOAD) :\r
+       {\r
+               . = ALIGN(4);\r
+               *(.region_ddr)\r
+       } >ddr\r
+\r
+       .region_ddr_nocache (NOLOAD) :\r
+       {\r
+               . = ALIGN(4);\r
+               *(.region_ddr_nocache)\r
+       } >ddr_nocache\r
+\r
+       /* .bss section which is used for uninitialized data */\r
+       .bss (NOLOAD) :\r
+       {\r
+               . = ALIGN(4);\r
+               _sbss = . ;\r
+               _szero = .;\r
+               *(.bss .bss.*)\r
+               *(COMMON)\r
+               . = ALIGN(4);\r
+               _ebss = . ;\r
+               _ezero = .;\r
+       } >sram\r
+\r
+       .stack (NOLOAD) :\r
+       {\r
+               __stack_start__ = . ;\r
+\r
+               . += IRQ_STACK_SIZE;\r
+               . = ALIGN (4);\r
+               _irqstack = . ;\r
+\r
+               . += FIQ_STACK_SIZE;\r
+               . = ALIGN (4);\r
+               _fiqstack = . ;\r
+\r
+               . += ABT_STACK_SIZE;\r
+               . = ALIGN (4);\r
+               _abtstack = . ;\r
+\r
+               . += UND_STACK_SIZE;\r
+               . = ALIGN (4);\r
+               _undstack = . ;\r
+\r
+               . += SYS_STACK_SIZE;\r
+               . = ALIGN (4);\r
+               _sysstack = . ;\r
+\r
+               . += C_STACK_SIZE;\r
+               . = ALIGN (4);\r
+               _cstack = . ;\r
+\r
+               . += HEAP_SIZE;\r
+               . = ALIGN (4);\r
+               _heap = . ;\r
+\r
+               __stack_end__ = .;\r
+       } >sram\r
+\r
+       _end = . ;\r
+       __end = . ;\r
+       PROVIDE(end = .);\r
+}\r