1 /******************************************************************************
\r
2 * AVR32 AT32UC3A0128 XLINK command file for AVR32 IAR C/C++ Compiler.
\r
4 * The assumed memory layout is the one of the AT32UC3A0128:
\r
6 * Start Stop Name Type
\r
7 * ---------- ---------- ----- --------------
\r
8 * 0x00000000 0x00007FFF SRAM RAM
\r
9 * 0x80000000 0x8001FFFF FLASH FLASH
\r
10 * 0x80800000 0x808001FF USER FLASH
\r
12 * Usage: xlink your_file(s) -f xcl-file libraries
\r
14 * - Compiler: IAR EWAVR32
\r
15 * - Supported devices: AVR32 AT32UC3A0128
\r
17 * - author Atmel Corporation: http://www.atmel.com \n
\r
18 * Support and FAQ: http://support.atmel.no/
\r
20 ******************************************************************************/
\r
22 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
\r
24 * Redistribution and use in source and binary forms, with or without
\r
25 * modification, are permitted provided that the following conditions are met:
\r
27 * 1. Redistributions of source code must retain the above copyright notice, this
\r
28 * list of conditions and the following disclaimer.
\r
30 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
31 * this list of conditions and the following disclaimer in the documentation
\r
32 * and/or other materials provided with the distribution.
\r
34 * 3. The name of Atmel may not be used to endorse or promote products derived
\r
35 * from this software without specific prior written permission.
\r
37 * 4. This software may only be redistributed and used in connection with an Atmel
\r
40 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
\r
41 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
42 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
\r
43 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
\r
44 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
45 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
\r
46 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
\r
47 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
48 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
\r
49 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
\r
53 /************************************************************************/
\r
54 /* The following segments are defined in this link file: */
\r
57 /* CODE32 -- Program code used by __code32 functions. */
\r
58 /* RESET -- Reset code. */
\r
59 /* EVSEG -- Exception vector handlers. */
\r
61 /* Constant segments */
\r
62 /* INITTAB -- Segment initializer table. */
\r
63 /* DIFUNCT -- Dynamic initialization vector used by C++. */
\r
64 /* SWITCH -- Switch tables. */
\r
65 /* ACTAB -- Table of pointers to acall functions. */
\r
67 /* DATA21_ID -- Initialization data for DATA21_I. */
\r
68 /* DATA32_ID -- Initialization data for DATA32_I. */
\r
69 /* DATA32_C -- Constant __data32 data. */
\r
71 /* CHECKSUM -- Checksum segment. */
\r
74 /* DATA21_I -- Initialized __data21 data with non-zero */
\r
75 /* initial value. */
\r
76 /* DATA32_I -- Initialized __data32 data with non-zero */
\r
77 /* initial value. */
\r
78 /* DATA21_Z -- Initialized __data21 data with zero initial value. */
\r
79 /* DATA32_Z -- Initialized __data32 data with zero initial value. */
\r
80 /* DATA21_N -- Non-initialized __data21. */
\r
81 /* DATA32_N -- Non-initialized __data32. */
\r
82 /* SSTACK -- The system stack. */
\r
83 /* CSTACK -- The application stack. */
\r
84 /* HEAP -- The heap used by malloc and free. */
\r
86 /************************************************************************/
\r
88 /************************************************************************/
\r
90 /************************************************************************/
\r
94 // Declare the IPR0 memory location
\r
97 /************************************************************************/
\r
98 /* Reset code is located at address 0x80000000 and up. */
\r
99 /************************************************************************/
\r
101 -Z(CODE)RESET=80000000-8001FFFF
\r
103 /************************************************************************/
\r
104 /* The exception handler code is located at address 0x80000000 */
\r
105 /* and up. Make sure that the exception table gets properly */
\r
106 /* allocated. By using the special -Z@ allocation primitive, the */
\r
107 /* placement is guaranteed to be at _EVBASE and onwards. */
\r
108 /************************************************************************/
\r
110 -Z@(CODE)EVTAB=80004000-8001FFFF
\r
111 -Z@(CODE)EV100=80004100-8001FFFF
\r
112 -P(CODE)EVSEG=80004000-8001FFFF
\r
114 /************************************************************************/
\r
115 /* Allocate code and const segments. */
\r
116 /************************************************************************/
\r
118 -P(CODE)CODE32=80000000-8001FFFF
\r
119 -P(CONST)DATA32_C=80000000-8001FFFF
\r
120 -P(CONST)USERDATA32_C=80800000-808001FF
\r
123 -Z(CONST)INITTAB,DIFUNCT=80000000-8001FFFF
\r
124 -Z(CONST)CHECKSUM,SWITCH=80000000-8001FFFF
\r
125 -Z(CONST)DATA21_ID,DATA32_ID=80000000-8001FFFF
\r
126 -Z(CONST)RAMCODE21_ID,RAMCODE32_ID=80000000-8001FFFF
\r
128 -Z(CONST)ACTAB,HTAB=80000000-8001FFFF
\r
130 /************************************************************************/
\r
131 /* Allocate the read/write segments that are mapped to RAM. */
\r
132 /************************************************************************/
\r
134 -Z(CODE)RAMCODE21=00000004-00007FFF
\r
135 -Z(DATA)DATA21_I,DATA21_Z,DATA21_N=00000004-00007FFF
\r
136 -Z(CODE)RAMCODE32=00000004-00007FFF
\r
137 -Z(DATA)DATA32_I,DATA32_Z,DATA32_N=00000004-00007FFF
\r
138 -Z(DATA)TRACEBUFFER=00000004-00007FFF
\r
140 -Z(DATA)SSTACK+_SSTACK_SIZE#00000004-00007FFF
\r
141 -Z(DATA)CSTACK+_CSTACK_SIZE#00000004-00007FFF
\r
142 -Z(DATA)HEAP+_HEAP_SIZE=00000004-00007FFF
\r
144 /************************************************************************/
\r
145 /* Copy the RAMCODE bytes to the initializer segments. */
\r
146 /************************************************************************/
\r
148 -QRAMCODE21=RAMCODE21_ID
\r
149 -QRAMCODE32=RAMCODE32_ID
\r
151 /************************************************************************/
\r
153 /************************************************************************/
\r