mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Updated AVR32 demos and added AVR32 UC3B demo.
This commit is contained in:
parent
45e7e5ac55
commit
94c94d3c0e
164 changed files with 21458 additions and 3994 deletions
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3A0128 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3A0128:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00007FFF SRAM RAM
|
||||
* 0x80000000 0x8001FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8001FFFF
|
||||
-Z@(CODE)EV100=80004100-8001FFFF
|
||||
-P(CODE)EVSEG=80004000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8001FFFF
|
||||
-P(CONST)DATA32_C=80000000-8001FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00007FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3A0256 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3A0256:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x0000FFFF SRAM RAM
|
||||
* 0x80000000 0x8003FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8003FFFF
|
||||
-Z@(CODE)EV100=80004100-8003FFFF
|
||||
-P(CODE)EVSEG=80004000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8003FFFF
|
||||
-P(CONST)DATA32_C=80000000-8003FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-0000FFFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3A0512 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3A0512:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x0000FFFF SRAM RAM
|
||||
* 0x80000000 0x8007FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8007FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8007FFFF
|
||||
-Z@(CODE)EV100=80004100-8007FFFF
|
||||
-P(CODE)EVSEG=80004000-8007FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8007FFFF
|
||||
-P(CONST)DATA32_C=80000000-8007FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8007FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8007FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8007FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8007FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-0000FFFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3A1128 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3A1128:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00007FFF SRAM RAM
|
||||
* 0x80000000 0x8001FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8001FFFF
|
||||
-Z@(CODE)EV100=80004100-8001FFFF
|
||||
-P(CODE)EVSEG=80004000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8001FFFF
|
||||
-P(CONST)DATA32_C=80000000-8001FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00007FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3A1256 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3A1256:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x0000FFFF SRAM RAM
|
||||
* 0x80000000 0x8003FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8003FFFF
|
||||
-Z@(CODE)EV100=80004100-8003FFFF
|
||||
-P(CODE)EVSEG=80004000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8003FFFF
|
||||
-P(CONST)DATA32_C=80000000-8003FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-0000FFFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3A1512 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3A1512:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x0000FFFF SRAM RAM
|
||||
* 0x80000000 0x8007FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8007FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8007FFFF
|
||||
-Z@(CODE)EV100=80004100-8007FFFF
|
||||
-P(CODE)EVSEG=80004000-8007FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8007FFFF
|
||||
-P(CONST)DATA32_C=80000000-8007FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8007FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8007FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8007FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8007FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-0000FFFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-0000FFFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-0000FFFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-0000FFFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-0000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3B0128 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3B0128:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00007FFF SRAM RAM
|
||||
* 0x80000000 0x8001FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8001FFFF
|
||||
-Z@(CODE)EV100=80004100-8001FFFF
|
||||
-P(CODE)EVSEG=80004000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8001FFFF
|
||||
-P(CONST)DATA32_C=80000000-8001FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00007FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3B0256 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3B0256:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00007FFF SRAM RAM
|
||||
* 0x80000000 0x8003FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8003FFFF
|
||||
-Z@(CODE)EV100=80004100-8003FFFF
|
||||
-P(CODE)EVSEG=80004000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8003FFFF
|
||||
-P(CONST)DATA32_C=80000000-8003FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00007FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3B064 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3B064:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00003FFF SRAM RAM
|
||||
* 0x80000000 0x8000FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8000FFFF
|
||||
-Z@(CODE)EV100=80004100-8000FFFF
|
||||
-P(CODE)EVSEG=80004000-8000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8000FFFF
|
||||
-P(CONST)DATA32_C=80000000-8000FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8000FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8000FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8000FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00003FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00003FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00003FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00003FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00003FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00003FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3B1128 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3B1128:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00007FFF SRAM RAM
|
||||
* 0x80000000 0x8001FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8001FFFF
|
||||
-Z@(CODE)EV100=80004100-8001FFFF
|
||||
-P(CODE)EVSEG=80004000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8001FFFF
|
||||
-P(CONST)DATA32_C=80000000-8001FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8001FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00007FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3B1256 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3B1256:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00007FFF SRAM RAM
|
||||
* 0x80000000 0x8003FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8003FFFF
|
||||
-Z@(CODE)EV100=80004100-8003FFFF
|
||||
-P(CODE)EVSEG=80004000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8003FFFF
|
||||
-P(CONST)DATA32_C=80000000-8003FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8003FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8003FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8003FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8003FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00007FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -0,0 +1,263 @@
|
|||
/******************************************************************************
|
||||
* 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) }
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/******************************************************************************
|
||||
* AVR32 AT32UC3B164 XLINK command file for AVR32 IAR C/C++ Compiler.
|
||||
*
|
||||
* The assumed memory layout is the one of the AT32UC3B164:
|
||||
*
|
||||
* Start Stop Name Type
|
||||
* ---------- ---------- ----- --------------
|
||||
* 0x00000000 0x00003FFF SRAM RAM
|
||||
* 0x80000000 0x8000FFFF FLASH FLASH
|
||||
*
|
||||
* Usage: xlink your_file(s) -f xcl-file libraries
|
||||
*
|
||||
* - Compiler: IAR EWAVR32
|
||||
* - 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.
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The following segments are defined in this link file: */
|
||||
/* */
|
||||
/* Code segments */
|
||||
/* CODE32 -- Program code used by __code32 functions. */
|
||||
/* RESET -- Reset code. */
|
||||
/* EVSEG -- Exception vector handlers. */
|
||||
/* */
|
||||
/* Constant segments */
|
||||
/* INITTAB -- Segment initializer table. */
|
||||
/* DIFUNCT -- Dynamic initialization vector used by C++. */
|
||||
/* SWITCH -- Switch tables. */
|
||||
/* ACTAB -- Table of pointers to acall functions. */
|
||||
/* */
|
||||
/* DATA21_ID -- Initialization data for DATA21_I. */
|
||||
/* DATA32_ID -- Initialization data for DATA32_I. */
|
||||
/* DATA32_C -- Constant __data32 data. */
|
||||
/* */
|
||||
/* CHECKSUM -- Checksum segment. */
|
||||
/* */
|
||||
/* Data segments */
|
||||
/* DATA21_I -- Initialized __data21 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA32_I -- Initialized __data32 data with non-zero */
|
||||
/* initial value. */
|
||||
/* DATA21_Z -- Initialized __data21 data with zero initial value. */
|
||||
/* DATA32_Z -- Initialized __data32 data with zero initial value. */
|
||||
/* DATA21_N -- Non-initialized __data21. */
|
||||
/* DATA32_N -- Non-initialized __data32. */
|
||||
/* SSTACK -- The system stack. */
|
||||
/* CSTACK -- The application stack. */
|
||||
/* HEAP -- The heap used by malloc and free. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* Define CPU */
|
||||
/************************************************************************/
|
||||
|
||||
-cavr32
|
||||
|
||||
// Declare the IPR0 memory location
|
||||
-DIPR0=FFFF0800
|
||||
|
||||
/************************************************************************/
|
||||
/* Reset code is located at address 0x80000000 and up. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(CODE)RESET=80000000-8000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* The exception handler code is located at address 0x80000000 */
|
||||
/* and up. Make sure that the exception table gets properly */
|
||||
/* allocated. By using the special -Z@ allocation primitive, the */
|
||||
/* placement is guaranteed to be at _EVBASE and onwards. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z@(CODE)EVTAB=80004000-8000FFFF
|
||||
-Z@(CODE)EV100=80004100-8000FFFF
|
||||
-P(CODE)EVSEG=80004000-8000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate code and const segments. */
|
||||
/************************************************************************/
|
||||
|
||||
-P(CODE)CODE32=80000000-8000FFFF
|
||||
-P(CONST)DATA32_C=80000000-8000FFFF
|
||||
|
||||
// Initializers
|
||||
-Z(CONST)INITTAB,DIFUNCT=80000000-8000FFFF
|
||||
-Z(CONST)CHECKSUM,SWITCH=80000000-8000FFFF
|
||||
-Z(CONST)DATA21_ID,DATA32_ID=80000000-8000FFFF
|
||||
|
||||
-Z(CONST)ACTAB,HTAB=80000000-8000FFFF
|
||||
|
||||
/************************************************************************/
|
||||
/* Allocate the read/write segments that are mapped to RAM. */
|
||||
/************************************************************************/
|
||||
|
||||
-Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00003FFF
|
||||
-Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00003FFF
|
||||
-Z(DATA)TRACEBUFFER=00000004-00003FFF
|
||||
|
||||
-Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00003FFF
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00003FFF
|
||||
-Z(DATA)HEAP+_HEAP_SIZE=00000004-00003FFF
|
||||
|
||||
/************************************************************************/
|
||||
/* End of File */
|
||||
/************************************************************************/
|
|
@ -1,5 +1,3 @@
|
|||
/* This header file is part of the ATMEL FREERTOS-0.9.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
|
@ -9,7 +7,7 @@
|
|||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support email: avr32@atmel.com
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* This header file is part of the ATMEL FREERTOS-0.9.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
|
@ -9,7 +7,7 @@
|
|||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support email: avr32@atmel.com
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* This header file is part of the ATMEL FREERTOS-0.9.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
|
@ -9,7 +7,7 @@
|
|||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support email: avr32@atmel.com
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -47,23 +45,23 @@
|
|||
|
||||
/*! \brief Stringize.
|
||||
*
|
||||
* Stringize a preprocessing token, this token being allowed to be #defined.
|
||||
* Stringize a preprocessing token, this token being allowed to be \#defined.
|
||||
*
|
||||
* May be used only within macros with the token passed as an argument if the token is #defined.
|
||||
* May be used only within macros with the token passed as an argument if the token is \#defined.
|
||||
*
|
||||
* For example, writing STRINGZ(PIN) within a macro #defined by PIN_NAME(PIN)
|
||||
* and invoked as PIN_NAME(PIN0) with PIN0 #defined as A0 is equivalent to
|
||||
* For example, writing STRINGZ(PIN) within a macro \#defined by PIN_NAME(PIN)
|
||||
* and invoked as PIN_NAME(PIN0) with PIN0 \#defined as A0 is equivalent to
|
||||
* writing "A0".
|
||||
*/
|
||||
#define STRINGZ(x) #x
|
||||
|
||||
/*! \brief Absolute stringize.
|
||||
*
|
||||
* Stringize a preprocessing token, this token being allowed to be #defined.
|
||||
* Stringize a preprocessing token, this token being allowed to be \#defined.
|
||||
*
|
||||
* No restriction of use if the token is #defined.
|
||||
* No restriction of use if the token is \#defined.
|
||||
*
|
||||
* For example, writing ASTRINGZ(PIN0) anywhere with PIN0 #defined as A0 is
|
||||
* For example, writing ASTRINGZ(PIN0) anywhere with PIN0 \#defined as A0 is
|
||||
* equivalent to writing "A0".
|
||||
*/
|
||||
#define ASTRINGZ(x) STRINGZ(x)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* This header file is part of the ATMEL FREERTOS-0.9.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
|
@ -9,7 +7,7 @@
|
|||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support email: avr32@atmel.com
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -47,12 +45,12 @@
|
|||
|
||||
/*! \name Token Paste
|
||||
*
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be #defined.
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
|
||||
*
|
||||
* May be used only within macros with the tokens passed as arguments if the tokens are #defined.
|
||||
* May be used only within macros with the tokens passed as arguments if the tokens are \#defined.
|
||||
*
|
||||
* For example, writing TPASTE2(U, WIDTH) within a macro #defined by
|
||||
* UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH #defined as 32 is
|
||||
* For example, writing TPASTE2(U, WIDTH) within a macro \#defined by
|
||||
* UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH \#defined as 32 is
|
||||
* equivalent to writing U32.
|
||||
*/
|
||||
//! @{
|
||||
|
@ -69,11 +67,11 @@
|
|||
|
||||
/*! \name Absolute Token Paste
|
||||
*
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be #defined.
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
|
||||
*
|
||||
* No restriction of use if the tokens are #defined.
|
||||
* No restriction of use if the tokens are \#defined.
|
||||
*
|
||||
* For example, writing ATPASTE2(U, UL_WIDTH) anywhere with UL_WIDTH #defined
|
||||
* For example, writing ATPASTE2(U, UL_WIDTH) anywhere with UL_WIDTH \#defined
|
||||
* as 32 is equivalent to writing U32.
|
||||
*/
|
||||
//! @{
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* This header file is part of the ATMEL FREERTOS-0.9.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
|
@ -12,7 +10,7 @@
|
|||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support email: avr32@atmel.com
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -47,18 +45,10 @@
|
|||
#ifndef _COMPILER_H_
|
||||
#define _COMPILER_H_
|
||||
|
||||
#if __GNUC__
|
||||
# include <avr32/io.h>
|
||||
#elif __ICCAVR32__ || __AAVR32__
|
||||
# include <avr32/iouc3a0512.h>
|
||||
# include <avr32/uc3a0512.h>
|
||||
# if __ICCAVR32__
|
||||
# include <intrinsics.h>
|
||||
# endif
|
||||
#else
|
||||
# error Unknown compiler
|
||||
#include <avr32/io.h>
|
||||
#if __ICCAVR32__
|
||||
# include <intrinsics.h>
|
||||
#endif
|
||||
|
||||
#include "preprocessor.h"
|
||||
|
||||
|
||||
|
@ -69,6 +59,22 @@
|
|||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#if __ICCAVR32__
|
||||
|
||||
/*! \name Compiler Keywords
|
||||
*
|
||||
* Port of some keywords from GNU GCC for AVR32 to IAR Embedded Workbench for Atmel AVR32.
|
||||
*/
|
||||
//! @{
|
||||
#define __asm__ asm
|
||||
#define __inline__ inline
|
||||
#define __volatile__
|
||||
//! @}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*! \name Usual Types
|
||||
*/
|
||||
//! @{
|
||||
|
@ -85,6 +91,7 @@ typedef float F32; //!< 32-bit floating-point number.
|
|||
typedef double F64; //!< 64-bit floating-point number.
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Status Types
|
||||
*/
|
||||
//! @{
|
||||
|
@ -92,19 +99,6 @@ typedef Bool Status_bool_t; //!< Boolean status.
|
|||
typedef U8 Status_t; //!< 8-bit-coded status.
|
||||
//! @}
|
||||
|
||||
#if __ICCAVR32__
|
||||
|
||||
/*! \name Compiler Keywords
|
||||
*
|
||||
* Translation of some keywords from GNU GCC for AVR32 to IAR Embedded Workbench for Atmel AVR32.
|
||||
*/
|
||||
//! @{
|
||||
#define __asm__ asm
|
||||
#define __inline__ inline
|
||||
#define __volatile__
|
||||
//! @}
|
||||
|
||||
#endif
|
||||
|
||||
/*! \name Aliasing Aggregate Types
|
||||
*/
|
||||
|
@ -210,6 +204,7 @@ typedef struct
|
|||
|
||||
#endif // __AVR32_ABI_COMPILER__
|
||||
|
||||
|
||||
//_____ M A C R O S ________________________________________________________
|
||||
|
||||
/*! \name Usual Constants
|
||||
|
@ -233,9 +228,10 @@ typedef struct
|
|||
#define SET 1
|
||||
//! @}
|
||||
|
||||
|
||||
#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
|
||||
|
||||
/*! \name Bit-Field Handling Macros
|
||||
/*! \name Bit-Field Handling
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
@ -316,6 +312,7 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \brief This macro is used to test fatal errors.
|
||||
*
|
||||
* The macro tests if the expression is FALSE. If it is, a fatal error is
|
||||
|
@ -332,7 +329,8 @@ typedef struct
|
|||
#define Assert(expr)
|
||||
#endif
|
||||
|
||||
/*! \name Zero-Bit Counting Macros
|
||||
|
||||
/*! \name Zero-Bit Counting
|
||||
*
|
||||
* Under AVR32-GCC, __builtin_clz and __builtin_ctz behave like macros when
|
||||
* applied to constant expressions (values known at compile time), so they are
|
||||
|
@ -372,7 +370,8 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
/*! \name Alignment Macros
|
||||
|
||||
/*! \name Alignment
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
@ -424,7 +423,8 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
/*! \name Mathematics Macros
|
||||
|
||||
/*! \name Mathematics
|
||||
*
|
||||
* The same considerations as for clz and ctz apply here but AVR32-GCC does not
|
||||
* provide built-in functions to access the assembly instructions abs, min and
|
||||
|
@ -536,6 +536,7 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \brief Calls the routine at address \a addr.
|
||||
*
|
||||
* It generates a long call opcode.
|
||||
|
@ -558,18 +559,39 @@ typedef struct
|
|||
(\
|
||||
{\
|
||||
__asm__ __volatile__ (\
|
||||
"lda.w r8, _start\n\t"\
|
||||
"lddpc r9, 1f\n\t"\
|
||||
"stm --sp, r8-r9\n\t"\
|
||||
"lddpc r9, 3f\n\t"\
|
||||
"mfsr r8, %[SR]\n\t"\
|
||||
"bfextu r8, r8, %[SR_MX_OFFSET], %[SR_MX_SIZE]\n\t"\
|
||||
"cp.w r8, 0b001\n\t"\
|
||||
"breq 0f\n\t"\
|
||||
"sub r8, pc, $ - 1f\n\t"\
|
||||
"pushm r8-r9\n\t"\
|
||||
"rete\n"\
|
||||
"0:\n\t"\
|
||||
"rets\n\t"\
|
||||
".balign 4\n"\
|
||||
"mtsr %[SR], r9\n"\
|
||||
"1:\n\t"\
|
||||
"mov r0, 0\n\t"\
|
||||
"mov r1, 0\n\t"\
|
||||
"mov r2, 0\n\t"\
|
||||
"mov r3, 0\n\t"\
|
||||
"mov r4, 0\n\t"\
|
||||
"mov r5, 0\n\t"\
|
||||
"mov r6, 0\n\t"\
|
||||
"mov r7, 0\n\t"\
|
||||
"mov r8, 0\n\t"\
|
||||
"mov r9, 0\n\t"\
|
||||
"mov r10, 0\n\t"\
|
||||
"mov r11, 0\n\t"\
|
||||
"mov r12, 0\n\t"\
|
||||
"mov sp, 0\n\t"\
|
||||
"stdsp sp[0], sp\n\t"\
|
||||
"ldmts sp, sp\n\t"\
|
||||
"mov lr, 0\n\t"\
|
||||
"lddpc pc, 2f\n\t"\
|
||||
".balign 4\n"\
|
||||
"2:\n\t"\
|
||||
".word _start\n"\
|
||||
"3:\n\t"\
|
||||
".word %[RESET_SR]"\
|
||||
:\
|
||||
: [SR] "i" (AVR32_SR),\
|
||||
|
@ -584,81 +606,44 @@ typedef struct
|
|||
{\
|
||||
extern void *volatile __program_start;\
|
||||
__asm__ __volatile__ (\
|
||||
"mov r8, LWRD(__program_start)\n\t"\
|
||||
"orh r8, HWRD(__program_start)\n\t"\
|
||||
"mov r7, LWRD(__program_start)\n\t"\
|
||||
"orh r7, HWRD(__program_start)\n\t"\
|
||||
"mov r9, LWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | AVR32_SR_M0_MASK)")\n\t"\
|
||||
"orh r9, HWRD("ASTRINGZ(AVR32_SR_GM_MASK | AVR32_SR_EM_MASK | AVR32_SR_M0_MASK)")\n\t"\
|
||||
"stm --sp, r8-r9\n\t"\
|
||||
"mfsr r8, "ASTRINGZ(AVR32_SR)"\n\t"\
|
||||
"bfextu r8, r8, "ASTRINGZ(AVR32_SR_M0_OFFSET)", "ASTRINGZ(AVR32_SR_M0_SIZE + AVR32_SR_M1_SIZE + AVR32_SR_M2_SIZE)"\n\t"\
|
||||
"cp.w r8, 001b\n\t"\
|
||||
"breq $ + 4\n\t"\
|
||||
"breq $ + 10\n\t"\
|
||||
"sub r8, pc, -12\n\t"\
|
||||
"pushm r8-r9\n\t"\
|
||||
"rete\n\t"\
|
||||
"rets"\
|
||||
"mtsr "ASTRINGZ(AVR32_SR)", r9\n\t"\
|
||||
"mov r0, 0\n\t"\
|
||||
"mov r1, 0\n\t"\
|
||||
"mov r2, 0\n\t"\
|
||||
"mov r3, 0\n\t"\
|
||||
"mov r4, 0\n\t"\
|
||||
"mov r5, 0\n\t"\
|
||||
"mov r6, 0\n\t"\
|
||||
"st.w r0[4], r7\n\t"\
|
||||
"mov r7, 0\n\t"\
|
||||
"mov r8, 0\n\t"\
|
||||
"mov r9, 0\n\t"\
|
||||
"mov r10, 0\n\t"\
|
||||
"mov r11, 0\n\t"\
|
||||
"mov r12, 0\n\t"\
|
||||
"mov sp, 0\n\t"\
|
||||
"stdsp sp[0], sp\n\t"\
|
||||
"ldmts sp, sp\n\t"\
|
||||
"mov lr, 0\n\t"\
|
||||
"ld.w pc, lr[4]"\
|
||||
);\
|
||||
__program_start;\
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*! \name CPU Status Register Macros
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Disables all exceptions.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Disable_global_exception() ({__asm__ __volatile__ ("ssrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Disable_global_exception() (__set_status_flag(AVR32_SR_EM_OFFSET))
|
||||
#endif
|
||||
|
||||
/*! \brief Enables all exceptions.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Enable_global_exception() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Enable_global_exception() (__clear_status_flag(AVR32_SR_EM_OFFSET))
|
||||
#endif
|
||||
|
||||
/*! \brief Disables all interrupts.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Disable_global_interrupt() ({__asm__ __volatile__ ("ssrf\t%0\n\tnop\n\tnop" : : "i" (AVR32_SR_GM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Disable_global_interrupt() {__asm__ __volatile__ ("ssrf\t"ASTRINGZ(AVR32_SR_GM_OFFSET)"\n\tnop\n\tnop");}
|
||||
#endif
|
||||
|
||||
/*! \brief Enables all interrupts.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Enable_global_interrupt() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_GM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Enable_global_interrupt() (__enable_interrupt())
|
||||
#endif
|
||||
|
||||
/*! \brief Disables interrupt level \a int_lev.
|
||||
*
|
||||
* \param int_lev Interrupt level to disable (0 to 3).
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Disable_interrupt_level(int_lev) ({__asm__ __volatile__ ("ssrf\t%0\n\tnop\n\tnop" : : "i" (TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)));})
|
||||
#elif __ICCAVR32__
|
||||
#define Disable_interrupt_level(int_lev) {__asm__ __volatile__ ("ssrf\t"ASTRINGZ(TPASTE3(AVR32_SR_I, int_lev, M_OFFSET))"\n\tnop\n\tnop");}
|
||||
#endif
|
||||
|
||||
/*! \brief Enables interrupt level \a int_lev.
|
||||
*
|
||||
* \param int_lev Interrupt level to enable (0 to 3).
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Enable_interrupt_level(int_lev) ({__asm__ __volatile__ ("csrf\t%0" : : "i" (TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)));})
|
||||
#elif __ICCAVR32__
|
||||
#define Enable_interrupt_level(int_lev) (__clear_status_flag(TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)))
|
||||
#endif
|
||||
|
||||
//! @}
|
||||
|
||||
/*! \name System Register Access Macros
|
||||
/*! \name System Register Access
|
||||
*/
|
||||
//! @{
|
||||
|
||||
|
@ -687,8 +672,88 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name CPU Status Register Access
|
||||
*/
|
||||
//! @{
|
||||
|
||||
/*! \brief Tells whether exceptions are globally enabled.
|
||||
*
|
||||
* \return \c 1 if exceptions are globally enabled, else \c 0.
|
||||
*/
|
||||
#define Is_global_exception_enabled() (!Tst_bits(Get_system_register(AVR32_SR), AVR32_SR_EM_MASK))
|
||||
|
||||
/*! \brief Disables exceptions globally.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Disable_global_exception() ({__asm__ __volatile__ ("ssrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Disable_global_exception() (__set_status_flag(AVR32_SR_EM_OFFSET))
|
||||
#endif
|
||||
|
||||
/*! \brief Enables exceptions globally.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Enable_global_exception() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_EM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Enable_global_exception() (__clear_status_flag(AVR32_SR_EM_OFFSET))
|
||||
#endif
|
||||
|
||||
/*! \brief Tells whether interrupts are globally enabled.
|
||||
*
|
||||
* \return \c 1 if interrupts are globally enabled, else \c 0.
|
||||
*/
|
||||
#define Is_global_interrupt_enabled() (!Tst_bits(Get_system_register(AVR32_SR), AVR32_SR_GM_MASK))
|
||||
|
||||
/*! \brief Disables interrupts globally.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Disable_global_interrupt() ({__asm__ __volatile__ ("ssrf\t%0\n\tnop\n\tnop" : : "i" (AVR32_SR_GM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Disable_global_interrupt() {__asm__ __volatile__ ("ssrf\t"ASTRINGZ(AVR32_SR_GM_OFFSET)"\n\tnop\n\tnop");}
|
||||
#endif
|
||||
|
||||
/*! \brief Enables interrupts globally.
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Enable_global_interrupt() ({__asm__ __volatile__ ("csrf\t%0" : : "i" (AVR32_SR_GM_OFFSET));})
|
||||
#elif __ICCAVR32__
|
||||
#define Enable_global_interrupt() (__enable_interrupt())
|
||||
#endif
|
||||
|
||||
/*! \brief Tells whether interrupt level \a int_lev is enabled.
|
||||
*
|
||||
* \param int_lev Interrupt level (0 to 3).
|
||||
*
|
||||
* \return \c 1 if interrupt level \a int_lev is enabled, else \c 0.
|
||||
*/
|
||||
#define Is_interrupt_level_enabled(int_lev) (!Tst_bits(Get_system_register(AVR32_SR), TPASTE3(AVR32_SR_I, int_lev, M_MASK)))
|
||||
|
||||
/*! \brief Disables interrupt level \a int_lev.
|
||||
*
|
||||
* \param int_lev Interrupt level to disable (0 to 3).
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Disable_interrupt_level(int_lev) ({__asm__ __volatile__ ("ssrf\t%0\n\tnop\n\tnop" : : "i" (TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)));})
|
||||
#elif __ICCAVR32__
|
||||
#define Disable_interrupt_level(int_lev) {__asm__ __volatile__ ("ssrf\t"ASTRINGZ(TPASTE3(AVR32_SR_I, int_lev, M_OFFSET))"\n\tnop\n\tnop");}
|
||||
#endif
|
||||
|
||||
/*! \brief Enables interrupt level \a int_lev.
|
||||
*
|
||||
* \param int_lev Interrupt level to enable (0 to 3).
|
||||
*/
|
||||
#if __GNUC__
|
||||
#define Enable_interrupt_level(int_lev) ({__asm__ __volatile__ ("csrf\t%0" : : "i" (TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)));})
|
||||
#elif __ICCAVR32__
|
||||
#define Enable_interrupt_level(int_lev) (__clear_status_flag(TPASTE3(AVR32_SR_I, int_lev, M_OFFSET)))
|
||||
#endif
|
||||
|
||||
//! @}
|
||||
|
||||
#endif // __AVR32_ABI_COMPILER__
|
||||
|
||||
|
||||
//! Boolean evaluating MCU little endianism.
|
||||
#if (__GNUC__ && __AVR32__) || (__ICCAVR32__ || __AAVR32__)
|
||||
#define LITTLE_ENDIAN_MCU FALSE
|
||||
|
@ -702,34 +767,39 @@ typedef struct
|
|||
//! Boolean evaluating MCU big endianism.
|
||||
#define BIG_ENDIAN_MCU (!LITTLE_ENDIAN_MCU)
|
||||
|
||||
|
||||
#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
|
||||
|
||||
/*! \name U16/U32/U64 MCU Endianism Handling Macros
|
||||
/*! \name MCU Endianism Handling
|
||||
*/
|
||||
//! @{
|
||||
|
||||
#if LITTLE_ENDIAN_MCU
|
||||
|
||||
#define LSB(u16) (((U8 *)&(u16))[0]) //!< Least significant byte of \a u16.
|
||||
#define MSB(u16) (((U8 *)&(u16))[1]) //!< Most significant byte of \a u16.
|
||||
|
||||
#define LSH(u32) (((U16 *)&(u32))[0]) //!< Least significant half-word of \a u32.
|
||||
#define MSH(u32) (((U16 *)&(u32))[1]) //!< Most significant half-word of \a u32.
|
||||
#define LSB0W(u32) (((U8 *)&(u32))[0]) //!< Least significant byte of 1st rank of \a u32.
|
||||
#define LSB1W(u32) (((U8 *)&(u32))[1]) //!< Least significant byte of 2nd rank of \a u32.
|
||||
#define LSB2W(u32) (((U8 *)&(u32))[2]) //!< Least significant byte of 3rd rank of \a u32.
|
||||
#define LSB3W(u32) (((U8 *)&(u32))[3]) //!< Least significant byte of 4th rank of \a u32.
|
||||
#define MSB3W(u32) LSB0W(u32) //!< Most significant byte of 1st rank of \a u32.
|
||||
#define MSB2W(u32) LSB1W(u32) //!< Most significant byte of 2nd rank of \a u32.
|
||||
#define MSB1W(u32) LSB2W(u32) //!< Most significant byte of 3rd rank of \a u32.
|
||||
#define MSB0W(u32) LSB3W(u32) //!< Most significant byte of 4th rank of \a u32.
|
||||
#define MSB3W(u32) LSB0W(u32) //!< Most significant byte of 4th rank of \a u32.
|
||||
#define MSB2W(u32) LSB1W(u32) //!< Most significant byte of 3rd rank of \a u32.
|
||||
#define MSB1W(u32) LSB2W(u32) //!< Most significant byte of 2nd rank of \a u32.
|
||||
#define MSB0W(u32) LSB3W(u32) //!< Most significant byte of 1st rank of \a u32.
|
||||
|
||||
#define LSW(u64) (((U32 *)&(u64))[0]) //!< Least significant word of \a u64.
|
||||
#define MSW(u64) (((U32 *)&(u64))[1]) //!< Most significant word of \a u64.
|
||||
#define LSH0(u64) (((U16 *)&(u64))[0]) //!< Least significant half-word of 1st rank of \a u64.
|
||||
#define LSH1(u64) (((U16 *)&(u64))[1]) //!< Least significant half-word of 2nd rank of \a u64.
|
||||
#define LSH2(u64) (((U16 *)&(u64))[2]) //!< Least significant half-word of 3rd rank of \a u64.
|
||||
#define LSH3(u64) (((U16 *)&(u64))[3]) //!< Least significant half-word of 4th rank of \a u64.
|
||||
#define MSH3(u64) LSH0(u64) //!< Most significant half-word of 1st rank of \a u64.
|
||||
#define MSH2(u64) LSH1(u64) //!< Most significant half-word of 2nd rank of \a u64.
|
||||
#define MSH1(u64) LSH2(u64) //!< Most significant half-word of 3rd rank of \a u64.
|
||||
#define MSH0(u64) LSH3(u64) //!< Most significant half-word of 4th rank of \a u64.
|
||||
#define MSH3(u64) LSH0(u64) //!< Most significant half-word of 4th rank of \a u64.
|
||||
#define MSH2(u64) LSH1(u64) //!< Most significant half-word of 3rd rank of \a u64.
|
||||
#define MSH1(u64) LSH2(u64) //!< Most significant half-word of 2nd rank of \a u64.
|
||||
#define MSH0(u64) LSH3(u64) //!< Most significant half-word of 1st rank of \a u64.
|
||||
#define LSB0D(u64) (((U8 *)&(u64))[0]) //!< Least significant byte of 1st rank of \a u64.
|
||||
#define LSB1D(u64) (((U8 *)&(u64))[1]) //!< Least significant byte of 2nd rank of \a u64.
|
||||
#define LSB2D(u64) (((U8 *)&(u64))[2]) //!< Least significant byte of 3rd rank of \a u64.
|
||||
|
@ -738,37 +808,41 @@ typedef struct
|
|||
#define LSB5D(u64) (((U8 *)&(u64))[5]) //!< Least significant byte of 6th rank of \a u64.
|
||||
#define LSB6D(u64) (((U8 *)&(u64))[6]) //!< Least significant byte of 7th rank of \a u64.
|
||||
#define LSB7D(u64) (((U8 *)&(u64))[7]) //!< Least significant byte of 8th rank of \a u64.
|
||||
#define MSB7D(u64) LSB0D(u64) //!< Most significant byte of 1st rank of \a u64.
|
||||
#define MSB6D(u64) LSB1D(u64) //!< Most significant byte of 2nd rank of \a u64.
|
||||
#define MSB5D(u64) LSB2D(u64) //!< Most significant byte of 3rd rank of \a u64.
|
||||
#define MSB4D(u64) LSB3D(u64) //!< Most significant byte of 4th rank of \a u64.
|
||||
#define MSB3D(u64) LSB4D(u64) //!< Most significant byte of 5th rank of \a u64.
|
||||
#define MSB2D(u64) LSB5D(u64) //!< Most significant byte of 6th rank of \a u64.
|
||||
#define MSB1D(u64) LSB6D(u64) //!< Most significant byte of 7th rank of \a u64.
|
||||
#define MSB0D(u64) LSB7D(u64) //!< Most significant byte of 8th rank of \a u64.
|
||||
#define MSB7D(u64) LSB0D(u64) //!< Most significant byte of 8th rank of \a u64.
|
||||
#define MSB6D(u64) LSB1D(u64) //!< Most significant byte of 7th rank of \a u64.
|
||||
#define MSB5D(u64) LSB2D(u64) //!< Most significant byte of 6th rank of \a u64.
|
||||
#define MSB4D(u64) LSB3D(u64) //!< Most significant byte of 5th rank of \a u64.
|
||||
#define MSB3D(u64) LSB4D(u64) //!< Most significant byte of 4th rank of \a u64.
|
||||
#define MSB2D(u64) LSB5D(u64) //!< Most significant byte of 3rd rank of \a u64.
|
||||
#define MSB1D(u64) LSB6D(u64) //!< Most significant byte of 2nd rank of \a u64.
|
||||
#define MSB0D(u64) LSB7D(u64) //!< Most significant byte of 1st rank of \a u64.
|
||||
|
||||
#else // BIG_ENDIAN_MCU
|
||||
|
||||
#define MSB(u16) (((U8 *)&(u16))[0]) //!< Most significant byte of \a u16.
|
||||
#define LSB(u16) (((U8 *)&(u16))[1]) //!< Least significant byte of \a u16.
|
||||
|
||||
#define MSH(u32) (((U16 *)&(u32))[0]) //!< Most significant half-word of \a u32.
|
||||
#define LSH(u32) (((U16 *)&(u32))[1]) //!< Least significant half-word of \a u32.
|
||||
#define MSB0W(u32) (((U8 *)&(u32))[0]) //!< Most significant byte of 1st rank of \a u32.
|
||||
#define MSB1W(u32) (((U8 *)&(u32))[1]) //!< Most significant byte of 2nd rank of \a u32.
|
||||
#define MSB2W(u32) (((U8 *)&(u32))[2]) //!< Most significant byte of 3rd rank of \a u32.
|
||||
#define MSB3W(u32) (((U8 *)&(u32))[3]) //!< Most significant byte of 4th rank of \a u32.
|
||||
#define LSB3W(u32) MSB0W(u32) //!< Least significant byte of 1st rank of \a u32.
|
||||
#define LSB2W(u32) MSB1W(u32) //!< Least significant byte of 2nd rank of \a u32.
|
||||
#define LSB1W(u32) MSB2W(u32) //!< Least significant byte of 3rd rank of \a u32.
|
||||
#define LSB0W(u32) MSB3W(u32) //!< Least significant byte of 4th rank of \a u32.
|
||||
#define LSB3W(u32) MSB0W(u32) //!< Least significant byte of 4th rank of \a u32.
|
||||
#define LSB2W(u32) MSB1W(u32) //!< Least significant byte of 3rd rank of \a u32.
|
||||
#define LSB1W(u32) MSB2W(u32) //!< Least significant byte of 2nd rank of \a u32.
|
||||
#define LSB0W(u32) MSB3W(u32) //!< Least significant byte of 1st rank of \a u32.
|
||||
|
||||
#define MSW(u64) (((U32 *)&(u64))[0]) //!< Most significant word of \a u64.
|
||||
#define LSW(u64) (((U32 *)&(u64))[1]) //!< Least significant word of \a u64.
|
||||
#define MSH0(u64) (((U16 *)&(u64))[0]) //!< Most significant half-word of 1st rank of \a u64.
|
||||
#define MSH1(u64) (((U16 *)&(u64))[1]) //!< Most significant half-word of 2nd rank of \a u64.
|
||||
#define MSH2(u64) (((U16 *)&(u64))[2]) //!< Most significant half-word of 3rd rank of \a u64.
|
||||
#define MSH3(u64) (((U16 *)&(u64))[3]) //!< Most significant half-word of 4th rank of \a u64.
|
||||
#define LSH3(u64) MSH0(u64) //!< Least significant half-word of 1st rank of \a u64.
|
||||
#define LSH2(u64) MSH1(u64) //!< Least significant half-word of 2nd rank of \a u64.
|
||||
#define LSH1(u64) MSH2(u64) //!< Least significant half-word of 3rd rank of \a u64.
|
||||
#define LSH0(u64) MSH3(u64) //!< Least significant half-word of 4th rank of \a u64.
|
||||
#define LSH3(u64) MSH0(u64) //!< Least significant half-word of 4th rank of \a u64.
|
||||
#define LSH2(u64) MSH1(u64) //!< Least significant half-word of 3rd rank of \a u64.
|
||||
#define LSH1(u64) MSH2(u64) //!< Least significant half-word of 2nd rank of \a u64.
|
||||
#define LSH0(u64) MSH3(u64) //!< Least significant half-word of 1st rank of \a u64.
|
||||
#define MSB0D(u64) (((U8 *)&(u64))[0]) //!< Most significant byte of 1st rank of \a u64.
|
||||
#define MSB1D(u64) (((U8 *)&(u64))[1]) //!< Most significant byte of 2nd rank of \a u64.
|
||||
#define MSB2D(u64) (((U8 *)&(u64))[2]) //!< Most significant byte of 3rd rank of \a u64.
|
||||
|
@ -777,18 +851,21 @@ typedef struct
|
|||
#define MSB5D(u64) (((U8 *)&(u64))[5]) //!< Most significant byte of 6th rank of \a u64.
|
||||
#define MSB6D(u64) (((U8 *)&(u64))[6]) //!< Most significant byte of 7th rank of \a u64.
|
||||
#define MSB7D(u64) (((U8 *)&(u64))[7]) //!< Most significant byte of 8th rank of \a u64.
|
||||
#define LSB7D(u64) MSB0D(u64) //!< Least significant byte of 1st rank of \a u64.
|
||||
#define LSB6D(u64) MSB1D(u64) //!< Least significant byte of 2nd rank of \a u64.
|
||||
#define LSB5D(u64) MSB2D(u64) //!< Least significant byte of 3rd rank of \a u64.
|
||||
#define LSB4D(u64) MSB3D(u64) //!< Least significant byte of 4th rank of \a u64.
|
||||
#define LSB3D(u64) MSB4D(u64) //!< Least significant byte of 5th rank of \a u64.
|
||||
#define LSB2D(u64) MSB5D(u64) //!< Least significant byte of 6th rank of \a u64.
|
||||
#define LSB1D(u64) MSB6D(u64) //!< Least significant byte of 7th rank of \a u64.
|
||||
#define LSB0D(u64) MSB7D(u64) //!< Least significant byte of 8th rank of \a u64.
|
||||
#define LSB7D(u64) MSB0D(u64) //!< Least significant byte of 8th rank of \a u64.
|
||||
#define LSB6D(u64) MSB1D(u64) //!< Least significant byte of 7th rank of \a u64.
|
||||
#define LSB5D(u64) MSB2D(u64) //!< Least significant byte of 6th rank of \a u64.
|
||||
#define LSB4D(u64) MSB3D(u64) //!< Least significant byte of 5th rank of \a u64.
|
||||
#define LSB3D(u64) MSB4D(u64) //!< Least significant byte of 4th rank of \a u64.
|
||||
#define LSB2D(u64) MSB5D(u64) //!< Least significant byte of 3rd rank of \a u64.
|
||||
#define LSB1D(u64) MSB6D(u64) //!< Least significant byte of 2nd rank of \a u64.
|
||||
#define LSB0D(u64) MSB7D(u64) //!< Least significant byte of 1st rank of \a u64.
|
||||
|
||||
#endif
|
||||
|
||||
//! @}
|
||||
|
||||
/*! \name Endianism Conversion Macros
|
||||
|
||||
/*! \name Endianism Conversion
|
||||
*
|
||||
* The same considerations as for clz and ctz apply here but AVR32-GCC's
|
||||
* __builtin_bswap_16 and __builtin_bswap_32 do not behave like macros when
|
||||
|
@ -874,6 +951,35 @@ typedef struct
|
|||
|
||||
//! @}
|
||||
|
||||
|
||||
/*! \name Target Abstraction
|
||||
*/
|
||||
//! @{
|
||||
|
||||
#define _GLOBEXT_ extern //!< extern storage-class specifier.
|
||||
#define _CONST_TYPE_ const //!< const type qualifier.
|
||||
#define _MEM_TYPE_SLOW_ //!< Slow memory type.
|
||||
#define _MEM_TYPE_MEDFAST_ //!< Fairly fast memory type.
|
||||
#define _MEM_TYPE_FAST_ //!< Fast memory type.
|
||||
|
||||
typedef U8 Byte; //!< 8-bit unsigned integer.
|
||||
|
||||
#define memcmp_ram2ram memcmp //!< Target-specific memcmp of RAM to RAM.
|
||||
#define memcmp_code2ram memcmp //!< Target-specific memcmp of RAM to NVRAM.
|
||||
#define memcpy_ram2ram memcpy //!< Target-specific memcpy from RAM to RAM.
|
||||
#define memcpy_code2ram memcpy //!< Target-specific memcpy from NVRAM to RAM.
|
||||
|
||||
#define LSB0(u32) LSB0W(u32) //!< Least significant byte of 1st rank of \a u32.
|
||||
#define LSB1(u32) LSB1W(u32) //!< Least significant byte of 2nd rank of \a u32.
|
||||
#define LSB2(u32) LSB2W(u32) //!< Least significant byte of 3rd rank of \a u32.
|
||||
#define LSB3(u32) LSB3W(u32) //!< Least significant byte of 4th rank of \a u32.
|
||||
#define MSB3(u32) MSB3W(u32) //!< Most significant byte of 4th rank of \a u32.
|
||||
#define MSB2(u32) MSB2W(u32) //!< Most significant byte of 3rd rank of \a u32.
|
||||
#define MSB1(u32) MSB1W(u32) //!< Most significant byte of 2nd rank of \a u32.
|
||||
#define MSB0(u32) MSB0W(u32) //!< Most significant byte of 1st rank of \a u32.
|
||||
|
||||
//! @}
|
||||
|
||||
#endif // __AVR32_ABI_COMPILER__
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue