|
2664
|
1 # ==================================================================== |
|
|
2 # |
|
|
3 # hal_arm_lpc2xxx_olpce2294.cdl |
|
|
4 # |
|
|
5 # ARM LPC2XXX OLPCE2294 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_OLPCE2294 { |
|
|
49 display "Olimex LPC-E2294 development board HAL" |
|
|
50 parent CYGPKG_HAL_ARM_LPC2XXX |
|
|
51 define_header hal_arm_lpc2xxx_olpce2294.h |
|
|
52 include_dir cyg/hal |
|
|
53 hardware |
|
|
54 description " |
|
|
55 The OLPCE2294 HAL package provides the support needed to run |
|
|
56 eCos on Olimex LPC-E2294 development board." |
|
|
57 |
|
|
58 compile olpce2294_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_olpce2294.h>" |
|
|
66 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI-S\"" |
|
|
67 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Olimex LPC-E2294 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 3 |
|
|
91 description " |
|
|
92 Channel 0: UART0, Channel 1: UART1, Channel 2: LCD." |
|
|
93 } |
|
|
94 |
|
|
95 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL { |
|
|
96 display "Debug serial port" |
|
|
97 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE |
|
|
98 flavor data |
|
|
99 legal_values 0 to 1 |
|
|
100 default_value 0 |
|
|
101 description " |
|
|
102 Olimex LPC-E2294 board has two serial ports. This option |
|
|
103 chooses which port will be used to connect to a host |
|
|
104 running GDB." |
|
|
105 } |
|
|
106 |
|
|
107 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL { |
|
|
108 display "Diagnostic serial port" |
|
|
109 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE |
|
|
110 flavor data |
|
|
111 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1 |
|
|
112 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT |
|
|
113 description " |
|
|
114 Olimex LPC-E2294 board has two serial ports and a LCD. This |
|
|
115 option chooses which port will be used for diagnostic |
|
|
116 output." |
|
|
117 } |
|
|
118 |
|
|
119 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD { |
|
|
120 display "Diagnostic serial port baud rate" |
|
|
121 flavor data |
|
|
122 legal_values 9600 19200 38400 57600 115200 |
|
|
123 default_value 38400 |
|
|
124 description " |
|
|
125 This option selects the baud rate used for the diagnostic |
|
|
126 port." |
|
|
127 } |
|
|
128 |
|
|
129 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD { |
|
|
130 display "GDB serial port baud rate" |
|
|
131 flavor data |
|
|
132 legal_values 9600 19200 38400 57600 115200 |
|
|
133 default_value 38400 |
|
|
134 description " |
|
|
135 This option controls the baud rate used for the GDB |
|
|
136 connection." |
|
|
137 } |
|
|
138 |
|
|
139 # Real-time clock/counter specifics |
|
|
140 cdl_option CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ { |
|
|
141 display "CPU xtal frequency" |
|
|
142 flavor data |
|
|
143 default_value {14745600} |
|
|
144 } |
|
|
145 |
|
|
146 cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL { |
|
|
147 display "CPU PLL multiplier" |
|
|
148 flavor data |
|
|
149 default_value {4} |
|
|
150 } |
|
|
151 |
|
|
152 cdl_option CYGNUM_HAL_ARM_LPC2XXX_CLOCK_SPEED { |
|
|
153 display "CPU clock speed" |
|
|
154 flavor data |
|
|
155 calculated { CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL * |
|
|
156 CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ } |
|
|
157 } |
|
|
158 |
|
|
159 cdl_component CYGBLD_GLOBAL_OPTIONS { |
|
|
160 display "Global build options" |
|
|
161 flavor none |
|
|
162 parent CYGPKG_NONE |
|
|
163 description " |
|
|
164 Global build options including control over compiler flags, |
|
|
165 linker flags and choice of toolchain." |
|
|
166 |
|
|
167 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX { |
|
|
168 display "Global command prefix" |
|
|
169 flavor data |
|
|
170 no_define |
|
|
171 default_value { "arm-eabi" } |
|
|
172 description " |
|
|
173 This option specifies the command prefix used when |
|
|
174 invoking the build tools." |
|
|
175 } |
|
|
176 |
|
|
177 cdl_option CYGBLD_GLOBAL_CFLAGS { |
|
|
178 display "Global compiler flags" |
|
|
179 flavor data |
|
|
180 no_define |
|
|
181 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" } |
|
|
182 description " |
|
|
183 This option controls the global compiler flags which |
|
|
184 are used to compile all packages by default. Individual |
|
|
185 packages may define options which override these global |
|
|
186 flags." |
|
|
187 } |
|
|
188 |
|
|
189 cdl_option CYGBLD_GLOBAL_LDFLAGS { |
|
|
190 display "Global linker flags" |
|
|
191 flavor data |
|
|
192 no_define |
|
|
193 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib" } |
|
|
194 description " |
|
|
195 This option controls the global linker flags. Individual |
|
|
196 packages may define options which override these global |
|
|
197 flags." |
|
|
198 } |
|
|
199 } |
|
|
200 |
|
|
201 cdl_option CYGSEM_HAL_ROM_MONITOR { |
|
|
202 display "Behave as a ROM monitor" |
|
|
203 flavor bool |
|
|
204 default_value 0 |
|
|
205 parent CYGPKG_HAL_ROM_MONITOR |
|
|
206 requires { CYG_HAL_STARTUP == "ROM"} |
|
|
207 description " |
|
|
208 Enable this option if this program is to be used as a |
|
|
209 ROM monitor, i.e. applications will be loaded into RAM on |
|
|
210 the board, and this ROM monitor may process exceptions or |
|
|
211 interrupts generated from the application. This enables |
|
|
212 features such as utilizing a separate interrupt stack when |
|
|
213 exceptions are generated." |
|
|
214 } |
|
|
215 |
|
|
216 cdl_option CYGSEM_HAL_USE_ROM_MONITOR { |
|
|
217 display "Work with a ROM monitor" |
|
|
218 flavor booldata |
|
|
219 legal_values { "Generic" "GDB_stubs" } |
|
|
220 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 } |
|
|
221 parent CYGPKG_HAL_ROM_MONITOR |
|
|
222 requires { CYG_HAL_STARTUP == "RAM" } |
|
|
223 description " |
|
|
224 Support can be enabled for different varieties of ROM |
|
|
225 monitor. This support changes various eCos semantics such |
|
|
226 as the encoding of diagnostic output, or the overriding of |
|
|
227 hardware interrupt vectors. |
|
|
228 Firstly there is \"Generic\" support which prevents the |
|
|
229 HAL from overriding the hardware vectors that it does not |
|
|
230 use, to instead allow an installed ROM monitor to handle |
|
|
231 them. This is the most basic support which is likely to be |
|
|
232 common to most implementations of ROM monitor. |
|
|
233 \"GDB_stubs\" provides support when GDB stubs are included |
|
|
234 in the ROM monitor or boot ROM." |
|
|
235 } |
|
|
236 |
|
|
237 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS { |
|
|
238 display "Redboot HAL options" |
|
|
239 flavor none |
|
|
240 no_define |
|
|
241 parent CYGPKG_REDBOOT |
|
|
242 active_if CYGPKG_REDBOOT |
|
|
243 description " |
|
|
244 This option lists the target's requirements for a valid |
|
|
245 Redboot configuration." |
|
|
246 |
|
|
247 cdl_option CYGBLD_BUILD_REDBOOT_BIN { |
|
|
248 display "Build Redboot ROM binary image" |
|
|
249 active_if CYGBLD_BUILD_REDBOOT |
|
|
250 requires { !CYGBLD_BUILD_REDBOOT_WITH_EXEC } |
|
|
251 default_value 1 |
|
|
252 no_define |
|
|
253 description " |
|
|
254 This option enables the conversion of the Redboot ELF |
|
|
255 image to a binary image suitable for ROM programming." |
|
|
256 |
|
|
257 compile -library=libextras.a redboot_cmds.c |
|
|
258 |
|
|
259 make -priority 325 { |
|
|
260 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf |
|
|
261 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) |
|
|
262 $(OBJCOPY) -O srec $< $(@:.bin=.srec) |
|
|
263 $(OBJCOPY) -O ihex $< $(@:.bin=.hex) |
|
|
264 $(OBJCOPY) -O binary $< $@ |
|
|
265 } |
|
|
266 |
|
|
267 } |
|
|
268 } |
|
|
269 |
|
|
270 cdl_component CYGHWR_MEMORY_LAYOUT { |
|
|
271 display "Memory layout" |
|
|
272 flavor data |
|
|
273 no_define |
|
|
274 calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_lpc2xxx_olpce2294_ram" : |
|
|
275 "arm_lpc2xxx_olpce2294_rom" } |
|
|
276 |
|
|
277 cdl_option CYGHWR_MEMORY_LAYOUT_LDI { |
|
|
278 display "Memory layout linker script fragment" |
|
|
279 flavor data |
|
|
280 no_define |
|
|
281 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI |
|
|
282 calculated { (CYG_HAL_STARTUP == "RAM") ? |
|
|
283 "<pkgconf/mlt_arm_lpc2xxx_olpce2294_ram.ldi>" : |
|
|
284 "<pkgconf/mlt_arm_lpc2xxx_olpce2294_rom.ldi>" } |
|
|
285 } |
|
|
286 |
|
|
287 cdl_option CYGHWR_MEMORY_LAYOUT_H { |
|
|
288 display "Memory layout header file" |
|
|
289 flavor data |
|
|
290 no_define |
|
|
291 define -file system.h CYGHWR_MEMORY_LAYOUT_H |
|
|
292 calculated { (CYG_HAL_STARTUP == "RAM") ? |
|
|
293 "<pkgconf/mlt_arm_lpc2xxx_olpce2294_ram.h>" : |
|
|
294 "<pkgconf/mlt_arm_lpc2xxx_olpce2294_rom.h>" } |
|
|
295 } |
|
|
296 } |
|
|
297 } |
|
|
298 |