]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/mips/idt79s334a/v2_0/cdl/hal_mips_idt32334_refidt334.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / mips / idt79s334a / v2_0 / cdl / hal_mips_idt32334_refidt334.cdl
1 # ====================================================================
2 #
3 #      hal_mips_idt32334_refIDT334.cdl
4 #
5 #      IDT32334 board HAL package configuration data
6 #
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 ##
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.
16 ##
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
20 ## for more details.
21 ##
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.
25 ##
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.
32 ##
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.
35 ##
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####
42 #
43 # Author(s):      tmichals
44 # Original data:  tmichals
45 # Contributors:
46 # Date:           2002-10-03
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_HAL_MIPS_IDT32334_REFIDT334 {
53     display  "MIPS IDT79S334A reference platform"
54     parent        CYGPKG_HAL_MIPS
55     requires      CYGPKG_HAL_MIPS_IDT32334
56     define_header hal_mips_idt32334_ref.h
57     include_dir   cyg/hal
58     description   "
59            The REFIDT334 HAL package should be used when targetting the
60            actual hardware."
61
62     compile       hal_diag.c platform.S plf_misc.c plf_stub.c ser16c550c.c
63
64     implements    CYGINT_HAL_DEBUG_GDB_STUBS
65     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
67
68     define_proc {
69         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_mips_idt32334.h>"
70         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_mips_idt32334_ref.h>"
71         
72         puts $::cdl_header "#define CYGHWR_HAL_MIPS_WARMSTART_COLDSTART"
73
74     }
75
76     cdl_component CYG_HAL_STARTUP {
77         display       "Startup type"
78         flavor        data
79         legal_values  {"RAM" "ROM" "ROMRAM"}
80         default_value {"ROM"}
81         no_define
82         define -file system.h CYG_HAL_STARTUP
83         description   "
84            When targetting the REFIDT334 board it is possible to build
85            the system for either RAM bootstrap, ROM bootstrap, or ROMRAM
86            bootstrap. RAM bootstrap generally requires that the board
87            is equipped with ROMs containing a suitable ROM monitor or
88            equivalent software that allows GDB to download the eCos
89            application on to the board, for example RedBoot. The ROM
90            bootstrap is intended for stand-alone applications and typically
91            requires that the eCos application be blown into EPROMs,
92            programmed into flash or equivalent technology. Using ROMRAM
93            will allow the program to exist in ROM, but be copied to RAM
94            during startup."
95     }
96
97
98
99     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
100         display       "Diagnostic serial port baud rate"
101         flavor        data
102         legal_values  9600 19200 38400 57600 115200
103         default_value 115200
104         description   "
105             This option selects the baud rate used for the diagnostic port.
106             Note: this should match the value chosen for the GDB port if the
107             diagnostic and GDB port are the same."
108     }
109
110     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
111         display       "GDB serial port baud rate"
112         flavor        data
113         legal_values  9600 19200 38400 57600 115200
114         default_value 115200
115         description   "
116             This option controls the baud rate used for the GDB connection."
117     }
118
119     # Real-time clock/counter specifics
120     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
121         display       "Real-time clock constants."
122         flavor        none
123     
124         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
125             display       "Real-time clock numerator"
126             flavor        data
127             default_value  10000000
128
129         }                
130
131         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
132             display       "Real-time clock denominator"
133             flavor        data
134             default_value 100
135         }
136         # Isn't a nice way to handle freq requirement!
137         cdl_option CYGNUM_HAL_RTC_PERIOD {
138             display       "Real-time clock period"
139             flavor        data
140             default_value { (CYGHWR_HAL_MIPS_CPU_FREQ_ACTUAL / 2) / CYGNUM_HAL_RTC_DENOMINATOR }            
141               description   "
142                 The count and compare registers of the MIPS core are used
143                 to drive the eCos kernel RTC. The count register
144                 increments at half the CPU clock speed."
145         }
146     }
147
148     cdl_component CYGBLD_GLOBAL_OPTIONS {
149         display "Global build options"
150         flavor  none
151         parent  CYGPKG_NONE
152         description   "
153             Global build options including control over
154             compiler flags, linker flags and choice of toolchain."
155
156
157         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
158             display "Global command prefix"
159             flavor  data
160             no_define
161             default_value { "mipsisa32-elf" }
162             description "
163                 This option specifies the command prefix used when
164                 invoking the build tools."
165         }
166
167         cdl_option CYGBLD_GLOBAL_CFLAGS {
168             display "Global compiler flags"
169             flavor  data
170             no_define
171             default_value { "-mips32 -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -fno-builtin -G0" }
172             description   "
173                 This option controls the global compiler flags which
174                 are used to compile all packages by
175                 default. Individual packages may define
176                 options which override these global flags."
177         }
178
179         cdl_option CYGBLD_GLOBAL_LDFLAGS {
180             display "Global linker flags"
181             flavor  data
182             no_define
183             default_value { "-mips32 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
184             description   "
185                 This option controls the global linker flags. Individual
186                 packages may define options which override these global flags."
187         }
188
189         cdl_option CYGBLD_BUILD_GDB_STUBS {
190             display "Build GDB stub ROM image"
191             default_value 0
192             requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM"}
193             requires CYGSEM_HAL_ROM_MONITOR
194             requires CYGBLD_BUILD_COMMON_GDB_STUBS
195             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
196             requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
197             requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
198             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
199             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
200             no_define
201             description "
202                 This option enables the building of the GDB stubs for the
203                 board. The common HAL controls takes care of most of the
204                 build process, but the final conversion from ELF image to
205                 binary data is handled by the platform CDL, allowing
206                 relocation of the data if necessary."
207
208             make -priority 320 {
209                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
210                 $(OBJCOPY) -O binary $< $@
211             }
212         }
213     }
214         
215
216     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
217         display      "Number of communication channels on the board"
218         flavor       data
219         calculated   1
220     }
221
222     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
223         display          "Debug serial port"
224         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
225         flavor data
226         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
227         default_value    0
228         description      "
229            The IDT board has only one serial port. This option
230            chooses which port will be used to connect to a host
231            running GDB."
232     }
233  
234      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
235         display          "Diagnostic serial port"
236         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
237         flavor data
238         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
239         default_value    0
240         description      "
241            The IDT board has only one serial port.  This option
242            chooses which port will be used for diagnostic output."
243     }
244
245     cdl_component CYGHWR_MEMORY_LAYOUT {
246         display "Memory layout"
247         flavor data
248         no_define
249         calculated { CYG_HAL_STARTUP == "RAM" ? "mips_idt32334_refidt334_ram" : \
250                      CYG_HAL_STARTUP == "ROM" ? "mips_idt32334_refidt334_rom" : \
251                             "mips_idt32334_refidt334_romram" }
252
253         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
254             display "Memory layout linker script fragment"
255             flavor data
256             no_define
257             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
258             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_idt32334_refidt334_ram.ldi>" : \
259                          CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_mips_idt32334_refidt334_rom.ldi>" : \
260                                                     "<pkgconf/mlt_mips_idt32334_refidt334_romram.ldi>" }
261         }
262
263         cdl_option CYGHWR_MEMORY_LAYOUT_H {
264             display "Memory layout header file"
265             flavor data
266             no_define
267             define -file system.h CYGHWR_MEMORY_LAYOUT_H
268             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_mips_idt32334_refidt334_ram.h>" : \
269                          CYG_HAL_STARTUP == "ROM" ? "<pkgconf/mlt_mips_idt32334_refidt334_rom.h>" : \
270                                                     "<pkgconf/mlt_mips_idt32334_refidt334_romram.h>" }
271         }
272     }
273
274     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
275         display       "Work with a ROM monitor"
276         flavor        booldata
277         legal_values  { "Generic" "CygMon" "GDB_stubs" }
278         default_value { CYG_HAL_STARTUP == "RAM" ? "CygMon" : 0 }
279         parent        CYGPKG_HAL_ROM_MONITOR
280         requires      { CYG_HAL_STARTUP == "RAM" }
281         description   "
282             Support can be enabled for three different varieties of ROM monitor.
283             This support changes various eCos semantics such as the encoding
284             of diagnostic output, or the overriding of hardware interrupt
285             vectors.
286             Firstly there is \"Generic\" support which prevents the HAL
287             from overriding the hardware vectors that it does not use, to
288             instead allow an installed ROM monitor to handle them. This is
289             the most basic support which is likely to be common to most
290             implementations of ROM monitor.
291             \"CygMon\" provides support for the Cygnus ROM Monitor.
292             And finally, \"GDB_stubs\" provides support when GDB stubs are
293             included in the ROM monitor or boot ROM."
294     }
295
296     cdl_option CYGSEM_HAL_ROM_MONITOR {
297         display       "Behave as a ROM monitor"
298         flavor        bool
299         default_value 0
300         parent        CYGPKG_HAL_ROM_MONITOR
301         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM"}
302         description   "
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."
308     }
309     
310
311     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
312         display       "Redboot HAL options"
313         flavor        none
314         no_define
315         parent        CYGPKG_REDBOOT
316         active_if     CYGPKG_REDBOOT
317         description   "
318             This option lists the target's requirements for a valid Redboot
319             configuration."
320
321         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
322             display       "Build Redboot ROM binary image"
323             active_if     CYGBLD_BUILD_REDBOOT
324             default_value 1
325             no_define
326             description "This option enables the conversion of the Redboot ELF
327                          image to a binary image suitable for ROM programming."
328     
329             compile -library=libextras.a
330     
331             make -priority 325 {
332                 <PREFIX>/bin/redboot.srec : <PREFIX>/bin/redboot.elf
333                 $(OBJCOPY) --strip-all $< $(@:.srec=.img)
334                 $(OBJCOPY) -O srec $< $@
335             }
336         }
337     }
338 }
339
340 # EOF hal_mips_idt32334_refidt334.cdl