]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/lpc2xxx/mcb2100/v2_0/cdl/hal_arm_lpc2xxx_mcb2100.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / lpc2xxx / mcb2100 / v2_0 / cdl / hal_arm_lpc2xxx_mcb2100.cdl
1 # ====================================================================
2 #
3 #      hal_arm_lpc2xxx_mcb2100.cdl
4 #
5 #      ARM LPC2XXX MCB2100 HAL package configuration data
6 #
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 
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):      jani 
41 # Contributors:   gthomas, tkoeller, nickg
42 # Date:           2004-10-4
43 #
44 #####DESCRIPTIONEND####
45 #
46 # ====================================================================
47
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
52     include_dir   cyg/hal
53     hardware
54     description   "
55         The MCB2100 HAL package provides the support needed to run
56         eCos on an Keil MCB2100 eval board."
57
58     compile       mcb2100_misc.c
59
60     requires      { CYGHWR_HAL_ARM_LPC2XXX == "LPC2129" }
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_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  \"\""
70     }
71     
72     cdl_component CYG_HAL_STARTUP {
73         display       "Startup type"
74         flavor        data
75         default_value {"ROM"}
76         legal_values  {"ROM"}
77         no_define
78         define -file system.h CYG_HAL_STARTUP
79         description   "
80             Only ROM startup allowed because of limited amount of RAM."
81     }
82     
83     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
84         display      "Number of communication channels on the board"
85         flavor       data
86         calculated   2
87     }
88  
89     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
90         display          "Debug serial port"
91         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
92         flavor data
93         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
94         default_value    0
95         description      "
96             The MCB2100 board has two serial ports. This option
97             chooses which port will be used to connect to a host
98             running GDB."
99      }
100  
101      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
102          display          "Diagnostic serial port"
103          active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
104          flavor data
105          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
106          default_value    0
107          description      "
108             The MCB2100 board has two serial ports. This option
109             chooses which port will be used for diagnostic output."
110      }
111      
112      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
113         display       "Diagnostic serial port baud rate"
114         flavor        data
115         legal_values  9600 19200 38400 57600 115200
116         default_value 38400
117         description   "
118             This option selects the baud rate used for the diagnostic port."
119     }
120  
121     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
122          display       "GDB serial port baud rate"
123          flavor        data
124          legal_values  9600 19200 38400 57600 115200
125          default_value 38400
126          description   "
127             This option controls the baud rate used for the GDB connection."
128      }
129     
130     # Real-time clock/counter specifics
131     cdl_option CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ {
132         display       "CPU clock speed"
133         flavor        data
134         default_value {12000000}
135     }
136
137     cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL {
138         display       "CPU clock speed"
139         flavor        data
140         default_value {5}
141     }
142
143     cdl_option CYGNUM_HAL_ARM_LPC2XXX_CLOCK_SPEED {
144         display       "CPU clock speed"
145         flavor        data
146         calculated { CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL * CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ }
147     }
148  
149     cdl_component CYGBLD_GLOBAL_OPTIONS {
150         display "Global build options"
151         flavor  none
152         parent  CYGPKG_NONE
153         description   "
154             Global build options including control over
155             compiler flags, linker flags and choice of toolchain."
156
157
158         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
159             display "Global command prefix"
160             flavor  data
161             no_define
162             default_value { "arm-elf" }
163             description "
164                 This option specifies the command prefix used when
165                 invoking the build tools."
166         }
167
168         cdl_option CYGBLD_GLOBAL_CFLAGS {
169             display "Global compiler flags"
170             flavor  data
171             no_define
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" }
173             description   "
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."
177         }
178
179         cdl_option CYGBLD_GLOBAL_LDFLAGS {
180             display "Global linker flags"
181             flavor  data
182             no_define
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" }
184             description   "
185                 This option controls the global linker flags. Individual
186                 packages may define options which override these global flags."
187         }
188     }
189
190     cdl_option CYGSEM_HAL_ROM_MONITOR {
191         display       "Behave as a ROM monitor"
192         flavor        bool
193         default_value 0
194         parent        CYGPKG_HAL_ROM_MONITOR
195         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
196         description   "
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."
202     }
203
204     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
205          display       "Work with a ROM monitor"
206          flavor        booldata
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" }
211          description   "
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
215              vectors.
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."
223      }
224
225     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
226         display       "Redboot HAL options"
227         flavor        none
228         no_define
229         parent        CYGPKG_REDBOOT
230         active_if     CYGPKG_REDBOOT
231         description   "
232             This option lists the target's requirements for a valid Redboot
233             configuration."
234
235         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
236             display       "Build Redboot ROM binary image"
237             active_if     CYGBLD_BUILD_REDBOOT
238             default_value 1
239             no_define
240             description "This option enables the conversion of the Redboot ELF
241                          image to a binary image suitable for ROM programming."
242     
243             make -priority 325 {
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 $< $@
248             }
249
250         }
251     }
252
253     cdl_component CYGHWR_MEMORY_LAYOUT {
254         display "Memory layout"
255         flavor data
256         no_define
257         calculated { "arm_lpc2xxx_mcb2100_rom" }
258
259         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
260             display "Memory layout linker script fragment"
261             flavor data
262             no_define
263             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
264             calculated { "<pkgconf/mlt_arm_lpc2xxx_mcb2100_rom.ldi>" }
265         }
266
267         cdl_option CYGHWR_MEMORY_LAYOUT_H {
268             display "Memory layout header file"
269             flavor data
270             no_define
271             define -file system.h CYGHWR_MEMORY_LAYOUT_H
272             calculated { "<pkgconf/mlt_arm_lpc2xxx_mcb2100_rom.h>" }
273         }
274     }
275 }