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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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