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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [sh/] [hs7729pci/] [v2_0/] [cdl/] [hal_sh_sh7729_hs7729pci.cdl] - Blame information for rev 27

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

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

powered by: WebSVN 2.1.0

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