Debian Codegraph @

test/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl

raw
1 // ----------------------------------------------------------------------------
2 // ATMEL Microcontroller Software Support - ROUSSET -
3 // ----------------------------------------------------------------------------
4 // DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
5 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
7 // DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
8 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
10 // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
11 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
12 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
13 // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 // ----------------------------------------------------------------------------
15 // File Name : at91SAM7X256_FLASH.xcl
16 // Object : Generic Linker Command File for IAR
17 // 1.0 30/Aug/05 FBr : Creation for 4.30A
18 // ----------------------------------------------------------------------------
19
20 //*************************************************************************
21 // XLINK command file template for EWARM/ICCARM
22 //
23 // Usage: xlink -f lnkarm <your_object_file(s)>
24 // -s <program start label> <C/C++ runtime library>
25 //*************************************************************************
26 //
27 // -------------
28 // Code segments - may be placed anywhere in memory.
29 // -------------
30 //
31 // INTVEC -- Exception vector table.
32 // SWITAB -- Software interrupt vector table.
33 // ICODE -- Startup (cstartup) and exception code.
34 // DIFUNCT -- Dynamic initialization vectors used by C++.
35 // CODE -- Compiler generated code.
36 // CODE_I -- Compiler generated code declared __ramfunc (executes in RAM)
37 // CODE_ID -- Initializer for CODE_I (ROM).
38 //
39 // -------------
40 // Data segments - may be placed anywhere in memory.
41 // -------------
42 //
43 // CSTACK -- The stack used by C/C++ programs (system and user mode).
44 // IRQ_STACK -- The stack used by IRQ service routines.
45 // SVC_STACK -- The stack used in supervisor mode
46 // (Define other exception stacks as needed for
47 // FIQ, ABT, UND).
48 // HEAP -- The heap used by malloc and free in C and new and
49 // delete in C++.
50 // INITTAB -- Table containing addresses and sizes of segments that
51 // need to be initialized at startup (by cstartup).
52 // CHECKSUM -- The linker places checksum byte(s) in this segment,
53 // when the -J linker command line option is used.
54 // DATA_y -- Data objects.
55 //
56 // Where _y can be one of:
57 //
58 // _AN -- Holds uninitialized located objects, i.e. objects with
59 // an absolute location given by the @ operator or the
60 // #pragma location directive. Since these segments
61 // contain objects which already have a fixed address,
62 // they should not be mentioned in this linker command
63 // file.
64 // _C -- Constants (ROM).
65 // _I -- Initialized data (RAM).
66 // _ID -- The original content of _I (copied to _I by cstartup) (ROM).
67 // _N -- Uninitialized data (RAM).
68 // _Z -- Zero initialized data (RAM).
69 //
70 // Note: Be sure to use end values for the defined address ranges.
71 // Otherwise, the linker may allocate space outside the
72 // intended memory range.
73 //*************************************************************************
74
75 //*************************************************************************
76 // Inform the linker about the CPU family used.
77 // AT91SAM7X256 Memory mapping
78 // No remap
79 // ROMSTART
80 // Start address 0x0000 0000
81 // Size 256 Kbo 0x0004 0000
82 // RAMSTART
83 // Start address 0x0020 0000
84 // Size 64 Kbo 0x0001 0000
85 // Remap done
86 // RAMSTART
87 // Start address 0x0000 0000
88 // Size 64 Kbo 0x0001 0000
89 // ROMSTART
90 // Start address 0x0010 0000
91 // Size 256 Kbo 0x0004 0000
92
93 //*************************************************************************
94 -carm
95
96 //*************************************************************************
97 // Internal Ram segments mapped AFTER REMAP 64 K.
98 //*************************************************************************
99 -Z(CONST)INTRAMSTART_REMAP=00200000
100 -Z(CONST)INTRAMEND_REMAP=0020FFFF
101
102 //*************************************************************************
103 // Read-only segments mapped to Flash 256 K.
104 //*************************************************************************
105 -DROMSTART=00000000
106 -DROMEND=0003FFFF
107 //*************************************************************************
108 // Read/write segments mapped to 64 K RAM.
109 //*************************************************************************
110 -DRAMSTART=00200000
111 -DRAMEND=0020FFFF
112
113 //*************************************************************************
114 // Address range for reset and exception
115 // vectors (INTVEC).
116 // The vector area is 32 bytes,
117 // an additional 32 bytes is allocated for the
118 // constant table used by ldr PC in cstartup.s79.
119 //*************************************************************************
120 -Z(CODE)INTVEC=00-3F
121
122 //*************************************************************************
123 // Startup code and exception routines (ICODE).
124 //*************************************************************************
125 -Z(CODE)ICODE,DIFUNCT=ROMSTART-ROMEND
126 -Z(CODE)SWITAB=ROMSTART-ROMEND
127
128 //*************************************************************************
129 // Code segments may be placed anywhere.
130 //*************************************************************************
131 -Z(CODE)CODE=ROMSTART-ROMEND
132
133 //*************************************************************************
134 // Various constants and initializers.
135 //*************************************************************************
136 -Z(CONST)INITTAB,DATA_ID,DATA_C=ROMSTART-ROMEND
137 -Z(CONST)CHECKSUM=ROMSTART-ROMEND
138
139 //*************************************************************************
140 // Data segments.
141 //*************************************************************************
142 -Z(DATA)DATA_I,DATA_Z,DATA_N=RAMSTART-RAMEND
143
144 //*************************************************************************
145 // __ramfunc code copied to and executed from RAM.
146 //*************************************************************************
147 -Z(DATA)CODE_I=RAMSTART-RAMEND
148 -Z(CONST)CODE_ID=ROMSTART-ROMEND // Initializer for
149 -QCODE_I=CODE_ID
150
151 //*************************************************************************
152 // ICCARM produces code for __ramfunc functions in
153 // CODE_I segments. The -Q XLINK command line
154 // option redirects XLINK to emit the code in the
155 // debug information associated with the CODE_I
156 // segment, where the code will execute.
157 //*************************************************************************
158
159 //*************************************************************************
160 // Stack and heap segments.
161 //*************************************************************************
162 -D_CSTACK_SIZE=(100*4)
163 -D_IRQ_STACK_SIZE=(3*8*4)
164 -D_HEAP_SIZE=(1024*1)
165
166 -Z(DATA)CSTACK+_CSTACK_SIZE=RAMSTART-RAMEND
167 -Z(DATA)IRQ_STACK+_IRQ_STACK_SIZE=RAMSTART-RAMEND
168 -Z(DATA)HEAP+_HEAP_SIZE=RAMSTART-RAMEND
169
170 //*************************************************************************
171 // ELF/DWARF support.
172 //
173 // Uncomment the line "-Felf" below to generate ELF/DWARF output.
174 // Available format specifiers are:
175 //
176 // "-yn": Suppress DWARF debug output
177 // "-yp": Multiple ELF program sections
178 // "-yas": Format suitable for debuggers from ARM Ltd (also sets -p flag)
179 //
180 // "-Felf" and the format specifiers can also be supplied directly as
181 // command line options, or selected from the Xlink Output tab in the
182 // IAR Embedded Workbench.
183 //*************************************************************************
184
185 // -Felf