]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/xscale/grg/v2_0/cdl/hal_arm_xscale_grg.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / xscale / grg / v2_0 / cdl / hal_arm_xscale_grg.cdl
1 # ====================================================================
2 #
3 #      hal_arm_xscale_grg.cdl
4 #
5 #      Intel XScale GRG Network Processor Eval Board HAL package
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
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 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
42 #
43 # Author(s):      msalter
44 # Contributors:   msalter
45 # Date:           2003-02-05
46 #
47 #####DESCRIPTIONEND####
48 #
49 # ====================================================================
50 cdl_package CYGPKG_HAL_ARM_XSCALE_GRG {
51     display       "Intel Generic Residential Gateway Platform"
52     parent        CYGPKG_HAL_ARM_XSCALE
53     implements    CYGINT_HAL_ARM_BIGENDIAN
54     hardware
55     include_dir   cyg/hal
56     define_header hal_arm_xscale_grg.h
57     description   "
58         This HAL platform package provides support for
59         the Intel Generic Residential Gateway board."
60
61     compile       grg_misc.c grg_pci.c
62
63     define_proc {
64         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
65         puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H  <pkgconf/hal_arm_xscale_ixp425.h>"
66         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_xscale_grg.h>"
67         puts $::cdl_header "#define CYGBLD_HAL_PLF_INTS_H <cyg/hal/hal_plf_ints.h>"
68         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"XScale\""
69         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Intel Generic Residential Gateway\""
70         puts $::cdl_header "#ifdef CYGHWR_HAL_ARM_BIGENDIAN"
71         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"BE\""
72         puts $::cdl_header "#else"
73         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"LE\""
74         puts $::cdl_header "#endif"
75         puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE  290"
76     }
77
78     cdl_component CYG_HAL_STARTUP {
79         display       "Startup type"
80         flavor        data
81         default_value {"RAM"}
82         legal_values  {"RAM" "ROM"}
83         no_define
84         define -file system.h CYG_HAL_STARTUP
85         description   "
86            When targeting the GRG board it is possible to configure the system
87            for either RAM bootstrap or ROM bootstrap(s). Select 'ram' when
88            building programs to load into RAM using onboard debug software
89            such as RedBoot or eCos GDB stubs."
90     }
91
92     cdl_component CYGBLD_GLOBAL_OPTIONS {
93         display "Global build options"
94         flavor  none
95         no_define
96         description   "
97             Global build options including control over
98             compiler flags, linker flags and choice of toolchain."
99
100         parent  CYGPKG_NONE
101
102         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
103             display "Global command prefix"
104             flavor  data
105             no_define
106             default_value { "arm-elf" }
107             description "
108                 This option specifies the command prefix used when
109                 invoking the build tools."
110         }
111
112         cdl_option CYGBLD_GLOBAL_CFLAGS {
113             display "Global compiler flags"
114             flavor  data
115             no_define
116             default_value { CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian -mcpu=xscale -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -mapcs-frame" :
117                             "-mcpu=xscale -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -mapcs-frame" }
118             description   "
119                 This option controls the global compiler flags which are used to
120                 compile all packages by default. Individual packages may define
121                 options which override these global flags."
122         }
123
124         cdl_option CYGBLD_GLOBAL_LDFLAGS {
125             display "Global linker flags"
126             flavor  data
127             no_define
128             default_value { CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian -mcpu=xscale -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" :
129                             "-mcpu=xscale -Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
130             description   "
131                 This option controls the global linker flags. Individual
132                 packages may define options which override these global flags."
133         }
134
135         cdl_option CYGBLD_BUILD_GDB_STUBS {
136             display "Build GDB stub ROM image"
137             default_value 0
138             requires { CYG_HAL_STARTUP == "ROM" }
139             requires CYGSEM_HAL_ROM_MONITOR
140             requires CYGBLD_BUILD_COMMON_GDB_STUBS
141             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
142             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
143             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
144             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
145             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
146             no_define
147             description "
148                 This option enables the building of the GDB stubs for the
149                 board. The common HAL controls takes care of most of the
150                 build process, but the final conversion from ELF image to
151                 binary data is handled by the platform CDL, allowing
152                 relocation of the data if necessary."
153
154             make -priority 320 {
155                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
156                 $(OBJCOPY) --remove-section=.fixed_vectors -O binary $< $@
157             }
158         }
159     }
160
161     cdl_component CYGPKG_HAL_ARM_XSCALE_GRG_OPTIONS {
162         display "Intel XScale GRG build options"
163         flavor  none
164         no_define
165         description   "
166             Package specific build options including control over
167             compiler flags used only in building this package,
168             and details of which tests are built."
169
170         cdl_option CYGPKG_HAL_ARM_XSCALE_GRG_CFLAGS_ADD {
171             display "Additional compiler flags"
172             flavor  data
173             no_define
174             default_value { "" }
175             description   "
176                 This option modifies the set of compiler flags for
177                 building the XScale GRG HAL. These flags are used in addition
178                 to the set of global flags."
179         }
180
181         cdl_option CYGPKG_HAL_ARM_XSCALE_GRG_CFLAGS_REMOVE {
182             display "Suppressed compiler flags"
183             flavor  data
184             no_define
185             default_value { "" }
186             description   "
187                 This option modifies the set of compiler flags for
188                 building the XScale GRG HAL. These flags are removed from
189                 the set of global flags if present."
190         }
191
192         cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
193             display       "Number of breakpoints supported by the HAL."
194             flavor        data
195             default_value 32
196             description   "
197                 This option determines the number of breakpoints supported by the HAL."
198         }
199     }
200
201     cdl_option CYGSEM_HAL_IXP425_PLF_USES_UART1 {
202         display       "GRG uses IXP425 high-speed UART"
203         flavor        bool
204         default_value 0
205         description   "
206             Enable this option if the IXP425 high-speed UART is used
207             as a virtual vector communications channel."
208     }
209
210     cdl_option CYGSEM_HAL_IXP425_PLF_USES_UART2 {
211         display       "GRG uses IXP425 console UART"
212         flavor        bool
213         default_value 1
214         description   "
215             Enable this option if the IXP425 console UART is to be used
216             as a virtual vector communications channel."
217     }
218
219     cdl_component CYGHWR_MEMORY_LAYOUT {
220         display "Memory layout"
221         flavor data
222         no_define
223         calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_grg_ram" : \
224                                                 "arm_xscale_grg_rom" }
225
226         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
227             display "Memory layout linker script fragment"
228             flavor data
229             no_define
230             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
231             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_grg_ram.ldi>" : \
232                                                     "<pkgconf/mlt_arm_xscale_grg_rom.ldi>" }
233         }
234
235         cdl_option CYGHWR_MEMORY_LAYOUT_H {
236             display "Memory layout header file"
237             flavor data
238             no_define
239             define -file system.h CYGHWR_MEMORY_LAYOUT_H
240             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_grg_ram.h>" : \
241                                                     "<pkgconf/mlt_arm_xscale_grg_rom.h>" }
242         }
243     }
244
245     cdl_option CYGSEM_HAL_ROM_MONITOR {
246         display       "Behave as a ROM monitor"
247         flavor        bool
248         default_value 0
249         parent        CYGPKG_HAL_ROM_MONITOR
250         requires      { CYG_HAL_STARTUP == "ROM" }
251         description   "
252             Enable this option if this program is to be used as a ROM monitor,
253             i.e. applications will be loaded into RAM on the board, and this
254             ROM monitor may process exceptions or interrupts generated from the
255             application. This enables features such as utilizing a separate
256             interrupt stack when exceptions are generated."
257     }
258
259     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
260          display       "Work with a ROM monitor"
261          flavor        booldata
262          legal_values  { "Generic" "GDB_stubs" }
263          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
264          parent        CYGPKG_HAL_ROM_MONITOR
265          requires      { CYG_HAL_STARTUP == "RAM" }
266          description   "
267              Support can be enabled for different varieties of ROM monitor.
268              This support changes various eCos semantics such as the encoding
269              of diagnostic output, or the overriding of hardware interrupt
270              vectors.
271              Firstly there is \"Generic\" support which prevents the HAL
272              from overriding the hardware vectors that it does not use, to
273              instead allow an installed ROM monitor to handle them. This is
274              the most basic support which is likely to be common to most
275              implementations of ROM monitor.
276              \"GDB_stubs\" provides support when GDB stubs are included in
277              the ROM monitor or boot ROM."
278      }
279
280     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
281         display       "Redboot HAL options"
282         flavor        none
283         no_define
284         parent        CYGPKG_REDBOOT
285         active_if     CYGPKG_REDBOOT
286         description   "
287             This option lists the target's requirements for a valid Redboot
288             configuration."
289
290         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
291             display       "Build Redboot ROM binary image"
292             active_if     CYGBLD_BUILD_REDBOOT
293             default_value 1
294             no_define
295             description "This option enables the conversion of the Redboot ELF
296                          image to a binary image suitable for ROM programming."
297
298             make -priority 325 {
299                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
300                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
301                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
302                 $(OBJCOPY) -O binary $< $@
303             }
304         }
305     }
306 }