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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_mips_rm7000_ocelot.cdl
4
#
5
#      RM7000/OCELOT 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_RM7000_OCELOT {
53
    display       "QED Ocelot board"
54
    parent        CYGPKG_HAL_MIPS
55
    requires      CYGPKG_HAL_MIPS_RM7000
56
    define_header hal_mips_rm7000_ocelot.h
57
    include_dir   cyg/hal
58
    description   "
59
           The Ocelot HAL package should be used when targetting the
60
           actual hardware."
61
 
62
    compile       platform.S plf_misc.c plf_stub.c ns16552.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   "
70
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
71
 
72
        puts $::cdl_header "#define CYGHWR_HAL_MIPS_WARMSTART_COLDSTART"
73
    }
74
 
75
    cdl_component CYG_HAL_STARTUP {
76
        display       "Startup type"
77
        flavor        data
78
        legal_values  {"RAM" "ROM"}
79
        default_value {"RAM"}
80
        no_define
81
        define -file system.h CYG_HAL_STARTUP
82
        description   "
83
           When targetting the Ocelot board it is possible to build
84
           the system for either RAM bootstrap or ROM bootstrap. RAM
85
           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."
91
    }
92
 
93
    cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_ENDIAN {
94
        display "Board endian mode"
95
        flavor data
96
        legal_values {"big" "little"}
97
        default_value {"big"}
98
        no_define
99
        description "
100
            The Ocelot platform can be used in either big or
101
            little endian mode. This option select which. The board
102
            will also need to be reconfigured if this option changes."
103
    }
104
    cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_ENDIAN_SET {
105
        display "Communicate endian setting to variant HAL"
106
        active_if {CYGHWR_HAL_MIPS_RM7000_OCELOT_ENDIAN == "big"}
107
        calculated 1
108
        implements CYGINT_HAL_MIPS_MSBFIRST
109
    }
110
 
111
   cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_PCI_MEM_MAP_BASE {
112
       display            "Base of memory accessible via PCI space"
113
       flavor             data
114
       legal_values       {     0xf200000 0xf300000 0xf400000 0xf500000
115
                                0xf600000 0xf700000 0xf800000 0xf900000
116
                                0xfa00000 0xfb00000 0xfc00000 0xfd00000
117
                                0xfe00000 0xff00000
118
                          }
119
       default_value      0x0ff00000
120
       active_if          CYGPKG_IO_PCI
121
       description "
122
           This option determines the base of the Ocelot memory which
123
           can be accessed via the PCI bus. The default is to allow
124
           access to the upper 1MB of a 256MB system.
125
           NB: We advise *against* changing this option.
126
           The value MUST match the base address of the section
127
           'pci_window' in the Memory Layout Tool else this memory area
128
           will be consumed by the malloc heap.
129
           This error condition can only be detected at runtime in
130
           current versions of the configuration tools.
131
           CLI users can edit include/pkgconf/mlt_mips_rm7000_ocelot_*.h
132
           and include/pkgconf/mlt_mips_rm7000_ocelot_*.ldi to achieve the
133
           same effects as moving that region in the MLT."
134
   }
135
 
136
   cdl_option CYGHWR_HAL_MIPS_RM7000_OCELOT_PCI_MEM_MAP_SIZE {
137
       display            "Size of memory accessible via PCI space"
138
       flavor             data
139
       legal_values       {     0x100000 0x200000 0x300000 0x400000
140
                                0x500000 0x600000 0x700000 0x800000
141
                          }
142
       default_value      0x00100000
143
       active_if          CYGPKG_IO_PCI
144
       description "
145
           This option determines the size of the Ocelot memory which
146
           can be accessed via the PCI bus. The default is to allow
147
           access to the upper 1MB of a 256MB system.
148
           NB: We advise *against* changing this option.
149
           The value MUST match the size of the section 'pci_window' in the
150
           Memory Layout Tool else this memory area will be consumed by the
151
           malloc heap.
152
           Further caveats in the PCI base option."
153
   }
154
 
155
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
156
        display      "Number of communication channels on the board"
157
        flavor       data
158
        calculated   2
159
    }
160
 
161
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
162
        display          "Debug serial port"
