|
2665
|
1 # ==================================================================== |
|
|
2 # |
|
|
3 # hal_arm_lpc2xxx_olpcl2294.cdl |
|
|
4 # |
|
|
5 # ARM LPC2XXX OLPCL2294 development board package configuration |
|
|
6 # data |
|
|
7 # |
|
|
8 # ==================================================================== |
|
|
9 #####ECOSGPLCOPYRIGHTBEGIN#### |
|
|
10 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
|
|
11 ## Copyright (C) 2008 eCosCentric Limited |
|
|
12 ## |
|
|
13 ## eCos is free software; you can redistribute it and/or modify it under |
|
|
14 ## the terms of the GNU General Public License as published by the Free |
|
|
15 ## Software Foundation; either version 2 or (at your option) any later version. |
|
|
16 ## |
|
|
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY |
|
|
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
|
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
|
20 ## for more details. |
|
|
21 ## |
|
|
22 ## You should have received a copy of the GNU General Public License along |
|
|
23 ## with eCos; if not, write to the Free Software Foundation, Inc., |
|
|
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
|
|
25 ## |
|
|
26 ## As a special exception, if other files instantiate templates or use macros |
|
|
27 ## or inline functions from this file, or you compile this file and link it |
|
|
28 ## with other works to produce a work based on this file, this file does not |
|
|
29 ## by itself cause the resulting work to be covered by the GNU General Public |
|
|
30 ## License. However the source code for this file must still be made available |
|
|
31 ## in accordance with section (3) of the GNU General Public License. |
|
|
32 ## |
|
|
33 ## This exception does not invalidate any other reasons why a work based on |
|
|
34 ## this file might be covered by the GNU General Public License. |
|
|
35 ## ------------------------------------------- |
|
|
36 #####ECOSGPLCOPYRIGHTEND#### |
|
|
37 # ==================================================================== |
|
|
38 ######DESCRIPTIONBEGIN#### |
|
|
39 # |
|
|
40 # Author(s): Sergei Gavrikov |
|
|
41 # Contributors: Sergei Gavrikov |
|
|
42 # Date: 2008-08-31 |
|
|
43 # |
|
|
44 #####DESCRIPTIONEND#### |
|
|
45 # |
|
|
46 # ==================================================================== |
|
|
47 |
|
|
48 cdl_package CYGPKG_HAL_ARM_LPC2XXX_OLPCL2294 { |
|
|
49 display "Olimex LPC-L2294-1MB development board HAL" |
|
|
50 parent CYGPKG_HAL_ARM_LPC2XXX |
|
|
51 define_header hal_arm_lpc2xxx_olpcl2294.h |
|
|
52 include_dir cyg/hal |
|
|
53 hardware |
|
|
54 description " |
|
|
55 The OLPCL2294 HAL package provides the support needed to run |
|
|
56 eCos on Olimex LPC-L2294-1MB development board." |
|
|
57 |
|
|
58 compile olpcl2294_misc.c |
|
|
59 |
|
|
60 requires { CYGHWR_HAL_ARM_LPC2XXX == "LPC2294" } |
|
|
61 |
|
|
62 define_proc { |
|
|
63 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>" |
|
|
64 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_arm_lpc2xxx.h>" |
|
|
65 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_lpc2xxx_olpcl2294.h>" |
|
|
66 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI-S\"" |
|
|
67 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Olimex LPC-L2294 development board\"" |
|
|
68 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\"" |
|
|
69 } |
|
|
70 |
|
|
71 cdl_component CYG_HAL_STARTUP { |
|
|
72 display "Startup type" |
|
|
73 flavor data |
|
|
74 default_value {"RAM"} |
|
|
75 legal_values {"RAM" "ROM"} |
|
|
76 no_define |
|
|
77 define -file system.h CYG_HAL_STARTUP |
|
|
78 description "Choose RAM or ROM startup type." |
|
|
79 } |
|
|
80 |
|
|
81 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT { |
|
|
82 display "Default console channel." |
|
|
83 flavor data |
|
|
84 calculated 0 |
|
|
85 } |
|
|
86 |
|
|
87 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS { |
|
|
88 display "Number of communication channels on the board" |
|
|
89 flavor data |
|
|
90 calculated 1 |
|
|
91 } |
|
|
92 |
|
|
93 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL { |
|
|
94 display "Debug serial port" |
|
|
95 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE |
|
|
96 flavor data |
|
|
97 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 |
|
|
98 default_value 0 |
|
|
99 description " |
|
|
100 There is one serial connector on the board." |
|
|
101 } |
|
|
102 |
|
|
103 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL { |
|
|
104 display "Diagnostic serial port" |
|
|
105 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE |
|
|
106 flavor data |
|
|
107 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 |
|
|
108 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT |
|
|
109 description " |
|
|
110 There is one serial connector on the board." |
|
|
111 } |
|
|
112 |
|
|
113 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD { |
|
|
114 display "Diagnostic serial port baud rate" |
|
|
115 flavor data |
|
|
116 legal_values 9600 19200 38400 57600 115200 |
|
|
117 default_value 38400 |
|
|
118 description " |
|
|
119 This option selects the baud rate used for the diagnostic |
|
|
120 port." |
|
|
121 } |
|
|
122 |
|
|
123 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD { |
|
|
124 display "GDB serial port baud rate" |
|
|
125 flavor data |
|
|
126 legal_values 9600 19200 38400 57600 115200 |
|
|
127 default_value 38400 |
|
|
128 description " |
|
|
129 This option controls the baud rate used for the GDB |
|
|
130 connection." |
|
|
131 } |
|
|
132 |
|
|
133 # Real-time clock/counter specifics |
|
|
134 cdl_option CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ { |
|
|
135 display "CPU xtal frequency" |
|
|
136 flavor data |
|
|
137 default_value {14745600} |
|
|
138 } |
|
|
139 |
|
|
140 cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL { |
|
|
141 display "CPU PLL multiplier" |
|
|
142 flavor data |
|
|
143 default_value {4} |
|
|
144 } |
|
|
145 |
|
|
146 cdl_option CYGNUM_HAL_ARM_LPC2XXX_CLOCK_SPEED { |
|
|
147 display "CPU clock speed" |
|
|
148 flavor data |
|
|
149 calculated { CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL * |
|
|
150 CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ } |
|
|
151 } |
|
|
152 |
|
|
153 cdl_component CYGBLD_GLOBAL_OPTIONS { |
|
|
154 display "Global build options" |
|
|
155 flavor none |
|
|
156 parent CYGPKG_NONE |
|
|
157 description " |
|
|
158 Global build options including control over compiler flags, |
|
|
159 linker flags and choice of toolchain." |
|
|
160 |
|
|
161 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX { |
|
|
162 display "Global command prefix" |
|
|
163 flavor data |
|
|
164 no_define |
|
|
165 default_value { "arm-eabi" } |
|
|
166 description " |
|
|
167 This option specifies the command prefix used when |
|
|
168 invoking the build tools." |
|
|
169 } |
|
|
170 |
|
|
171 cdl_option CYGBLD_GLOBAL_CFLAGS { |
|
|
172 display "Global compiler flags" |
|
|
173 flavor data |
|
|
174 no_define |
|
|
175 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" } |
|
|
176 description " |
|
|
177 This option controls the global compiler flags which |
|
|
178 are used to compile all packages by default. Individual |
|
|
179 packages may define options which override these global |
|
|
180 flags." |
|
|
181 } |
|
|
182 |
|
|
183 cdl_option CYGBLD_GLOBAL_LDFLAGS { |
|
|
184 display "Global linker flags" |
|
|
185 flavor data |
|
|
186 no_define |
|
|
187 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib" } |
|
|
188 description " |
|
|
189 This option controls the global linker flags. Individual |
|
|
190 packages may define options which override these global |
|
|
191 flags." |
|
|
192 } |
|
|
193 } |
|
|
194 |
|
|
195 cdl_option CYGSEM_HAL_ROM_MONITOR { |
|
|
196 display "Behave as a ROM monitor" |
|
|
197 flavor bool |
|
|
198 default_value 0 |
|
|
199 parent CYGPKG_HAL_ROM_MONITOR |
|
|
200 requires { CYG_HAL_STARTUP == "ROM" } |
|
|
201 description " |
|
|
202 Enable this option if this program is to be used as a |
|
|
203 ROM monitor, i.e. applications will be loaded into RAM on |
|
|
204 the board, and this ROM monitor may process exceptions or |
|
|
205 interrupts generated from the application. This enables |
|
|
206 features such as utilizing a separate interrupt stack when |
|
|
207 exceptions are generated." |
|
|
208 } |
|
|
209 |
|
|
210 cdl_option CYGSEM_HAL_USE_ROM_MONITOR { |
|
|
211 display "Work with a ROM monitor" |
|
|
212 flavor booldata |
|
|
213 legal_values { "Generic" "GDB_stubs" } |
|
|
214 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 } |
|
|
215 parent CYGPKG_HAL_ROM_MONITOR |
|
|
216 requires { CYG_HAL_STARTUP == "RAM" } |
|
|
217 description " |
|
|
218 Support can be enabled for different varieties of ROM |
|
|
219 monitor. This support changes various eCos semantics such |
|
|
220 as the encoding of diagnostic output, or the overriding of |
|
|
221 hardware interrupt vectors. |
|
|
222 Firstly there is \"Generic\" support which prevents the |
|
|
223 HAL from overriding the hardware vectors that it does not |
|
|
224 use, to instead allow an installed ROM monitor to handle |
|
|
225 them. This is the most basic support which is likely to be |
|
|
226 common to most implementations of ROM monitor. |
|
|
227 \"GDB_stubs\" provides support when GDB stubs are included |
|
|
228 in the ROM monitor or boot ROM." |
|
|
229 } |
|
|
230 |
|
|
231 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS { |
|
|
232 display "Redboot HAL options" |
|
|
233 flavor none |
|
|
234 no_define |
|
|
235 parent CYGPKG_REDBOOT |
|
|
236 active_if CYGPKG_REDBOOT |
|
|
237 description " |
|
|
238 This option lists the target's requirements for a valid |
|
|
239 Redboot configuration." |
|
|
240 |
|
|
241 cdl_option CYGBLD_BUILD_REDBOOT_BIN { |
|
|
242 display "Build Redboot ROM binary image" |
|
|
243 active_if CYGBLD_BUILD_REDBOOT |
|
|
244 requires { !CYGBLD_BUILD_REDBOOT_WITH_EXEC } |
|
|
245 default_value 1 |
|
|
246 no_define |
|
|
247 description " |
|
|
248 This option enables the conversion of the Redboot ELF |
|
|
249 image to a binary image suitable for ROM programming." |
|
|
250 |
|
|
251 compile -library=libextras.a redboot_cmds.c |
|
|
252 |
|
|
253 compile -library=libextras.a redboot_cmds.c |
|
|
254 |
|
|
255 make -priority 325 { |
|
|
256 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf |
|
|
257 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) |
|
|
258 $(OBJCOPY) -O srec $< $(@:.bin=.srec) |
|
|
259 $(OBJCOPY) -O ihex $< $(@:.bin=.hex) |
|
|
260 $(OBJCOPY) -O binary $< $@ |
|
|
261 } |
|
|
262 |
|
|
263 } |
|
|
264 } |
|
|
265 |
|
|
266 cdl_component CYGHWR_MEMORY_LAYOUT { |
|
|
267 display "Memory layout" |
|
|
268 flavor data |
|
|
269 no_define |
|
|
270 calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_lpc2xxx_olpcl2294_ram" : |
|
|
271 "arm_lpc2xxx_olpcl2294_rom" } |
|
|
272 cdl_option CYGHWR_MEMORY_LAYOUT_LDI { |
|
|
273 display "Memory layout linker script fragment" |
|
|
274 flavor data |
|
|
275 no_define |
|
|
276 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI |
|
|
277 calculated { (CYG_HAL_STARTUP == "RAM") ? |
|
|
278 "<pkgconf/mlt_arm_lpc2xxx_olpcl2294_ram.ldi>" : |
|
|
279 "<pkgconf/mlt_arm_lpc2xxx_olpcl2294_rom.ldi>" } |
|
|
280 } |
|
|
281 |
|
|
282 cdl_option CYGHWR_MEMORY_LAYOUT_H { |
|
|
283 display "Memory layout header file" |
|
|
284 flavor data |
|
|
285 no_define |
|
|
286 define -file system.h CYGHWR_MEMORY_LAYOUT_H |
|
|
287 calculated { (CYG_HAL_STARTUP == "RAM") ? |
|
|
288 "<pkgconf/mlt_arm_lpc2xxx_olpcl2294_ram.h>" : |
|
|
289 "<pkgconf/mlt_arm_lpc2xxx_olpcl2294_rom.h>" } |
|
|
290 } |
|
|
291 } |
|
|
292 } |
|
|
293 |