1 # ====================================================================
3 # hal_arm_lpc24xx_ea2468.cdl
5 # Embedded Artists LPC2468 OEM Board HAL package configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
10 ## Copyright (C) 2008 eCosCentric Limited
12 ## eCos is free software; you can redistribute it and/or modify it under
13 ## the terms of the GNU General Public License as published by the Free
14 ## Software Foundation; either version 2 or (at your option) any later version.
16 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 ## You should have received a copy of the GNU General Public License along
22 ## with eCos; if not, write to the Free Software Foundation, Inc.,
23 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 ## As a special exception, if other files instantiate templates or use macros
26 ## or inline functions from this file, or you compile this file and link it
27 ## with other works to produce a work based on this file, this file does not
28 ## by itself cause the resulting work to be covered by the GNU General Public
29 ## License. However the source code for this file must still be made available
30 ## in accordance with section (3) of the GNU General Public License.
32 ## This exception does not invalidate any other reasons why a work based on
33 ## this file might be covered by the GNU General Public License.
34 ## -------------------------------------------
35 #####ECOSGPLCOPYRIGHTEND####
36 # ====================================================================
37 ######DESCRIPTIONBEGIN####
39 # Author(s): Uwe Kindler
40 # Contributors: Uwe Kindler
43 #####DESCRIPTIONEND####
45 # ====================================================================
47 cdl_package CYGPKG_HAL_ARM_LPC24XX_EA2468 {
48 display "Embedded Artists LPC2468 OEM Board board HAL"
49 parent CYGPKG_HAL_ARM_LPC24XX
50 define_header hal_arm_lpc24xx_ea2468.h
53 implements CYGINT_DEVS_CAN_LPC2XXX_CAN0
54 implements CYGINT_DEVS_CAN_LPC2XXX_CAN1
55 implements CYGINT_IO_SERIAL_LPC24XX_UART0
56 implements CYGINT_IO_SERIAL_LPC24XX_UART1
58 The LPC2468 OEM HAL package provides the support needed to run
59 eCos on Embedded Artists LPC2468 OEM 16/32 boards."
63 requires { CYGHWR_HAL_ARM_LPC24XX == "LPC2468" }
66 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
67 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_arm_lpc24xx.h>"
68 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_lpc24xx_ea2468.h>"
69 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI-S\""
70 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Embedded Artists LPC2468 OEM Board\""
71 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
74 cdl_option CYGNUM_HAL_ARM_LPC24XX_XTAL_FREQ {
75 display "CPU xtal frequency"
76 parent CYGNUM_HAL_ARM_LPC24XX_CLOCKING
78 default_value {12000000}
81 cdl_option CYGNUM_HAL_ARM_LPC24XX_MAX_CLOCK_SPEED {
82 display "Max. CPU clock speed"
83 parent CYGNUM_HAL_ARM_LPC24XX_CLOCKING
86 requires CYGNUM_HAL_ARM_LPC24XX_CLOCK_SPEED <= 57600000
88 Due to a silicon errata, the highest internal core
89 clock frequency (at the time of writing this document)
90 is 57.6 MHz. This corresponds to an internal PLL
91 frequency of 288 MHz that is divided by 6 to get a 48
92 MHz clock for the core and the USB interface."
95 cdl_component CYG_HAL_STARTUP {
96 display "Startup type"
99 legal_values {"RAM" "ROM"}
101 define -file system.h CYG_HAL_STARTUP
103 Choose RAM or ROM startup type. Typically ROM startup is used for
104 building RedBoot. RedBoot runs from internal on chip flash of
105 LPC24xx. Use RAM startup for building eCos applications.
106 RedBoot manages the external on board flash devices. It copies
107 the eCos application image from FLASH to on board SDRAM
108 and then starts the eCos application."
111 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
112 display "Number of communication channels on the board"
116 Channel 0: UART0, Channel 1: UART1"
119 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
120 display "Default console channel."
121 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
126 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
127 display "Debug serial port"
128 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
130 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
133 The LPC2468 OEM board has two serial channels. The first
134 channel, UART0, ist routed to an USB-to-serial bridge and
135 the second channel, UART1, is available on the Sub-D9
136 RS232 connector. This option chooses which channel will be
137 used to connect to a host running GDB."
140 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
141 display "GDB serial port baud rate"
143 legal_values 9600 19200 38400 57600 115200
146 This option controls the baud rate used for the GDB
150 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
151 display "Diagnostic serial port"
152 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
154 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
157 The LPC2468 OEM board has two serial ports. This option
158 chooses which port will be used for diagnostic output."
161 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
162 display "Diagnostic serial port baud rate"
164 legal_values 9600 19200 38400 57600 115200
167 This option selects the baud rate used for the diagnostic port."
170 cdl_option CYGHWR_HAL_ARM_LPC24XX_EA2468_DATA_BUS_WIDTH {
171 display "Data bus width"
174 legal_values { 16 32 }
176 The LPC2468 OEM board is sold in two different data bus
177 versions - a 16-bit version and a 32-bit version."
181 cdl_component CYGBLD_GLOBAL_OPTIONS {
182 display "Global build options"
186 Global build options including control over compiler flags,
187 linker flags and choice of toolchain."
189 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
190 display "Global command prefix"
193 default_value { "arm-elf" }
195 This option specifies the command prefix used when
196 invoking the build tools."
199 cdl_option CYGBLD_GLOBAL_CFLAGS {
200 display "Global compiler flags"
203 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
205 This option controls the global compiler flags which
206 are used to compile all packages by default. Individual
207 packages may define options which override these global
211 cdl_option CYGBLD_GLOBAL_LDFLAGS {
212 display "Global linker flags"
215 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections -Wl,-static -g -nostdlib" }
217 This option controls the global linker flags. Individual
218 packages may define options which override these global
223 cdl_option CYGSEM_HAL_ROM_MONITOR {
224 display "Behave as a ROM monitor"
227 parent CYGPKG_HAL_ROM_MONITOR
228 requires { CYG_HAL_STARTUP == "ROM"}
230 Enable this option if this program is to be used as a
231 ROM monitor, i.e. applications will be loaded into RAM on
232 the board, and this ROM monitor may process exceptions or
233 interrupts generated from the application. This enables
234 features such as utilizing a separate interrupt stack when
235 exceptions are generated."
238 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
239 display "Work with a ROM monitor"
241 legal_values { "Generic" "GDB_stubs" }
242 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
243 parent CYGPKG_HAL_ROM_MONITOR
244 requires { CYG_HAL_STARTUP == "RAM" }
246 Support can be enabled for different varieties of ROM
247 monitor. This support changes various eCos semantics such
248 as the encoding of diagnostic output, or the overriding of
249 hardware interrupt vectors.
250 Firstly there is \"Generic\" support which prevents the
251 HAL from overriding the hardware vectors that it does not
252 use, to instead allow an installed ROM monitor to handle
253 them. This is the most basic support which is likely to be
254 common to most implementations of ROM monitor.
255 \"GDB_stubs\" provides support when GDB stubs are included
256 in the ROM monitor or boot ROM."
259 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
260 display "Redboot HAL options"
263 parent CYGPKG_REDBOOT
264 active_if CYGPKG_REDBOOT
266 This option lists the target's requirements for a valid
267 Redboot configuration."
269 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
270 display "Build Redboot ROM binary image"
271 active_if CYGBLD_BUILD_REDBOOT
272 requires { !CYGBLD_BUILD_REDBOOT_WITH_EXEC }
276 This option enables the conversion of the Redboot ELF
277 image to a binary image suitable for ROM programming."
280 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
281 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
282 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
283 $(OBJCOPY) -O ihex $< $(@:.bin=.hex)
284 $(OBJCOPY) -O binary $< $@
290 cdl_component CYGHWR_MEMORY_LAYOUT {
291 display "Memory layout"
294 calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_lpc24xx_ea2468_ram" :
295 "arm_lpc24xx_ea2468_rom" }
297 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
298 display "Memory layout linker script fragment"
301 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
302 calculated { (CYG_HAL_STARTUP == "RAM") ?
303 "<pkgconf/mlt_arm_lpc24xx_ea2468_ram.ldi>" :
304 "<pkgconf/mlt_arm_lpc24xx_ea2468_rom.ldi>" }
307 cdl_option CYGHWR_MEMORY_LAYOUT_H {
308 display "Memory layout header file"
311 define -file system.h CYGHWR_MEMORY_LAYOUT_H
312 calculated { (CYG_HAL_STARTUP == "RAM") ?
313 "<pkgconf/mlt_arm_lpc24xx_ea2468_ram.h>" :
314 "<pkgconf/mlt_arm_lpc24xx_ea2468_rom.h>" }