1 # ====================================================================
3 # hal_arm_lpc2xxx_p2106.cdl
5 # ARM LPC2XXX P2106 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_P2106 {
49 display "Olimex P2106 eval board HAL"
50 parent CYGPKG_HAL_ARM_LPC2XXX
51 define_header hal_arm_lpc2xxx_p2106.h
55 The P2106 HAL package provides the support needed to run
56 eCos on an Olimex P2106 eval board."
60 requires { CYGHWR_HAL_ARM_LPC2XXX == "LPC210x" }
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_p2106.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 \"Olimex LPC2XXX/P2106\""
69 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
72 cdl_component CYG_HAL_STARTUP {
73 display "Startup type"
76 legal_values {"ROM" "RAM"}
78 define -file system.h CYG_HAL_STARTUP
80 Choose ROM or RAM startup type."
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 P2106 board has one serial port."
99 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
100 display "Diagnostic serial port"
101 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
103 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
106 The P2106 board has one serial port."
109 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
110 display "Diagnostic serial port baud rate"
112 legal_values 9600 19200 38400 57600 115200
115 This option selects the baud rate used for the diagnostic port."
118 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
119 display "GDB serial port baud rate"
121 legal_values 9600 19200 38400 57600 115200
124 This option controls the baud rate used for the GDB connection."
127 # Real-time clock/counter specifics
128 cdl_option CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ {
129 display "CPU clock speed"
131 default_value {14745600}
134 cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL {
135 display "CPU clock speed"
140 cdl_option CYGNUM_HAL_ARM_LPC2XXX_CLOCK_SPEED {
141 display "CPU clock speed"
143 calculated { CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL * CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ }
146 cdl_component CYGBLD_GLOBAL_OPTIONS {
147 display "Global build options"
151 Global build options including control over
152 compiler flags, linker flags and choice of toolchain."
154 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
155 display "Global command prefix"
158 default_value { "arm-elf" }
160 This option specifies the command prefix used when
161 invoking the build tools."
164 cdl_option CYGBLD_GLOBAL_CFLAGS {
165 display "Global compiler flags"
168 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" }
170 This option controls the global compiler flags which are used to
171 compile all packages by default. Individual packages may define
172 options which override these global flags."
175 cdl_option CYGBLD_GLOBAL_LDFLAGS {
176 display "Global linker flags"
179 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" }
181 This option controls the global linker flags. Individual
182 packages may define options which override these global flags."
186 cdl_option CYGSEM_HAL_ROM_MONITOR {
187 display "Behave as a ROM monitor"
190 parent CYGPKG_HAL_ROM_MONITOR
191 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
193 Enable this option if this program is to be used as a ROM monitor,
194 i.e. applications will be loaded into RAM on the board, and this
195 ROM monitor may process exceptions or interrupts generated from the
196 application. This enables features such as utilizing a separate
197 interrupt stack when exceptions are generated."
200 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
201 display "Work with a ROM monitor"
203 legal_values { "Generic" "GDB_stubs" }
204 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
205 parent CYGPKG_HAL_ROM_MONITOR
206 requires { CYG_HAL_STARTUP == "RAM" }
208 Support can be enabled for different varieties of ROM monitor.
209 This support changes various eCos semantics such as the encoding
210 of diagnostic output, or the overriding of hardware interrupt
212 Firstly there is \"Generic\" support which prevents the HAL
213 from overriding the hardware vectors that it does not use, to
214 instead allow an installed ROM monitor to handle them. This is
215 the most basic support which is likely to be common to most
216 implementations of ROM monitor.
217 \"GDB_stubs\" provides support when GDB stubs are included in
218 the ROM monitor or boot ROM."
221 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
222 display "Redboot HAL options"
225 parent CYGPKG_REDBOOT
226 active_if CYGPKG_REDBOOT
228 This option lists the target's requirements for a valid Redboot
231 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
232 display "Build Redboot ROM binary image"
233 active_if CYGBLD_BUILD_REDBOOT
236 description "This option enables the conversion of the Redboot ELF
237 image to a binary image suitable for ROM programming."
240 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
241 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
242 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
243 $(OBJCOPY) -O binary $< $@
249 cdl_component CYGHWR_MEMORY_LAYOUT {
250 display "Memory layout"
253 calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_lpc2xxx_p2106_ram":
254 "arm_lpc2xxx_p2106_rom"}
256 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
257 display "Memory layout linker script fragment"
260 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
261 calculated { (CYG_HAL_STARTUP == "RAM") ?
262 "<pkgconf/mlt_arm_lpc2xxx_p2106_ram.ldi>":
263 "<pkgconf/mlt_arm_lpc2xxx_p2106_rom.ldi>"}
266 cdl_option CYGHWR_MEMORY_LAYOUT_H {
267 display "Memory layout header file"
270 define -file system.h CYGHWR_MEMORY_LAYOUT_H
271 calculated { (CYG_HAL_STARTUP == "RAM") ?
272 "<pkgconf/mlt_arm_lpc2xxx_p2106_ram.h>":
273 "<pkgconf/mlt_arm_lpc2xxx_p2106_rom.h>"}