1 # ====================================================================
3 # hal_mips_tx39_jmr3904.cdl
5 # TX39/JMR3904 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_TX39_JMR3904 {
53 display "JMR3904 evaluation board"
54 parent CYGPKG_HAL_MIPS
55 requires CYGPKG_HAL_MIPS_TX39
56 define_header hal_mips_tx39_jmr3904.h
59 The JMR3904 HAL package should be used when targetting the
60 actual hardware. The same package can also be used when
61 running on the full simulator, since this provides an
62 accurate simulation of the hardware including I/O devices.
63 To use the simulator in this mode the command
64 `target sim --board=jmr3904' should be used from inside gdb."
66 compile platform.S plf_misc.c plf_stub.c
68 implements CYGINT_HAL_DEBUG_GDB_STUBS
71 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_mips_tx39.h>"
72 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_mips_tx39_jmr3904.h>"
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 JMR3904 board it is possible to build
84 the system for either RAM bootstrap, ROM bootstrap, or STUB
85 bootstrap. RAM 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_TX39_JMR3904_DRAM_CONFIG {
94 display "DRAM configuration"
96 legal_values {"4MB" "8MB" "16MB"}
97 default_value {"16MB"}
99 DRAM configuration. 4MB (1MBit (x4bit) x 8), 8MByte (1MBit
100 (x4bit) x 8 x 2 banks) or 16MByte (4MBit (x4bit) x
101 8). Only change if you are aware of the consequences."
105 cdl_option CYGHWR_HAL_MIPS_TX39_JMR3904_DRAM_CONFIG_INIT {
106 display "DRAM config init"
108 description "This is the value used for the hardware."
109 calculated { CYGHWR_HAL_MIPS_TX39_JMR3904_DRAM_CONFIG == "4MB" ? 0x08013020 : \
110 CYGHWR_HAL_MIPS_TX39_JMR3904_DRAM_CONFIG == "8MB" ? 0x08013020 : 0x08024030 }
113 cdl_option CYGHWR_HAL_MIPS_TX39_JMR3904_ENABLE_TOE {
114 display "Bus timeout detection"
117 Only change if you are aware of the consequences."
120 # Real-time clock/counter specifics
121 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
122 display "Real-time clock constants."
125 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
126 display "Real-time clock numerator"
128 default_value 1000000000
130 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
131 display "Real-time clock denominator"
135 # Isn't a nice way to handle freq requirement!
136 cdl_option CYGNUM_HAL_RTC_PERIOD {
137 display "Real-time clock period"
139 legal_values { 15360 20736 }
140 default_value { CYGHWR_HAL_MIPS_CPU_FREQ == 50 ? 15360 : \
141 CYGHWR_HAL_MIPS_CPU_FREQ == 66 ? 20736 : 0 }
145 cdl_component CYGBLD_GLOBAL_OPTIONS {
146 display "Global build options"
150 Global build options including control over
151 compiler flags, linker flags and choice of toolchain."
154 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
155 display "Global command prefix"
158 default_value { "mips-tx39-elf" }
160 This option specifies the command prefix used when
161 invoking the build tools."
164 cdl_option CYGBLD_GLOBAL_CFLAGS {
165 display "Global compiler flags"
168 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" }
170 This option controls the global compiler flags which
171 are used to compile all packages by
172 default. Individual packages may define
173 options which override these global flags."
176 cdl_option CYGBLD_GLOBAL_LDFLAGS {
177 display "Global linker flags"
180 default_value { "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
182 This option controls the global linker flags. Individual
183 packages may define options which override these global flags."
186 cdl_option CYGBLD_BUILD_GDB_STUBS {
187 display "Build GDB stub ROM image"
189 requires { CYG_HAL_STARTUP == "ROM" }
190 requires CYGSEM_HAL_ROM_MONITOR
191 requires CYGBLD_BUILD_COMMON_GDB_STUBS
192 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
193 requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
194 requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
195 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
196 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
199 This option enables the building of the GDB stubs for the
200 board. The common HAL controls takes care of most of the
201 build process, but the final conversion from ELF image to
202 binary data is handled by the platform CDL, allowing
203 relocation of the data if necessary."
206 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
207 $(OBJCOPY) -O binary $< $@
212 cdl_component CYGHWR_MEMORY_LAYOUT {
213 display "Memory layout"
216 calculated { CYG_HAL_STARTUP == "RAM" ? "mips_tx39_jmr3904_ram" : \
217 "mips_tx39_jmr3904_rom" }
219 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
220 display "Memory layout linker script fragment"
223 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
224 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_tx39_jmr3904_ram.ldi>" : \
225 "<pkgconf/mlt_mips_tx39_jmr3904_rom.ldi>" }
228 cdl_option CYGHWR_MEMORY_LAYOUT_H {
229 display "Memory layout header file"
232 define -file system.h CYGHWR_MEMORY_LAYOUT_H
233 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_tx39_jmr3904_ram.h>" : \
234 "<pkgconf/mlt_mips_tx39_jmr3904_rom.h>" }
238 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
239 display "Work with a ROM monitor"
241 legal_values { "Generic" "CygMon" "GDB_stubs" }
242 default_value { CYG_HAL_STARTUP == "RAM" ? "CygMon" : 0 }
243 parent CYGPKG_HAL_ROM_MONITOR
244 requires { CYG_HAL_STARTUP == "RAM" }
246 Support can be enabled for three different varieties of ROM monitor.
247 This support changes various eCos semantics such as the encoding
248 of diagnostic output, or the overriding of hardware interrupt
250 Firstly there is \"Generic\" support which prevents the HAL
251 from overriding the hardware vectors that it does not use, to
252 instead allow an installed ROM monitor to handle them. This is
253 the most basic support which is likely to be common to most
254 implementations of ROM monitor.
255 \"CygMon\" provides support for the Cygnus ROM Monitor.
256 And finally, \"GDB_stubs\" provides support when GDB stubs are
257 included in the ROM monitor or boot ROM."
260 cdl_option CYGSEM_HAL_ROM_MONITOR {
261 display "Behave as a ROM monitor"
264 parent CYGPKG_HAL_ROM_MONITOR
265 requires { CYG_HAL_STARTUP == "ROM" }
267 Enable this option if this program is to be used as a ROM monitor,
268 i.e. applications will be loaded into RAM on the board, and this
269 ROM monitor may process exceptions or interrupts generated from the
270 application. This enables features such as utilizing a separate
271 interrupt stack when exceptions are generated."