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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [openrisc/] [orpsoc/] [current/] [cdl/] [hal_openrisc_orpsoc.cdl] - Blame information for rev 791

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_openrisc_orpsoc.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 Free Software Foundation, 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
16
## version.
17
##
18
## eCos is distributed in the hope that it will be useful, but WITHOUT
19
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21
## for more details.
22
##
23
## You should have received a copy of the GNU General Public License
24
## along with eCos; if not, write to the Free Software Foundation, Inc.,
25
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
26
##
27
## As a special exception, if other files instantiate templates or use
28
## macros or inline functions from this file, or you compile this file
29
## and link it with other works to produce a work based on this file,
30
## this file does not by itself cause the resulting work to be covered by
31
## the GNU General Public License. However the source code for this file
32
## must still be made available in accordance with section (3) of the GNU
33
## General Public License v2.
34
##
35
## This exception does not invalidate any other reasons why a work based
36
## on this file might be covered by the GNU General Public License.
37
## -------------------------------------------
38
## ####ECOSGPLCOPYRIGHTEND####
39
# ====================================================================
40
######DESCRIPTIONBEGIN####
41
#
42
# Author(s):      sfurman
43
# Contributors:
44
# Date:           2003-01-20
45
#
46
#####DESCRIPTIONEND####
47
#
48
# ====================================================================
49
 
50
cdl_package CYGPKG_HAL_OPENRISC_ORPSOC {
51
    display  "OpenRISC System-on-Chip"
52
    parent        CYGPKG_HAL_OPENRISC
53
    include_dir   cyg/hal
54
    hardware
55
    description   "
56
           The ORPSoC HAL package should be used when targetting the
57
           OpenRISC Reference Platform."
58
 
59
    compile       hal_diag.c hal_aux.c
60
 
61
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
62
    implements    CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
63 791 skrzyp
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
64
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65 786 skrzyp
 
66
    define_proc {
67
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
68
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
69
    }
70
 
71 791 skrzyp
    cdl_component CYG_HAL_STARTUP {
72
        display       "Startup type"
73
        flavor        data
74
        legal_values  {"RAM" "ROM" "JTAG"}
75
        default_value {"JTAG"}
76
        no_define
77
        define -file system.h CYG_HAL_STARTUP
78
        description   "
79
            Selects whether code initially runs from ROM or RAM.  In the case of ROM startup,
80
            it's possible for the code to be copied into RAM and executed there."
81
    }
82
 
83
    cdl_component CYGHWR_MEMORY_LAYOUT {
84
        display "Memory layout"
85
        flavor data
86
        no_define
87
        calculated { CYG_HAL_STARTUP == "ROM" ? "openrisc_orpsoc_rom" : \
88
                                                "openrisc_orpsoc_ram" }
89
 
90
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
91
            display "Memory layout linker script fragment"
92
            flavor data
93
            no_define
94
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
95
            calculated { CYG_HAL_STARTUP == "ROM" ? "" : \
96
                                                    "" }
97
        }
98
 
99
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
100
            display "Memory layout header file"
101
            flavor data
102
            no_define
103
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
104
            calculated { CYG_HAL_STARTUP == "ROM" ? "" : \
105
                                                    "" }
106
        }
107
    }
108
 
109
 
110
    # Real-time clock/counter specifics
111
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
112
        display       "Real-time clock constants."
113
        flavor        none
114
 
115
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
116
            display       "Real-time clock numerator"
117
            flavor        data
118
            default_value 1000000000
119
        }
120
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
121
            display       "Real-time clock denominator"
122
            flavor        data
123
            default_value 100
124
        }
125
        cdl_option CYGNUM_HAL_RTC_PERIOD {
126
            display       "Real-time clock period"
127
            flavor        data
128
            default_value {CYGHWR_HAL_OPENRISC_CPU_FREQ * 1000000 / CYGNUM_HAL_RTC_DENOMINATOR}
129
            description   "
130
                The tick timer facility is used
131
                to drive the eCos kernel RTC. The count register
132
                increments at the CPU clock speed.  By default, 100 Hz"
133
        }
134
    }
135
 
136
    cdl_component CYGBLD_GLOBAL_OPTIONS {
137
        display "Global build options"
138
        flavor  none
139
        description   "
140
            Global build options including control over
141
            compiler flags, linker flags and choice of toolchain."
142
 
143
 
144
        parent  CYGPKG_NONE
145
 
146
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
147
            display "Global command prefix"
148
            flavor  data
149
            no_define
150
            default_value { "or32-elf" }
151
            description "
152
                This option specifies the command prefix used when
153
                invoking the build tools."
154
        }
155
 
