1 # ====================================================================
3 # hal_arm_xscale_picasso.cdl
5 # NMI uEngine picasso platform HAL package configuration data
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>
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.
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
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.
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.
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.
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####
48 #####DESCRIPTIONEND####
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_XSCALE_PICASSO {
53 parent CYGPKG_HAL_ARM_XSCALE
56 define_header hal_arm_xscale_picasso.h
58 This HAL platform package provides
59 support for the NMI uPCI with a uEngine picasso CPU board."
61 compile picasso_misc.c picasso_pci.c picasso_ide.c
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
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"
83 cdl_component CYG_HAL_STARTUP {
84 display "Startup type"
87 legal_values {"RAM" "ROM" "ROMRAM"}
89 define -file system.h CYG_HAL_STARTUP
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."
101 cdl_component CYGSEM_PICASSO_VGA_SUPPORT {
102 display "Support LCD"
105 compile vga_support.c
107 Enabling this option will enable the use the VGA/CRT as a
108 simple framebuffer, suitable for use with a windowing
111 cdl_component CYGSEM_PICASSO_VGA_COMM {
112 display "Support VGA/keyboard for comminication channel"
113 active_if CYGPKG_REDBOOT
117 Enabling this option will use the LCD/CRT and keyboard for a
118 communications channel, suitable for RedBoot, etc."
120 cdl_option CYGNUM_PICASSO_VGA_COMM_FONT_SIZE {
121 display "VGA console font size"
126 This option selects which size font, and ultimately the
127 number of displayable characters, to be used on the VGA."
130 cdl_option CYGOPT_PICASSO_VGA_COMM_LOGO {
131 display "Logo location"
133 legal_values { "TOP" "BOTTOM" }
134 default_value { "TOP" }
136 Use this option to control where the logo is placed
137 on the VGA/CRT screen."
142 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
143 display "Diagnostic serial port baud rate"
145 legal_values 9600 19200 38400 57600 115200
146 default_value 38400 ;
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."
153 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
154 display "GDB serial port baud rate"
156 legal_values 9600 19200 38400 57600 115200
157 default_value 38400 ;
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."
164 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
165 display "Number of communication channels on the board"
167 calculated 1+CYGSEM_PICASSO_VGA_COMM
169 Channel 0 is the only serial port on the board."
172 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
173 display "Debug serial port"
174 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
176 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
179 The PICASSO has only one serial port."
182 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
183 display "Default console channel."
185 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
189 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
190 display "Diagnostic serial port"
191 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
193 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
194 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
196 The PICASSO has only one serial port."
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
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
210 cdl_option CYGSEM_HAL_LOAD_PCI_FPGA {
211 display "Download firmware for PCI controller"
212 active_if CYGPKG_IO_PCI
215 This option will cause the firmware for the PCI controller
216 to be downloaded during system initialization."
220 cdl_component CYGBLD_GLOBAL_OPTIONS {
221 display "Global build options"
225 Global build options including control over
226 compiler flags, linker flags and choice of toolchain."
230 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
231 display "Global command prefix"
234 default_value { "arm-elf" }
236 This option specifies the command prefix used when
237 invoking the build tools."
240 cdl_option CYGBLD_GLOBAL_CFLAGS {
241 display "Global compiler flags"
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" }
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."
251 cdl_option CYGBLD_GLOBAL_LDFLAGS {
252 display "Global linker flags"
255 default_value { "-Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
257 This option controls the global linker flags. Individual
258 packages may define options which override these global flags."
261 cdl_option CYGBLD_BUILD_GDB_STUBS {
262 display "Build GDB stub ROM image"
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
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."
281 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
282 $(OBJCOPY) --remove-section=.fixed_vectors -O binary $< $@
287 cdl_component CYGPKG_HAL_ARM_XSCALE_PICASSO_OPTIONS {
288 display "NMI uEngine picasso build options"
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."
296 cdl_option CYGPKG_HAL_ARM_XSCALE_PICASSO_CFLAGS_ADD {
297 display "Additional compiler flags"
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."
307 cdl_option CYGPKG_HAL_ARM_XSCALE_PICASSO_CFLAGS_REMOVE {
308 display "Suppressed compiler flags"
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."
318 cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
319 display "Number of breakpoints supported by the HAL."
323 This option determines the number of breakpoints supported by the HAL."
327 cdl_component CYGHWR_MEMORY_LAYOUT {
328 display "Memory layout"
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" }
335 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
336 display "Memory layout linker script fragment"
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"}
345 cdl_option CYGHWR_MEMORY_LAYOUT_H {
346 display "Memory layout header file"
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" }
356 cdl_option CYGSEM_HAL_ROM_MONITOR {
357 display "Behave as a ROM monitor"
360 parent CYGPKG_HAL_ROM_MONITOR
361 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
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."
370 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
371 display "Work with a ROM monitor"
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" }
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
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."
391 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
392 display "Redboot HAL options"
395 parent CYGPKG_REDBOOT
396 active_if CYGPKG_REDBOOT
398 This option lists the target's requirements for a valid Redboot
401 # compile -library=libextras.a redboot_cmds.c
403 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
404 display "Build Redboot ROM binary image"
405 active_if CYGBLD_BUILD_REDBOOT
408 description "This option enables the conversion of the Redboot ELF
409 image to a binary image suitable for ROM programming."
411 # compile -library=libextras.a redboot_cmds.c
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 $< $@