OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [mips/] [malta/] [v2_0/] [cdl/] [hal_mips_malta.cdl] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_mips_malta.cdl
4
#
5
#      MIPS Malta 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):      dmoseley
44
# Original data:  bartv
45
# Contributors:   dmoseley, jskov
46
# Date:           2000-06-06
47
#
48
#####DESCRIPTIONEND####
49
#
50
# ====================================================================
51
 
52
cdl_package CYGPKG_HAL_MIPS_MALTA {
53
    display  "Malta evaluation board"
54
    parent        CYGPKG_HAL_MIPS
55
    requires      { ((((CYGHWR_HAL_MIPS_MIPS32_CORE == "4Kc") || \
56
                       (CYGHWR_HAL_MIPS_MIPS32_CORE == "4Kp") || \
57
                       (CYGHWR_HAL_MIPS_MIPS32_CORE == "4Km")) && CYGPKG_HAL_MIPS_MIPS32) || \
58
                     (((CYGHWR_HAL_MIPS_MIPS64_CORE == "5K") || \
59
                       (CYGHWR_HAL_MIPS_MIPS64_CORE == "20K")) && CYGPKG_HAL_MIPS_MIPS64)) \
60
                  }
61
    requires      CYGPKG_IO_PCI
62
    include_dir   cyg/hal
63
    description   "
64
           The Malta HAL package should be used when targetting the
65
           actual hardware."
66
 
67
    compile       hal_diag.c platform.S plf_misc.c ser16c550c.c smsc37m81x.c
68
 
69
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
70
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
71
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
72
    implements    CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
73
    implements    CYGINT_HAL_PLF_IF_IDE
74
 
75
    cdl_option CYGBLD_HAL_TARGET_H {
76
        display       "Variant header"
77
        flavor        data
78
        no_define
79
        calculated { CYGPKG_HAL_MIPS_MIPS32 ? "" : \
80
                                              "" }
81
        define -file system.h CYGBLD_HAL_TARGET_H
82
        description   "Variant header."
83
 
84
        define_proc {
85
            puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
86
            puts $::cdl_system_header ""
87
            puts $::cdl_system_header "/* Make sure we get the CORE type definitions for HAL_PLATFORM_CPU */"
88
            puts $::cdl_system_header "#include CYGBLD_HAL_TARGET_H"
89
            puts $::cdl_system_header "#define HAL_PLATFORM_BOARD    \"Malta\""
90
            puts $::cdl_system_header "#define HAL_PLATFORM_EXTRA    \"\""
91
            puts $::cdl_system_header ""
92
            puts $::cdl_system_header "#if defined(CYGHWR_HAL_MIPS_MIPS32_CORE_4Kc)"
93
            puts $::cdl_system_header "#  define HAL_PLATFORM_CPU    \"MIPS32 4Kc\""
94
            puts $::cdl_system_header "#elif defined(CYGHWR_HAL_MIPS_MIPS32_CORE_4Kp)"
95
            puts $::cdl_system_header "#  define HAL_PLATFORM_CPU    \"MIPS32 4Kp\""
96
            puts $::cdl_system_header "#elif defined(CYGHWR_HAL_MIPS_MIPS32_CORE_4Km)"
97
            puts $::cdl_system_header "#  define HAL_PLATFORM_CPU    \"MIPS32 4Km\""
98
            puts $::cdl_system_header "#elif defined(CYGHWR_HAL_MIPS_MIPS64_CORE_5K)"
99
            puts $::cdl_system_header "#  define HAL_PLATFORM_CPU    \"MIPS64 5K\""
100
            puts $::cdl_system_header "#elif defined(CYGHWR_HAL_MIPS_MIPS64_CORE_20K)"
101
            puts $::cdl_system_header "#  define HAL_PLATFORM_CPU    \"MIPS64 20K\""
102
            puts $::cdl_system_header "#else"
103
            puts $::cdl_system_header "#  error Unknown Core"
104
            puts $::cdl_system_header "#endif"
105
            puts $::cdl_system_header ""
106
        }
107
 
108
    }
109
 
110
    cdl_component CYG_HAL_STARTUP {
111
        display       "Startup type"
112
        flavor        data
113
        legal_values  {"RAM" "ROM"}
114
        default_value {"RAM"}
115
        no_define
116
        define -file system.h CYG_HAL_STARTUP
117
        description   "
118
            Currently only ROM startup type is supported."
119
    }
120
 
121
    # The "-o file" is a workaround for CR100958 - without it the
122
    # output file would end up in the source directory under CygWin.
123
    # n.b. grep does not behave itself under win32
124
    make -priority 1 {
125
        /include/cyg/hal/plf_defs.inc : /src/plf_mk_defs.c
126
        $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,plf_defs.tmp -o plf_mk_defs.tmp -S $<
127
        fgrep .equ plf_mk_defs.tmp | sed s/#// > $@
128
        @echo $@ ": \\" > $(notdir $@).deps
129
        @tail +2 plf_defs.tmp >> $(notdir $@).deps
130
        @echo >> $(notdir $@).deps
131
        @rm plf_defs.tmp plf_mk_defs.tmp
132
    }
133
 
134
    cdl_option CYGHWR_HAL_MIPS_MALTA_CPU_CLOCK {
135
        display          "CPU clock speed"
136
        flavor           data
137
        calculated       80000000
138
        description      "
139
                This option specifies the CPU clock."
140
    }
141
 
142
    # Real-time clock/counter specifics
143
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
144
        display       "Real-time clock constants."
145
        flavor        none
146
 
147
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
148
            display       "Real-time clock numerator"
149
            flavor        data
150
            calculated    1000000000
151
        }
