1 # ====================================================================
3 # hal_mips_rm7000_ocelot.cdl
5 # RM7000/OCELOT board 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.
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 # Original data: bartv
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_MIPS_RM7000_OCELOT {
53 display "QED Ocelot board"
54 parent CYGPKG_HAL_MIPS
55 requires CYGPKG_HAL_MIPS_RM7000
56 define_header hal_mips_rm7000_ocelot.h
59 The Ocelot HAL package should be used when targetting the
62 compile platform.S plf_misc.c plf_stub.c ns16552.c
64 implements CYGINT_HAL_DEBUG_GDB_STUBS
65 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
69 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_mips_rm7000.h>"
70 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_mips_rm7000_ocelot.h>"
72 puts $::cdl_header "#define CYGHWR_HAL_MIPS_WARMSTART_COLDSTART"
75 cdl_component CYG_HAL_STARTUP {
76 display "Startup type"
78 legal_values {"RAM" "ROM"}
81 define -file system.h CYG_HAL_STARTUP
83 When targetting the Ocelot board it is possible to build
84 the system for either RAM bootstrap or ROM bootstrap. RAM
85 bootstrap generally requires that the board
86 is equipped with ROMs containing a suitable ROM monitor or
87 equivalent software that allows GDB to download the eCos
88 application on to the board. The ROM bootstrap typically
89 requires that the eCos application be blown into EPROMs or
90 equivalent technology."
93 cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_ENDIAN {
94 display "Board endian mode"
96 legal_values {"big" "little"}
100 The Ocelot platform can be used in either big or
101 little endian mode. This option select which. The board
102 will also need to be reconfigured if this option changes."
104 cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_ENDIAN_SET {
105 display "Communicate endian setting to variant HAL"
106 active_if {CYGHWR_HAL_MIPS_RM7000_OCELOT_ENDIAN == "big"}
108 implements CYGINT_HAL_MIPS_MSBFIRST
111 cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_PCI_MEM_MAP_BASE {
112 display "Base of memory accessible via PCI space"
114 legal_values { 0xf200000 0xf300000 0xf400000 0xf500000
115 0xf600000 0xf700000 0xf800000 0xf900000
116 0xfa00000 0xfb00000 0xfc00000 0xfd00000
119 default_value 0x0ff00000
120 active_if CYGPKG_IO_PCI
122 This option determines the base of the Ocelot memory which
123 can be accessed via the PCI bus. The default is to allow
124 access to the upper 1MB of a 256MB system.
125 NB: We advise *against* changing this option.
126 The value MUST match the base address of the section
127 'pci_window' in the Memory Layout Tool else this memory area
128 will be consumed by the malloc heap.
129 This error condition can only be detected at runtime in
130 current versions of the configuration tools.
131 CLI users can edit include/pkgconf/mlt_mips_rm7000_ocelot_*.h
132 and include/pkgconf/mlt_mips_rm7000_ocelot_*.ldi to achieve the
133 same effects as moving that region in the MLT."
136 cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_PCI_MEM_MAP_SIZE {
137 display "Size of memory accessible via PCI space"
139 legal_values { 0x100000 0x200000 0x300000 0x400000
140 0x500000 0x600000 0x700000 0x800000
142 default_value 0x00100000
143 active_if CYGPKG_IO_PCI
145 This option determines the size of the Ocelot memory which
146 can be accessed via the PCI bus. The default is to allow
147 access to the upper 1MB of a 256MB system.
148 NB: We advise *against* changing this option.
149 The value MUST match the size of the section 'pci_window' in the
150 Memory Layout Tool else this memory area will be consumed by the
152 Further caveats in the PCI base option."
155 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
156 display "Number of communication channels on the board"
161 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
162 display "Debug serial port"
163 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
165 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
168 The Ocelot board has two separate serial ports. This option
169 chooses which of these ports will be used to connect to a host
173 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
174 display "Diagnostic serial port"
175 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
177 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
180 The Ocelot board has two separate serial ports. This option
181 chooses which of these ports will be used for diagnostic output."
184 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
185 display "Default baud rate used for serial ports"
187 legal_values 9600 19200 38400 115200
190 This option selects the baud rate used for the serial ports."
193 # The "-o file" is a workaround for CR100958 - without it the
194 # output file would end up in the source directory under CygWin.
195 # n.b. grep does not behave itself under win32
197 <PREFIX>/include/cyg/hal/plf_defs.inc : <PACKAGE>/src/plf_mk_defs.c
198 $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,plf_defs.tmp -o plf_mk_defs.tmp -S $<
199 fgrep .equ plf_mk_defs.tmp | sed s/#// > $@
200 @echo $@ ": \\" > $(notdir $@).deps
201 @tail -n +2 plf_defs.tmp >> $(notdir $@).deps
202 @echo >> $(notdir $@).deps
203 @rm plf_defs.tmp plf_mk_defs.tmp
206 cdl_option CYGHWR_HAL_MIPS_RM7000_CPU_CLOCK {
207 display "CPU clock speed"
209 legal_values { 300000000 400000000 500000000 600000000 }
210 default_value 300000000
212 The CPU clock speed in Hz."
215 # Real-time clock/counter specifics
216 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
217 display "Real-time clock constants."
220 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
221 display "Real-time clock numerator"
223 default_value 1000000000
225 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
226 display "Real-time clock denominator"
230 cdl_option CYGNUM_HAL_RTC_PERIOD {
231 display "Real-time clock period"
233 default_value { (CYGHWR_HAL_MIPS_RM7000_CPU_CLOCK / 2) / CYGNUM_HAL_RTC_DENOMINATOR }
235 The count and compare registers of the RM7000 are used
236 to drive the eCos kernel RTC. The count register
237 increments at half the CPU clock speed."
241 cdl_component CYGBLD_GLOBAL_OPTIONS {
242 display "Global build options"
246 Global build options including control over
247 compiler flags, linker flags and choice of toolchain."
250 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
251 display "Global command prefix"
254 default_value { "mipsisa32-elf" }
255 # default_value { "mips-tx49-elf" }
256 # default_value { "mips64vr5000-elf" }
257 # default_value { "mips64vr4300-elf" }
259 This option specifies the command prefix used when
260 invoking the build tools."
263 cdl_option CYGBLD_GLOBAL_CFLAGS {
264 display "Global compiler flags"
268 default_value { CYGPKG_HAL_MIPS_MSBFIRST ? "-G0 -mips2 -EB -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" : "-G0 -mips2 -EL -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
270 This option controls the global compiler flags which
271 are used to compile all packages by
272 default. Individual packages may define
273 options which override these global flags."
276 cdl_option CYGBLD_GLOBAL_LDFLAGS {
277 display "Global linker flags"
281 default_value { CYGPKG_HAL_MIPS_MSBFIRST ? "-G0 -g -mips32 -EB -nostdlib -Wl,--gc-sections -Wl,-static" : "-g -mips2 -EL -mabi=eabi -nostdlib -Wl,--gc-sections -Wl,-static" }
283 This option controls the global linker flags. Individual
284 packages may define options which override these global flags."
287 cdl_option CYGBLD_BUILD_GDB_STUBS {
288 display "Build GDB stub ROM image"
290 requires { CYG_HAL_STARTUP == "ROM" }
291 requires CYGSEM_HAL_ROM_MONITOR
292 requires CYGBLD_BUILD_COMMON_GDB_STUBS
293 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
294 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
295 requires ! CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
296 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
297 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
298 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
301 This option enables the building of the GDB stubs for the
302 board. The common HAL controls takes care of most of the
303 build process, but the final conversion from ELF image to
304 SREC data is handled by the platform CDL, allowing
305 relocation of the data if necessary."
308 <PREFIX>/bin/gdb_module.srec : <PREFIX>/bin/gdb_module.img
313 cdl_component CYGHWR_MEMORY_LAYOUT {
314 display "Memory layout"
317 calculated { CYG_HAL_STARTUP == "RAM" ? "mips_rm7000_ocelot_ram" : \
318 "mips_rm7000_ocelot_rom" }
320 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
321 display "Memory layout linker script fragment"
324 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
325 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_rm7000_ocelot_ram.ldi>" : \
326 "<pkgconf/mlt_mips_rm7000_ocelot_rom.ldi>" }
329 cdl_option CYGHWR_MEMORY_LAYOUT_H {
330 display "Memory layout header file"
333 define -file system.h CYGHWR_MEMORY_LAYOUT_H
334 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_rm7000_ocelot_ram.h>" : \
335 "<pkgconf/mlt_mips_rm7000_ocelot_rom.h>" }
339 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
340 display "Work with a ROM monitor"
342 legal_values { "GDB_stubs" }
343 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
344 parent CYGPKG_HAL_ROM_MONITOR
345 requires { CYG_HAL_STARTUP == "RAM" }
347 Support can be enabled for GDB stubs.
348 This support changes various eCos semantics such as the encoding
349 of diagnostic output, or the overriding of hardware interrupt
351 \"GDB_stubs\" provides support when GDB stubs are
352 included in the ROM monitor or boot ROM, allowing debugging
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" }
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_component CYGPKG_REDBOOT_HAL_OPTIONS {
371 display "Redboot HAL options"
374 parent CYGPKG_REDBOOT
375 active_if CYGPKG_REDBOOT
377 This option lists the target's requirements for a valid Redboot
380 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
381 display "Build Redboot ROM binary image"
382 active_if CYGBLD_BUILD_REDBOOT
385 description "This option enables the conversion of the Redboot ELF
386 image to the various relocated SREC images needed
390 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
391 $(OBJCOPY) --strip-unneeded $< $(@:.bin=.img)
392 $(OBJCOPY) -O srec $(@:.bin=.img) $(@:.bin=.srec)
393 $(OBJCOPY) -O binary $(@:.bin=.img) $@