+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3A0128 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3A0128
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00020000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00007FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3A0128 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3A0128:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00007FFF SRAM RAM\r
- * 0x80000000 0x8001FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3A0128\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8001FFFF\r
--Z@(CODE)EV100=80004100-8001FFFF\r
--P(CODE)EVSEG=80004000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8001FFFF\r
--P(CONST)DATA32_C=80000000-8001FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF\r
--Z(DATA)TRACEBUFFER=00000004-00007FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3A0256 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3A0256
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00040000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x0000FFFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3A0256 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3A0256:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x0000FFFF SRAM RAM\r
- * 0x80000000 0x8003FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3A0256\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8003FFFF\r
--Z@(CODE)EV100=80004100-8003FFFF\r
--P(CODE)EVSEG=80004000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8003FFFF\r
--P(CONST)DATA32_C=80000000-8003FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF\r
--Z(DATA)TRACEBUFFER=00000004-0000FFFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3A0512 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3A0512
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00080000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x0000FFFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3A0512 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3A0512:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x0000FFFF SRAM RAM\r
- * 0x80000000 0x8007FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3A0512\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8007FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8007FFFF\r
--Z@(CODE)EV100=80004100-8007FFFF\r
--P(CODE)EVSEG=80004000-8007FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8007FFFF\r
--P(CONST)DATA32_C=80000000-8007FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8007FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8007FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8007FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8007FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF\r
--Z(DATA)TRACEBUFFER=00000004-0000FFFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3A1128 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3A1128
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00020000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00007FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3A1128 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3A1128:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00007FFF SRAM RAM\r
- * 0x80000000 0x8001FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3A1128\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8001FFFF\r
--Z@(CODE)EV100=80004100-8001FFFF\r
--P(CODE)EVSEG=80004000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8001FFFF\r
--P(CONST)DATA32_C=80000000-8001FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF\r
--Z(DATA)TRACEBUFFER=00000004-00007FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3A1256 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3A1256
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00040000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x0000FFFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3A1256 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3A1256:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x0000FFFF SRAM RAM\r
- * 0x80000000 0x8003FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3A1256\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8003FFFF\r
--Z@(CODE)EV100=80004100-8003FFFF\r
--P(CODE)EVSEG=80004000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8003FFFF\r
--P(CONST)DATA32_C=80000000-8003FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF\r
--Z(DATA)TRACEBUFFER=00000004-0000FFFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3A1512 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3A1512
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00080000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x0000FFFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3A1512 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3A1512:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x0000FFFF SRAM RAM\r
- * 0x80000000 0x8007FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3A1512\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8007FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8007FFFF\r
--Z@(CODE)EV100=80004100-8007FFFF\r
--P(CODE)EVSEG=80004000-8007FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8007FFFF\r
--P(CONST)DATA32_C=80000000-8007FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8007FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8007FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8007FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8007FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF\r
--Z(DATA)TRACEBUFFER=00000004-0000FFFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3B0128 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3B0128
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00020000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00007FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3B0128 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3B0128:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00007FFF SRAM RAM\r
- * 0x80000000 0x8001FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3B0128\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8001FFFF\r
--Z@(CODE)EV100=80004100-8001FFFF\r
--P(CODE)EVSEG=80004000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8001FFFF\r
--P(CONST)DATA32_C=80000000-8001FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF\r
--Z(DATA)TRACEBUFFER=00000004-00007FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3B0256 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3B0256
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00040000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00007FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3B0256 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3B0256:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00007FFF SRAM RAM\r
- * 0x80000000 0x8003FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3B0256\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8003FFFF\r
--Z@(CODE)EV100=80004100-8003FFFF\r
--P(CODE)EVSEG=80004000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8003FFFF\r
--P(CONST)DATA32_C=80000000-8003FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF\r
--Z(DATA)TRACEBUFFER=00000004-00007FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3B064 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3B064
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00010000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00003FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3B064 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3B064:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00003FFF SRAM RAM\r
- * 0x80000000 0x8000FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3B064\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8000FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8000FFFF\r
--Z@(CODE)EV100=80004100-8000FFFF\r
--P(CODE)EVSEG=80004000-8000FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8000FFFF\r
--P(CONST)DATA32_C=80000000-8000FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8000FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8000FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8000FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8000FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00003FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00003FFF\r
--Z(DATA)TRACEBUFFER=00000004-00003FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00003FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00003FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00003FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3B1128 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3B1128
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00020000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00007FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3B1128 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3B1128:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00007FFF SRAM RAM\r
- * 0x80000000 0x8001FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3B1128\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8001FFFF\r
--Z@(CODE)EV100=80004100-8001FFFF\r
--P(CODE)EVSEG=80004000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8001FFFF\r
--P(CONST)DATA32_C=80000000-8001FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8001FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF\r
--Z(DATA)TRACEBUFFER=00000004-00007FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3B1256 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3B1256
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00040000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00007FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3B1256 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3B1256:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00007FFF SRAM RAM\r
- * 0x80000000 0x8003FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3B1256\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8003FFFF\r
--Z@(CODE)EV100=80004100-8003FFFF\r
--P(CODE)EVSEG=80004000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8003FFFF\r
--P(CONST)DATA32_C=80000000-8003FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8003FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF\r
--Z(DATA)TRACEBUFFER=00000004-00007FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/******************************************************************************
- * AVR32 AT32UC3B164 GNU LD script file.
- *
- * - Compiler: GNU GCC for AVR32
- * - Supported devices: AVR32 AT32UC3B164
- *
- * - author Atmel Corporation: http://www.atmel.com \n
- * Support and FAQ: http://support.atmel.no/
- *
- ******************************************************************************/
-
-/* Copyright (c) 2007, Atmel Corporation All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * 3. The name of ATMEL may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
-
-OUTPUT_ARCH(avr32:uc)
-
-ENTRY(_start)
-
-MEMORY
-{
- FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 0x00010000
- INTRAM (wxa!ri) : ORIGIN = 0x00000004, LENGTH = 0x00003FFC
- USERPAGE : ORIGIN = 0x80800000, LENGTH = 0x00000200
- FACTORYPAGE : ORIGIN = 0x80800200, LENGTH = 0x00000200
-}
-
-PHDRS
-{
- FLASH PT_LOAD;
- INTRAM PT_NULL;
- USERPAGE PT_LOAD;
- FACTORYPAGE PT_LOAD;
-}
-
-SECTIONS
-{
- /* If this heap size is selected, all the INTRAM space from the end of the
- data area to the beginning of the stack will be allocated for the heap. */
- __max_heap_size__ = -1;
-
- /* Use a default heap size if heap size was not defined. */
- __heap_size__ = DEFINED(__heap_size__) ? __heap_size__ : __max_heap_size__;
-
- /* Use a default stack size if stack size was not defined. */
- __stack_size__ = DEFINED(__stack_size__) ? __stack_size__ : 4K;
-
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x80000000); . = 0x80000000;
- .interp : { *(.interp) } >FLASH AT>FLASH :FLASH
- .reset : { *(.reset) } >FLASH AT>FLASH :FLASH
- .hash : { *(.hash) } >FLASH AT>FLASH :FLASH
- .dynsym : { *(.dynsym) } >FLASH AT>FLASH :FLASH
- .dynstr : { *(.dynstr) } >FLASH AT>FLASH :FLASH
- .gnu.version : { *(.gnu.version) } >FLASH AT>FLASH :FLASH
- .gnu.version_d : { *(.gnu.version_d) } >FLASH AT>FLASH :FLASH
- .gnu.version_r : { *(.gnu.version_r) } >FLASH AT>FLASH :FLASH
- .rel.init : { *(.rel.init) } >FLASH AT>FLASH :FLASH
- .rela.init : { *(.rela.init) } >FLASH AT>FLASH :FLASH
- .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } >FLASH AT>FLASH :FLASH
- .rel.fini : { *(.rel.fini) } >FLASH AT>FLASH :FLASH
- .rela.fini : { *(.rela.fini) } >FLASH AT>FLASH :FLASH
- .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rel.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rela.data.rel.ro : { *(.rel.data.rel.ro*) } >FLASH AT>FLASH :FLASH
- .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } >FLASH AT>FLASH :FLASH
- .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } >FLASH AT>FLASH :FLASH
- .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } >FLASH AT>FLASH :FLASH
- .rel.ctors : { *(.rel.ctors) } >FLASH AT>FLASH :FLASH
- .rela.ctors : { *(.rela.ctors) } >FLASH AT>FLASH :FLASH
- .rel.dtors : { *(.rel.dtors) } >FLASH AT>FLASH :FLASH
- .rela.dtors : { *(.rela.dtors) } >FLASH AT>FLASH :FLASH
- .rel.got : { *(.rel.got) } >FLASH AT>FLASH :FLASH
- .rela.got : { *(.rela.got) } >FLASH AT>FLASH :FLASH
- .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } >FLASH AT>FLASH :FLASH
- .rel.plt : { *(.rel.plt) } >FLASH AT>FLASH :FLASH
- .rela.plt : { *(.rela.plt) } >FLASH AT>FLASH :FLASH
- .init :
- {
- KEEP (*(.init))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .plt : { *(.plt) } >FLASH AT>FLASH :FLASH
- .text :
- {
- *(.text .stub .text.* .gnu.linkonce.t.*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } >FLASH AT>FLASH :FLASH =0xd703d703
- .fini :
- {
- KEEP (*(.fini))
- } >FLASH AT>FLASH :FLASH =0xd703d703
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >FLASH AT>FLASH :FLASH
- .rodata1 : { *(.rodata1) } >FLASH AT>FLASH :FLASH
- .eh_frame_hdr : { *(.eh_frame_hdr) } >FLASH AT>FLASH :FLASH
- .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >FLASH AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >FLASH AT>FLASH :FLASH
- .lalign : { . = ALIGN(8); PROVIDE(_data_lma = .); } >FLASH AT>FLASH :FLASH
- . = ORIGIN(INTRAM);
- .dalign : { . = ALIGN(8); PROVIDE(_data = .); } >INTRAM AT>INTRAM :INTRAM
- /* Exception handling */
- .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >INTRAM AT>FLASH :FLASH
- .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >INTRAM AT>FLASH :FLASH
- /* Thread Local Storage sections */
- .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >INTRAM AT>FLASH :FLASH
- .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >INTRAM AT>FLASH :FLASH
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- PROVIDE (__preinit_array_start = ALIGN(32 / 8));
- .preinit_array : { KEEP (*(.preinit_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- .init_array : { KEEP (*(.init_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- .fini_array : { KEEP (*(.fini_array)) } >INTRAM AT>FLASH :FLASH
- PROVIDE (__fini_array_end = .);
- .ctors :
- {
- /* gcc uses crtbegin.o to find the start of
- the constructors, so we make sure it is
- first. Because this is a wildcard, it
- doesn't matter if the user does not
- actually link against crtbegin.o; the
- linker won't look for a file to match a
- wildcard. The wildcard also means that it
- doesn't matter which directory crtbegin.o
- is in. */
- KEEP (*crtbegin*.o(.ctors))
- /* We don't want to include the .ctor section from
- from the crtend.o file until after the sorted ctors.
- The .ctor section from the crtend file contains the
- end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
- } >INTRAM AT>FLASH :FLASH
- .dtors :
- {
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } >INTRAM AT>FLASH :FLASH
- .jcr : { KEEP (*(.jcr)) } >INTRAM AT>FLASH :FLASH
- .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >INTRAM AT>FLASH :FLASH
- .dynamic : { *(.dynamic) } >INTRAM AT>FLASH :FLASH
- .got : { *(.got.plt) *(.got) } >INTRAM AT>FLASH :FLASH
- .data :
- {
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- } >INTRAM AT>FLASH :FLASH
- .data1 : { *(.data1) } >INTRAM AT>FLASH :FLASH
- .balign : { . = ALIGN(8); _edata = .; } >INTRAM AT>FLASH :FLASH
- _edata = .;
- PROVIDE (edata = .);
- __bss_start = .;
- .bss :
- {
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
- /* Align here to ensure that the .bss section occupies space up to
- _end. Align after .bss to ensure correct alignment even if the
- .bss section disappears because there are no input sections. */
- . = ALIGN(8);
- } >INTRAM AT>INTRAM :INTRAM
- . = ALIGN(8);
- _end = .;
- PROVIDE (end = .);
- __heap_start__ = ALIGN(8);
- .heap :
- {
- *(.heap)
- . = (__heap_size__ == __max_heap_size__) ?
- ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ - ABSOLUTE(.) :
- __heap_size__;
- } >INTRAM AT>INTRAM :INTRAM
- __heap_end__ = .;
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- .stack ORIGIN(INTRAM) + LENGTH(INTRAM) - __stack_size__ :
- {
- _stack = .;
- *(.stack)
- . = __stack_size__;
- _estack = .;
- } >INTRAM AT>INTRAM :INTRAM
- .userpage : { *(.userpage .userpage.*) } >USERPAGE AT>USERPAGE :USERPAGE
- .factorypage : { *(.factorypage .factorypage.*) } >FACTORYPAGE AT>FACTORYPAGE :FACTORYPAGE
- /DISCARD/ : { *(.note.GNU-stack) }
-}
+++ /dev/null
-/******************************************************************************\r
- * AVR32 AT32UC3B164 XLINK command file for AVR32 IAR C/C++ Compiler.\r
- *\r
- * The assumed memory layout is the one of the AT32UC3B164:\r
- *\r
- * Start Stop Name Type\r
- * ---------- ---------- ----- --------------\r
- * 0x00000000 0x00003FFF SRAM RAM\r
- * 0x80000000 0x8000FFFF FLASH FLASH\r
- *\r
- * Usage: xlink your_file(s) -f xcl-file libraries\r
- *\r
- * - Compiler: IAR EWAVR32\r
- * - Supported devices: AVR32 AT32UC3B164\r
- *\r
- * - author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-/************************************************************************/\r
-/* The following segments are defined in this link file: */\r
-/* */\r
-/* Code segments */\r
-/* CODE32 -- Program code used by __code32 functions. */\r
-/* RESET -- Reset code. */\r
-/* EVSEG -- Exception vector handlers. */\r
-/* */\r
-/* Constant segments */\r
-/* INITTAB -- Segment initializer table. */\r
-/* DIFUNCT -- Dynamic initialization vector used by C++. */\r
-/* SWITCH -- Switch tables. */\r
-/* ACTAB -- Table of pointers to acall functions. */\r
-/* */\r
-/* DATA21_ID -- Initialization data for DATA21_I. */\r
-/* DATA32_ID -- Initialization data for DATA32_I. */\r
-/* DATA32_C -- Constant __data32 data. */\r
-/* */\r
-/* CHECKSUM -- Checksum segment. */\r
-/* */\r
-/* Data segments */\r
-/* DATA21_I -- Initialized __data21 data with non-zero */\r
-/* initial value. */\r
-/* DATA32_I -- Initialized __data32 data with non-zero */\r
-/* initial value. */\r
-/* DATA21_Z -- Initialized __data21 data with zero initial value. */\r
-/* DATA32_Z -- Initialized __data32 data with zero initial value. */\r
-/* DATA21_N -- Non-initialized __data21. */\r
-/* DATA32_N -- Non-initialized __data32. */\r
-/* SSTACK -- The system stack. */\r
-/* CSTACK -- The application stack. */\r
-/* HEAP -- The heap used by malloc and free. */\r
-/* */\r
-/************************************************************************/\r
-\r
-/************************************************************************/\r
-/* Define CPU */\r
-/************************************************************************/\r
-\r
--cavr32\r
-\r
-// Declare the IPR0 memory location\r
--DIPR0=FFFF0800\r
-\r
-/************************************************************************/\r
-/* Reset code is located at address 0x80000000 and up. */\r
-/************************************************************************/\r
-\r
--Z(CODE)RESET=80000000-8000FFFF\r
-\r
-/************************************************************************/\r
-/* The exception handler code is located at address 0x80000000 */\r
-/* and up. Make sure that the exception table gets properly */\r
-/* allocated. By using the special -Z@ allocation primitive, the */\r
-/* placement is guaranteed to be at _EVBASE and onwards. */\r
-/************************************************************************/\r
-\r
--Z@(CODE)EVTAB=80004000-8000FFFF\r
--Z@(CODE)EV100=80004100-8000FFFF\r
--P(CODE)EVSEG=80004000-8000FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate code and const segments. */\r
-/************************************************************************/\r
-\r
--P(CODE)CODE32=80000000-8000FFFF\r
--P(CONST)DATA32_C=80000000-8000FFFF\r
-\r
-// Initializers\r
--Z(CONST)INITTAB,DIFUNCT=80000000-8000FFFF\r
--Z(CONST)CHECKSUM,SWITCH=80000000-8000FFFF\r
--Z(CONST)DATA21_ID,DATA32_ID=80000000-8000FFFF\r
-\r
--Z(CONST)ACTAB,HTAB=80000000-8000FFFF\r
-\r
-/************************************************************************/\r
-/* Allocate the read/write segments that are mapped to RAM. */\r
-/************************************************************************/\r
-\r
--Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00003FFF\r
--Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00003FFF\r
--Z(DATA)TRACEBUFFER=00000004-00003FFF\r
-\r
--Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00003FFF\r
--Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00003FFF\r
--Z(DATA)HEAP+_HEAP_SIZE=00000004-00003FFF\r
-\r
-/************************************************************************/\r
-/* End of File */\r
-/************************************************************************/\r
+++ /dev/null
-/*This file is prepared for Doxygen automatic documentation generation.*/\r
-/*! \file *********************************************************************\r
- *\r
- * \brief Preprocessor macro repeating utils.\r
- *\r
- * - Compiler: IAR EWAVR32 and GNU GCC for AVR32\r
- * - Supported devices: All AVR32 devices can be used.\r
- *\r
- * \author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-#ifndef _MREPEAT_H_\r
-#define _MREPEAT_H_\r
-\r
-#include "preprocessor.h"\r
-\r
-\r
-//! Maximal number of repetitions supported by MREPEAT.\r
-#define MREPEAT_LIMIT 256\r
-\r
-/*! \brief Macro repeat.\r
- *\r
- * This macro represents a horizontal repetition construct.\r
- *\r
- * \param count The number of repetitious calls to macro. Valid values range from 0 to MREPEAT_LIMIT.\r
- * \param macro A binary operation of the form macro(n, data). This macro is expanded by MREPEAT with\r
- * the current repetition number and the auxiliary data argument.\r
- * \param data Auxiliary data passed to macro.\r
- *\r
- * \return <tt>macro(0, data) macro(1, data) ... macro(count - 1, data)</tt>\r
- */\r
-#define MREPEAT(count, macro, data) TPASTE2(MREPEAT, count)(macro, data)\r
-\r
-#define MREPEAT0( macro, data)\r
-#define MREPEAT1( macro, data) MREPEAT0( macro, data) macro( 0, data)\r
-#define MREPEAT2( macro, data) MREPEAT1( macro, data) macro( 1, data)\r
-#define MREPEAT3( macro, data) MREPEAT2( macro, data) macro( 2, data)\r
-#define MREPEAT4( macro, data) MREPEAT3( macro, data) macro( 3, data)\r
-#define MREPEAT5( macro, data) MREPEAT4( macro, data) macro( 4, data)\r
-#define MREPEAT6( macro, data) MREPEAT5( macro, data) macro( 5, data)\r
-#define MREPEAT7( macro, data) MREPEAT6( macro, data) macro( 6, data)\r
-#define MREPEAT8( macro, data) MREPEAT7( macro, data) macro( 7, data)\r
-#define MREPEAT9( macro, data) MREPEAT8( macro, data) macro( 8, data)\r
-#define MREPEAT10( macro, data) MREPEAT9( macro, data) macro( 9, data)\r
-#define MREPEAT11( macro, data) MREPEAT10( macro, data) macro( 10, data)\r
-#define MREPEAT12( macro, data) MREPEAT11( macro, data) macro( 11, data)\r
-#define MREPEAT13( macro, data) MREPEAT12( macro, data) macro( 12, data)\r
-#define MREPEAT14( macro, data) MREPEAT13( macro, data) macro( 13, data)\r
-#define MREPEAT15( macro, data) MREPEAT14( macro, data) macro( 14, data)\r
-#define MREPEAT16( macro, data) MREPEAT15( macro, data) macro( 15, data)\r
-#define MREPEAT17( macro, data) MREPEAT16( macro, data) macro( 16, data)\r
-#define MREPEAT18( macro, data) MREPEAT17( macro, data) macro( 17, data)\r
-#define MREPEAT19( macro, data) MREPEAT18( macro, data) macro( 18, data)\r
-#define MREPEAT20( macro, data) MREPEAT19( macro, data) macro( 19, data)\r
-#define MREPEAT21( macro, data) MREPEAT20( macro, data) macro( 20, data)\r
-#define MREPEAT22( macro, data) MREPEAT21( macro, data) macro( 21, data)\r
-#define MREPEAT23( macro, data) MREPEAT22( macro, data) macro( 22, data)\r
-#define MREPEAT24( macro, data) MREPEAT23( macro, data) macro( 23, data)\r
-#define MREPEAT25( macro, data) MREPEAT24( macro, data) macro( 24, data)\r
-#define MREPEAT26( macro, data) MREPEAT25( macro, data) macro( 25, data)\r
-#define MREPEAT27( macro, data) MREPEAT26( macro, data) macro( 26, data)\r
-#define MREPEAT28( macro, data) MREPEAT27( macro, data) macro( 27, data)\r
-#define MREPEAT29( macro, data) MREPEAT28( macro, data) macro( 28, data)\r
-#define MREPEAT30( macro, data) MREPEAT29( macro, data) macro( 29, data)\r
-#define MREPEAT31( macro, data) MREPEAT30( macro, data) macro( 30, data)\r
-#define MREPEAT32( macro, data) MREPEAT31( macro, data) macro( 31, data)\r
-#define MREPEAT33( macro, data) MREPEAT32( macro, data) macro( 32, data)\r
-#define MREPEAT34( macro, data) MREPEAT33( macro, data) macro( 33, data)\r
-#define MREPEAT35( macro, data) MREPEAT34( macro, data) macro( 34, data)\r
-#define MREPEAT36( macro, data) MREPEAT35( macro, data) macro( 35, data)\r
-#define MREPEAT37( macro, data) MREPEAT36( macro, data) macro( 36, data)\r
-#define MREPEAT38( macro, data) MREPEAT37( macro, data) macro( 37, data)\r
-#define MREPEAT39( macro, data) MREPEAT38( macro, data) macro( 38, data)\r
-#define MREPEAT40( macro, data) MREPEAT39( macro, data) macro( 39, data)\r
-#define MREPEAT41( macro, data) MREPEAT40( macro, data) macro( 40, data)\r
-#define MREPEAT42( macro, data) MREPEAT41( macro, data) macro( 41, data)\r
-#define MREPEAT43( macro, data) MREPEAT42( macro, data) macro( 42, data)\r
-#define MREPEAT44( macro, data) MREPEAT43( macro, data) macro( 43, data)\r
-#define MREPEAT45( macro, data) MREPEAT44( macro, data) macro( 44, data)\r
-#define MREPEAT46( macro, data) MREPEAT45( macro, data) macro( 45, data)\r
-#define MREPEAT47( macro, data) MREPEAT46( macro, data) macro( 46, data)\r
-#define MREPEAT48( macro, data) MREPEAT47( macro, data) macro( 47, data)\r
-#define MREPEAT49( macro, data) MREPEAT48( macro, data) macro( 48, data)\r
-#define MREPEAT50( macro, data) MREPEAT49( macro, data) macro( 49, data)\r
-#define MREPEAT51( macro, data) MREPEAT50( macro, data) macro( 50, data)\r
-#define MREPEAT52( macro, data) MREPEAT51( macro, data) macro( 51, data)\r
-#define MREPEAT53( macro, data) MREPEAT52( macro, data) macro( 52, data)\r
-#define MREPEAT54( macro, data) MREPEAT53( macro, data) macro( 53, data)\r
-#define MREPEAT55( macro, data) MREPEAT54( macro, data) macro( 54, data)\r
-#define MREPEAT56( macro, data) MREPEAT55( macro, data) macro( 55, data)\r
-#define MREPEAT57( macro, data) MREPEAT56( macro, data) macro( 56, data)\r
-#define MREPEAT58( macro, data) MREPEAT57( macro, data) macro( 57, data)\r
-#define MREPEAT59( macro, data) MREPEAT58( macro, data) macro( 58, data)\r
-#define MREPEAT60( macro, data) MREPEAT59( macro, data) macro( 59, data)\r
-#define MREPEAT61( macro, data) MREPEAT60( macro, data) macro( 60, data)\r
-#define MREPEAT62( macro, data) MREPEAT61( macro, data) macro( 61, data)\r
-#define MREPEAT63( macro, data) MREPEAT62( macro, data) macro( 62, data)\r
-#define MREPEAT64( macro, data) MREPEAT63( macro, data) macro( 63, data)\r
-#define MREPEAT65( macro, data) MREPEAT64( macro, data) macro( 64, data)\r
-#define MREPEAT66( macro, data) MREPEAT65( macro, data) macro( 65, data)\r
-#define MREPEAT67( macro, data) MREPEAT66( macro, data) macro( 66, data)\r
-#define MREPEAT68( macro, data) MREPEAT67( macro, data) macro( 67, data)\r
-#define MREPEAT69( macro, data) MREPEAT68( macro, data) macro( 68, data)\r
-#define MREPEAT70( macro, data) MREPEAT69( macro, data) macro( 69, data)\r
-#define MREPEAT71( macro, data) MREPEAT70( macro, data) macro( 70, data)\r
-#define MREPEAT72( macro, data) MREPEAT71( macro, data) macro( 71, data)\r
-#define MREPEAT73( macro, data) MREPEAT72( macro, data) macro( 72, data)\r
-#define MREPEAT74( macro, data) MREPEAT73( macro, data) macro( 73, data)\r
-#define MREPEAT75( macro, data) MREPEAT74( macro, data) macro( 74, data)\r
-#define MREPEAT76( macro, data) MREPEAT75( macro, data) macro( 75, data)\r
-#define MREPEAT77( macro, data) MREPEAT76( macro, data) macro( 76, data)\r
-#define MREPEAT78( macro, data) MREPEAT77( macro, data) macro( 77, data)\r
-#define MREPEAT79( macro, data) MREPEAT78( macro, data) macro( 78, data)\r
-#define MREPEAT80( macro, data) MREPEAT79( macro, data) macro( 79, data)\r
-#define MREPEAT81( macro, data) MREPEAT80( macro, data) macro( 80, data)\r
-#define MREPEAT82( macro, data) MREPEAT81( macro, data) macro( 81, data)\r
-#define MREPEAT83( macro, data) MREPEAT82( macro, data) macro( 82, data)\r
-#define MREPEAT84( macro, data) MREPEAT83( macro, data) macro( 83, data)\r
-#define MREPEAT85( macro, data) MREPEAT84( macro, data) macro( 84, data)\r
-#define MREPEAT86( macro, data) MREPEAT85( macro, data) macro( 85, data)\r
-#define MREPEAT87( macro, data) MREPEAT86( macro, data) macro( 86, data)\r
-#define MREPEAT88( macro, data) MREPEAT87( macro, data) macro( 87, data)\r
-#define MREPEAT89( macro, data) MREPEAT88( macro, data) macro( 88, data)\r
-#define MREPEAT90( macro, data) MREPEAT89( macro, data) macro( 89, data)\r
-#define MREPEAT91( macro, data) MREPEAT90( macro, data) macro( 90, data)\r
-#define MREPEAT92( macro, data) MREPEAT91( macro, data) macro( 91, data)\r
-#define MREPEAT93( macro, data) MREPEAT92( macro, data) macro( 92, data)\r
-#define MREPEAT94( macro, data) MREPEAT93( macro, data) macro( 93, data)\r
-#define MREPEAT95( macro, data) MREPEAT94( macro, data) macro( 94, data)\r
-#define MREPEAT96( macro, data) MREPEAT95( macro, data) macro( 95, data)\r
-#define MREPEAT97( macro, data) MREPEAT96( macro, data) macro( 96, data)\r
-#define MREPEAT98( macro, data) MREPEAT97( macro, data) macro( 97, data)\r
-#define MREPEAT99( macro, data) MREPEAT98( macro, data) macro( 98, data)\r
-#define MREPEAT100(macro, data) MREPEAT99( macro, data) macro( 99, data)\r
-#define MREPEAT101(macro, data) MREPEAT100(macro, data) macro(100, data)\r
-#define MREPEAT102(macro, data) MREPEAT101(macro, data) macro(101, data)\r
-#define MREPEAT103(macro, data) MREPEAT102(macro, data) macro(102, data)\r
-#define MREPEAT104(macro, data) MREPEAT103(macro, data) macro(103, data)\r
-#define MREPEAT105(macro, data) MREPEAT104(macro, data) macro(104, data)\r
-#define MREPEAT106(macro, data) MREPEAT105(macro, data) macro(105, data)\r
-#define MREPEAT107(macro, data) MREPEAT106(macro, data) macro(106, data)\r
-#define MREPEAT108(macro, data) MREPEAT107(macro, data) macro(107, data)\r
-#define MREPEAT109(macro, data) MREPEAT108(macro, data) macro(108, data)\r
-#define MREPEAT110(macro, data) MREPEAT109(macro, data) macro(109, data)\r
-#define MREPEAT111(macro, data) MREPEAT110(macro, data) macro(110, data)\r
-#define MREPEAT112(macro, data) MREPEAT111(macro, data) macro(111, data)\r
-#define MREPEAT113(macro, data) MREPEAT112(macro, data) macro(112, data)\r
-#define MREPEAT114(macro, data) MREPEAT113(macro, data) macro(113, data)\r
-#define MREPEAT115(macro, data) MREPEAT114(macro, data) macro(114, data)\r
-#define MREPEAT116(macro, data) MREPEAT115(macro, data) macro(115, data)\r
-#define MREPEAT117(macro, data) MREPEAT116(macro, data) macro(116, data)\r
-#define MREPEAT118(macro, data) MREPEAT117(macro, data) macro(117, data)\r
-#define MREPEAT119(macro, data) MREPEAT118(macro, data) macro(118, data)\r
-#define MREPEAT120(macro, data) MREPEAT119(macro, data) macro(119, data)\r
-#define MREPEAT121(macro, data) MREPEAT120(macro, data) macro(120, data)\r
-#define MREPEAT122(macro, data) MREPEAT121(macro, data) macro(121, data)\r
-#define MREPEAT123(macro, data) MREPEAT122(macro, data) macro(122, data)\r
-#define MREPEAT124(macro, data) MREPEAT123(macro, data) macro(123, data)\r
-#define MREPEAT125(macro, data) MREPEAT124(macro, data) macro(124, data)\r
-#define MREPEAT126(macro, data) MREPEAT125(macro, data) macro(125, data)\r
-#define MREPEAT127(macro, data) MREPEAT126(macro, data) macro(126, data)\r
-#define MREPEAT128(macro, data) MREPEAT127(macro, data) macro(127, data)\r
-#define MREPEAT129(macro, data) MREPEAT128(macro, data) macro(128, data)\r
-#define MREPEAT130(macro, data) MREPEAT129(macro, data) macro(129, data)\r
-#define MREPEAT131(macro, data) MREPEAT130(macro, data) macro(130, data)\r
-#define MREPEAT132(macro, data) MREPEAT131(macro, data) macro(131, data)\r
-#define MREPEAT133(macro, data) MREPEAT132(macro, data) macro(132, data)\r
-#define MREPEAT134(macro, data) MREPEAT133(macro, data) macro(133, data)\r
-#define MREPEAT135(macro, data) MREPEAT134(macro, data) macro(134, data)\r
-#define MREPEAT136(macro, data) MREPEAT135(macro, data) macro(135, data)\r
-#define MREPEAT137(macro, data) MREPEAT136(macro, data) macro(136, data)\r
-#define MREPEAT138(macro, data) MREPEAT137(macro, data) macro(137, data)\r
-#define MREPEAT139(macro, data) MREPEAT138(macro, data) macro(138, data)\r
-#define MREPEAT140(macro, data) MREPEAT139(macro, data) macro(139, data)\r
-#define MREPEAT141(macro, data) MREPEAT140(macro, data) macro(140, data)\r
-#define MREPEAT142(macro, data) MREPEAT141(macro, data) macro(141, data)\r
-#define MREPEAT143(macro, data) MREPEAT142(macro, data) macro(142, data)\r
-#define MREPEAT144(macro, data) MREPEAT143(macro, data) macro(143, data)\r
-#define MREPEAT145(macro, data) MREPEAT144(macro, data) macro(144, data)\r
-#define MREPEAT146(macro, data) MREPEAT145(macro, data) macro(145, data)\r
-#define MREPEAT147(macro, data) MREPEAT146(macro, data) macro(146, data)\r
-#define MREPEAT148(macro, data) MREPEAT147(macro, data) macro(147, data)\r
-#define MREPEAT149(macro, data) MREPEAT148(macro, data) macro(148, data)\r
-#define MREPEAT150(macro, data) MREPEAT149(macro, data) macro(149, data)\r
-#define MREPEAT151(macro, data) MREPEAT150(macro, data) macro(150, data)\r
-#define MREPEAT152(macro, data) MREPEAT151(macro, data) macro(151, data)\r
-#define MREPEAT153(macro, data) MREPEAT152(macro, data) macro(152, data)\r
-#define MREPEAT154(macro, data) MREPEAT153(macro, data) macro(153, data)\r
-#define MREPEAT155(macro, data) MREPEAT154(macro, data) macro(154, data)\r
-#define MREPEAT156(macro, data) MREPEAT155(macro, data) macro(155, data)\r
-#define MREPEAT157(macro, data) MREPEAT156(macro, data) macro(156, data)\r
-#define MREPEAT158(macro, data) MREPEAT157(macro, data) macro(157, data)\r
-#define MREPEAT159(macro, data) MREPEAT158(macro, data) macro(158, data)\r
-#define MREPEAT160(macro, data) MREPEAT159(macro, data) macro(159, data)\r
-#define MREPEAT161(macro, data) MREPEAT160(macro, data) macro(160, data)\r
-#define MREPEAT162(macro, data) MREPEAT161(macro, data) macro(161, data)\r
-#define MREPEAT163(macro, data) MREPEAT162(macro, data) macro(162, data)\r
-#define MREPEAT164(macro, data) MREPEAT163(macro, data) macro(163, data)\r
-#define MREPEAT165(macro, data) MREPEAT164(macro, data) macro(164, data)\r
-#define MREPEAT166(macro, data) MREPEAT165(macro, data) macro(165, data)\r
-#define MREPEAT167(macro, data) MREPEAT166(macro, data) macro(166, data)\r
-#define MREPEAT168(macro, data) MREPEAT167(macro, data) macro(167, data)\r
-#define MREPEAT169(macro, data) MREPEAT168(macro, data) macro(168, data)\r
-#define MREPEAT170(macro, data) MREPEAT169(macro, data) macro(169, data)\r
-#define MREPEAT171(macro, data) MREPEAT170(macro, data) macro(170, data)\r
-#define MREPEAT172(macro, data) MREPEAT171(macro, data) macro(171, data)\r
-#define MREPEAT173(macro, data) MREPEAT172(macro, data) macro(172, data)\r
-#define MREPEAT174(macro, data) MREPEAT173(macro, data) macro(173, data)\r
-#define MREPEAT175(macro, data) MREPEAT174(macro, data) macro(174, data)\r
-#define MREPEAT176(macro, data) MREPEAT175(macro, data) macro(175, data)\r
-#define MREPEAT177(macro, data) MREPEAT176(macro, data) macro(176, data)\r
-#define MREPEAT178(macro, data) MREPEAT177(macro, data) macro(177, data)\r
-#define MREPEAT179(macro, data) MREPEAT178(macro, data) macro(178, data)\r
-#define MREPEAT180(macro, data) MREPEAT179(macro, data) macro(179, data)\r
-#define MREPEAT181(macro, data) MREPEAT180(macro, data) macro(180, data)\r
-#define MREPEAT182(macro, data) MREPEAT181(macro, data) macro(181, data)\r
-#define MREPEAT183(macro, data) MREPEAT182(macro, data) macro(182, data)\r
-#define MREPEAT184(macro, data) MREPEAT183(macro, data) macro(183, data)\r
-#define MREPEAT185(macro, data) MREPEAT184(macro, data) macro(184, data)\r
-#define MREPEAT186(macro, data) MREPEAT185(macro, data) macro(185, data)\r
-#define MREPEAT187(macro, data) MREPEAT186(macro, data) macro(186, data)\r
-#define MREPEAT188(macro, data) MREPEAT187(macro, data) macro(187, data)\r
-#define MREPEAT189(macro, data) MREPEAT188(macro, data) macro(188, data)\r
-#define MREPEAT190(macro, data) MREPEAT189(macro, data) macro(189, data)\r
-#define MREPEAT191(macro, data) MREPEAT190(macro, data) macro(190, data)\r
-#define MREPEAT192(macro, data) MREPEAT191(macro, data) macro(191, data)\r
-#define MREPEAT193(macro, data) MREPEAT192(macro, data) macro(192, data)\r
-#define MREPEAT194(macro, data) MREPEAT193(macro, data) macro(193, data)\r
-#define MREPEAT195(macro, data) MREPEAT194(macro, data) macro(194, data)\r
-#define MREPEAT196(macro, data) MREPEAT195(macro, data) macro(195, data)\r
-#define MREPEAT197(macro, data) MREPEAT196(macro, data) macro(196, data)\r
-#define MREPEAT198(macro, data) MREPEAT197(macro, data) macro(197, data)\r
-#define MREPEAT199(macro, data) MREPEAT198(macro, data) macro(198, data)\r
-#define MREPEAT200(macro, data) MREPEAT199(macro, data) macro(199, data)\r
-#define MREPEAT201(macro, data) MREPEAT200(macro, data) macro(200, data)\r
-#define MREPEAT202(macro, data) MREPEAT201(macro, data) macro(201, data)\r
-#define MREPEAT203(macro, data) MREPEAT202(macro, data) macro(202, data)\r
-#define MREPEAT204(macro, data) MREPEAT203(macro, data) macro(203, data)\r
-#define MREPEAT205(macro, data) MREPEAT204(macro, data) macro(204, data)\r
-#define MREPEAT206(macro, data) MREPEAT205(macro, data) macro(205, data)\r
-#define MREPEAT207(macro, data) MREPEAT206(macro, data) macro(206, data)\r
-#define MREPEAT208(macro, data) MREPEAT207(macro, data) macro(207, data)\r
-#define MREPEAT209(macro, data) MREPEAT208(macro, data) macro(208, data)\r
-#define MREPEAT210(macro, data) MREPEAT209(macro, data) macro(209, data)\r
-#define MREPEAT211(macro, data) MREPEAT210(macro, data) macro(210, data)\r
-#define MREPEAT212(macro, data) MREPEAT211(macro, data) macro(211, data)\r
-#define MREPEAT213(macro, data) MREPEAT212(macro, data) macro(212, data)\r
-#define MREPEAT214(macro, data) MREPEAT213(macro, data) macro(213, data)\r
-#define MREPEAT215(macro, data) MREPEAT214(macro, data) macro(214, data)\r
-#define MREPEAT216(macro, data) MREPEAT215(macro, data) macro(215, data)\r
-#define MREPEAT217(macro, data) MREPEAT216(macro, data) macro(216, data)\r
-#define MREPEAT218(macro, data) MREPEAT217(macro, data) macro(217, data)\r
-#define MREPEAT219(macro, data) MREPEAT218(macro, data) macro(218, data)\r
-#define MREPEAT220(macro, data) MREPEAT219(macro, data) macro(219, data)\r
-#define MREPEAT221(macro, data) MREPEAT220(macro, data) macro(220, data)\r
-#define MREPEAT222(macro, data) MREPEAT221(macro, data) macro(221, data)\r
-#define MREPEAT223(macro, data) MREPEAT222(macro, data) macro(222, data)\r
-#define MREPEAT224(macro, data) MREPEAT223(macro, data) macro(223, data)\r
-#define MREPEAT225(macro, data) MREPEAT224(macro, data) macro(224, data)\r
-#define MREPEAT226(macro, data) MREPEAT225(macro, data) macro(225, data)\r
-#define MREPEAT227(macro, data) MREPEAT226(macro, data) macro(226, data)\r
-#define MREPEAT228(macro, data) MREPEAT227(macro, data) macro(227, data)\r
-#define MREPEAT229(macro, data) MREPEAT228(macro, data) macro(228, data)\r
-#define MREPEAT230(macro, data) MREPEAT229(macro, data) macro(229, data)\r
-#define MREPEAT231(macro, data) MREPEAT230(macro, data) macro(230, data)\r
-#define MREPEAT232(macro, data) MREPEAT231(macro, data) macro(231, data)\r
-#define MREPEAT233(macro, data) MREPEAT232(macro, data) macro(232, data)\r
-#define MREPEAT234(macro, data) MREPEAT233(macro, data) macro(233, data)\r
-#define MREPEAT235(macro, data) MREPEAT234(macro, data) macro(234, data)\r
-#define MREPEAT236(macro, data) MREPEAT235(macro, data) macro(235, data)\r
-#define MREPEAT237(macro, data) MREPEAT236(macro, data) macro(236, data)\r
-#define MREPEAT238(macro, data) MREPEAT237(macro, data) macro(237, data)\r
-#define MREPEAT239(macro, data) MREPEAT238(macro, data) macro(238, data)\r
-#define MREPEAT240(macro, data) MREPEAT239(macro, data) macro(239, data)\r
-#define MREPEAT241(macro, data) MREPEAT240(macro, data) macro(240, data)\r
-#define MREPEAT242(macro, data) MREPEAT241(macro, data) macro(241, data)\r
-#define MREPEAT243(macro, data) MREPEAT242(macro, data) macro(242, data)\r
-#define MREPEAT244(macro, data) MREPEAT243(macro, data) macro(243, data)\r
-#define MREPEAT245(macro, data) MREPEAT244(macro, data) macro(244, data)\r
-#define MREPEAT246(macro, data) MREPEAT245(macro, data) macro(245, data)\r
-#define MREPEAT247(macro, data) MREPEAT246(macro, data) macro(246, data)\r
-#define MREPEAT248(macro, data) MREPEAT247(macro, data) macro(247, data)\r
-#define MREPEAT249(macro, data) MREPEAT248(macro, data) macro(248, data)\r
-#define MREPEAT250(macro, data) MREPEAT249(macro, data) macro(249, data)\r
-#define MREPEAT251(macro, data) MREPEAT250(macro, data) macro(250, data)\r
-#define MREPEAT252(macro, data) MREPEAT251(macro, data) macro(251, data)\r
-#define MREPEAT253(macro, data) MREPEAT252(macro, data) macro(252, data)\r
-#define MREPEAT254(macro, data) MREPEAT253(macro, data) macro(253, data)\r
-#define MREPEAT255(macro, data) MREPEAT254(macro, data) macro(254, data)\r
-#define MREPEAT256(macro, data) MREPEAT255(macro, data) macro(255, data)\r
-\r
-\r
-#endif // _MREPEAT_H_\r
+++ /dev/null
-/*This file is prepared for Doxygen automatic documentation generation.*/\r
-/*! \file *********************************************************************\r
- *\r
- * \brief Preprocessor utils.\r
- *\r
- * - Compiler: IAR EWAVR32 and GNU GCC for AVR32\r
- * - Supported devices: All AVR32 devices can be used.\r
- *\r
- * \author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-#ifndef _PREPROCESSOR_H_\r
-#define _PREPROCESSOR_H_\r
-\r
-#include "tpaste.h"\r
-#include "stringz.h"\r
-#include "mrepeat.h"\r
-\r
-\r
-#endif // _PREPROCESSOR_H_\r
+++ /dev/null
-/*This file is prepared for Doxygen automatic documentation generation.*/\r
-/*! \file *********************************************************************\r
- *\r
- * \brief Preprocessor stringizing utils.\r
- *\r
- * - Compiler: IAR EWAVR32 and GNU GCC for AVR32\r
- * - Supported devices: All AVR32 devices can be used.\r
- *\r
- * \author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-#ifndef _STRINGZ_H_\r
-#define _STRINGZ_H_\r
-\r
-\r
-/*! \brief Stringize.\r
- *\r
- * Stringize a preprocessing token, this token being allowed to be \#defined.\r
- *\r
- * May be used only within macros with the token passed as an argument if the token is \#defined.\r
- *\r
- * For example, writing STRINGZ(PIN) within a macro \#defined by PIN_NAME(PIN)\r
- * and invoked as PIN_NAME(PIN0) with PIN0 \#defined as A0 is equivalent to\r
- * writing "A0".\r
- */\r
-#define STRINGZ(x) #x\r
-\r
-/*! \brief Absolute stringize.\r
- *\r
- * Stringize a preprocessing token, this token being allowed to be \#defined.\r
- *\r
- * No restriction of use if the token is \#defined.\r
- *\r
- * For example, writing ASTRINGZ(PIN0) anywhere with PIN0 \#defined as A0 is\r
- * equivalent to writing "A0".\r
- */\r
-#define ASTRINGZ(x) STRINGZ(x)\r
-\r
-\r
-#endif // _STRINGZ_H_\r
+++ /dev/null
-/*This file is prepared for Doxygen automatic documentation generation.*/\r
-/*! \file *********************************************************************\r
- *\r
- * \brief Preprocessor token pasting utils.\r
- *\r
- * - Compiler: IAR EWAVR32 and GNU GCC for AVR32\r
- * - Supported devices: All AVR32 devices can be used.\r
- *\r
- * \author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-#ifndef _TPASTE_H_\r
-#define _TPASTE_H_\r
-\r
-\r
-/*! \name Token Paste\r
- *\r
- * Paste N preprocessing tokens together, these tokens being allowed to be \#defined.\r
- *\r
- * May be used only within macros with the tokens passed as arguments if the tokens are \#defined.\r
- *\r
- * For example, writing TPASTE2(U, WIDTH) within a macro \#defined by\r
- * UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH \#defined as 32 is\r
- * equivalent to writing U32.\r
- */\r
-//! @{\r
-#define TPASTE2( a, b) a##b\r
-#define TPASTE3( a, b, c) a##b##c\r
-#define TPASTE4( a, b, c, d) a##b##c##d\r
-#define TPASTE5( a, b, c, d, e) a##b##c##d##e\r
-#define TPASTE6( a, b, c, d, e, f) a##b##c##d##e##f\r
-#define TPASTE7( a, b, c, d, e, f, g) a##b##c##d##e##f##g\r
-#define TPASTE8( a, b, c, d, e, f, g, h) a##b##c##d##e##f##g##h\r
-#define TPASTE9( a, b, c, d, e, f, g, h, i) a##b##c##d##e##f##g##h##i\r
-#define TPASTE10(a, b, c, d, e, f, g, h, i, j) a##b##c##d##e##f##g##h##i##j\r
-//! @}\r
-\r
-/*! \name Absolute Token Paste\r
- *\r
- * Paste N preprocessing tokens together, these tokens being allowed to be \#defined.\r
- *\r
- * No restriction of use if the tokens are \#defined.\r
- *\r
- * For example, writing ATPASTE2(U, UL_WIDTH) anywhere with UL_WIDTH \#defined\r
- * as 32 is equivalent to writing U32.\r
- */\r
-//! @{\r
-#define ATPASTE2( a, b) TPASTE2( a, b)\r
-#define ATPASTE3( a, b, c) TPASTE3( a, b, c)\r
-#define ATPASTE4( a, b, c, d) TPASTE4( a, b, c, d)\r
-#define ATPASTE5( a, b, c, d, e) TPASTE5( a, b, c, d, e)\r
-#define ATPASTE6( a, b, c, d, e, f) TPASTE6( a, b, c, d, e, f)\r
-#define ATPASTE7( a, b, c, d, e, f, g) TPASTE7( a, b, c, d, e, f, g)\r
-#define ATPASTE8( a, b, c, d, e, f, g, h) TPASTE8( a, b, c, d, e, f, g, h)\r
-#define ATPASTE9( a, b, c, d, e, f, g, h, i) TPASTE9( a, b, c, d, e, f, g, h, i)\r
-#define ATPASTE10(a, b, c, d, e, f, g, h, i, j) TPASTE10(a, b, c, d, e, f, g, h, i, j)\r
-//! @}\r
-\r
-\r
-#endif // _TPASTE_H_\r
+++ /dev/null
-/*This file is prepared for Doxygen automatic documentation generation.*/\r
-/*! \file *********************************************************************\r
- *\r
- * \brief Compiler file for AVR32.\r
- *\r
- * This file defines commonly used types and macros.\r
- *\r
- * - Compiler: IAR EWAVR32 and GNU GCC for AVR32\r
- * - Supported devices: All AVR32 devices can be used.\r
- * - AppNote:\r
- *\r
- * \author Atmel Corporation: http://www.atmel.com \n\r
- * Support and FAQ: http://support.atmel.no/\r
- *\r
- ******************************************************************************/\r
-\r
-/* Copyright (c) 2007, Atmel Corporation 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
- * 1. Redistributions of source code must retain the above copyright notice,\r
- * this list of conditions and the following disclaimer.\r
- *\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- * this list of conditions and the following disclaimer in the documentation\r
- * and/or other materials provided with the distribution.\r
- *\r
- * 3. The name of ATMEL may not be used to endorse or promote products derived\r
- * from this software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED\r
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND\r
- * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,\r
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-\r
-#ifndef _COMPILER_H_\r
-#define _COMPILER_H_\r
-\r
-#if (__GNUC__ && __AVR32__) || (__ICCAVR32__ || __AAVR32__)\r
-# include <avr32/io.h>\r
-#endif\r
-#if __ICCAVR32__\r
-# include <intrinsics.h>\r
-#endif\r
-#include "preprocessor.h"\r
-\r
-\r
-//_____ D E C L A R A T I O N S ____________________________________________\r
-\r
-#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.\r
-\r
-#include <stddef.h>\r
-#include <stdlib.h>\r
-\r
-\r
-#if __ICCAVR32__\r
-\r
-/*! \name Compiler Keywords\r
- *\r
- * Port of some keywords from GNU GCC for AVR32 to IAR Embedded Workbench for Atmel AVR32.\r
- */\r
-//! @{\r
-#define __asm__ asm\r
-#define __inline__ inline\r
-#define __volatile__\r
-//! @}\r
-\r
-#endif\r
-\r
-\r
-/*! \name Usual Types\r
- */\r
-//! @{\r
-typedef unsigned char Bool; //!< Boolean.\r
-typedef unsigned char U8 ; //!< 8-bit unsigned integer.\r
-typedef unsigned short int U16; //!< 16-bit unsigned integer.\r
-typedef unsigned long int U32; //!< 32-bit unsigned integer.\r
-typedef unsigned long long int U64; //!< 64-bit unsigned integer.\r
-typedef signed char S8 ; //!< 8-bit signed integer.\r
-typedef signed short int S16; //!< 16-bit signed integer.\r
-typedef signed long int S32; //!< 32-bit signed integer.\r
-typedef signed long long int S64; //!< 64-bit signed integer.\r
-typedef float F32; //!< 32-bit floating-point number.\r
-typedef double F64; //!< 64-bit floating-point number.\r
-//! @}\r
-\r
-\r
-/*! \name Status Types\r
- */\r
-//! @{\r
-typedef Bool Status_bool_t; //!< Boolean status.\r
-typedef U8 Status_t; //!< 8-bit-coded status.\r
-//! @}\r
-\r
-\r
-/*! \name Aliasing Aggregate Types\r
- */\r
-//! @{\r
-\r
-//! 16-bit union.\r
-typedef union\r
-{\r
- U16 u16 ;\r
- U8 u8 [2];\r
-} Union16;\r
-\r
-//! 32-bit union.\r
-typedef union\r
-{\r
- U32 u32 ;\r
- U16 u16[2];\r
- U8 u8 [4];\r
-} Union32;\r
-\r
-//! 64-bit union.\r
-typedef union\r
-{\r
- U64 u64 ;\r
- U32 u32[2];\r
- U16 u16[4];\r
- U8 u8 [8];\r
-} Union64;\r
-\r
-//! Union of pointers to 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef union\r
-{\r
- U64 *u64ptr;\r
- U32 *u32ptr;\r
- U16 *u16ptr;\r
- U8 *u8ptr ;\r
-} UnionPtr;\r
-\r
-//! Union of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef union\r
-{\r
- volatile U64 *u64ptr;\r
- volatile U32 *u32ptr;\r
- volatile U16 *u16ptr;\r
- volatile U8 *u8ptr ;\r
-} UnionVPtr;\r
-\r
-//! Union of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef union\r
-{\r
- const U64 *u64ptr;\r
- const U32 *u32ptr;\r
- const U16 *u16ptr;\r
- const U8 *u8ptr ;\r
-} UnionCPtr;\r
-\r
-//! Union of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef union\r
-{\r
- const volatile U64 *u64ptr;\r
- const volatile U32 *u32ptr;\r
- const volatile U16 *u16ptr;\r
- const volatile U8 *u8ptr ;\r
-} UnionCVPtr;\r
-\r
-//! Structure of pointers to 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef struct\r
-{\r
- U64 *u64ptr;\r
- U32 *u32ptr;\r
- U16 *u16ptr;\r
- U8 *u8ptr ;\r
-} StructPtr;\r
-\r
-//! Structure of pointers to volatile 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef struct\r
-{\r
- volatile U64 *u64ptr;\r
- volatile U32 *u32ptr;\r
- volatile U16 *u16ptr;\r
- volatile U8 *u8ptr ;\r
-} StructVPtr;\r
-\r
-//! Structure of pointers to constant 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef struct\r
-{\r
- const U64 *u64ptr;\r
- const U32 *u32ptr;\r
- const U16 *u16ptr;\r
- const U8 *u8ptr ;\r
-} StructCPtr;\r
-\r
-//! Structure of pointers to constant volatile 64-, 32-, 16- and 8-bit unsigned integers.\r
-typedef struct\r
-{\r
- const volatile U64 *u64ptr;\r
- const volatile U32 *u32ptr;\r
- const volatile U16 *u16ptr;\r
- const volatile U8 *u8ptr ;\r
-} StructCVPtr;\r
-\r
-//! @}\r
-\r
-#endif // __AVR32_ABI_COMPILER__\r
-\r
-\r
-//_____ M A C R O S ________________________________________________________\r
-\r
-/*! \name Usual Constants\r
- */\r
-//! @{\r
-#define DISABLE 0\r
-#define ENABLE 1\r
-#define DISABLED 0\r
-#define ENABLED 1\r
-#define OFF 0\r
-#define ON 1\r
-#define FALSE 0\r
-#define TRUE 1\r
-#define KO 0\r
-#define OK 1\r
-#define PASS 0\r
-#define FAIL 1\r
-#define LOW 0\r
-#define HIGH 1\r
-#define CLR 0\r
-#define SET 1\r
-//! @}\r
-\r
-\r
-#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.\r
-\r
-/*! \name Bit-Field Handling\r
- */\r
-//! @{\r
-\r
-/*! \brief Reads the bits of a value specified by a given bit-mask.\r
- *\r
- * \param value Value to read bits from.\r
- * \param mask Bit-mask indicating bits to read.\r
- *\r
- * \return Read bits.\r
- */\r
-#define Rd_bits( value, mask) ((value) & (mask))\r
-\r
-/*! \brief Writes the bits of a C lvalue specified by a given bit-mask.\r
- *\r
- * \param lvalue C lvalue to write bits to.\r
- * \param mask Bit-mask indicating bits to write.\r
- * \param bits Bits to write.\r
- *\r
- * \return Resulting value with written bits.\r
- */\r
-#define Wr_bits(lvalue, mask, bits) ((lvalue) = ((lvalue) & ~(mask)) |\\r
- ((bits ) & (mask)))\r
-\r
-/*! \brief Tests the bits of a value specified by a given bit-mask.\r
- *\r
- * \param value Value of which to test bits.\r
- * \param mask Bit-mask indicating bits to test.\r
- *\r
- * \return \c 1 if at least one of the tested bits is set, else \c 0.\r
- */\r
-#define Tst_bits( value, mask) (Rd_bits(value, mask) != 0)\r
-\r
-/*! \brief Clears the bits of a C lvalue specified by a given bit-mask.\r
- *\r
- * \param lvalue C lvalue of which to clear bits.\r
- * \param mask Bit-mask indicating bits to clear.\r
- *\r
- * \return Resulting value with cleared bits.\r
- */\r
-#define Clr_bits(lvalue, mask) ((lvalue) &= ~(mask))\r
-\r
-/*! \brief Sets the bits of a C lvalue specified by a given bit-mask.\r
- *\r
- * \param lvalue C lvalue of which to set bits.\r
- * \param mask Bit-mask indicating bits to set.\r
- *\r
- * \return Resulting value with set bits.\r
- */\r
-#define Set_bits(lvalue, mask) ((lvalue) |= (mask))\r
-\r
-/*! \brief Toggles the bits of a C lvalue specified by a given bit-mask.\r
- *\r
- * \param lvalue C lvalue of which to toggle bits.\r
- * \param mask Bit-mask indicating bits to toggle.\r
- *\r
- * \return Resulting value with toggled bits.\r
- */\r
-#define Tgl_bits(lvalue, mask) ((lvalue) ^= (mask))\r
-\r
-/*! \brief Reads the bit-field of a value specified by a given bit-mask.\r
- *\r
- * \param value Value to read a bit-field from.\r
- * \param mask Bit-mask indicating the bit-field to read.\r
- *\r
- * \return Read bit-field.\r
- */\r
-#define Rd_bitfield( value, mask) (Rd_bits( value, mask) >> ctz(mask))\r
-\r
-/*! \brief Writes the bit-field of a C lvalue specified by a given bit-mask.\r
- *\r
- * \param lvalue C lvalue to write a bit-field to.\r
- * \param mask Bit-mask indicating the bit-field to write.\r
- * \param bitfield Bit-field to write.\r
- *\r
- * \return Resulting value with written bit-field.\r
- */\r
-#define Wr_bitfield(lvalue, mask, bitfield) (Wr_bits(lvalue, mask, (U32)(bitfield) << ctz(mask)))\r
-\r
-//! @}\r
-\r
-\r
-/*! \brief This macro is used to test fatal errors.\r
- *\r
- * The macro tests if the expression is FALSE. If it is, a fatal error is\r
- * detected and the application hangs up.\r
- *\r
- * \param expr Expression to evaluate and supposed to be nonzero.\r
- */\r
-#ifdef _ASSERT_ENABLE_\r
- #define Assert(expr) \\r
- {\\r
- if (!(expr)) while (TRUE);\\r
- }\r
-#else\r
- #define Assert(expr)\r
-#endif\r
-\r
-\r
-/*! \name Zero-Bit Counting\r
- *\r
- * Under AVR32-GCC, __builtin_clz and __builtin_ctz behave like macros when\r
- * applied to constant expressions (values known at compile time), so they are\r
- * more optimized than the use of the corresponding assembly instructions and\r
- * they can be used as constant expressions e.g. to initialize objects having\r
- * static storage duration, and like the corresponding assembly instructions\r
- * when applied to non-constant expressions (values unknown at compile time), so\r
- * they are more optimized than an assembly periphrasis. Hence, clz and ctz\r
- * ensure a possible and optimized behavior for both constant and non-constant\r
- * expressions.\r
- */\r
-//! @{\r
-\r
-/*! \brief Counts the leading zero bits of the given value considered as a 32-bit integer.\r
- *\r
- * \param u Value of which to count the leading zero bits.\r
- *\r
- * \return The count of leading zero bits in \a u.\r
- */\r
-#if __GNUC__\r
- #define clz(u) __builtin_clz(u)\r
-#elif __ICCAVR32__\r
- #define clz(u) __count_leading_zeros(u)\r
-#endif\r
-\r
-/*! \brief Counts the trailing zero bits of the given value considered as a 32-bit integer.\r
- *\r
- * \param u Value of which to count the trailing zero bits.\r
- *\r
- * \return The count of trailing zero bits in \a u.\r
- */\r
-#if __GNUC__\r
- #define ctz(u) __builtin_ctz(u)\r
-#elif __ICCAVR32__\r
- #define ctz(u) __count_trailing_zeros(u)\r
-#endif\r
-\r
-//! @}\r
-\r
-\r
-/*! \name Alignment\r
- */\r
-//! @{\r
-\r
-/*! \brief Tests alignment of the number \a val with the \a n boundary.\r
- *\r
- * \param val Input value.\r
- * \param n Boundary.\r
- *\r
- * \return \c 1 if the number \a val is aligned with the \a n boundary, else \c 0.\r
- */\r
-#define Test_align(val, n ) (!Tst_bits( val, (n) - 1 ) )\r
-\r
-/*! \brief Gets alignment of the number \a val with respect to the \a n boundary.\r
- *\r
- * \param val Input value.\r
- * \param n Boundary.\r
- *\r
- * \return Alignment of the number \a val with respect to the \a n boundary.\r
- */\r
-#define Get_align( val, n ) ( Rd_bits( val, (n) - 1 ) )\r
-\r
-/*! \brief Sets alignment of the lvalue number \a lval to \a alg with respect to the \a n boundary.\r
- *\r
- * \param lval Input/output lvalue.\r
- * \param n Boundary.\r
- * \param alg Alignment.\r
- *\r
- * \return New value of \a lval resulting from its alignment set to \a alg with respect to the \a n boundary.\r
- */\r
-#define Set_align(lval, n, alg) ( Wr_bits(lval, (n) - 1, alg) )\r
-\r
-/*! \brief Aligns the number \a val with the upper \a n boundary.\r
- *\r
- * \param val Input value.\r
- * \param n Boundary.\r
- *\r
- * \return Value resulting from the number \a val aligned with the upper \a n boundary.\r
- */\r
-#define Align_up( val, n ) (((val) + ((n) - 1)) & ~((n) - 1))\r
-\r
-/*! \brief Aligns the number \a val with the lower \a n boundary.\r
- *\r
- * \param val Input value.\r
- * \param n Boundary.\r
- *\r
- * \return Value resulting from the number \a val aligned with the lower \a n boundary.\r
- */\r
-#define Align_down(val, n ) ( (val) & ~((n) - 1))\r
-\r
-//! @}\r
-\r
-\r
-/*! \name Mathematics\r
- *\r
- * The same considerations as for clz and ctz apply here but AVR32-GCC does not\r
- * provide built-in functions to access the assembly instructions abs, min and\r
- * max and it does not produce them by itself in most cases, so two sets of\r
- * macros are defined here:\r
- * - Abs, Min and Max to apply to constant expressions (values known at\r
- * compile time);\r
- * - abs, min and max to apply to non-constant expressions (values unknown at\r
- * compile time).\r
- */\r
-//! @{\r
-\r
-/*! \brief Takes the absolute value of \a a.\r
- *\r
- * \param a Input value.\r
- *\r
- * \return Absolute value of \a a.\r
- *\r
- * \note More optimized if only used with values known at compile time.\r
- */\r
-#define Abs(a) (((a) < 0 ) ? -(a) : (a))\r
-\r
-/*! \brief Takes the minimal value of \a a and \a b.\r
- *\r
- * \param a Input value.\r
- * \param b Input value.\r
- *\r
- * \return Minimal value of \a a and \a b.\r
- *\r
- * \note More optimized if only used with values known at compile time.\r
- */\r
-#define Min(a, b) (((a) < (b)) ? (a) : (b))\r
-\r
-/*! \brief Takes the maximal value of \a a and \a b.\r
- *\r
- * \param a Input value.\r
- * \param b Input value.\r
- *\r
- * \return Maximal value of \a a and \a b.\r
- *\r
- * \note More optimized if only used with values known at compile time.\r
- */\r
-#define Max(a, b) (((a) > (b)) ? (a) : (b))\r
-\r
-/*! \brief Takes the absolute value of \a a.\r
- *\r
- * \param a Input value.\r
- *\r
- * \return Absolute value of \a a.\r
- *\r
- * \note More optimized if only used with values unknown at compile time.\r
- */\r
-#if __GNUC__\r
- #define abs(a) \\r
- (\\r
- {\\r
- int __value = (a);\\r
- __asm__ ("abs\t%0" : "+r" (__value) : : "cc");\\r
- __value;\\r
- }\\r
- )\r
-#elif __ICCAVR32__\r
- #define abs(a) Abs(a)\r
-#endif\r
-\r
-/*! \brief Takes the minimal value of \a a and \a b.\r
- *\r
- * \param a Input value.\r
- * \param b Input value.\r
- *\r
- * \return Minimal value of \a a and \a b.\r
- *\r
- * \note More optimized if only used with values unknown at compile time.\r
- */\r
-#if __GNUC__\r
- #define min(a, b) \\r
- (\\r
- {\\r
- int __value, __arg_a = (a), __arg_b = (b);\\r
- __asm__ ("min\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\\r
- __value;\\r
- }\\r
- )\r
-#elif __ICCAVR32__\r
- #define min(a, b) __min(a, b)\r
-#endif\r
-\r
-/*! \brief Takes the maximal value of \a a and \a b.\r
- *\r
- * \param a Input value.\r
- * \param b Input value.\r
- *\r
- * \return Maximal value of \a a and \a b.\r
- *\r
- * \note More optimized if only used with values unknown at compile time.\r
- */\r
-#if __GNUC__\r
- #define max(a, b) \\r
- (\\r
- {\\r
- int __value, __arg_a = (a), __arg_b = (b);\\r
- __asm__ ("max\t%0, %1, %2" : "=r" (__value) : "r" (__arg_a), "r" (__arg_b));\\r
- __value;\\r
- }\\r
- )\r
-#elif __ICCAVR32__\r
- #define max(a, b) __max(a, b)\r
-#endif\r
-\r
-//! @}\r
-\r
-\r
-/*! \brief Calls the routine at address \a addr.\r
- *\r
- * It generates a long call opcode.\r
- *\r
- * For example, `Long_call(0x80000000)' generates a software reset on a UC3 if\r
- * it is invoked from the CPU supervisor mode.\r
- *\r
- * \param addr Address of the routine to call.\r
- *\r
- * \note It may be used as a long jump opcode in some special cases.\r
- */\r
-#define Long_call(addr) ((*(void (*)(void))(addr))())\r
-\r
-/*! \brief Resets the CPU by software.\r
- *\r
- * \warning It shall not be called from the CPU application mode.\r
- */\r
-#if __GNUC__\r
- #define Reset_CPU() \\r
- (\\r
- {\\r
- __asm__ __volatile__ (\\r
- "lddpc r9, 3f\n\t"\\r
- "mfsr r8, %[SR]\n\t"\\r
- "bfextu r8, r8, %[SR_MX_OFFSET], %[SR_MX_SIZE]\n\t"\\r
- "cp.w r8, 0b001\n\t"\\r
- "breq 0f\n\t"\\r
- "sub r8, pc, $ - 1f\n\t"\\r
- "pushm r8-r9\n\t"\\r
- "rete\n"\\r
- "0:\n\t"\\r
- "mtsr %[SR], r9\n"\\r
- "1:\n\t"\\r
- "mov r0, 0\n\t"\\r
- "mov r1, 0\n\t"\\r
- "mov r2, 0\n\t"\\r
- "mov r3, 0\n\t"\\r
- "mov r4, 0\n\t"\\r
- "mov r5, 0\n\t"\\r
- "mov r6, 0\n\t"\\r
- "mov r7, 0\n\t"\\r
- "mov r8, 0\n\t"\\r
- "mov r9, 0\n\t"\\r
- "mov r10, 0\n\t"\\r
- "mov r11, 0\n\t"\\r
- "mov r12, 0\n\t"\\r
- "mov sp, 0\n\t"\\r
- "stdsp sp[0], sp\n\t"\\r
- "ldmts sp, sp\n\t"\\r
- "mov lr, 0\n\t"\\r
- "lddpc pc, 2f\n\t"\\r
- ".balign 4\n"\\r
- "2:\n\t"\\r
- ".word _start\n"\\r
- "3:\n\t"\\r
- ".word %[RESET_SR]"\\r
- :\\r
- : [SR] "i" (AVR32_SR),\\r
- [SR_MX_OFFSET] "i" (AVR32_SR_M0_OFFSET),\\r
- [SR_MX_SIZE] "i" (AVR32_SR_M0_SIZE + AVR32_SR_M1_SIZE + AVR32_SR_M2_SIZE),\\r
- [RESET_SR] "i" (AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | AVR32_SR_M0_MASK)\\r
- );\\r
- }\\r
- )\r
-#elif __ICCAVR32__\r
- #define Reset_CPU() \\r
- {\\r
- extern void *volatile __program_start;\\r
- __asm__ __volatile__ (\\r
- "mov r7, LWRD(__program_start)\n\t"\\r
- "orh r7, HWRD(__program_start)\n\t"\\r
- "mov r9, LWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | AVR32_SR_M0_MASK)")\n\t"\\r
- "orh r9, HWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | AVR32_SR_M0_MASK)")\n\t"\\r
- "mfsr r8, "ASTRINGZ(AVR32_SR)"\n\t"\\r
- "bfextu r8, r8, "ASTRINGZ(AVR32_SR_M0_OFFSET)", "ASTRINGZ(AVR32_SR_M0_SIZE + AVR32_SR_M1_SIZE + AVR32_SR_M2_SIZE)"\n\t"\\r
- "cp.w r8, 001b\n\t"\\r
- "breq $ + 10\n\t"\\r
- "sub r8, pc, -12\n\t"\\r
- "pushm r8-r9\n\t"\\r
- "rete\n\t"\\r
- "mtsr "ASTRINGZ(AVR32_SR)", r9\n\t"\\r
- "mov r0, 0\n\t"\\r
- "mov r1, 0\n\t"\\r
- "mov r2, 0\n\t"\\r
- "mov r3, 0\n\t"\\r
- "mov r4, 0\n\t"\\r
- "mov r5, 0\n\t"\\r
- "mov r6, 0\n\t"\\r
- "st.w r0[4], r7\n\t"\\r
- "mov r7, 0\n\t"\\r
- "mov r8, 0\n\t"\\r
- "mov r9, 0\n\t"\\r
- "mov r10, 0\n\t"\\r
- "mov r11, 0\n\t"\\r
- "mov r12, 0\n\t"\\r
- "mov sp, 0\n\t"\\r
- "stdsp sp[0], sp\n\t"\\r
- "ldmts sp, sp\n\t"\\r
- "mov lr, 0\n\t"\\r
- "ld.w pc, lr[4]"\\r
- );\\r
- __program_start;\\r
- }\r
-#endif\r
-\r
-\r
-/*! \name System Register Access\r
- */\r
-//! @{\r
-\r
-/*! \brief Gets the value of the \a sysreg system register.\r
- *\r
- * \param sysreg Address of the system register of which to get the value.\r
- *\r
- * \return Value of the \a sysreg system register.\r
- */\r
-#if __GNUC__\r
- #define Get_system_register(sysreg) __builtin_mfsr(sysreg)\r
-#elif __ICCAVR32__\r
- #define Get_system_register(sysreg) __get_system_register(sysreg)\r
-#endif\r
-\r
-/*! \brief Sets the value of the \a sysreg system register to \a value.\r
- *\r
- * \param sysreg Address of the system register of which to set the value.\r
- * \param value Value to set the \a sysreg system register to.\r
- */\r
-#if __GNUC__\r
- #define Set_system_register(sysreg, value) __builtin_mtsr(sysreg, value)\r
-#elif __ICCAVR32__\r
- #define Set_system_register(sysreg, value) __set_system_register(sysreg, value)\r
-#endif\r
-\r
-//! @}\r
-\r
-\r
-/*! \name CPU Status Register Access\r
- */\r
-//! @{\r
-\r
-/*! \brief Tells whether exceptions are globally enabled.\r
- *\r
- * \return \c 1 if exceptions are globally enabled, else \c 0.\r
- */\r
-#define Is_global_exception_enabled() (!Tst_bits(Get_system_register(AVR32_SR), AVR32_SR_EM_MASK))\r
-\r
-/*! \brief Disables exceptions globally.\r
- */\r
-#if __GNUC__\r
- #define Disable_global_exception() ({__asm__ __volatile__ ("ssrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})\r
-#elif __ICCAVR32__\r
- #define Disable_global_exception() (__set_status_flag(AVR32_SR_EM_OFFSET))\r
-#endif\r
-\r
-/*! \brief Enables exceptions globally.\r
- */\r
-#if __GNUC__\r
- #define Enable_global_exception() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})\r
-#elif __ICCAVR32__\r
- #define Enable_global_exception() (__clear_status_flag(AVR32_SR_EM_OFFSET))\r
-#endif\r
-\r
-/*! \brief Tells whether interrupts are globally enabled.\r
- *\r
- * \return \c 1 if interrupts are globally enabled, else \c 0.\r
- */\r
-#define Is_global_interrupt_enabled() (!Tst_bits(Get_system_register(AVR32_SR), AVR32_SR_GM_MASK))\r
-\r
-/*! \brief Disables interrupts globally.\r
- */\r
-#if __GNUC__\r
- #define Disable_global_interrupt() ({__asm__ __volatile__ ("ssrf\t%0\n\tnop\n\tnop" : : "i" (AVR32_SR_GM_OFFSET));})\r
-#elif __ICCAVR32__\r
- #define Disable_global_interrupt() {__asm__ __volatile__ ("ssrf\t"ASTRINGZ(AVR32_SR_GM_OFFSET)"\n\tnop\n\tnop");}\r
-#endif\r
-\r
-/*! \brief Enables interrupts globally.\r
- */\r
-#if __GNUC__\r
- #define Enable_global_interrupt() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_GM_OFFSET));})\r
-#elif __ICCAVR32__\r
- #define Enable_global_interrupt() (__enable_interrupt())\r
-#endif\r
-\r
-/*! \brief Tells whether interrupt level \a int_lev is enabled.\r
- *\r
- * \param int_lev Interrupt level (0 to 3).\r
- *\r
- * \return \c 1 if interrupt level \a int_lev is enabled, else \c 0.\r
- */\r
-#define Is_interrupt_level_enabled(int_lev) (!Tst_bits(Get_system_register(AVR32_SR), TPASTE3(AVR32_SR_I, int_lev, M_MASK)))\r
-\r
-/*! \brief Disables interrupt level \a int_lev.\r
- *\r
- * \param int_lev Interrupt level to disable (0 to 3).\r
- */\r
-#if __GNUC__\r
- #define Disable_interrupt_level(int_lev) ({__asm__ __volatile__ ("ssrf\t%0\n\tnop\n\tnop" : : "i" (TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)));})\r
-#elif __ICCAVR32__\r
- #define Disable_interrupt_level(int_lev) {__asm__ __volatile__ ("ssrf\t"ASTRINGZ(TPASTE3(AVR32_SR_I, int_lev, M_OFFSET))"\n\tnop\n\tnop");}\r
-#endif\r
-\r
-/*! \brief Enables interrupt level \a int_lev.\r
- *\r
- * \param int_lev Interrupt level to enable (0 to 3).\r
- */\r
-#if __GNUC__\r
- #define Enable_interrupt_level(int_lev) ({__asm__ __volatile__ ("csrf\t%0" : : "i" (TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)));})\r
-#elif __ICCAVR32__\r
- #define Enable_interrupt_level(int_lev) (__clear_status_flag(TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)))\r
-#endif\r
-\r
-//! @}\r
-\r
-\r
-/*! \name Debug Register Access\r
- */\r
-//! @{\r
-\r
-/*! \brief Gets the value of the \a dbgreg debug register.\r
- *\r
- * \param dbgreg Address of the debug register of which to get the value.\r
- *\r
- * \return Value of the \a dbgreg debug register.\r
- */\r
-#if __GNUC__\r
- #define Get_debug_register(dbgreg) __builtin_mfdr(dbgreg)\r
-#elif __ICCAVR32__\r
- #define Get_debug_register(dbgreg) __get_debug_register(dbgreg)\r
-#endif\r
-\r
-/*! \brief Sets the value of the \a dbgreg debug register to \a value.\r
- *\r
- * \param dbgreg Address of the debug register of which to set the value.\r
- * \param value Value to set the \a dbgreg debug register to.\r
- */\r
-#if __GNUC__\r
- #define Set_debug_register(dbgreg, value) __builtin_mtdr(dbgreg, value)\r
-#elif __ICCAVR32__\r
- #define Set_debug_register(dbgreg, value) __set_debug_register(dbgreg, value)\r
-#endif\r
-\r
-//! @}\r
-\r
-#endif // __AVR32_ABI_COMPILER__\r
-\r
-\r
-//! Boolean evaluating MCU little endianism.\r
-#if (__GNUC__ && __AVR32__) || (__ICCAVR32__ || __AAVR32__)\r
- #define LITTLE_ENDIAN_MCU FALSE\r
-#endif\r
-\r
-// Check that MCU endianism is correctly defined.\r
-#ifndef LITTLE_ENDIAN_MCU\r
- #error YOU MUST define the MCU endianism with LITTLE_ENDIAN_MCU: either FALSE or TRUE\r
-#endif\r
-\r
-//! Boolean evaluating MCU big endianism.\r
-#define BIG_ENDIAN_MCU (!LITTLE_ENDIAN_MCU)\r
-\r
-\r
-#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.\r
-\r
-/*! \name MCU Endianism Handling\r
- */\r
-//! @{\r
-\r
-#if LITTLE_ENDIAN_MCU\r
-\r
- #define LSB(u16) (((U8 *)&(u16))[0]) //!< Least significant byte of \a u16.\r
- #define MSB(u16) (((U8 *)&(u16))[1]) //!< Most significant byte of \a u16.\r
-\r
- #define LSH(u32) (((U16 *)&(u32))[0]) //!< Least significant half-word of \a u32.\r
- #define MSH(u32) (((U16 *)&(u32))[1]) //!< Most significant half-word of \a u32.\r
- #define LSB0W(u32) (((U8 *)&(u32))[0]) //!< Least significant byte of 1st rank of \a u32.\r
- #define LSB1W(u32) (((U8 *)&(u32))[1]) //!< Least significant byte of 2nd rank of \a u32.\r
- #define LSB2W(u32) (((U8 *)&(u32))[2]) //!< Least significant byte of 3rd rank of \a u32.\r
- #define LSB3W(u32) (((U8 *)&(u32))[3]) //!< Least significant byte of 4th rank of \a u32.\r
- #define MSB3W(u32) LSB0W(u32) //!< Most significant byte of 4th rank of \a u32.\r
- #define MSB2W(u32) LSB1W(u32) //!< Most significant byte of 3rd rank of \a u32.\r
- #define MSB1W(u32) LSB2W(u32) //!< Most significant byte of 2nd rank of \a u32.\r
- #define MSB0W(u32) LSB3W(u32) //!< Most significant byte of 1st rank of \a u32.\r
-\r
- #define LSW(u64) (((U32 *)&(u64))[0]) //!< Least significant word of \a u64.\r
- #define MSW(u64) (((U32 *)&(u64))[1]) //!< Most significant word of \a u64.\r
- #define LSH0(u64) (((U16 *)&(u64))[0]) //!< Least significant half-word of 1st rank of \a u64.\r
- #define LSH1(u64) (((U16 *)&(u64))[1]) //!< Least significant half-word of 2nd rank of \a u64.\r
- #define LSH2(u64) (((U16 *)&(u64))[2]) //!< Least significant half-word of 3rd rank of \a u64.\r
- #define LSH3(u64) (((U16 *)&(u64))[3]) //!< Least significant half-word of 4th rank of \a u64.\r
- #define MSH3(u64) LSH0(u64) //!< Most significant half-word of 4th rank of \a u64.\r
- #define MSH2(u64) LSH1(u64) //!< Most significant half-word of 3rd rank of \a u64.\r
- #define MSH1(u64) LSH2(u64) //!< Most significant half-word of 2nd rank of \a u64.\r
- #define MSH0(u64) LSH3(u64) //!< Most significant half-word of 1st rank of \a u64.\r
- #define LSB0D(u64) (((U8 *)&(u64))[0]) //!< Least significant byte of 1st rank of \a u64.\r
- #define LSB1D(u64) (((U8 *)&(u64))[1]) //!< Least significant byte of 2nd rank of \a u64.\r
- #define LSB2D(u64) (((U8 *)&(u64))[2]) //!< Least significant byte of 3rd rank of \a u64.\r
- #define LSB3D(u64) (((U8 *)&(u64))[3]) //!< Least significant byte of 4th rank of \a u64.\r
- #define LSB4D(u64) (((U8 *)&(u64))[4]) //!< Least significant byte of 5th rank of \a u64.\r
- #define LSB5D(u64) (((U8 *)&(u64))[5]) //!< Least significant byte of 6th rank of \a u64.\r
- #define LSB6D(u64) (((U8 *)&(u64))[6]) //!< Least significant byte of 7th rank of \a u64.\r
- #define LSB7D(u64) (((U8 *)&(u64))[7]) //!< Least significant byte of 8th rank of \a u64.\r
- #define MSB7D(u64) LSB0D(u64) //!< Most significant byte of 8th rank of \a u64.\r
- #define MSB6D(u64) LSB1D(u64) //!< Most significant byte of 7th rank of \a u64.\r
- #define MSB5D(u64) LSB2D(u64) //!< Most significant byte of 6th rank of \a u64.\r
- #define MSB4D(u64) LSB3D(u64) //!< Most significant byte of 5th rank of \a u64.\r
- #define MSB3D(u64) LSB4D(u64) //!< Most significant byte of 4th rank of \a u64.\r
- #define MSB2D(u64) LSB5D(u64) //!< Most significant byte of 3rd rank of \a u64.\r
- #define MSB1D(u64) LSB6D(u64) //!< Most significant byte of 2nd rank of \a u64.\r
- #define MSB0D(u64) LSB7D(u64) //!< Most significant byte of 1st rank of \a u64.\r
-\r
-#else // BIG_ENDIAN_MCU\r
-\r
- #define MSB(u16) (((U8 *)&(u16))[0]) //!< Most significant byte of \a u16.\r
- #define LSB(u16) (((U8 *)&(u16))[1]) //!< Least significant byte of \a u16.\r
-\r
- #define MSH(u32) (((U16 *)&(u32))[0]) //!< Most significant half-word of \a u32.\r
- #define LSH(u32) (((U16 *)&(u32))[1]) //!< Least significant half-word of \a u32.\r
- #define MSB0W(u32) (((U8 *)&(u32))[0]) //!< Most significant byte of 1st rank of \a u32.\r
- #define MSB1W(u32) (((U8 *)&(u32))[1]) //!< Most significant byte of 2nd rank of \a u32.\r
- #define MSB2W(u32) (((U8 *)&(u32))[2]) //!< Most significant byte of 3rd rank of \a u32.\r
- #define MSB3W(u32) (((U8 *)&(u32))[3]) //!< Most significant byte of 4th rank of \a u32.\r
- #define LSB3W(u32) MSB0W(u32) //!< Least significant byte of 4th rank of \a u32.\r
- #define LSB2W(u32) MSB1W(u32) //!< Least significant byte of 3rd rank of \a u32.\r
- #define LSB1W(u32) MSB2W(u32) //!< Least significant byte of 2nd rank of \a u32.\r
- #define LSB0W(u32) MSB3W(u32) //!< Least significant byte of 1st rank of \a u32.\r
-\r
- #define MSW(u64) (((U32 *)&(u64))[0]) //!< Most significant word of \a u64.\r
- #define LSW(u64) (((U32 *)&(u64))[1]) //!< Least significant word of \a u64.\r
- #define MSH0(u64) (((U16 *)&(u64))[0]) //!< Most significant half-word of 1st rank of \a u64.\r
- #define MSH1(u64) (((U16 *)&(u64))[1]) //!< Most significant half-word of 2nd rank of \a u64.\r
- #define MSH2(u64) (((U16 *)&(u64))[2]) //!< Most significant half-word of 3rd rank of \a u64.\r
- #define MSH3(u64) (((U16 *)&(u64))[3]) //!< Most significant half-word of 4th rank of \a u64.\r
- #define LSH3(u64) MSH0(u64) //!< Least significant half-word of 4th rank of \a u64.\r
- #define LSH2(u64) MSH1(u64) //!< Least significant half-word of 3rd rank of \a u64.\r
- #define LSH1(u64) MSH2(u64) //!< Least significant half-word of 2nd rank of \a u64.\r
- #define LSH0(u64) MSH3(u64) //!< Least significant half-word of 1st rank of \a u64.\r
- #define MSB0D(u64) (((U8 *)&(u64))[0]) //!< Most significant byte of 1st rank of \a u64.\r
- #define MSB1D(u64) (((U8 *)&(u64))[1]) //!< Most significant byte of 2nd rank of \a u64.\r
- #define MSB2D(u64) (((U8 *)&(u64))[2]) //!< Most significant byte of 3rd rank of \a u64.\r
- #define MSB3D(u64) (((U8 *)&(u64))[3]) //!< Most significant byte of 4th rank of \a u64.\r
- #define MSB4D(u64) (((U8 *)&(u64))[4]) //!< Most significant byte of 5th rank of \a u64.\r
- #define MSB5D(u64) (((U8 *)&(u64))[5]) //!< Most significant byte of 6th rank of \a u64.\r
- #define MSB6D(u64) (((U8 *)&(u64))[6]) //!< Most significant byte of 7th rank of \a u64.\r
- #define MSB7D(u64) (((U8 *)&(u64))[7]) //!< Most significant byte of 8th rank of \a u64.\r
- #define LSB7D(u64) MSB0D(u64) //!< Least significant byte of 8th rank of \a u64.\r
- #define LSB6D(u64) MSB1D(u64) //!< Least significant byte of 7th rank of \a u64.\r
- #define LSB5D(u64) MSB2D(u64) //!< Least significant byte of 6th rank of \a u64.\r
- #define LSB4D(u64) MSB3D(u64) //!< Least significant byte of 5th rank of \a u64.\r
- #define LSB3D(u64) MSB4D(u64) //!< Least significant byte of 4th rank of \a u64.\r
- #define LSB2D(u64) MSB5D(u64) //!< Least significant byte of 3rd rank of \a u64.\r
- #define LSB1D(u64) MSB6D(u64) //!< Least significant byte of 2nd rank of \a u64.\r
- #define LSB0D(u64) MSB7D(u64) //!< Least significant byte of 1st rank of \a u64.\r
-\r
-#endif\r
-\r
-//! @}\r
-\r
-\r
-/*! \name Endianism Conversion\r
- *\r
- * The same considerations as for clz and ctz apply here but AVR32-GCC's\r
- * __builtin_bswap_16 and __builtin_bswap_32 do not behave like macros when\r
- * applied to constant expressions, so two sets of macros are defined here:\r
- * - Swap16, Swap32 and Swap64 to apply to constant expressions (values known\r
- * at compile time);\r
- * - swap16, swap32 and swap64 to apply to non-constant expressions (values\r
- * unknown at compile time).\r
- */\r
-//! @{\r
-\r
-/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).\r
- *\r
- * \param u16 U16 of which to toggle the endianism.\r
- *\r
- * \return Value resulting from \a u16 with toggled endianism.\r
- *\r
- * \note More optimized if only used with values known at compile time.\r
- */\r
-#define Swap16(u16) ((U16)(((U16)(u16) >> 8) |\\r
- ((U16)(u16) << 8)))\r
-\r
-/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).\r
- *\r
- * \param u32 U32 of which to toggle the endianism.\r
- *\r
- * \return Value resulting from \a u32 with toggled endianism.\r
- *\r
- * \note More optimized if only used with values known at compile time.\r
- */\r
-#define Swap32(u32) ((U32)(((U32)Swap16((U32)(u32) >> 16)) |\\r
- ((U32)Swap16((U32)(u32)) << 16)))\r
-\r
-/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).\r
- *\r
- * \param u64 U64 of which to toggle the endianism.\r
- *\r
- * \return Value resulting from \a u64 with toggled endianism.\r
- *\r
- * \note More optimized if only used with values known at compile time.\r
- */\r
-#define Swap64(u64) ((U64)(((U64)Swap32((U64)(u64) >> 32)) |\\r
- ((U64)Swap32((U64)(u64)) << 32)))\r
-\r
-/*! \brief Toggles the endianism of \a u16 (by swapping its bytes).\r
- *\r
- * \param u16 U16 of which to toggle the endianism.\r
- *\r
- * \return Value resulting from \a u16 with toggled endianism.\r
- *\r
- * \note More optimized if only used with values unknown at compile time.\r
- */\r
-#if __GNUC__\r
- #define swap16(u16) ((U16)__builtin_bswap_16((U16)(u16)))\r
-#elif __ICCAVR32__\r
- #define swap16(u16) ((U16)__swap_bytes_in_halfwords((U16)(u16)))\r
-#endif\r
-\r
-/*! \brief Toggles the endianism of \a u32 (by swapping its bytes).\r
- *\r
- * \param u32 U32 of which to toggle the endianism.\r
- *\r
- * \return Value resulting from \a u32 with toggled endianism.\r
- *\r
- * \note More optimized if only used with values unknown at compile time.\r
- */\r
-#if __GNUC__\r
- #define swap32(u32) ((U32)__builtin_bswap_32((U32)(u32)))\r
-#elif __ICCAVR32__\r
- #define swap32(u32) ((U32)__swap_bytes((U32)(u32)))\r
-#endif\r
-\r
-/*! \brief Toggles the endianism of \a u64 (by swapping its bytes).\r
- *\r
- * \param u64 U64 of which to toggle the endianism.\r
- *\r
- * \return Value resulting from \a u64 with toggled endianism.\r
- *\r
- * \note More optimized if only used with values unknown at compile time.\r
- */\r
-#define swap64(u64) ((U64)(((U64)swap32((U64)(u64) >> 32)) |\\r
- ((U64)swap32((U64)(u64)) << 32)))\r
-\r
-//! @}\r
-\r
-\r
-/*! \name Target Abstraction\r
- */\r
-//! @{\r
-\r
-#define _GLOBEXT_ extern //!< extern storage-class specifier.\r
-#define _CONST_TYPE_ const //!< const type qualifier.\r
-#define _MEM_TYPE_SLOW_ //!< Slow memory type.\r
-#define _MEM_TYPE_MEDFAST_ //!< Fairly fast memory type.\r
-#define _MEM_TYPE_FAST_ //!< Fast memory type.\r
-\r
-typedef U8 Byte; //!< 8-bit unsigned integer.\r
-\r
-#define memcmp_ram2ram memcmp //!< Target-specific memcmp of RAM to RAM.\r
-#define memcmp_code2ram memcmp //!< Target-specific memcmp of RAM to NVRAM.\r
-#define memcpy_ram2ram memcpy //!< Target-specific memcpy from RAM to RAM.\r
-#define memcpy_code2ram memcpy //!< Target-specific memcpy from NVRAM to RAM.\r
-\r
-#define LSB0(u32) LSB0W(u32) //!< Least significant byte of 1st rank of \a u32.\r
-#define LSB1(u32) LSB1W(u32) //!< Least significant byte of 2nd rank of \a u32.\r
-#define LSB2(u32) LSB2W(u32) //!< Least significant byte of 3rd rank of \a u32.\r
-#define LSB3(u32) LSB3W(u32) //!< Least significant byte of 4th rank of \a u32.\r
-#define MSB3(u32) MSB3W(u32) //!< Most significant byte of 4th rank of \a u32.\r
-#define MSB2(u32) MSB2W(u32) //!< Most significant byte of 3rd rank of \a u32.\r
-#define MSB1(u32) MSB1W(u32) //!< Most significant byte of 2nd rank of \a u32.\r
-#define MSB0(u32) MSB0W(u32) //!< Most significant byte of 1st rank of \a u32.\r
-\r
-//! @}\r
-\r
-#endif // __AVR32_ABI_COMPILER__\r
-\r
-\r
-#endif // _COMPILER_H_\r