]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/lpc2xxx/p2106/v2_0/cdl/hal_arm_lpc2xxx_p2106.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / lpc2xxx / p2106 / v2_0 / cdl / hal_arm_lpc2xxx_p2106.cdl
1 # ====================================================================
2 #
3 #      hal_arm_lpc2xxx_p2106.cdl
4 #
5 #      ARM LPC2XXX P2106 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_P2106 {
49     display       "Olimex P2106 eval board HAL"
50     parent        CYGPKG_HAL_ARM_LPC2XXX
51     define_header hal_arm_lpc2xxx_p2106.h
52     include_dir   cyg/hal
53     hardware
54     description   "
55         The P2106 HAL package provides the support needed to run
56         eCos on an Olimex P2106 eval board."
57
58     compile       p2106_misc.c
59
60     requires      { CYGHWR_HAL_ARM_LPC2XXX == "LPC210x" }
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_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  \"\""
70     }
71     
72     cdl_component CYG_HAL_STARTUP {
73         display       "Startup type"
74         flavor        data
75         default_value {"ROM"}
76         legal_values  {"ROM" "RAM"}
77         no_define
78         define -file system.h CYG_HAL_STARTUP
79         description   "
80             Choose ROM or RAM startup type."
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   1
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 P2106 board has one serial port."
97      }
98  
99      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
100          display          "Diagnostic serial port"
101          active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
102          flavor data
103          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
104          default_value    0
105          description      "
106             The P2106 board has one serial port."
107      }
108      
109      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
110         display       "Diagnostic serial port baud rate"
111         flavor        data
112         legal_values  9600 19200 38400 57600 115200
113         default_value 38400
114         description   "
115             This option selects the baud rate used for the diagnostic port."
116     }
117  
118     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
119          display       "GDB serial port baud rate"
120          flavor        data
121          legal_values  9600 19200 38400 57600 115200
122          default_value 38400
123          description   "
124             This option controls the baud rate used for the GDB connection."
125      }
126      
127     # Real-time clock/counter specifics
128     cdl_option CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ {
129         display       "CPU clock speed"
130         flavor        data
131         default_value {14745600}
132     }
133
134     cdl_option CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL {
135         display       "CPU clock speed"
136         flavor        data
137         default_value {4}
138     }
139  
140     cdl_option CYGNUM_HAL_ARM_LPC2XXX_CLOCK_SPEED {
141         display       "CPU clock speed"
142         flavor        data
143         calculated { CYGNUM_HAL_ARM_LPC2XXX_PLL_MUL * CYGNUM_HAL_ARM_LPC2XXX_XTAL_FREQ }
144     }
145    
146     cdl_component CYGBLD_GLOBAL_OPTIONS {
147         display "Global build options"
148         flavor  none
149         parent  CYGPKG_NONE
150         description   "
151             Global build options including control over
152             compiler flags, linker flags and choice of toolchain."
153
154         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
155             display "Global command prefix"
156             flavor  data
157             no_define
158             default_value { "arm-elf" }
159             description "
160                 This option specifies the command prefix used when
161                 invoking the build tools."
162         }
163
164         cdl_option CYGBLD_GLOBAL_CFLAGS {
165             display "Global compiler flags"
166             flavor  data
167             no_define
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" }
169             description   "
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."
173         }
174
175         cdl_option CYGBLD_GLOBAL_LDFLAGS {
176             display "Global linker flags"
177             flavor  data
178             no_define
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" }
180             description   "
181                 This option controls the global linker flags. Individual
182                 packages may define options which override these global flags."
183         }
184     }
185
186     cdl_option CYGSEM_HAL_ROM_MONITOR {
187         display       "Behave as a ROM monitor"
188         flavor        bool
189         default_value 0
190         parent        CYGPKG_HAL_ROM_MONITOR
191         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
192         description   "
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."
198     }
199
200     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
201          display       "Work with a ROM monitor"
202          flavor        booldata
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" }
207          description   "
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
211              vectors.
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."
219      }
220
221     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
222         display       "Redboot HAL options"
223         flavor        none
224         no_define
225         parent        CYGPKG_REDBOOT
226         active_if     CYGPKG_REDBOOT
227         description   "
228             This option lists the target's requirements for a valid Redboot
229             configuration."
230
231         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
232             display       "Build Redboot ROM binary image"
233             active_if     CYGBLD_BUILD_REDBOOT
234             default_value 1
235             no_define
236             description "This option enables the conversion of the Redboot ELF
237                          image to a binary image suitable for ROM programming."
238     
239             make -priority 325 {
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 $< $@
244             }
245
246         }
247     }
248
249     cdl_component CYGHWR_MEMORY_LAYOUT {
250         display "Memory layout"
251         flavor data
252         no_define
253         calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_lpc2xxx_p2106_ram":
254                                                   "arm_lpc2xxx_p2106_rom"}
255
256         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
257             display "Memory layout linker script fragment"
258             flavor data
259             no_define
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>"} 
264         }
265
266         cdl_option CYGHWR_MEMORY_LAYOUT_H {
267             display "Memory layout header file"
268             flavor data
269             no_define
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>"}
274         }
275     }
276
277 }