163
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
164
        flavor data
165
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
166
        default_value    0
167
        description      "
168
           The Ocelot board has two separate serial ports.  This option
169
           chooses which of these ports will be used to connect to a host
170
           running GDB."
171
    }
172
 
173
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
174
        display          "Diagnostic serial port"
175
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
176
        flavor data
177
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
178
        default_value    0
179
        description      "
180
           The Ocelot board has two separate serial ports.  This option
181
           chooses which of these ports will be used for diagnostic output."
182
    }
183
 
184
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
185
        display       "Default baud rate used for serial ports"
186
        flavor        data
187
        legal_values  9600 19200 38400 115200
188
        default_value 38400
189
        description   "
190
            This option selects the baud rate used for the serial ports."
191
    }
192
 
193
    # The "-o file" is a workaround for CR100958 - without it the
194
    # output file would end up in the source directory under CygWin.
195
    # n.b. grep does not behave itself under win32
196
    make -priority 1 {
197
        /include/cyg/hal/plf_defs.inc : /src/plf_mk_defs.c
198
        $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,plf_defs.tmp -o plf_mk_defs.tmp -S $<
199
        fgrep .equ plf_mk_defs.tmp | sed s/#// > $@
200
        @echo $@ ": \\" > $(notdir $@).deps
201
        @tail +2 plf_defs.tmp >> $(notdir $@).deps
202
        @echo >> $(notdir $@).deps
203
        @rm plf_defs.tmp plf_mk_defs.tmp
204
    }
205
 
206
    cdl_option CYGHWR_HAL_MIPS_RM7000_CPU_CLOCK {
207
        display       "CPU clock speed"
208
        flavor        data
209
        legal_values  { 300000000 400000000 500000000 600000000 }
210
        default_value 300000000
211
        description   "
212
            The CPU clock speed in Hz."
213
    }
214
 
215
    # Real-time clock/counter specifics
216
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
217
        display       "Real-time clock constants."
218
        flavor        none
219
 
220
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
221
            display       "Real-time clock numerator"
222
            flavor        data
223
            calculated    1000000000
224
        }
225
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
226
            display       "Real-time clock denominator"
227
            flavor        data
228
            calculated    100
229
        }
230
        cdl_option CYGNUM_HAL_RTC_PERIOD {
231
            display       "Real-time clock period"
232
            flavor        data
233
            calculated    { (CYGHWR_HAL_MIPS_RM7000_CPU_CLOCK / 2) / CYGNUM_HAL_RTC_DENOMINATOR }
234
            description   "
235
                The count and compare registers of the RM7000 are used
236
                to drive the eCos kernel RTC. The count register
237
                increments at half the CPU clock speed."
238
        }
239
    }
240
 
241
    cdl_component CYGBLD_GLOBAL_OPTIONS {
242
        display "Global build options"
243
        flavor  none
244
        parent  CYGPKG_NONE
245
        description   "
246
            Global build options including control over
247
            compiler flags, linker flags and choice of toolchain."
248
 
249
 
250
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
251
            display "Global command prefix"
252
            flavor  data
253
            no_define
254
            default_value { "mipsisa32-elf" }
255
#            default_value { "mips-tx49-elf" }
256
#            default_value { "mips64vr5000-elf" }
257
#            default_value { "mips64vr4300-elf" }
258
            description "
259
                This option specifies the command prefix used when
260
                invoking the build tools."
261
        }
262
 
263
        cdl_option CYGBLD_GLOBAL_CFLAGS {
264
            display "Global compiler flags"
265
            flavor  data
266
            no_define
267
# -mabi=eabi -mips2
268
            default_value { CYGPKG_HAL_MIPS_MSBFIRST ? "-G0 -mips2 -EB -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" : "-G0 -mips2 -EL -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
269
            description   "
270
                This option controls the global compiler flags which
271
                are used to compile all packages by
272
                default. Individual packages may define
273
                options which override these global flags."
274
        }
275
 
276
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
277
            display "Global linker flags"
278
            flavor  data
279
            no_define
280
#  -mabi=eabi -mips2
281
            default_value { CYGPKG_HAL_MIPS_MSBFIRST ? "-G0 -g -mips32 -EB -nostdlib -Wl,--gc-sections -Wl,-static" : "-g -mips2 -EL -mabi=eabi -nostdlib -Wl,--gc-sections -Wl,-static" }
282
            description   "
283
                This option controls the global linker flags. Individual
284
                packages may define options which override these global flags."
285
        }
