]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/mips/mips32/v2_0/cdl/hal_mips_mips32.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / mips / mips32 / v2_0 / cdl / hal_mips_mips32.cdl
1 # ====================================================================
2 #
3 #      hal_mips_mips32.cdl
4 #
5 #      MIPS 32/64 variant architectural 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):      dmoseley
44 # Original data:  bartv, nickg, t.michals@attbi.com
45 # Contributors:
46 # Date:           2000-06-07
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_HAL_MIPS_MIPS32 {
53     display       "MIPS32 variant"
54     parent        CYGPKG_HAL_MIPS
55     hardware
56     include_dir   cyg/hal
57     description   "
58            The MIPS32 architecture HAL package provides generic support
59            for this processor architecture. It is also necessary to
60            select a specific target platform HAL package."
61
62     cdl_option CYGHWR_HAL_MIPS_MIPS32_CORE {
63         display       "Mips32 processor core used"
64         flavor        data
65         default_value {"4Kc"}
66         legal_values  {"4Kc" "4Kp" "4Km"}
67         description   "
68             The MIPS 32 cores come in (at least) 3 flavors.  The main
69             differences being in the MMU"
70     }
71
72     implements    CYGINT_HAL_MIPS_VARIANT
73
74     cdl_option CYGHWR_HAL_MIPS_FPU {
75         display    "Variant FPU support"
76         calculated 0
77     }
78     
79    cdl_option CYGHWR_HAL_MIPS_MIPS32_ENDIAN {
80         display       "Endian format to use"
81         flavor        data
82         default_value {"Little" }
83         legal_values  {"Little" "Big" }
84         description   "
85             The MIPS 32 can use either a big or little endian format.
86             This allows the flexibility to choose which format to use
87             to create a HAL."
88     }
89
90     cdl_option CYGPKG_HAL_MIPS_LSBFIRST {
91         display    "CPU Variant little-endian"
92         calculated {   CYGHWR_HAL_MIPS_MIPS32_ENDIAN == "Little"}
93     }
94
95
96     cdl_option CYGPKG_HAL_MIPS_MSBFIRST {
97         display    "CPU Variant big-endian"
98         calculated {   CYGHWR_HAL_MIPS_MIPS32_ENDIAN == "Big"}
99     }
100
101     cdl_option CYGPKG_HAL_MIPS_GDB_REPORT_CP0 {
102         display "Report contents of CP0 to GDB"
103         calculated 0
104     }
105     
106     define_proc {
107         puts $::cdl_header "#include <pkgconf/hal_mips.h>"
108     }
109
110     compile       var_misc.c variant.S
111
112     make {
113         <PREFIX>/lib/target.ld: <PACKAGE>/src/mips_mips32.ld
114         $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
115         @echo $@ ": \\" > $(notdir $@).deps
116         @tail -n +2 target.tmp >> $(notdir $@).deps
117         @echo >> $(notdir $@).deps
118         @rm target.tmp
119     }
120
121     cdl_option CYGBLD_LINKER_SCRIPT {
122         display "Linker script"
123         flavor data
124         no_define
125         calculated  { "src/mips_mips32.ld" }
126     }
127
128
129     cdl_component CYGBLD_GLOBAL_OPTIONS {
130         display "Global build options"
131         flavor  none
132         parent  CYGPKG_NONE
133         description   "
134             Global build options including control over
135             compiler flags, linker flags and choice of toolchain."
136
137
138         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
139             display "Global command prefix"
140             flavor  data
141             no_define
142             default_value { "mipsisa32-elf" }
143             description "
144                 This option specifies the command prefix used when
145                 invoking the build tools."
146         }
147
148         cdl_option CYGBLD_GLOBAL_CFLAGS {
149             display "Global compiler flags"
150             flavor  data
151             no_define
152             default_value { CYGPKG_HAL_MIPS_LSBFIRST ? "-mips32 -EL -msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -G0" : \
153                                "-mips32 -EB -msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -G0"  }
154             description   "
155                 This option controls the global compiler flags which
156                 are used to compile all packages by
157                 default. Individual packages may define
158                 options which override these global flags."
159         }
160
161         cdl_option CYGBLD_GLOBAL_LDFLAGS {
162             display "Global linker flags"
163             flavor  data
164             no_define
165             default_value {CYGPKG_HAL_MIPS_LSBFIRST ? "-EL -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static" :\
166                             "-msoft-float -EB -g -nostdlib -Wl,--gc-sections -Wl,-static"}
167             description   "
168                 This option controls the global linker flags. Individual
169                 packages may define options which override these global flags."
170         }
171
172     }
173     
174 }
175
176 # EOF hal_mips_mips32.cdl