1 # ====================================================================
3 # hal_mips_vr4300_vrc4375.cdl
5 # VR4300/VRC4375 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####
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_MIPS_VR4300_VRC4375 {
53 display "VRC4375 evaluation board"
54 parent CYGPKG_HAL_MIPS
55 requires CYGPKG_HAL_MIPS_VR4300
56 requires CYGPKG_HAL_MIPS_VR4300_VRC437X
57 define_header hal_mips_vr4300_vrc4375.h
60 The VRC4375 HAL package should be used when targetting the
63 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
66 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_mips_vr4300.h>"
67 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_mips_vr4300_vrc4375.h>"
68 puts $::cdl_header "#include <pkgconf/hal_mips_vr4300_vrc437x.h>"
71 cdl_component CYG_HAL_STARTUP {
72 display "Startup type"
74 legal_values {"RAM" "ROM" "ROMRAM"}
77 define -file system.h CYG_HAL_STARTUP
79 When targetting the VRC4375 board it is possible to build
80 the system for either RAM bootstrap or ROM bootstrap."
83 cdl_option CYGPKG_HAL_MIPS_LSBFIRST {
84 display "CPU little-endian"
88 # Real-time clock/counter specifics
89 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
90 display "Real-time clock constants."
93 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
94 display "Real-time clock numerator"
96 default_value 1000000000
98 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
99 display "Real-time clock denominator"
103 # Isn't a nice way to handle freq requirement!
104 cdl_option CYGNUM_HAL_RTC_PERIOD {
105 display "Real-time clock period"
111 cdl_component CYGBLD_GLOBAL_OPTIONS {
112 display "Global build options"
116 Global build options including control over
117 compiler flags, linker flags and choice of toolchain."
120 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
121 display "Global command prefix"
124 default_value { "mips64vr4300-elf" }
126 This option specifies the command prefix used when
127 invoking the build tools."
130 cdl_option CYGBLD_GLOBAL_CFLAGS {
131 display "Global compiler flags"
134 default_value { "-mgp32 -EL -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
136 This option controls the global compiler flags which
137 are used to compile all packages by
138 default. Individual packages may define
139 options which override these global flags."
142 cdl_option CYGBLD_GLOBAL_LDFLAGS {
143 display "Global linker flags"
146 default_value { "-mgp32 -EL -g -nostdlib -Wl,--gc-sections -Wl,-static" }
148 This option controls the global linker flags. Individual
149 packages may define options which override these global flags."
152 cdl_option CYGBLD_BUILD_GDB_STUBS {
153 display "Build GDB stub ROM image"
155 requires { CYG_HAL_STARTUP == "ROMRAM" }
156 requires CYGSEM_HAL_ROM_MONITOR
157 requires CYGBLD_BUILD_COMMON_GDB_STUBS
158 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
159 requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
160 requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
161 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
162 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
165 This option enables the building of the GDB stubs for the
166 board. The common HAL controls takes care of most of the
167 build process, but the final conversion from ELF image to
168 binary data is handled by the platform CDL, allowing
169 relocation of the data if necessary."
172 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
173 $(OBJCOPY) -O binary $< $@
178 cdl_component CYGHWR_MEMORY_LAYOUT {
179 display "Memory layout"
182 calculated { CYG_HAL_STARTUP == "RAM" ? "mips_vr4300_vrc4375_ram" : \
183 CYG_HAL_STARTUP == "ROM" ? "mips_vr4300_vrc4375_rom" : \
184 "mips_vr4300_vrc4375_romram" }
186 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
187 display "Memory layout linker script fragment"
190 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
191 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_vr4300_vrc4375_ram.ldi>" : \
192 CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_mips_vr4300_vrc4375_rom.ldi>" : \
193 "<pkgconf/mlt_mips_vr4300_vrc4375_romram.ldi>" }
196 cdl_option CYGHWR_MEMORY_LAYOUT_H {
197 display "Memory layout header file"
200 define -file system.h CYGHWR_MEMORY_LAYOUT_H
201 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_vr4300_vrc4375_ram.h>" : \
202 CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_mips_vr4300_vrc4375_rom.h>" : \
203 "<pkgconf/mlt_mips_vr4300_vrc4375_romram.h>" }
207 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
208 display "Work with a ROM monitor"
210 legal_values { "Generic" "GDB_stubs" "PMON" }
211 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
212 parent CYGPKG_HAL_ROM_MONITOR
213 requires { CYG_HAL_STARTUP == "RAM" }
215 Support can be enabled for three different varieties of ROM monitor.
216 This support changes various eCos semantics such as the encoding
217 of diagnostic output, or the overriding of hardware interrupt
219 Firstly there is \"Generic\" support which prevents the HAL
220 from overriding the hardware vectors that it does not use, to
221 instead allow an installed ROM monitor to handle them. This is
222 the most basic support which is likely to be common to most
223 implementations of ROM monitor.
224 \"GDB_stubs\" provides support when GDB stubs are included in
225 the ROM monitor or boot ROM.
226 And finally, \"PMON\" allows the program to co-operate with
227 the PMON ROM monitor when fitted to the board."
230 cdl_option CYGSEM_HAL_ROM_MONITOR {
231 display "Behave as a ROM monitor"
234 parent CYGPKG_HAL_ROM_MONITOR
235 requires { CYG_HAL_STARTUP == "ROMRAM" || CYG_HAL_STARTUP == "ROM" }
237 Enable this option if this program is to be used as a ROM monitor,
238 i.e. applications will be loaded into RAM on the board, and this
239 ROM monitor may process exceptions or interrupts generated from the
240 application. This enables features such as utilizing a separate
241 interrupt stack when exceptions are generated."
244 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
245 display "Diagnostic serial port baud rate"
247 legal_values 9600 19200 38400 57600 115200
250 This option selects the baud rate used for the diagnostic port.
251 Note: this should match the value chosen for the GDB port if the
252 diagnostic and GDB port are the same."
255 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
256 display "GDB serial port baud rate"
258 legal_values 9600 19200 38400 57600 115200
261 This option controls the baud rate used for the GDB connection."
264 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
265 display "Number of communication channels on the board"
270 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
271 display "Debug serial port"
272 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
274 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
277 The VRC4375 board has only one serial port. This option
278 chooses which port will be used to connect to a host
282 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
283 display "Diagnostic serial port"
284 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
286 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
289 The VRC4375 board has only one serial port. This option
290 chooses which port will be used for diagnostic output."
293 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
294 display "Redboot HAL options"
297 parent CYGPKG_REDBOOT
298 active_if CYGPKG_REDBOOT
300 This option lists the target's requirements for a valid Redboot
303 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
304 display "Build Redboot ROM binary image"
305 active_if CYGBLD_BUILD_REDBOOT
308 description "This option enables the conversion of the Redboot ELF
309 image to a binary image suitable for ROM programming."
311 compile -library=libextras.a
314 <PREFIX>/bin/redboot.srec : <PREFIX>/bin/redboot.elf
315 $(OBJCOPY) --strip-all $< $(@:.srec=.img)
316 $(OBJCOPY) -O binary $< $(@:.srec=.bin)
317 $(OBJCOPY) -O srec $< $@