1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# hal_arm_lpc24xx_ea2468.cdl
|
4 |
|
|
#
|
5 |
|
|
# Embedded Artists LPC2468 OEM Board HAL package configuration data
|
6 |
|
|
#
|
7 |
|
|
# ====================================================================
|
8 |
|
|
## ####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
## -------------------------------------------
|
10 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc.
|
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
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
## for more details.
|
22 |
|
|
##
|
23 |
|
|
## You should have received a copy of the GNU General Public License
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
# ====================================================================
|
40 |
|
|
######DESCRIPTIONBEGIN####
|
41 |
|
|
#
|
42 |
|
|
# Author(s): Uwe Kindler
|
43 |
|
|
# Contributors: Uwe Kindler
|
44 |
|
|
# Date: 2008-07-06
|
45 |
|
|
#
|
46 |
|
|
#####DESCRIPTIONEND####
|
47 |
|
|
#
|
48 |
|
|
# ====================================================================
|
49 |
|
|
|
50 |
|
|
cdl_package CYGPKG_HAL_ARM_LPC24XX_EA2468 {
|
51 |
|
|
display "Embedded Artists LPC2468 OEM Board board HAL"
|
52 |
|
|
parent CYGPKG_HAL_ARM_LPC24XX
|
53 |
|
|
define_header hal_arm_lpc24xx_ea2468.h
|
54 |
|
|
include_dir cyg/hal
|
55 |
|
|
hardware
|
56 |
|
|
implements CYGINT_DEVS_CAN_LPC2XXX_CAN0
|
57 |
|
|
implements CYGINT_DEVS_CAN_LPC2XXX_CAN1
|
58 |
|
|
implements CYGINT_IO_SERIAL_LPC24XX_UART0
|
59 |
|
|
implements CYGINT_IO_SERIAL_LPC24XX_UART1
|
60 |
|
|
description "
|
61 |
|
|
The LPC2468 OEM HAL package provides the support needed to run
|
62 |
|
|
eCos on Embedded Artists LPC2468 OEM 16/32 boards."
|
63 |
|
|
|
64 |
|
|
compile ea2468_misc.c platform_i2c.c
|
65 |
|
|
|
66 |
|
|
requires { CYGHWR_HAL_ARM_LPC24XX == "LPC2468" }
|
67 |
|
|
requires { is_active(CYGPKG_DEVS_ETH_PHY) implies
|
68 |
|
|
(1 == CYGHWR_DEVS_ETH_PHY_KSZ8001) }
|
69 |
|
|
|
70 |
|
|
define_proc {
|
71 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H "
|
72 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H "
|
73 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
|
74 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI-S\""
|
75 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Embedded Artists LPC2468 OEM Board\""
|
76 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
|
77 |
|
|
}
|
78 |
|
|
|
79 |
|
|
cdl_option CYGNUM_HAL_ARM_LPC24XX_XTAL_FREQ {
|
80 |
|
|
display "CPU xtal frequency"
|
81 |
|
|
parent CYGNUM_HAL_ARM_LPC24XX_CLOCKING
|
82 |
|
|
flavor data
|
83 |
|
|
default_value {12000000}
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
cdl_option CYGNUM_HAL_ARM_LPC24XX_MAX_CLOCK_SPEED {
|
87 |
|
|
display "Max. CPU clock speed"
|
88 |
|
|
parent CYGNUM_HAL_ARM_LPC24XX_CLOCKING
|
89 |
|
|
flavor data
|
90 |
|
|
calculated {57600000}
|
91 |
|
|
requires CYGNUM_HAL_ARM_LPC24XX_CLOCK_SPEED <= 57600000
|
92 |
|
|
description "
|
93 |
|
|
Due to a silicon errata, the highest internal core
|
94 |
|
|
clock frequency (at the time of writing this document)
|
95 |
|
|
is 57.6 MHz. This corresponds to an internal PLL
|
96 |
|
|
frequency of 288 MHz that is divided by 6 to get a 48
|
97 |
|
|
MHz clock for the core and the USB interface."
|
98 |
|
|
}
|
99 |
|
|
|
100 |
|
|
cdl_component CYG_HAL_STARTUP {
|
101 |
|
|
display "Startup type"
|
102 |
|
|
flavor data
|
103 |
|
|
default_value {"ROM"}
|
104 |
|
|
legal_values {"RAM" "ROM"}
|
105 |
|
|
no_define
|
106 |
|
|
define -file system.h CYG_HAL_STARTUP
|
107 |
|
|
description "
|
108 |
|
|
Choose RAM or ROM startup type. Typically ROM startup is used for
|
109 |
|
|
building RedBoot. RedBoot runs from internal on chip flash of
|
110 |
|
|
LPC24xx. Use RAM startup for building eCos applications.
|
111 |
|
|
RedBoot manages the external on board flash devices. It copies
|
112 |
|
|
the eCos application image from FLASH to on board SDRAM
|
113 |
|
|
and then starts the eCos application."
|
114 |
|
|
}
|
115 |
|
|
|
116 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
|
117 |
|
|
display "Number of communication channels on the board"
|
118 |
|
|
flavor data
|
119 |
|
|
calculated 2
|
120 |
|
|
description "
|
121 |
|
|
Channel 0: UART0, Channel 1: UART1"
|
122 |
|
|
}
|
123 |
|
|
|
124 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
|
125 |
|
|
display "Default console channel."
|
126 |
|
|
active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
|
127 |
|
|
flavor data
|
128 |
|
|
calculated 0
|
129 |
|
|
}
|
130 |
|
|
|
131 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
|
132 |
|
|
display "Debug serial port"
|
133 |
|
|
active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
|
134 |
|
|
flavor data
|
135 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
136 |
|
|
default_value 0
|
137 |
|
|
description "
|
138 |
|
|
The LPC2468 OEM board has two serial channels. The first
|
139 |
|
|
channel, UART0, is routed to an USB-to-serial bridge and
|
140 |
|
|
the second channel, UART1, is available on the Sub-D9
|
141 |
|
|
RS232 connector. This option chooses which channel will be
|
142 |
|
|
used to connect to a host running GDB."
|
143 |
|
|
}
|
144 |
|
|
|
145 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
|
146 |
|
|
display "GDB serial port baud rate"
|
147 |
|
|
flavor data
|
148 |
|
|
legal_values 9600 19200 38400 57600 115200
|
149 |
|
|
default_value 38400
|
150 |
|
|
description "
|
151 |
|
|
This option controls the baud rate used for the GDB
|
152 |
|
|
connection."
|
153 |
|
|
}
|
154 |
|
|
|
155 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
|
156 |
|
|
display "Diagnostic serial port"
|
157 |
|
|
active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
|
158 |
|
|
flavor data
|
159 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
160 |
|
|
default_value 0
|
161 |
|
|
description "
|
162 |
|
|
The LPC2468 OEM board has two serial ports. This option
|
163 |
|
|
chooses which port will be used for diagnostic output."
|
164 |
|
|
}
|
165 |
|
|
|
166 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
|
167 |
|
|
display "Diagnostic serial port baud rate"
|
168 |
|
|
flavor data
|
169 |
|
|
legal_values 9600 19200 38400 57600 115200
|
170 |
|
|
default_value 38400
|
171 |
|
|
description "
|
172 |
|
|
This option selects the baud rate used for the diagnostic port."
|
173 |
|
|
}
|
174 |
|
|
|
175 |
|
|
cdl_option CYGHWR_HAL_ARM_LPC24XX_EA2468_DATA_BUS_WIDTH {
|
176 |
|
|
display "Data bus width"
|
177 |
|
|
flavor data
|
178 |
|
|
default_value { 16 }
|
179 |
|
|
legal_values { 16 32 }
|
180 |
|
|
description "
|
181 |
|
|
The LPC2468 OEM board is sold in two different data bus
|
182 |
|
|
versions - a 16-bit version and a 32-bit version."
|
183 |
|
|
}
|
184 |
|
|
|
185 |
|
|
|
186 |
|
|
cdl_component CYGBLD_GLOBAL_OPTIONS {
|
187 |
|
|
display "Global build options"
|
188 |
|
|
flavor none
|
189 |
|
|
parent CYGPKG_NONE
|
190 |
|
|
description "
|
191 |
|
|
Global build options including control over compiler flags,
|
192 |
|
|
linker flags and choice of toolchain."
|
193 |
|
|
|
194 |
|
|
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
|
195 |
|
|
display "Global command prefix"
|
196 |
|
|
flavor data
|
197 |
|
|
no_define
|
198 |
|
|
default_value { "arm-eabi"}
|
199 |
|
|
description "
|
200 |
|
|
This option specifies the command prefix used when
|
201 |
|
|
invoking the build tools."
|
202 |
|
|
}
|
203 |
|
|
|
204 |
|
|
cdl_option CYGBLD_GLOBAL_CFLAGS {
|
205 |
|
|
display "Global compiler flags"
|
206 |
|
|
flavor data
|
207 |
|
|
no_define
|
208 |
|
|
default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
|
209 |
|
|
"-mcpu=arm7tdmi -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
|
210 |
|
|
description "
|
211 |
|
|
This option controls the global compiler flags which
|
212 |
|
|
are used to compile all packages by default. Individual
|
213 |
|
|
packages may define options which override these global
|
214 |
|
|
flags."
|
215 |
|
|
}
|
216 |
|
|
|
217 |
|
|
cdl_option CYGBLD_GLOBAL_LDFLAGS {
|
218 |
|
|
display "Global linker flags"
|
219 |
|
|
flavor data
|
220 |
|
|
no_define
|
221 |
|
|
default_value { CYGBLD_ARCH_LDFLAGS . "-mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib" }
|
222 |
|
|
description "
|
223 |
|
|
This option controls the global linker flags. Individual
|
224 |
|
|
packages may define options which override these global
|
225 |
|
|
flags."
|
226 |
|
|
}
|
227 |
|
|
}
|
228 |
|
|
|
229 |
|
|
cdl_option CYGSEM_HAL_ROM_MONITOR {
|
230 |
|
|
display "Behave as a ROM monitor"
|
231 |
|
|
flavor bool
|
232 |
|
|
default_value 0
|
233 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
234 |
|
|
requires { CYG_HAL_STARTUP == "ROM"}
|
235 |
|
|
description "
|
236 |
|
|
Enable this option if this program is to be used as a
|
237 |
|
|
ROM monitor, i.e. applications will be loaded into RAM on
|
238 |
|
|
the board, and this ROM monitor may process exceptions or
|
239 |
|
|
interrupts generated from the application. This enables
|
240 |
|
|
features such as utilizing a separate interrupt stack when
|
241 |
|
|
exceptions are generated."
|
242 |
|
|
}
|
243 |
|
|
|
244 |
|
|
cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
|
245 |
|
|
display "Work with a ROM monitor"
|
246 |
|
|
flavor booldata
|
247 |
|
|
legal_values { "Generic" "GDB_stubs" }
|
248 |
|
|
default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
|
249 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
250 |
|
|
requires { CYG_HAL_STARTUP == "RAM" }
|
251 |
|
|
description "
|
252 |
|
|
Support can be enabled for different varieties of ROM
|
253 |
|
|
monitor. This support changes various eCos semantics such
|
254 |
|
|
as the encoding of diagnostic output, or the overriding of
|
255 |
|
|
hardware interrupt vectors.
|
256 |
|
|
Firstly there is \"Generic\" support which prevents the
|
257 |
|
|
HAL from overriding the hardware vectors that it does not
|
258 |
|
|
use, to instead allow an installed ROM monitor to handle
|
259 |
|
|
them. This is the most basic support which is likely to be
|
260 |
|
|
common to most implementations of ROM monitor.
|
261 |
|
|
\"GDB_stubs\" provides support when GDB stubs are included
|
262 |
|
|
in the ROM monitor or boot ROM."
|
263 |
|
|
}
|
264 |
|
|
|
265 |
|
|
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
|
266 |
|
|
display "Redboot HAL options"
|
267 |
|
|
flavor none
|
268 |
|
|
no_define
|
269 |
|
|
parent CYGPKG_REDBOOT
|
270 |
|
|
active_if CYGPKG_REDBOOT
|
271 |
|
|
description "
|
272 |
|
|
This option lists the target's requirements for a valid
|
273 |
|
|
Redboot configuration."
|
274 |
|
|
|
275 |
|
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN {
|
276 |
|
|
display "Build Redboot ROM binary image"
|
277 |
|
|
active_if CYGBLD_BUILD_REDBOOT
|
278 |
|
|
requires { !CYGBLD_BUILD_REDBOOT_WITH_EXEC }
|
279 |
|
|
default_value 1
|
280 |
|
|
no_define
|
281 |
|
|
description "
|
282 |
|
|
This option enables the conversion of the Redboot ELF
|
283 |
|
|
image to a binary image suitable for ROM programming."
|
284 |
|
|
|
285 |
|
|
make -priority 325 {
|
286 |
|
|
/bin/redboot.bin : /bin/redboot.elf
|
287 |
|
|
$(OBJCOPY) --strip-debug $< $(@:.bin=.img)
|
288 |
|
|
$(OBJCOPY) -O srec $< $(@:.bin=.srec)
|
289 |
|
|
$(OBJCOPY) -O ihex $< $(@:.bin=.hex)
|
290 |
|
|
$(OBJCOPY) -O binary $< $@
|
291 |
|
|
}
|
292 |
|
|
|
293 |
|
|
}
|
294 |
|
|
}
|
295 |
|
|
|
296 |
|
|
|
297 |
|
|
cdl_component CYGHWR_MEMORY_LAYOUT {
|
298 |
|
|
display "Memory layout"
|
299 |
|
|
flavor data
|
300 |
|
|
no_define
|
301 |
|
|
calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_lpc24xx_ea2468_ram" :
|
302 |
|
|
"arm_lpc24xx_ea2468_rom" }
|
303 |
|
|
|
304 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
|
305 |
|
|
display "Memory layout linker script fragment"
|
306 |
|
|
flavor data
|
307 |
|
|
no_define
|
308 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
|
309 |
|
|
calculated { (CYG_HAL_STARTUP == "RAM") ?
|
310 |
|
|
"" :
|
311 |
|
|
"" }
|
312 |
|
|
}
|
313 |
|
|
|
314 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_H {
|
315 |
|
|
display "Memory layout header file"
|
316 |
|
|
flavor data
|
317 |
|
|
no_define
|
318 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_H
|
319 |
|
|
calculated { (CYG_HAL_STARTUP == "RAM") ?
|
320 |
|
|
"" :
|
321 |
|
|
"" }
|
322 |
|
|
}
|
323 |
|
|
}
|
324 |
|
|
|
325 |
|
|
cdl_option CYGPKG_HAL_ARM_LPC24XX_EA2468_TESTS {
|
326 |
|
|
display "Tests for LPC2468 OEM board HAL"
|
327 |
|
|
flavor data
|
328 |
|
|
no_define
|
329 |
|
|
calculated { "tests/i2c_eeprom" }
|
330 |
|
|
description "
|
331 |
|
|
This option specifies the set of tests for the EA2468
|
332 |
|
|
OEM board HAL."
|
333 |
|
|
}
|
334 |
|
|
|
335 |
|
|
}
|