152
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
153
            display       "Real-time clock denominator"
154
            flavor        data
155
            calculated    100
156
        }
157
        cdl_option CYGNUM_HAL_RTC_PERIOD {
158
            display       "Real-time clock period"
159
            flavor        data
160
            calculated    { (CYGHWR_HAL_MIPS_MALTA_CPU_CLOCK / 2) / CYGNUM_HAL_RTC_DENOMINATOR }
161
            description   "
162
                The count and compare registers of the Malta are used
163
                to drive the eCos kernel RTC. The count register
164
                increments at half the CPU clock speed."
165
        }
166
    }
167
 
168
    cdl_option CYGBLD_BUILD_GDB_STUBS {
169
        display "Build GDB stub ROM image"
170
        default_value 0
171
        parent CYGBLD_GLOBAL_OPTIONS
172
        requires { CYG_HAL_STARTUP == "ROM" }
173
        requires CYGSEM_HAL_ROM_MONITOR
174
        requires CYGBLD_BUILD_COMMON_GDB_STUBS
175
        requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
176
        requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
177
        requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
178
        requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
179
        requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
180
        no_define
181
        description "
182
                This option enables the building of the GDB stubs for the
183
                board. The common HAL controls takes care of most of the
184
                build process, but the final conversion from ELF image to
185
                binary data is handled by the platform CDL, allowing
186
                relocation of the data if necessary."
187
 
188
        make -priority 320 {
189
            /bin/gdb_module.bin : /bin/gdb_module.img
190
            $(OBJCOPY) -O binary $< $@
191
        }
192
    }
193
 
194
 
195
    cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
196
        display       "Number of breakpoints supported by the HAL."
197
        flavor        data
198
        default_value 25
199
        description   "
200
            This option determines the number of breakpoints supported by the HAL."
201
    }
202
 
203
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
204
        display      "Number of communication channels on the board"
205
        flavor       data
206
        calculated   2
207
    }
208
 
209
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
210
        display          "Debug serial port"
211
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
212
        flavor data
213
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
214
        default_value    0
215
        description      "
216
           The Malta board has only one serial port. This option
217
           chooses which port will be used to connect to a host
218
           running GDB."
219
    }
220
 
221
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
222
        display          "Diagnostic serial port"
223
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
224
        flavor data
225
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
226
        default_value    0
227
        description      "
228
           The Malta board has only one serial port.  This option
229
           chooses which port will be used for diagnostic output."
230
     }
231
 
232
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
233
        display       "Console/GDB serial port baud rate"
234
        flavor        data
235
        legal_values  9600 19200 38400 57600 115200
236
        default_value 38400
