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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [sh/] [edk7708/] [current/] [cdl/] [hal_sh_edk7708.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_sh_edk7708.cdl
4
#
5
#      EDK7708 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 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):      jskov
43
# Original data:  jskov
44
# Contributors:
45
# Date:           1999-10-29
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_SH_EDK7708 {
52
    display       "Hitachi EDK/SH7708 board"
53
    parent        CYGPKG_HAL_SH
54
    requires      CYGPKG_HAL_SH_7708
55
    define_header hal_sh_edk7708.h
56
    include_dir   cyg/hal
57
    description   "
58
        The edk HAL package provides the support needed to run
59
        eCos on a Hitachi SH3 EDK7708 board."
60
 
61
    compile       hal_diag.c plf_misc.c
62
 
63
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
64
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65
    implements    CYGINT_HAL_VIRTUAL_VECTOR_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
        puts $::cdl_header "#define CYGNUM_HAL_SH_SH3_SCI_PORTS 1"
72
        puts $::cdl_header "#define CYGHWR_HAL_VSR_TABLE 0x88000000"
73
        puts $::cdl_header "#define CYGHWR_HAL_VECTOR_TABLE 0x88000100"
74
    }
75
 
76
    cdl_component CYG_HAL_STARTUP {
77
        display       "Startup type"
78
        flavor        data
79
        legal_values  {"RAM" "ROM" "ROMRAM"}
80
        default_value {"RAM"}
81
        no_define
82
        define -file system.h CYG_HAL_STARTUP
83
        description   "
84
           When targetting the EDK7708 board it is possible to build
85
           the system for either RAM bootstrap or ROM bootstrap.
86
           RAM bootstrap generally requires that the board
87
           is equipped with ROMs containing a suitable ROM monitor or
88
           equivalent software that allows GDB to download the eCos
89
           application on to the board. The ROM bootstrap typically
90
           requires that the eCos application be blown into EPROMs or
91
           equivalent technology.  ROMRAM bootstrap is similar to ROM
92
           bootstrap, but everything is copied to RAM before execution
93
           starts thus improving performace, but at the cost of an
94
           increased RAM footprint."
95
    }
96
 
97
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
98
        display      "Number of communication channels on the board"
99
        flavor       data
100
        calculated   1
101
    }
102
 
103
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
104
        display          "Debug serial port"
105
        flavor data
106
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
107
        default_value    0
108
        description      "
109
           The EDK/7708 board has only one serial port. This option
110
           chooses which port will be used to connect to a host
111
           running GDB."
112
    }
113
 
114
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
115
        display          "Diagnostic serial port"
116
        flavor data
117
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
118
        default_value    0
119
        description      "
120
           The EDK/7708 board has only one serial port.  This option
121
           chooses which port will be used for diagnostic output."
122
    }
123
 
124
    cdl_component CYGHWR_HAL_SH_PLF_CLOCK_SETTINGS {
125
        display          "SH on-chip platform clock controls"
126
        description      "
127
            The various clocks used by the system are derived from
128
            these options."
129
        flavor        none
130
        no_define
131
 
132
        cdl_option CYGHWR_HAL_SH_OOC_XTAL {
133
            display          "SH clock crystal"
134
            flavor           data
135
            legal_values     8000000 to 50000000
136
            default_value    15000000
137
            no_define
138
            description      "
139
                This option specifies the frequency of the crystal all
140
                other clocks are derived from."
141
        }
142
 
143
        cdl_option CYGHWR_HAL_SH_OOC_PLL_1 {
144
            display          "SH clock PLL circuit 1"
145
            flavor           data
146
            default_value    1
147
            legal_values     { 0 1 2 4 }
148
            description      "
149
                This selects the multiplication factor provided by
150
                PLL1. If PLL1 is disabled via CAP1, this option should
151
                be set to zero."
152
        }
153
 
154
        cdl_option CYGHWR_HAL_SH_OOC_PLL_2 {
155
            display          "SH clock PLL circuit 2"
156
            flavor           data
157
            default_value    4
158
            legal_values     { 0 1 4 }
159
            no_define
160
            description      "
161
                This selects the multiplication factor provided by
162
                PLL2. If PLL2 is disabled via CAP2, this option should
163
                be set to zero."
164
        }
165
 
166
        cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_1 {
167
            display          "SH clock divider 1"
168
            flavor           data
169
            default_value    1
170
            legal_values     { 1 2 3 4 }
171
            description      "
172
                This divider option affects the CPU core clock."
173
        }
174
 
175
        cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_2 {
176
            display          "SH clock divider 2"
177
            flavor           data
178
            default_value    4
179
            legal_values     { 1 2 3 4 }
180
            description      "
181
                This divider option affects the peripheral clock."
182
        }
183
 
184
        cdl_option CYGHWR_HAL_SH_OOC_CLOCK_MODE {
185
            display          "SH clock mode"
186
            flavor           data
187
            default_value    2
188
            legal_values     { 0 1 2 3 4 7 }
189
            description      "
190
                This option must mirror the clock mode hardwired on
191
                the MD0-MD2 pins of the CPU in order to correctly
192
                initialize the FRQCR register."
193
        }
194
    }
195
 
