]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/xscale/picasso/v2_0/cdl/hal_arm_xscale_picasso.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / xscale / picasso / v2_0 / cdl / hal_arm_xscale_picasso.cdl
1 # ====================================================================
2 #
3 #      hal_arm_xscale_picasso.cdl
4 #
5 #      NMI uEngine picasso platform HAL package configuration data
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 ## Copyright (C) 2003 Gary Thomas <gary@mind.be>
13 ##
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
17 ##
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21 ## for more details.
22 ##
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ##
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
33 ##
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
36 ##
37 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
38 ## at http://sources.redhat.com/ecos/ecos-license/
39 ## -------------------------------------------
40 #####ECOSGPLCOPYRIGHTEND####
41 # ====================================================================
42 ######DESCRIPTIONBEGIN####
43 #
44 # Author(s):      msalter
45 # Contributors:   hmt
46 # Date:           2001-12-03
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_XSCALE_PICASSO {
52     display       "uEngine 250"
53     parent        CYGPKG_HAL_ARM_XSCALE
54     hardware
55     include_dir   cyg/hal
56     define_header hal_arm_xscale_picasso.h
57     description   "
58         This HAL platform package provides 
59         support for the NMI uPCI with a uEngine picasso CPU board."
60
61     compile       picasso_misc.c picasso_pci.c picasso_ide.c
62
63     implements    CYGINT_HAL_DEBUG_GDB_STUBS
64     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
66     # implements    CYGINT_HAL_ARM_MEM_REAL_REGION_TOP
67     implements    CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
68     implements    CYGINT_HAL_PLF_IF_IDE
69     implements    CYGHWR_HAL_ARM_PXA2X0_BTUART
70
71     define_proc {
72         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
73         puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H  <pkgconf/hal_arm_xscale_pxa2x0.h>"
74         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_xscale_picasso.h>"
75         puts $::cdl_header "#define CYGBLD_HAL_PLF_INTS_H <cyg/hal/hal_plf_ints.h>"
76         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"XScale PXA250\""
77         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"NMI uEngine picasso\""
78         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
79         puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE  257"
80         puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x00001f00"
81     }
82
83     cdl_component CYG_HAL_STARTUP {
84         display       "Startup type"
85         flavor        data
86         default_value {"RAM"}
87         legal_values  {"RAM" "ROM" "ROMRAM"}
88         no_define
89         define -file system.h CYG_HAL_STARTUP
90         description   "
91            When targeting the picasso eval board it is possible to build
92            the system for either RAM bootstrap or ROM bootstrap(s). Select
93            'RAM' when building programs to load into RAM using onboard
94            debug software such as Angel or eCos GDB stubs.  Select 'ROM'
95            when building a stand-alone application which will be put
96            into ROM.  'ROMRAM' will build a version suitable for system
97            startup code (in FLASH/ROM), which is immediately copied into
98            RAM for improved performance."
99     }
100
101     cdl_component CYGSEM_PICASSO_VGA_SUPPORT {
102         display        "Support LCD"
103         flavor         bool
104         default_value  1
105         compile        vga_support.c
106         description    "
107           Enabling this option will enable the use the VGA/CRT as a 
108           simple framebuffer, suitable for use with a windowing
109           package."
110
111         cdl_component CYGSEM_PICASSO_VGA_COMM {
112             display        "Support VGA/keyboard for comminication channel"
113             active_if      CYGPKG_REDBOOT
114             flavor         bool
115             default_value  1
116             description    "
117               Enabling this option will use the LCD/CRT and keyboard for a
118               communications channel, suitable for RedBoot, etc."
119
120             cdl_option  CYGNUM_PICASSO_VGA_COMM_FONT_SIZE {
121                 display       "VGA console font size"
122                 flavor        data
123                 legal_values  8 16
124                 default_value 16
125                 description   "
126                    This option selects which size font, and ultimately the
127                    number of displayable characters, to be used on the VGA."
128             }
129
130             cdl_option  CYGOPT_PICASSO_VGA_COMM_LOGO {
131                 display       "Logo location"
132                 flavor        booldata
133                 legal_values  { "TOP" "BOTTOM" }
134                 default_value { "TOP" }
135                 description   "
136                     Use this option to control where the logo is placed
137                     on the VGA/CRT screen."
138             }
139         }
140     }
141
142     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
143         display       "Diagnostic serial port baud rate"
144         flavor        data
145         legal_values  9600 19200 38400 57600 115200
146         default_value 38400 ;
147         description   "
148             This option selects the baud rate used for the diagnostic port.
149             Note: this should match the value chosen for the GDB port if the
150             diagnostic and GDB port are the same."
151     }
152
153     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
154         display       "GDB serial port baud rate"
155         flavor        data
156         legal_values  9600 19200 38400 57600 115200
157         default_value 38400 ;
158         description   "
159             This option selects the baud rate used for the diagnostic port.
160             Note: this should match the value chosen for the GDB port if the
161             diagnostic and GDB port are the same."
162     }
163
164     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
165         display      "Number of communication channels on the board"
166         flavor       data
167         calculated   1+CYGSEM_PICASSO_VGA_COMM
168         description "
169             Channel 0 is the only serial port on the board."
170     }
171  
172     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
173         display          "Debug serial port"
174         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
175         flavor data
176         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
177         default_value    0
178         description      "
179             The PICASSO has only one serial port."
180     }
181
182     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
183         display      "Default console channel."
184         flavor       data
185         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
186         calculated   0
187     }
188  
189     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
190         display          "Diagnostic serial port"
191         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
192         flavor data
193         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
194         default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
195         description      "
196             The PICASSO has only one serial port."
197     }
198
199     cdl_component CYGSEM_HAL_LOAD_FPGAS {
200         display        "Download bitstreams to various FPGA devices"
201         default_value  { CYG_HAL_STARTUP != "RAM" }
202         requires       CYGPKG_COMPRESS_ZLIB
203         compile        xilinx-load.c 
204         description    "
205           Enabling this option will include code to download new
206           firmware (bitstream data) to various FPGA devices contained
207           within the system.  Sub-options control which devices are
208           downloaded, etc."
209
210         cdl_option CYGSEM_HAL_LOAD_PCI_FPGA {
211             display        "Download firmware for PCI controller"
212             active_if      CYGPKG_IO_PCI
213             default_value  1
214             description "
215               This option will cause the firmware for the PCI controller
216               to be downloaded during system initialization."
217         }
218     }
219     
220     cdl_component CYGBLD_GLOBAL_OPTIONS {
221         display "Global build options"
222         flavor  none
223         no_define
224         description   "
225             Global build options including control over
226             compiler flags, linker flags and choice of toolchain."
227
228         parent  CYGPKG_NONE
229
230         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
231             display "Global command prefix"
232             flavor  data
233             no_define
234             default_value { "arm-elf" }
235             description "
236                 This option specifies the command prefix used when
237                 invoking the build tools."
238         }
239
240         cdl_option CYGBLD_GLOBAL_CFLAGS {
241             display "Global compiler flags"
242             flavor  data
243             no_define
244             default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame -fno-builtin" }
245             description   "
246                 This option controls the global compiler flags which are used to
247                 compile all packages by default. Individual packages may define
248                 options which override these global flags."
249         }
250
251         cdl_option CYGBLD_GLOBAL_LDFLAGS {
252             display "Global linker flags"
253             flavor  data
254             no_define
255             default_value { "-Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
256             description   "
257                 This option controls the global linker flags. Individual
258                 packages may define options which override these global flags."
259         }
260
261         cdl_option CYGBLD_BUILD_GDB_STUBS {
262             display "Build GDB stub ROM image"
263             default_value 0
264             requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
265             requires CYGSEM_HAL_ROM_MONITOR
266             requires CYGBLD_BUILD_COMMON_GDB_STUBS
267             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
268             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
269             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
270             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
271             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
272             no_define
273             description "
274                 This option enables the building of the GDB stubs for the
275                 board. The common HAL controls takes care of most of the
276                 build process, but the final conversion from ELF image to
277                 binary data is handled by the platform CDL, allowing
278                 relocation of the data if necessary."
279
280             make -priority 320 {
281                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
282                 $(OBJCOPY) --remove-section=.fixed_vectors -O binary $< $@
283             }
284         }
285     }
286
287     cdl_component CYGPKG_HAL_ARM_XSCALE_PICASSO_OPTIONS {
288         display "NMI uEngine picasso build options"
289         flavor  none
290         no_define
291         description   "
292             Package specific build options including control over
293             compiler flags used only in building this package,
294             and details of which tests are built."
295
296         cdl_option CYGPKG_HAL_ARM_XSCALE_PICASSO_CFLAGS_ADD {
297             display "Additional compiler flags"
298             flavor  data
299             no_define
300             default_value { "" }
301             description   "
302                 This option modifies the set of compiler flags for
303                 building the XScale PICASSO HAL. These flags are used in addition
304                 to the set of global flags."
305         }
306
307         cdl_option CYGPKG_HAL_ARM_XSCALE_PICASSO_CFLAGS_REMOVE {
308             display "Suppressed compiler flags"
309             flavor  data
310             no_define
311             default_value { "" }
312             description   "
313                 This option modifies the set of compiler flags for
314                 building the XScale PICASSO HAL. These flags are removed from
315                 the set of global flags if present."
316         }
317
318         cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
319             display       "Number of breakpoints supported by the HAL."
320             flavor        data
321             default_value 32
322             description   "
323                 This option determines the number of breakpoints supported by the HAL."
324         }
325     }
326
327     cdl_component CYGHWR_MEMORY_LAYOUT {
328         display "Memory layout"
329         flavor data
330         no_define
331         calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_picasso_ram" : \
332                      CYG_HAL_STARTUP == "ROMRAM" ? "arm_xscale_picasso.romram" : \
333                      CYG_HAL_STARTUP == "ROM" ? "arm_xscale_picasso_rom" : "BOGUS.mlt" }
334
335         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
336             display "Memory layout linker script fragment"
337             flavor data
338             no_define
339             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
340             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_picasso_ram.ldi>" : \
341                          CYG_HAL_STARTUP == "ROMRAM" ?  "<pkgconf/mlt_arm_xscale_picasso_romram.ldi>" : \
342                          CYG_HAL_STARTUP == "ROM" ?  "<pkgconf/mlt_arm_xscale_picasso_rom.ldi>" : "BOGUS.ldi"}
343         }
344
345         cdl_option CYGHWR_MEMORY_LAYOUT_H {
346             display "Memory layout header file"
347             flavor data
348             no_define
349             define -file system.h CYGHWR_MEMORY_LAYOUT_H
350             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_picasso_ram.h>" : \
351                          CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_arm_xscale_picasso_romram.h>" : \
352                          CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_arm_xscale_picasso_rom.h>" : "BOGUS.h" }
353         }
354     }
355
356     cdl_option CYGSEM_HAL_ROM_MONITOR {
357         display       "Behave as a ROM monitor"
358         flavor        bool
359         default_value 0
360         parent        CYGPKG_HAL_ROM_MONITOR
361         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
362         description   "
363             Enable this option if this program is to be used as a ROM monitor,
364             i.e. applications will be loaded into RAM on the board, and this
365             ROM monitor may process exceptions or interrupts generated from the
366             application. This enables features such as utilizing a separate
367             interrupt stack when exceptions are generated."
368     }
369
370     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
371          display       "Work with a ROM monitor"
372          flavor        booldata
373          legal_values  { "Generic" "GDB_stubs" }
374          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
375          parent        CYGPKG_HAL_ROM_MONITOR
376          requires      { CYG_HAL_STARTUP == "RAM" }
377          description   "
378              Support can be enabled for different varieties of ROM monitor.
379              This support changes various eCos semantics such as the encoding
380              of diagnostic output, or the overriding of hardware interrupt
381              vectors.
382              Firstly there is \"Generic\" support which prevents the HAL
383              from overriding the hardware vectors that it does not use, to
384              instead allow an installed ROM monitor to handle them. This is
385              the most basic support which is likely to be common to most
386              implementations of ROM monitor.
387              \"GDB_stubs\" provides support when GDB stubs are included in
388              the ROM monitor or boot ROM."
389      }
390
391     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
392         display       "Redboot HAL options"
393         flavor        none
394         no_define
395         parent        CYGPKG_REDBOOT
396         active_if     CYGPKG_REDBOOT
397         description   "
398             This option lists the target's requirements for a valid Redboot
399             configuration."
400
401         # compile -library=libextras.a redboot_cmds.c
402     
403         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
404             display       "Build Redboot ROM binary image"
405             active_if     CYGBLD_BUILD_REDBOOT
406             default_value 1
407             no_define
408             description "This option enables the conversion of the Redboot ELF
409                          image to a binary image suitable for ROM programming."
410
411         # compile -library=libextras.a redboot_cmds.c
412     
413             make -priority 325 {
414                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
415                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
416                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
417                 $(OBJCOPY) -O binary $< $@
418             }
419         }
420     }
421
422 }