237
        define        CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD
238
        description   "
239
            This option controls the default baud rate used for the
240
            Console/GDB connection."
241
    }
242
 
243
    cdl_component CYGHWR_MEMORY_LAYOUT {
244
        display "Memory layout"
245
        flavor data
246
        no_define
247
        calculated { CYG_HAL_STARTUP == "RAM" ? "mips_malta_ram" : \
248
                                                "mips_malta_rom" }
249
 
250
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
251
            display "Memory layout linker script fragment"
252
            flavor data
253
            no_define
254
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
255
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
256
                                                    "" }
257
        }
258
 
259
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
260
            display "Memory layout header file"
261
            flavor data
262
            no_define
263
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
264
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
265
                                                    "" }
266
        }
267
    }
268
 
269
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
270
        display       "Work with a ROM monitor"
271
        flavor        booldata
272
        legal_values  { "Generic" "GDB_stubs" }
273
        default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
274
        parent        CYGPKG_HAL_ROM_MONITOR
275
        requires      { CYG_HAL_STARTUP == "RAM" }
276
        description   "
277
            Support can be enabled for three different varieties of ROM monitor.
278
            This support changes various eCos semantics such as the encoding
279
            of diagnostic output, or the overriding of hardware interrupt
280
            vectors.
281
            Firstly there is \"Generic\" support which prevents the HAL
282
            from overriding the hardware vectors that it does not use, to
283
            instead allow an installed ROM monitor to handle them. This is
284
            the most basic support which is likely to be common to most
285
            implementations of ROM monitor.
286
            \"GDB_stubs\" provides support when GDB stubs are
287
            included in the ROM monitor or boot ROM."
288
    }
289
 
290
    cdl_option CYGSEM_HAL_ROM_MONITOR {
291
        display       "Behave as a ROM monitor"
292
        flavor        bool
293
        default_value 0
294
        parent        CYGPKG_HAL_ROM_MONITOR
295
        requires      { CYG_HAL_STARTUP == "ROM" }
296
        description   "
297
            Enable this option if this program is to be used as a ROM monitor,
298
            i.e. applications will be loaded into RAM on the board, and this
299
            ROM monitor may process exceptions or interrupts generated from the
300
            application. This enables features such as utilizing a separate
301
            interrupt stack when exceptions are generated."
302
    }
303
 
304
    cdl_component CYGPKG_CYGMON_HAL_OPTIONS {
305
        display       "CygMon HAL options"
306
        flavor        none
307
        no_define
308
        parent        CYGPKG_CYGMON
309
        active_if     CYGPKG_CYGMON
310
        description   "
311
            This option also lists the target's requirements for a valid CygMon
312
            configuration."
313
 
314
        cdl_option CYGBLD_BUILD_CYGMON_BIN {
315
            display       "Build CygMon ROM binary image"
316
            active_if     CYGBLD_BUILD_CYGMON
317
            default_value 1
318
            no_define
319
            description "This option enables the conversion of the CygMon ELF
320
                         image to a binary image suitable for ROM programming."
321
 
322
            make -priority 325 {
323
                /bin/cygmon.srec : /bin/cygmon.elf
324
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
325
                $(OBJCOPY) -O srec $< $@
326
            }
327
        }
328
    }
329
 
330
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
331
        display       "Redboot HAL options"
332
        flavor        none
333
        no_define
334
        parent        CYGPKG_REDBOOT
335
        active_if     CYGPKG_REDBOOT
336
        description   "
337
            This option lists the target's requirements for a valid Redboot
338
            configuration."
339
 
340
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
341
            display       "Build Redboot ROM binary image"
342
            active_if     CYGBLD_BUILD_REDBOOT
343
            default_value 1
344
            no_define
345
            description "This option enables the conversion of the Redboot ELF
346
                         image to a binary image suitable for ROM programming."
347
 
348
            compile -library=libextras.a
349
 
350
            make -priority 325 {
351
                /bin/redboot.srec : /bin/redboot.elf
352
                $(OBJCOPY) --strip-all $< $(@:.srec=.img)
353
                $(OBJCOPY) -O srec $< $@
354
            }
355
        }
356
    }
357
 
358
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.