196
    cdl_component CYGBLD_GLOBAL_OPTIONS {
197
        display "Global build options"
198
        flavor  none
199
        parent  CYGPKG_NONE
200
        no_define
201
        description   "
202
            Global build options including control over
203
            compiler flags, linker flags and choice of toolchain."
204
 
205
 
206
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
207
            display "Global command prefix"
208
            flavor  data
209
            no_define
210
            default_value { "sh-elf" }
211
            description "
212
                This option specifies the command prefix used when
213
                invoking the build tools."
214
        }
215
 
216
        cdl_option CYGBLD_GLOBAL_CFLAGS {
217
            display "Global compiler flags"
218
            flavor  data
219
            no_define
220
              default_value { CYGBLD_GLOBAL_WARNFLAGS .
221
                              (CYGHWR_HAL_SH_BIGENDIAN ? "-mb" : "-ml") .
222
                              " -m3 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions"
223
              }
224
            description   "
225
                This option controls the global compiler flags which
226
                are used to compile all packages by
227
                default. Individual packages may define
228
                options which override these global flags."
229
        }
230
 
231
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
232
            display "Global linker flags"
233
            flavor  data
234
            no_define
235
            default_value { (CYGHWR_HAL_SH_BIGENDIAN ? "-mb" : "-ml") . " -m3 -nostdlib -Wl,--gc-sections -Wl,-static" }
236
            description   "
237
                This option controls the global linker flags. Individual
238
                packages may define options which override these global flags."
239
        }
240
 
241
        cdl_option CYGBLD_BUILD_GDB_STUBS {
242
            display "Build GDB stub ROM image"
243
            default_value 0
244
            requires { CYG_HAL_STARTUP == "ROM" }
245
            requires CYGSEM_HAL_ROM_MONITOR
246
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
247
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
248
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
249
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
250
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
251
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
252
            no_define
253
            description "
254
                This option enables the building of the GDB stubs for the
255
                board. The common HAL controls takes care of most of the
256
                build process, but the final conversion from ELF image to
257
                binary data is handled by the platform CDL, allowing
258
                relocation of the data if necessary."
259
 
260
            make -priority 320 {
261
                /bin/gdb_module.bin : /bin/gdb_module.img
262
                $(OBJCOPY) -O binary $< $@
263
            }
264
        }
265
    }
266
 
267
    cdl_component CYGHWR_MEMORY_LAYOUT {
268
        display "Memory layout"
269
        flavor data
270
        no_define
271
        calculated { CYG_HAL_STARTUP == "RAM" ? "sh_edk7708_ram" : \
272
                     CYG_HAL_STARTUP == "ROM" ? "sh_edk7708_rom" : \
273
                                                "sh_edk7708_romram" }
274
 
275
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
276
            display "Memory layout linker script fragment"
277
            flavor data
278
            no_define
279
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
280
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
281
                         CYG_HAL_STARTUP == "ROM" ? "" : \
282
                                                    "" }
283
        }
284
 
285
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
286
            display "Memory layout header file"
287
            flavor data
288
            no_define
289
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
290
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
291
                         CYG_HAL_STARTUP == "ROM" ? "" : \
292
                                                    "" }
293
        }
294
    }
295
 
296
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
297
        display       "Work with a ROM monitor"
298
        flavor        booldata
299
        legal_values  { "GDB_stubs" }
300
        default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
301
        requires      { CYG_HAL_STARTUP == "RAM" }
302
        parent        CYGPKG_HAL_ROM_MONITOR
303
        description   "
304
            Support can be enabled for boot ROMs or ROM monitors which contain
305
            GDB stubs. This support changes various eCos semantics such as
306
            the encoding of diagnostic output, and the overriding of hardware
307
            interrupt vectors."
308
    }
309
 
310
    cdl_option CYGSEM_HAL_ROM_MONITOR {
311
        display       "Behave as a ROM monitor"
312
        flavor        bool
313
        default_value 0
314
        parent        CYGPKG_HAL_ROM_MONITOR
315
        requires      { CYG_HAL_STARTUP == "ROM" }
316
        description   "
317
            Enable this option if this program is to be used as a ROM monitor,
318
            i.e. applications will be loaded into RAM on the board, and this
319
            ROM monitor may process exceptions or interrupts generated from the
320
            application. This enables features such as utilizing a separate
321
            interrupt stack when exceptions are generated."
322
    }
323
 
324
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
325
        display       "Redboot HAL options"
326
        flavor        none
327
        no_define
328
        parent        CYGPKG_REDBOOT
329
        active_if     CYGPKG_REDBOOT
330
        description   "
331
            This option lists the target's requirements for a valid Redboot
332
            configuration."
333
 
334
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
335
            display       "Build Redboot ROM binary image"
336
            active_if     CYGBLD_BUILD_REDBOOT
337
            default_value 1
338
            no_define
339
            description "This option enables the conversion of the Redboot ELF
340
                         image to a binary image suitable for ROM programming."
341
 
342
            make -priority 325 {
343
                /bin/redboot.bin : /bin/redboot.elf
344
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
345
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
346
                $(OBJCOPY) -O binary $< $@
347
            }
348
        }
349
    }
350
}

powered by: WebSVN 2.1.0

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