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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [openrisc/] [orp/] [current/] [cdl/] [hal_openrisc_orp.cdl] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_openrisc_orp.cdl
4
#
5
#      OpenRISC Reference Platform (ORP) 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):      sfurman
44
# Contributors:
45
# Date:           2003-01-20
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_OPENRISC_ORP {
52
    display  "OpenRISC Reference Platform"
53
    parent        CYGPKG_HAL_OPENRISC
54
    include_dir   cyg/hal
55
    hardware
56
    description   "
57
           The ORP HAL package should be used when targetting the
58
           OpenRISC Reference Platform."
59
 
60
    compile       hal_diag.c hal_aux.c
61
 
62
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
63
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
64
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
65
    implements    CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
66
 
67
    define_proc {
68
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
69
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
70
    }
71
 
72
    cdl_component CYG_HAL_STARTUP {
73
        display       "Startup type"
74
        flavor        data
75
        legal_values  {"RAM" "ROM"}
76
        default_value {"ROM"}
77
        no_define
78
        define -file system.h CYG_HAL_STARTUP
79
        description   "
80
            Selects whether code initially runs from ROM or RAM.  In the case of ROM startup,
81
            it's possible for the code to be copied into RAM and executed there."
82
    }
83
 
84
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
85
        display       "Diagnostic serial port baud rate"
86
        flavor        data
87
        legal_values  9600 19200 38400 57600 115200 230400 460800 921600
88
        default_value 115200
89
        description   "
90
            This option selects the baud rate used for the diagnostic console.
91
            Note: this should match the value chosen for the GDB port if the
92
            diagnostic and GDB port are the same.
93
            Note: very high baud rates are useful during simulation."
94
    }
95
 
96
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
97
        display       "GDB serial port baud rate"
98
        flavor        data
99
        legal_values  9600 19200 38400 57600 115200 230400 460800 921600
100
        default_value 115200
101
        description   "
102
            This option controls the baud rate used for the GDB connection.
103
            Note: very high baud rates are useful during simulation."
104
    }
105
 
106
    # Real-time clock/counter specifics
107
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
108
        display       "Real-time clock constants."
109
        flavor        none
110
 
111
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
112
            display       "Real-time clock numerator"
113
            flavor        data
114
            calculated    1000000000
115
        }
116
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
117
            display       "Real-time clock denominator"
118
            flavor        data
119
            calculated    100
120
        }
121
        cdl_option CYGNUM_HAL_RTC_PERIOD {
122
            display       "Real-time clock period"
123
            flavor        data
124
# sfurman: Probably ought be "calculated" - not "default_value"
125
# However, it is handy to override this value during simulator-based testing
126
            default_value {CYGHWR_HAL_OPENRISC_CPU_FREQ * 1000000 / CYGNUM_HAL_RTC_DENOMINATOR}
127
            description   "
128
                The tick timer facility is used
129
                to drive the eCos kernel RTC. The count register
130
                increments at the CPU clock speed.  By default, 100 Hz"
131
        }
132
    }
133
 
134
    cdl_option CYGBLD_BUILD_GDB_STUBS {
135
        display "Build GDB stub ROM image"
136
        default_value 0
137
        parent CYGBLD_GLOBAL_OPTIONS
138
        requires { CYG_HAL_STARTUP == "ROM" }
139
        requires CYGSEM_HAL_ROM_MONITOR
140
        requires CYGBLD_BUILD_COMMON_GDB_STUBS
141
        requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
142
        requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
143
        requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
144
        requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
145
        requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
146
        no_define
147
        description "
148
                This option enables the building of the GDB stubs for the
149
                board. The common HAL controls takes care of most of the
150
                build process, but the final conversion from ELF image to
151
                binary data is handled by the platform CDL, allowing
152
                relocation of the data if necessary."
153
 
154
        make -priority 320 {
155
            /bin/gdb_module.bin : /bin/gdb_module.img
156
            $(OBJCOPY) -O binary $< $@
157
        }
158
    }
159
 
160
 
161
    cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
162
        display       "Number of breakpoints supported by the HAL."
163
        flavor        data
164
        default_value 25
165
        description   "
166
            This option determines the number of breakpoints supported by the HAL."
167
    }
168
 
169
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
170
        display      "Number of communication channels on the board"
171
        flavor       data
172
        default_value  1
173
    }
174
 
175
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
176
        display          "Debug serial port"
177
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
178
        flavor data
179
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
180
        default_value    0
181
        description      "
182
           The ORP platform has at least one serial port, but it can potentially have several.
183
           This option chooses which port will be used to connect to a host
184
           running GDB."
185
    }
186
 
187
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
188
        display          "Diagnostic serial port"
189
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
190
        flavor data
191
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
192
        default_value    0
193
        description      "
194
           The ORP platform has at least one serial port, but it can potentially have several.
