]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/mips/ref4955/v2_0/cdl/hal_mips_tx49_ref4955.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / mips / ref4955 / v2_0 / cdl / hal_mips_tx49_ref4955.cdl
1 # ====================================================================
2 #
3 #      hal_mips_tx49_ref4955.cdl
4 #
5 #      TX49/REF4955 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):      jskov
44 # Original data:  bartv
45 # Contributors:
46 # Date:           2000-05-15
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
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
57     include_dir   cyg/hal
58     description   "
59            The REF4955 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 pc87338.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_tx49.h>"
70         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_mips_tx49_ref4955.h>"
71
72         puts $::cdl_header "#define CYGHWR_HAL_MIPS_WARMSTART_COLDSTART"
73
74         puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 1000000"
75     }
76
77     cdl_component CYG_HAL_STARTUP {
78         display       "Startup type"
79         flavor        data
80         legal_values  {"RAM" "ROM"}
81         default_value {"RAM"}
82         no_define
83         define -file system.h CYG_HAL_STARTUP
84         description   "
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."
93     }
94
95     cdl_option CYGHWR_HAL_MIPS_TX49_REF4955_ENDIAN {
96         display "Board endian mode"
97         flavor data
98         legal_values {"big" "little"}
99         default_value {"big"}
100         no_define
101         description "
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."
105     }
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"}
109         calculated 1
110         implements CYGINT_HAL_MIPS_MSBFIRST
111     }
112
113     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
114         display      "Number of communication channels on the board"
115         flavor       data
116         calculated   2
117     }
118
119     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
120         display          "Debug serial port"
121         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
122         flavor data
123         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
124         default_value    0
125         description      "
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
128            running GDB."
129     }
130
131     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
132         display          "Diagnostic serial port"
133         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
134         flavor data
135         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
136         default_value    0
137         description      "
138            The REF4955 board has two separate serial ports.  This option
139            chooses which of these ports will be used for diagnostic output."
140     }
141
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
145     make -priority 1 {
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
153     }
154
155     # Real-time clock/counter specifics
156     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
157         display       "Real-time clock constants."
158         flavor        none
159     
160         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
161             display       "Real-time clock numerator"
162             flavor        data
163             default_value 1000000000
164         }
165         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
166             display       "Real-time clock denominator"
167             flavor        data
168             default_value 100
169         }
170         cdl_option CYGNUM_HAL_RTC_PERIOD {
171             display       "Real-time clock period"
172             flavor        data
173             default_value { 660000 }
174             description   "
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."
178         }
179     }
180
181     cdl_component CYGBLD_GLOBAL_OPTIONS {
182         display "Global build options"
183         flavor  none
184         parent  CYGPKG_NONE
185         description   "
186             Global build options including control over
187             compiler flags, linker flags and choice of toolchain."
188
189
190         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
191             display "Global command prefix"
192             flavor  data
193             no_define
194             default_value { "mips-tx49-elf" }
195             description "
196                 This option specifies the command prefix used when
197                 invoking the build tools."
198         }
199
200         cdl_option CYGBLD_GLOBAL_CFLAGS {
201             display "Global compiler flags"
202             flavor  data
203             no_define
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" }
205             description   "
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."
210         }
211
212         cdl_option CYGBLD_GLOBAL_LDFLAGS {
213             display "Global linker flags"
214             flavor  data
215             no_define
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" }
217             description   "
218                 This option controls the global linker flags. Individual
219                 packages may define options which override these global flags."
220         }
221
222         cdl_option CYGBLD_BUILD_GDB_STUBS {
223             display "Build GDB stub ROM image"
224             default_value 0
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
234             no_define
235             description "
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."
241
242             make -priority 320 {
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 $@
249             }
250         }
251     }
252
253     cdl_component CYGHWR_MEMORY_LAYOUT {
254         display "Memory layout"
255         flavor data
256         no_define
257         calculated { CYG_HAL_STARTUP == "RAM" ? "mips_tx49_ref4955_ram" : \
258                                                 "mips_tx49_ref4955_rom" }
259
260         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
261             display "Memory layout linker script fragment"
262             flavor data
263             no_define
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>" }
267         }
268
269         cdl_option CYGHWR_MEMORY_LAYOUT_H {
270             display "Memory layout header file"
271             flavor data
272             no_define
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>" }
276         }
277     }
278
279     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
280         display       "Work with a ROM monitor"
281         flavor        booldata
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" }
286         description   "
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
290             vectors.
291             \"GDB_stubs\" provides support when GDB stubs are
292             included in the ROM monitor or boot ROM, allowing debugging
293             via GDB."
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" }
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 }