1 # ====================================================================
3 # hal_arm_lpc2xxx_mcb2100.cdl
5 # ARM LPC2XXX MCB2100 HAL package configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
10 ## Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
11 ## Copyright (C) 2004 eCosCentric Limited
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.
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
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.
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.
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####
41 # Contributors: gthomas, tkoeller, nickg
44 #####DESCRIPTIONEND####
46 # ====================================================================
48 cdl_package CYGPKG_HAL_ARM_LPC2XXX_MCB2100 {
49 display "Keil MCB2100 eval board HAL"
50 parent CYGPKG_HAL_ARM_LPC2XXX
51 define_header hal_arm_lpc2xxx_mcb2100.h
55 The MCB2100 HAL package provides the support needed to run
56 eCos on an Keil MCB2100 eval board."
58 compile mcb2100_misc.c
60 requires { CYGHWR_HAL_ARM_LPC2XXX == "LPC2129" }
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_mcb2100.h>"
66 puts $::cdl_system_header "#define CYGBLD_HAL_ARM_VAR_IO_H"
67 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI-S\""
68 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Keil LPC2XXX/MCB2100\""
69 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
72 cdl_component CYG_HAL_STARTUP {
73 display "Startup type"
78 define -file system.h CYG_HAL_STARTUP
80 Only ROM startup allowed because of limited amount of RAM."
83 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
84 display "Number of communication channels on the board"
89 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
90 display "Debug serial port"
91 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
93 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
96 The MCB2100 board has two serial ports. This option
97 chooses which port will be used to connect to a host
101 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
102 display "Diagnostic serial port"
103 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
105 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
108 The MCB2100 board has two serial ports. This option
109 chooses which port will be used for diagnostic output."
112 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
113 display "Diagnostic serial port baud rate"
115 legal_values 9600 19200 38400 57600 115200
118 This option selects the baud rate used for the diagnostic port."
121 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
122 display "GDB serial port baud rate"
124 legal_values 9600 19200 38400 57600 115200
127 This option controls the baud rate used for the GDB connection."
130 # Real-time clock/counter specifics
131 cdl_option CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ {
132 display "CPU clock speed"
134 default_value {12000000}
137 cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL {
138 display "CPU clock speed"
143 cdl_option CYGNUM_HAL_ARM_LPC2XXX_CLOCK_SPEED {
144 display "CPU clock speed"
146 calculated { CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL * CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ }
149 cdl_component CYGBLD_GLOBAL_OPTIONS {
150 display "Global build options"
154 Global build options including control over
155 compiler flags, linker flags and choice of toolchain."
158 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
159 display "Global command prefix"
162 default_value { "arm-elf" }
164 This option specifies the command prefix used when
165 invoking the build tools."
168 cdl_option CYGBLD_GLOBAL_CFLAGS {
169 display "Global compiler flags"
172 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" }
174 This option controls the global compiler flags which are used to
175 compile all packages by default. Individual packages may define
176 options which override these global flags."
179 cdl_option CYGBLD_GLOBAL_LDFLAGS {
180 display "Global linker flags"
183 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" }
185 This option controls the global linker flags. Individual
186 packages may define options which override these global flags."
190 cdl_option CYGSEM_HAL_ROM_MONITOR {
191 display "Behave as a ROM monitor"
194 parent CYGPKG_HAL_ROM_MONITOR
195 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
197 Enable this option if this program is to be used as a ROM monitor,
198 i.e. applications will be loaded into RAM on the board, and this
199 ROM monitor may process exceptions or interrupts generated from the
200 application. This enables features such as utilizing a separate
201 interrupt stack when exceptions are generated."
204 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
205 display "Work with a ROM monitor"
207 legal_values { "Generic" "GDB_stubs" }
208 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
209 parent CYGPKG_HAL_ROM_MONITOR
210 requires { CYG_HAL_STARTUP == "RAM" }
212 Support can be enabled for different varieties of ROM monitor.
213 This support changes various eCos semantics such as the encoding
214 of diagnostic output, or the overriding of hardware interrupt
216 Firstly there is \"Generic\" support which prevents the HAL
217 from overriding the hardware vectors that it does not use, to
218 instead allow an installed ROM monitor to handle them. This is
219 the most basic support which is likely to be common to most
220 implementations of ROM monitor.
221 \"GDB_stubs\" provides support when GDB stubs are included in
222 the ROM monitor or boot ROM."
225 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
226 display "Redboot HAL options"
229 parent CYGPKG_REDBOOT
230 active_if CYGPKG_REDBOOT
232 This option lists the target's requirements for a valid Redboot
235 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
236 display "Build Redboot ROM binary image"
237 active_if CYGBLD_BUILD_REDBOOT
240 description "This option enables the conversion of the Redboot ELF
241 image to a binary image suitable for ROM programming."
244 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
245 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
246 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
247 $(OBJCOPY) -O binary $< $@
253 cdl_component CYGHWR_MEMORY_LAYOUT {
254 display "Memory layout"
257 calculated { "arm_lpc2xxx_mcb2100_rom" }
259 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
260 display "Memory layout linker script fragment"
263 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
264 calculated { "<pkgconf/mlt_arm_lpc2xxx_mcb2100_rom.ldi>" }
267 cdl_option CYGHWR_MEMORY_LAYOUT_H {
268 display "Memory layout header file"
271 define -file system.h CYGHWR_MEMORY_LAYOUT_H
272 calculated { "<pkgconf/mlt_arm_lpc2xxx_mcb2100_rom.h>" }