195
           This option chooses which port will be used for diagnostic output."
196
     }
197
 
198
    cdl_component CYGBLD_GLOBAL_OPTIONS {
199
        display "Global build options"
200
        flavor  none
201
        description   "
202
            Global build options including control over
203
            compiler flags, linker flags and choice of toolchain."
204
 
205
 
206
        parent  CYGPKG_NONE
207
 
208
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
209
            display "Global command prefix"
210
            flavor  data
211
            no_define
212
            default_value { "or32-elf" }
213
            description "
214
                This option specifies the command prefix used when
215
                invoking the build tools."
216
        }
217
 
218
        cdl_option CYGBLD_GLOBAL_CFLAGS {
219
            display "Global compiler flags"
220
            flavor  data
221
            no_define
222
            default_value { "-msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
223
            description   "
224
                This option controls the global compiler flags which
225
                are used to compile all packages by
226
                default. Individual packages may define
227
                options which override these global flags."
228
        }
229
 
230
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
231
            display "Global linker flags"
232
            flavor  data
233
            no_define
234
            default_value { "-msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static" }
235
            description   "
236
                This option controls the global linker flags. Individual
237
                packages may define options which override these global flags."
238
        }
239
    }
240
 
241
    cdl_component CYGHWR_MEMORY_LAYOUT {
242
        display "Memory layout"
243
        flavor data
244
        no_define
245
        calculated { CYG_HAL_STARTUP == "RAM" ? "openrisc_orp_ram" : \
246
                                                "openrisc_orp_rom" }
247
 
248
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
249
            display "Memory layout linker script fragment"
250
            flavor data
251
            no_define
252
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
253
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
254
                                                    "" }
255
        }
256
 
257
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
258
            display "Memory layout header file"
259
            flavor data
260
            no_define
261
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
262
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
263
                                                    "" }
264
        }
265
    }
266
 
267
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
268
        display       "Work with a ROM monitor"
269
        flavor        booldata
270
        legal_values  { "Generic" "CygMon" "GDB_stubs" }
271
        default_value { CYG_HAL_STARTUP == "RAM" ? "CygMon" : 0 }
272
        parent        CYGPKG_HAL_ROM_MONITOR
273
        requires      { CYG_HAL_STARTUP == "RAM" }
274
        description   "
275
            Support can be enabled for three different varieties of ROM monitor.
276
            This support changes various eCos semantics such as the encoding
277
            of diagnostic output, or the overriding of hardware interrupt
278
            vectors.
279
            Firstly there is \"Generic\" support which prevents the HAL
280
            from overriding the hardware vectors that it does not use, to
281
            instead allow an installed ROM monitor to handle them. This is
282
            the most basic support which is likely to be common to most
283
            implementations of ROM monitor.
284
            \"CygMon\" provides support for the Cygnus ROM Monitor.
285
            And finally, \"GDB_stubs\" provides support when GDB stubs are
286
            included in the ROM monitor or boot ROM."
287
    }
288
 
289
    cdl_option CYGSEM_HAL_ROM_MONITOR {
290
        display       "Behave as a ROM monitor"
291
        flavor        bool
292
        default_value 1
293
        parent        CYGPKG_HAL_ROM_MONITOR
294
        requires      { CYG_HAL_STARTUP == "ROM" }
295
        description   "
296
            Enable this option if this program is to be used as a ROM monitor,
297
            i.e. applications will be loaded into RAM on the board, and this
298
            ROM monitor may process exceptions or interrupts generated from the
299
            application. This enables features such as utilizing a separate
300
            interrupt stack when exceptions are generated."
301
    }
302
 
303
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
304
        display       "Redboot HAL options"
305
        flavor        none
306
        no_define
307
        parent        CYGPKG_REDBOOT
308
        active_if     CYGPKG_REDBOOT
309
        description   "
310
            This option lists the target's requirements for a valid Redboot
311
            configuration."
312
 
313
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
314
            display       "Build Redboot ROM binary image"
315
            active_if     CYGBLD_BUILD_REDBOOT
316
            default_value 1
317
            no_define
318
            description "This option enables the conversion of the Redboot ELF
319
                         image to a binary image suitable for ROM programming."
320
 
321
            compile -library=libextras.a
322
 
323
            make -priority 325 {
324
                /bin/redboot.srec : /bin/redboot.elf
325
                $(OBJCOPY) --strip-all $< $(@:.srec=.img)
326
                $(OBJCOPY) -O srec $< $@
327
            }
328
        }
329
    }
330
 
331
    define_proc {
332
        puts $cdl_header "#define CYGHWR_HAL_VSR_TABLE    0"
333
        puts $cdl_header "#define CYGHWR_HAL_VIRTUAL_VECTOR_TABLE 0xF00"
334
    }
335
}

powered by: WebSVN 2.1.0

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