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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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