1 # ====================================================================
3 # hal_mips_tx49_ref4955.cdl
5 # TX49/REF4955 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_TX49_REF4955 {
53 display "REF4955 evaluation board"
54 parent CYGPKG_HAL_MIPS
55 requires CYGPKG_HAL_MIPS_TX49
56 define_header hal_mips_tx49_ref4955.h
59 The REF4955 HAL package should be used when targetting the
62 compile hal_diag.c platform.S plf_misc.c plf_stub.c pc87338.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_tx49.h>"
70 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_mips_tx49_ref4955.h>"
72 puts $::cdl_header "#define CYGHWR_HAL_MIPS_WARMSTART_COLDSTART"
74 puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 1000000"
77 cdl_component CYG_HAL_STARTUP {
78 display "Startup type"
80 legal_values {"RAM" "ROM"}
83 define -file system.h CYG_HAL_STARTUP
85 When targetting the REF4955 board it is possible to build
86 the system for either RAM bootstrap or ROM bootstrap. RAM
87 bootstrap generally requires that the board
88 is equipped with ROMs containing a suitable ROM monitor or
89 equivalent software that allows GDB to download the eCos
90 application on to the board. The ROM bootstrap typically
91 requires that the eCos application be blown into EPROMs or
92 equivalent technology."
95 cdl_option CYGHWR_HAL_MIPS_TX49_REF4955_ENDIAN {
96 display "Board endian mode"
98 legal_values {"big" "little"}
102 The TX4955 Reference Platform can be used in either big or
103 little endian mode. This option select which. The board
104 will also need to be reconfigured if this option changes."
106 cdl_option CYGHWR_HAL_MIPS_TX49_REF4955_ENDIAN_SET {
107 display "Communicate endian setting to variant HAL"
108 active_if {CYGHWR_HAL_MIPS_TX49_REF4955_ENDIAN == "big"}
110 implements CYGINT_HAL_MIPS_MSBFIRST
113 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
114 display "Number of communication channels on the board"
119 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
120 display "Debug serial port"
121 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
123 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
126 The REF4955 board has two separate serial ports. This option
127 chooses which of these ports will be used to connect to a host
131 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
132 display "Diagnostic serial port"
133 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
135 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
138 The REF4955 board has two separate serial ports. This option
139 chooses which of these ports will be used for diagnostic output."
142 # The "-o file" is a workaround for CR100958 - without it the
143 # output file would end up in the source directory under CygWin.
144 # n.b. grep does not behave itself under win32
146 <PREFIX>/include/cyg/hal/plf_defs.inc : <PACKAGE>/src/plf_mk_defs.c
147 $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,plf_defs.tmp -o plf_mk_defs.tmp -S $<
148 fgrep .equ plf_mk_defs.tmp | sed s/#// > $@
149 @echo $@ ": \\" > $(notdir $@).deps
150 @tail -n +2 plf_defs.tmp >> $(notdir $@).deps
151 @echo >> $(notdir $@).deps
152 @rm plf_defs.tmp plf_mk_defs.tmp
155 # Real-time clock/counter specifics
156 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
157 display "Real-time clock constants."
160 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
161 display "Real-time clock numerator"
163 default_value 1000000000
165 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
166 display "Real-time clock denominator"
170 cdl_option CYGNUM_HAL_RTC_PERIOD {
171 display "Real-time clock period"
173 default_value { 660000 }
175 The count and compare registers of the TX49 are used
176 to drive the eCos kernel RTC. The count register
177 increments at 66MHz on the REF4955."
181 cdl_component CYGBLD_GLOBAL_OPTIONS {
182 display "Global build options"
186 Global build options including control over
187 compiler flags, linker flags and choice of toolchain."
190 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
191 display "Global command prefix"
194 default_value { "mips-tx49-elf" }
196 This option specifies the command prefix used when
197 invoking the build tools."
200 cdl_option CYGBLD_GLOBAL_CFLAGS {
201 display "Global compiler flags"
204 default_value { CYGPKG_HAL_MIPS_MSBFIRST ? "-mips2 -EB -mabi=eabi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" : "-mips2 -EL -mabi=eabi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
206 This option controls the global compiler flags which
207 are used to compile all packages by
208 default. Individual packages may define
209 options which override these global flags."
212 cdl_option CYGBLD_GLOBAL_LDFLAGS {
213 display "Global linker flags"
216 default_value { CYGPKG_HAL_MIPS_MSBFIRST ? "-g -mips2 -EB -mabi=eabi -nostdlib -Wl,--gc-sections -Wl,-static" : "-g -mips2 -EL -mabi=eabi -nostdlib -Wl,--gc-sections -Wl,-static" }
218 This option controls the global linker flags. Individual
219 packages may define options which override these global flags."
222 cdl_option CYGBLD_BUILD_GDB_STUBS {
223 display "Build GDB stub ROM image"
225 requires { CYG_HAL_STARTUP == "ROM" }
226 requires CYGSEM_HAL_ROM_MONITOR
227 requires CYGBLD_BUILD_COMMON_GDB_STUBS
228 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
229 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
230 requires ! CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
231 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
232 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
233 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
236 This option enables the building of the GDB stubs for the
237 board. The common HAL controls takes care of most of the
238 build process, but the final conversion from ELF image to
239 SREC data is handled by the platform CDL, allowing
240 relocation of the data if necessary."
243 <PREFIX>/bin/gdb_module.srec : <PREFIX>/bin/gdb_module.img
244 $(OBJCOPY) --strip-unneeded -O srec $< pre-swap.srec
245 $(OBJCOPY) --strip-unneeded --change-addresses 0x40400000 $< be-swap.img
246 $(OBJCOPY) -O binary be-swap.img be-swap.bin
247 $(REPOSITORY)/$(PACKAGE)/misc/swap4.tcl be-swap.bin be.bin
248 $(OBJCOPY) --change-address 0xbfc00000 -I binary -O srec be.bin $@
253 cdl_component CYGHWR_MEMORY_LAYOUT {
254 display "Memory layout"
257 calculated { CYG_HAL_STARTUP == "RAM" ? "mips_tx49_ref4955_ram" : \
258 "mips_tx49_ref4955_rom" }
260 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
261 display "Memory layout linker script fragment"
264 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
265 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_tx49_ref4955_ram.ldi>" : \
266 "<pkgconf/mlt_mips_tx49_ref4955_rom.ldi>" }
269 cdl_option CYGHWR_MEMORY_LAYOUT_H {
270 display "Memory layout header file"
273 define -file system.h CYGHWR_MEMORY_LAYOUT_H
274 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_tx49_ref4955_ram.h>" : \
275 "<pkgconf/mlt_mips_tx49_ref4955_rom.h>" }
279 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
280 display "Work with a ROM monitor"
282 legal_values { "GDB_stubs" }
283 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
284 parent CYGPKG_HAL_ROM_MONITOR
285 requires { CYG_HAL_STARTUP == "RAM" }
287 Support can be enabled for GDB stubs.
288 This support changes various eCos semantics such as the encoding
289 of diagnostic output, or the overriding of hardware interrupt
291 \"GDB_stubs\" provides support when GDB stubs are
292 included in the ROM monitor or boot ROM, allowing debugging
296 cdl_option CYGSEM_HAL_ROM_MONITOR {
297 display "Behave as a ROM monitor"
300 parent CYGPKG_HAL_ROM_MONITOR
301 requires { CYG_HAL_STARTUP == "ROM" }
303 Enable this option if this program is to be used as a ROM monitor,
304 i.e. applications will be loaded into RAM on the board, and this
305 ROM monitor may process exceptions or interrupts generated from the
306 application. This enables features such as utilizing a separate
307 interrupt stack when exceptions are generated."