286
 
287
        cdl_option CYGBLD_BUILD_GDB_STUBS {
288
            display "Build GDB stub ROM image"
289
            default_value 0
290
            requires { CYG_HAL_STARTUP == "ROM" }
291
            requires CYGSEM_HAL_ROM_MONITOR
292
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
293
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
294
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
295
            requires ! CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
296
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
297
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
298
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
299
            no_define
300
            description "
301
                This option enables the building of the GDB stubs for the
302
                board. The common HAL controls takes care of most of the
303
                build process, but the final conversion from ELF image to
304
                SREC data is handled by the platform CDL, allowing
305
                relocation of the data if necessary."
306
 
307
            make -priority 320 {
308
                /bin/gdb_module.srec : /bin/gdb_module.img
309
            }
310
        }
311
    }
312
 
313
    cdl_component CYGHWR_MEMORY_LAYOUT {
314
        display "Memory layout"
315
        flavor data
316
        no_define
317
        calculated { CYG_HAL_STARTUP == "RAM" ? "mips_rm7000_ocelot_ram" : \
318
                                                "mips_rm7000_ocelot_rom" }
319
 
320
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
321
            display "Memory layout linker script fragment"
322
            flavor data
323
            no_define
324
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
325
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
326
                                                    "" }
327
        }
328
 
329
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
330
            display "Memory layout header file"
331
            flavor data
332
            no_define
333
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
334
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
335
                                                    "" }
336
        }
337
    }
338
 
339
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
340
        display       "Work with a ROM monitor"
341
        flavor        booldata
342
        legal_values  { "GDB_stubs" }
343
        default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
344
        parent        CYGPKG_HAL_ROM_MONITOR
345
        requires      { CYG_HAL_STARTUP == "RAM" }
346
        description   "
347
            Support can be enabled for GDB stubs.
348
            This support changes various eCos semantics such as the encoding
349
            of diagnostic output, or the overriding of hardware interrupt
350
            vectors.
351
            \"GDB_stubs\" provides support when GDB stubs are
352
            included in the ROM monitor or boot ROM, allowing debugging
353
            via GDB."
354
    }
355
 
356
    cdl_option CYGSEM_HAL_ROM_MONITOR {
357
        display       "Behave as a ROM monitor"
358
        flavor        bool
359
        default_value 0
360
        parent        CYGPKG_HAL_ROM_MONITOR
361
        requires      { CYG_HAL_STARTUP == "ROM" }
362
        description   "
363
            Enable this option if this program is to be used as a ROM monitor,
364
            i.e. applications will be loaded into RAM on the board, and this
365
            ROM monitor may process exceptions or interrupts generated from the
366
            application. This enables features such as utilizing a separate
367
            interrupt stack when exceptions are generated."
368
    }
369
 
370
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
371
        display       "Redboot HAL options"
372
        flavor        none
373
        no_define
374
        parent        CYGPKG_REDBOOT
375
        active_if     CYGPKG_REDBOOT
376
        description   "
377
            This option lists the target's requirements for a valid Redboot
378
            configuration."
379
 
380
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
381
            display       "Build Redboot ROM binary image"
382
            active_if     CYGBLD_BUILD_REDBOOT
383
            default_value 1
384
            no_define
385
            description "This option enables the conversion of the Redboot ELF
386
                         image to the various relocated SREC images needed
387
                         for flash updating."
388
 
389
            make -priority 325 {
390
                /bin/redboot.bin : /bin/redboot.elf
391
                $(OBJCOPY) --strip-unneeded $< $(@:.bin=.img)
392
                $(OBJCOPY) -O srec $(@:.bin=.img) $(@:.bin=.srec)
393
                $(OBJCOPY) -O binary $(@:.bin=.img) $@
394
            }
395
        }
396
    }
397
}

powered by: WebSVN 2.1.0

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