]> git.sur5r.net Git - freertos/blob - Demo/CORTEX_LM3S316_IAR/hw_include/RTOSDemo_lnk.xcl
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@14 1d2547de-c912-0410-9cb9...
[freertos] / Demo / CORTEX_LM3S316_IAR / hw_include / RTOSDemo_lnk.xcl
1 // Generated : 06/01/06 20:29:52\r
2 //**********************************************************************\r
3 // XLINK template command file to be used with the ICCARM C/C++ Compiler\r
4 //\r
5 // Usage:  xlink  -f lnkarm  <your_object_file(s)>\r
6 //                -s <program start label>  <C/C++ runtime library>\r
7 //\r
8 // $Revision: 1.3 $\r
9 //\r
10 //**********************************************************************\r
11 \r
12 //*************************************************************************\r
13 // In this file it is assumed that the system has the following\r
14 // memory layout:\r
15 //\r
16 //   Exception vectors [0x000000--0x00001F]  RAM or ROM\r
17 //   ROMSTART--ROMEND  [0x008000--0x0FFFFF]  ROM (or other non-volatile memory)\r
18 //   RAMSTART--RAMEND  [0x100000--0x7FFFFF]  RAM (or other read/write memory)\r
19 //\r
20 // -------------\r
21 // Code segments - may be placed anywhere in memory.\r
22 // -------------\r
23 //\r
24 //   INTVEC     -- Exception vector table.\r
25 //   SWITAB     -- Software interrupt vector table.\r
26 //   ICODE      -- Startup (cstartup) and exception code.\r
27 //   DIFUNCT    -- Dynamic initialization vectors used by C++.\r
28 //   CODE       -- Compiler generated code.\r
29 //   CODE_I     -- Compiler generated code declared __ramfunc (executes in RAM)\r
30 //   CODE_ID    -- Initializer for CODE_I (ROM).\r
31 //\r
32 // -------------\r
33 // Data segments - may be placed anywhere in memory.\r
34 // -------------\r
35 //\r
36 //   CSTACK     -- The stack used by C/C++ programs (system and user mode).\r
37 //   IRQ_STACK  -- The stack used by IRQ service routines.\r
38 //   SVC_STACK  -- The stack used in supervisor mode\r
39 //                 (Define other exception stacks as needed for\r
40 //                 FIQ, ABT, UND).\r
41 //   HEAP       -- The heap used by malloc and free in C and new and\r
42 //                 delete in C++.\r
43 //   INITTAB    -- Table containing addresses and sizes of segments that\r
44 //                 need to be initialized at startup (by cstartup).\r
45 //   CHECKSUM   -- The linker places checksum byte(s) in this segment,\r
46 //                 when the -J linker command line option is used.\r
47 //   DATA_y     -- Data objects.\r
48 //\r
49 // Where _y can be one of:\r
50 //\r
51 //   _AN        -- Holds uninitialized located objects, i.e. objects with\r
52 //                 an absolute location given by the @ operator or the\r
53 //                 #pragma location directive. Since these segments\r
54 //                 contain objects which already have a fixed address,\r
55 //                 they should not be mentioned in this linker command\r
56 //                 file.\r
57 //   _C         -- Constants (ROM).\r
58 //   _I         -- Initialized data (RAM).\r
59 //   _ID        -- The original content of _I (copied to _I by cstartup) (ROM).\r
60 //   _N         -- Uninitialized data (RAM).\r
61 //   _Z         -- Zero initialized data (RAM).\r
62 //\r
63 // Note:  Be sure to use end values for the defined address ranges.\r
64 //        Otherwise, the linker may allocate space outside the\r
65 //        intended memory range.\r
66 //*************************************************************************\r
67 \r
68 //************************************************\r
69 // Inform the linker about the CPU family used.\r
70 //************************************************\r
71 \r
72 -carm\r
73 \r
74 //*************************************************************************\r
75 // Segment placement - General information\r
76 //\r
77 // All numbers in the segment placement command lines below are interpreted\r
78 // as hexadecimal unless they are immediately preceded by a '.', which\r
79 // denotes decimal notation. \r
80 //\r
81 // When specifying the segment placement using the -P instead of the -Z\r
82 // option, the linker is free to split each segment into its segment parts\r
83 // and randomly place these parts within the given ranges in order to\r
84 // achieve a more efficient memory usage. One disadvantage, however, is\r
85 // that it is not possible to find the start or end address (using\r
86 // the assembler operators .sfb./.sfe.) of a segment which has been split\r
87 // and reformed. \r
88 //\r
89 // When generating an output file which is to be used for programming\r
90 // external ROM/Flash devices, the -M linker option is very useful \r
91 // (see xlink.pdf for details).\r
92 //*************************************************************************\r
93 \r
94 \r
95 //*************************************************************************\r
96 // Read-only segments mapped to ROM.\r
97 //*************************************************************************\r
98 \r
99 //************************************************\r
100 // Address range for reset and exception\r
101 // vectors (INTVEC).\r
102 // The vector area is 32 bytes, \r
103 // an additional 32 bytes is allocated for the\r
104 // constant table used by ldr PC in cstartup.s79.\r
105 //************************************************\r
106 \r
107 -Z(CODE)INTVEC=0-3F\r
108 \r
109 //************************************************\r
110 // Startup code and exception routines (ICODE).\r
111 //************************************************\r
112 \r
113 -Z(CODE)ICODE,DIFUNCT=8000-FFFFF\r
114 -Z(CODE)SWITAB=8000-FFFFF\r
115 \r
116 //************************************************\r
117 // Code segments may be placed anywhere.\r
118 //************************************************\r
119 \r
120 -Z(CODE)CODE=8000-FFFFF\r
121 \r
122 //************************************************\r
123 // Original ROM location for __ramfunc code copied\r
124 // to and executed from RAM.\r
125 //************************************************\r
126 \r
127 -Z(CONST)CODE_ID=8000-FFFFF\r
128 \r
129 //************************************************\r
130 // Various constants and initializers.\r
131 //************************************************\r
132 \r
133 -Z(CONST)INITTAB,DATA_ID,DATA_C=8000-FFFFF\r
134 -Z(CONST)CHECKSUM=8000-FFFFF\r
135 \r
136 //*************************************************************************\r
137 // Read/write segments mapped to RAM.\r
138 //*************************************************************************\r
139 \r
140 //************************************************\r
141 // Data segments.\r
142 //************************************************\r
143 \r
144 -Z(DATA)DATA_I,DATA_Z,DATA_N=100000-7FFFFF\r
145 \r
146 //************************************************\r
147 // __ramfunc code copied to and executed from RAM.\r
148 //************************************************\r
149 \r
150 -Z(DATA)CODE_I=100000-7FFFFF\r
151 \r
152 //************************************************\r
153 // ICCARM produces code for __ramfunc functions in\r
154 // CODE_I segments. The -Q XLINK command line\r
155 // option redirects XLINK to emit the code in the\r
156 // CODE_ID segment instead, but to keep symbol and\r
157 // debug information associated with the CODE_I\r
158 // segment, where the code will execute.\r
159 //************************************************\r
160 \r
161 -QCODE_I=CODE_ID\r
162 \r
163 //*************************************************************************\r
164 // Stack and heap segments.\r
165 //*************************************************************************\r
166 \r
167 -Z(DATA)CSTACK+200=100000-7FFFFF\r
168 -Z(DATA)IRQ_STACK+100=100000-7FFFFF\r
169 -Z(DATA)HEAP+8000=100000-7FFFFF\r
170 \r
171 //**********************************************************************\r
172 // Output user defined segments\r
173 //**********************************************************************\r
174 \r
175 \r
176 \r
177 //*************************************************************************\r
178 // ELF/DWARF support.\r
179 //\r
180 // Uncomment the line "-Felf" below to generate ELF/DWARF output.\r
181 // Available format specifiers are:\r
182 //\r
183 //   "-yn": Suppress DWARF debug output\r
184 //   "-yp": Multiple ELF program sections\r
185 //   "-yas": Format suitable for debuggers from ARM Ltd (also sets -p flag)\r
186 //\r
187 // "-Felf" and the format specifiers can also be supplied directly as\r
188 // command line options, or selected from the Xlink Output tab in the\r
189 // IAR Embedded Workbench.\r
190 //*************************************************************************\r
191 \r
192 // -Felf\r