1 # ====================================================================
3 # hal_arm_xscale_grg.cdl
5 # Intel XScale GRG Network Processor Eval Board HAL package
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.
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.
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####
44 # Contributors: msalter
47 #####DESCRIPTIONEND####
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
56 define_header hal_arm_xscale_grg.h
58 This HAL platform package provides support for
59 the Intel Generic Residential Gateway board."
61 compile grg_misc.c grg_pci.c
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"
78 cdl_component CYG_HAL_STARTUP {
79 display "Startup type"
82 legal_values {"RAM" "ROM"}
84 define -file system.h CYG_HAL_STARTUP
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."
92 cdl_component CYGBLD_GLOBAL_OPTIONS {
93 display "Global build options"
97 Global build options including control over
98 compiler flags, linker flags and choice of toolchain."
102 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
103 display "Global command prefix"
106 default_value { "arm-elf" }
108 This option specifies the command prefix used when
109 invoking the build tools."
112 cdl_option CYGBLD_GLOBAL_CFLAGS {
113 display "Global compiler flags"
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" }
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."
124 cdl_option CYGBLD_GLOBAL_LDFLAGS {
125 display "Global linker flags"
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" }
131 This option controls the global linker flags. Individual
132 packages may define options which override these global flags."
135 cdl_option CYGBLD_BUILD_GDB_STUBS {
136 display "Build GDB stub ROM image"
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
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."
155 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
156 $(OBJCOPY) --remove-section=.fixed_vectors -O binary $< $@
161 cdl_component CYGPKG_HAL_ARM_XSCALE_GRG_OPTIONS {
162 display "Intel XScale GRG build options"
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."
170 cdl_option CYGPKG_HAL_ARM_XSCALE_GRG_CFLAGS_ADD {
171 display "Additional compiler flags"
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."
181 cdl_option CYGPKG_HAL_ARM_XSCALE_GRG_CFLAGS_REMOVE {
182 display "Suppressed compiler flags"
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."
192 cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
193 display "Number of breakpoints supported by the HAL."
197 This option determines the number of breakpoints supported by the HAL."
201 cdl_option CYGSEM_HAL_IXP425_PLF_USES_UART1 {
202 display "GRG uses IXP425 high-speed UART"
206 Enable this option if the IXP425 high-speed UART is used
207 as a virtual vector communications channel."
210 cdl_option CYGSEM_HAL_IXP425_PLF_USES_UART2 {
211 display "GRG uses IXP425 console UART"
215 Enable this option if the IXP425 console UART is to be used
216 as a virtual vector communications channel."
219 cdl_component CYGHWR_MEMORY_LAYOUT {
220 display "Memory layout"
223 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_grg_ram" : \
224 "arm_xscale_grg_rom" }
226 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
227 display "Memory layout linker script fragment"
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>" }
235 cdl_option CYGHWR_MEMORY_LAYOUT_H {
236 display "Memory layout header file"
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>" }
245 cdl_option CYGSEM_HAL_ROM_MONITOR {
246 display "Behave as a ROM monitor"
249 parent CYGPKG_HAL_ROM_MONITOR
250 requires { CYG_HAL_STARTUP == "ROM" }
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."
259 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
260 display "Work with a ROM monitor"
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" }
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
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."
280 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
281 display "Redboot HAL options"
284 parent CYGPKG_REDBOOT
285 active_if CYGPKG_REDBOOT
287 This option lists the target's requirements for a valid Redboot
290 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
291 display "Build Redboot ROM binary image"
292 active_if CYGBLD_BUILD_REDBOOT
295 description "This option enables the conversion of the Redboot ELF
296 image to a binary image suitable for ROM programming."
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 $< $@