156
        cdl_option CYGBLD_GLOBAL_CFLAGS {
157
            display "Global compiler flags"
158
            flavor  data
159
            no_define
160
            default_value { CYGBLD_GLOBAL_WARNFLAGS .
161
                            "-g -O2 -fno-omit-frame-pointer -fno-rtti -fno-exceptions " .
162
                            (CYGHWR_MUL_IMPLEMENTED ? "-mhard-mul " : "-msoft-mul ") .
163
                            (CYGHWR_DIV_IMPLEMENTED ? "-mhard-div " : "-msoft-div ") .
164
                            (CYGHWR_FPU_IMPLEMENTED ? "-mhard-float " : "-msoft-float ") }
165
            description   "
166
                This option controls the global compiler flags which
167
                are used to compile all packages by
168
                default. Individual packages may define
169
                options which override these global flags."
170
        }
171
 
172
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
173
            display "Global linker flags"
174
            flavor  data
175
            no_define
176
            default_value { "-g -O2 -nostdlib -Wl,--gc-sections -Wl,-static " .
177
                            (CYGHWR_MUL_IMPLEMENTED ? "-mhard-mul " : "-msoft-mul ") .
178
                            (CYGHWR_DIV_IMPLEMENTED ? "-mhard-div " : "-msoft-div ") .
179
                            (CYGHWR_FPU_IMPLEMENTED ? "-mhard-float " : "-msoft-float ") }
180
            description   "
181
                This option controls the global linker flags. Individual
182
                packages may define options which override these global flags."
183
        }
184
    }
185
 
186
    cdl_option CYGBLD_BUILD_GDB_STUBS {
187
        display "Build GDB stub ROM image"
188
        default_value 0
189
        parent CYGBLD_GLOBAL_OPTIONS
190
        requires { CYG_HAL_STARTUP == "ROM" }
191
        requires CYGSEM_HAL_ROM_MONITOR
192
        requires CYGBLD_BUILD_COMMON_GDB_STUBS
193
        requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
194
        requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
195
        requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
196
        requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
197
        requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
198
        no_define
199
        description "
200
                This option enables the building of the GDB stubs for the
201
                board. The common HAL controls takes care of most of the
202
                build process, but the final conversion from ELF image to
203
                binary data is handled by the platform CDL, allowing
204
                relocation of the data if necessary."
205
 
206
        make -priority 320 {
207
            /bin/gdb_module.bin : /bin/gdb_module.img
208
            $(OBJCOPY) -O binary $< $@
209
        }
210
    }
211
 
212
    cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
213
        display       "Number of breakpoints supported by the HAL."
214
        flavor        data
215
        default_value 25
216
        description   "
217
            This option determines the number of breakpoints supported by the HAL."
218
    }
219
 
220
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
221
        display       "Work with a ROM monitor"
222
        flavor        bool
223
        default_value { CYG_HAL_STARTUP == "RAM" ? 1 : 0 }
224
        parent        CYGPKG_HAL_ROM_MONITOR
225
        requires      { CYG_HAL_STARTUP == "RAM" }
226
        description   "
227
            Allow coexistence with ROM monitor (CygMon or GDB stubs) by
228
            only initializing interrupt vectors on startup, thus leaving
229
            exception handling to the ROM monitor."
230
    }
231
 
232
    cdl_option CYGSEM_HAL_ROM_MONITOR {
233
        display       "Behave as a ROM monitor"
234
        flavor        bool
235
        default_value 0
236
        parent        CYGPKG_HAL_ROM_MONITOR
237
        requires      { CYG_HAL_STARTUP == "ROM" }
238
        description   "
239
            Enable this option if this program is to be used as a ROM monitor,
240
            i.e. applications will be loaded into RAM on the board, and this
241
            ROM monitor may process exceptions or interrupts generated from the
242
            application. This enables features such as utilizing a separate
243
            interrupt stack when exceptions are generated."
244
    }
245
 
246
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
247
        display       "Redboot HAL options"
248
        flavor        none
249
        no_define
250
        parent        CYGPKG_REDBOOT
251
        active_if     CYGPKG_REDBOOT
252
        description   "
253
            This option lists the target's requirements for a valid Redboot
254
            configuration."
255
 
256
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
257
            display       "Build Redboot ROM binary image"
258
            active_if     CYGBLD_BUILD_REDBOOT
259
            default_value 1
260
            no_define
261
            description "This option enables the conversion of the Redboot ELF
262
                         image to a binary image suitable for ROM programming."
263
 
264
            compile -library=libextras.a
265
 
266
            make -priority 325 {
267
                /bin/redboot.srec : /bin/redboot.elf
268
                $(OBJCOPY) --strip-all $< $(@:.srec=.img)
269
                $(OBJCOPY) -O srec $< $@
270
            }
271
        }
272
    }
273
 
274
    cdl_option CYGHWR_HAL_OPENRISC_CPU_FREQ {
275
        display "CPU frequency"
276
        flavor  data
277
        legal_values 0 to 1000000
278
        default_value 50
279
        description "
280
           This option contains the frequency of the CPU in MegaHertz.
281
           Choose the frequency to match the processor you have. This
282
           may affect thing like serial device, interval clock and
283
           memory access speed settings."
284
    }
285
 
286
    cdl_option CYGHWR_MUL_IMPLEMENTED {
287
        display       "Hardware multiplier implemented"
288
        flavor        bool
289
        default_value 1
290
        description   "
291
            Select this option only if hardware multiplier is
292
            implemented."
293
    }
294
 
295
    cdl_option CYGHWR_DIV_IMPLEMENTED {
296
        display       "Hardware divisor implemented"
297
        flavor        bool
298
        default_value 1
299
        description   "
300
            Select this option only if hardware division is
301
            implemented."
302
    }
303
 
304
    cdl_option CYGHWR_FPU_IMPLEMENTED {
305
        display       "Hardware FPU implemented"
306
        flavor        bool
307
        default_value 0
308
        description   "
309
            Select this option only if FPU is implemented."
310
    }
311
 
312
    cdl_component CYGHWR_ICACHE_IMPLEMENTED {
313
        display       "Instruction cache implemented"
314
        flavor        bool
315
        default_value 1
316
        description   "
317
            Select this option only if instruction cache is
318
            implemented."
319
 
320
        cdl_option CYGHWR_ICACHE_SIZE {
321
            display       "Size of instruction cache"
322
            flavor        data
323
            legal_values  0x1000 0x2000 0x4000 0x8000
324
            default_value 0x2000
325
            description   "
326
                Size of the instruction cache. Default is 8kB."
327
        }
328
    }
329
 
330
    cdl_component CYGHWR_DCACHE_IMPLEMENTED {
331
        display       "Data cache implemented"
332
        flavor        bool
333
        default_value 1
334
        description   "
335
            Select this option only if data cache is
336
            implemented."
337
 
338
        cdl_option CYGHWR_DCACHE_SIZE {
339
            display       "Size of data cache"
340
            active_if     CYGHWR_DCACHE_IMPLEMENTED
341
            flavor        data
342
            legal_values  0x200 0x1000 0x2000 0x4000 0x8000
343
            default_value 0x1000
344
            description   "
345
                Size of the data cache. Default is 4kB."
346
        }
347
 
348
        cdl_option CYGHWR_DCACHE_MODE {
349
            display       "DATA cache mode"
350
            flavor        data
351
            legal_values  { "WRITETHROUGH" "WRITEBACK" }
352
            default_value { "WRITETHROUGH" }
353
            description   "
354
                Speficy synthesized cache."
355
        }
356
    }
357
 
358
 
359
 
360
    cdl_option CYGHWR_RAM_SIZE {
361
        display       "Size of RAM memory"
362
        flavor        data
363
        default_value 0x2000000
364
        description   "
365
            Size of RAM memory. This value is used to generate linker script.
366
            Default is 32MB."
367
    }
368
 
369
    cdl_option CYGHWR_ROM_SIZE {
370
        display       "Size of ROM memory"
371
        flavor        data
372
        default_value 0x40000
373
        description   "
374
            Size of ROM memory. This value is used to generate linker script.
375
            Default is 256kB."
376
    }
377
 
378 786 skrzyp
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
379
        display       "Diagnostic serial port baud rate"
380
        flavor        data
381
        legal_values  9600 19200 38400 57600 115200 230400 460800 921600
382
        default_value 115200
383
        description   "
384
            This option selects the baud rate used for the diagnostic console.
385
            Note: this should match the value chosen for the GDB port if the
386
            diagnostic and GDB port are the same.
387
            Note: very high baud rates are useful during simulation."
388
    }
389
 
390
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
391
        display       "GDB serial port baud rate"
392
        flavor        data
393
        legal_values  9600 19200 38400 57600 115200 230400 460800 921600
394
        default_value 115200
395
        description   "
396
            This option controls the baud rate used for the GDB connection.
397
            Note: very high baud rates are useful during simulation."
398
    }
399
 
400
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
401
        display      "Number of communication channels on the board"
402
        flavor       data
403
        default_value  1
404
    }
405
 
406
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
407
        display          "Debug serial port"
408
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
409
        flavor data
410
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
411
        default_value    0
412
        description      "
413
           The ORP platform has at least one serial port, but it can potentially have several.
414
           This option chooses which port will be used to connect to a host
415
           running GDB."
416
    }
417
 
418
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
419
        display          "Diagnostic serial port"
420
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
421
        flavor data
422
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
423
        default_value    0
424
        description      "
425
           The ORP platform has at least one serial port, but it can potentially have several.
426
           This option chooses which port will be used for diagnostic output."
427
     }
428
 
429
    define_proc {
430
        puts $cdl_header "#define CYGHWR_HAL_VSR_TABLE    0"
431
        puts $cdl_header "#define CYGHWR_HAL_VIRTUAL_VECTOR_TABLE 0xF00"
432
    }
433
}
434
 
435
# EOF hal_openrisc_orpsoc.cdl

powered by: WebSVN 2.1.0

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