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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [frv/] [mb93091/] [current/] [cdl/] [hal_frv_mb93091.cdl] - Blame information for rev 838

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

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_frv_mb93091.cdl
4
#
5
#      GENERIC 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):      bartv
43
# Original data:  gthomas
44
# Contributors:
45
# Date:           2001-09-07
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_FRV_MB93091 {
52
    display       "FUJITSU MB93091 (FR-V 4xx,5xx) evaluation board"
53
    parent        CYGPKG_HAL_FRV
54
 
55
    define_header hal_frv_mb93091.h
56
    include_dir   cyg/hal
57
    hardware
58
    description   "
59
        The MB93091 HAL package provides the support needed to run
60
        eCos on a FUJITSU MB93091 eval board."
61
 
62
    compile       mb93091_misc.c mb93091_pci.c
63
 
64
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
65
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
67
    implements    CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
68
    implements    CYGINT_HAL_FRV_ARCH_FR500
69
    implements    CYGINT_HAL_FRV_ARCH_FR400
70
 
71
    define_proc {
72
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
73
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
74
        puts $::cdl_system_header "#define CYGBLD_HAL_PLF_DEFS_H "
75
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_IO_H "
76
        puts $::cdl_header "#ifndef __ASSEMBLER__"
77
        puts $::cdl_header "#define HAL_PLATFORM_CPU    cyg_hal_platform_cpu"
78
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  cyg_hal_platform_board"
79
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  cyg_hal_platform_extra"
80
        puts $::cdl_header "extern char HAL_PLATFORM_CPU\[\];"
81
        puts $::cdl_header "extern char HAL_PLATFORM_BOARD\[\];"
82
        puts $::cdl_header "extern char HAL_PLATFORM_EXTRA\[\];"
83
        puts $::cdl_header "#endif"
84
#       puts $::cdl_header "#define HAL_PLATFORM_CPU    \"Fujitsu FR4xx,5xx\""
85
#        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"MB93091-CBxx evaluation board\""
86
#        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
87
    }
88
 
89
    cdl_component CYG_HAL_STARTUP {
90
        display       "Startup type"
91
        flavor        data
92
        default_value {"RAM"}
93
        legal_values  {"RAM" "ROM" "ROMRAM" }
94
        no_define
95
        define -file system.h CYG_HAL_STARTUP
96
        description   "
97
            When targetting the MB93091 (FR-V 400) eval board it is possible to build
98
            the system for either RAM bootstrap or ROM bootstrap(s). Select
99
            'ram' when building programs to load into RAM using onboard
100
            debug software such as Angel or eCos GDB stubs.  Select 'rom'
101
            when building a stand-alone application which will be put
102
            into ROM.  For the ROMRAM startup type, code will behave as
103
            if in ROM, but will be copied to static RAM on the board before
104
            execution."
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   2
111
    }
112
 
113
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
114
        display          "Debug serial port"
115
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
116
        flavor data
117
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
118
        default_value    0
119
        description      "
120
            The MB93091 board has two serial ports. This option
121
            chooses which port will be used to connect to a host
122
            running GDB."
123
     }
124
 
125
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
126
         display      "Default console channel."
127
         flavor       data
128
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
129
         calculated   0
130
     }
131
 
132
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
133
         display          "Diagnostic serial port"
134
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
135
         flavor data
136
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
137
         default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
138
         description      "
139
            The MB93091 board has two serial ports.  This option
140
            chooses which port will be used for diagnostic output."
141
     }
142
 
143
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
144
        display       "Diagnostic serial port baud rate"
145
        flavor        data
146
        legal_values  9600 19200 38400 115200
147
        default_value 115200
148
        description   "
149
            This option selects the baud rate used for the diagnostic port.
150
            Note: this should match the value chosen for the GDB port if the
151
            diagnostic and GDB port are the same."
152
    }
153
 
154
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
155
        display       "GDB serial port baud rate"
156
        flavor        data
157
        legal_values  9600 19200 38400 115200
158
        default_value 115200
159
        description   "
160
            This option selects the baud rate used for the diagnostic port.
161
            Note: this should match the value chosen for the GDB port if the
162
            diagnostic and GDB port are the same."
163
    }
164
 
165
    # Real-time clock/counter specifics
166
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
167
        display       "Real-time clock constants"
168
        flavor        none
169
 
170
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
171
            display       "Real-time clock numerator"
172
            flavor        data
173
            calculated    1000000000
174
        }
175
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
176
            display       "Real-time clock denominator"
177
            flavor        data
178
            calculated    100
179
        }
180
        cdl_option CYGNUM_HAL_RTC_PERIOD {
181
            display       "Real-time clock period"
182
            flavor        data
183
# Internal clock set up to run at 1MHz
184
            calculated    { (1000000/CYGNUM_HAL_RTC_DENOMINATOR) }
185
        }
186
    }
187
 
188
    cdl_component CYGBLD_GLOBAL_OPTIONS {
189
        display "Global build options"
190
        flavor  none
191
        parent  CYGPKG_NONE
192
        description   "
193
            Global build options including control over
194
            compiler flags, linker flags and choice of toolchain."
195
 
196
 
197
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
198
            display "Global command prefix"
199
            flavor  data
200
            no_define
201
            default_value { "frv-elf" }
202
            description "
203
                This option specifies the command prefix used when
204
                invoking the build tools."
205
        }
206
 
207
        cdl_option CYGBLD_GLOBAL_CFLAGS {
208
            display "Global compiler flags"
209
            flavor  data
210
            no_define
211
             default_value { CYGBLD_GLOBAL_WARNFLAGS . "-mcpu=fr400 -mno-fdpic -G0 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" }
212
            description   "
213
                This option controls the global compiler flags which are used to
214
                compile all packages by default. Individual packages may define
215
                options which override these global flags."
216
        }
217
 
218
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
219
            display "Global linker flags"
220
            flavor  data
221
            no_define
222
             default_value { "-mcpu=fr400 -mno-fdpic -G0 -Wl,--gc-sections -Wl,-static -g -nostdlib" }
223
            description   "
224
                This option controls the global linker flags. Individual
225
                packages may define options which override these global flags."
226
        }
227
 
228
        cdl_option CYGBLD_BUILD_GDB_STUBS {
229
            display "Build GDB stub ROM image"
230
            default_value 0
231
            requires { CYG_HAL_STARTUP == "ROM" }
232
            requires CYGSEM_HAL_ROM_MONITOR
233
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
234
            requires ! CYGBLD_BUILD_COMMON_GDB_STUBS
235
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
236
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
237
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
238
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
239
            no_define
240
            description "
241
                This option enables the building of the GDB stubs for the
242
                board. This is a bit convoluted as it involves prepending
243
                the image with a special header used by the MB93091 firmware
244
                to keep track of multiple ROM images. This header includes
245
                a checksum making it necessary to build twice."
246
 
247
            make -priority 320 {
248
                /bin/gdb_module.bin : /src/gdb_module.c
249
                @sh -c "mkdir -p src $(dir $@)"
250
                # First build version with no checksum.
251
                $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/gdb_module_ncs.o $<
252
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module_ncs.tmp src/gdb_module_ncs.o
253
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module_ncs.tmp src/gdb_module_ncs.img
254
                $(OBJCOPY) -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin
255
                @rm src/gdb_module_ncs.tmp src/gdb_module_ncs.img
256
                # Prepare dependency file
257
                @echo $@ ": \\" > $(notdir $@).deps
258
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
259
                @tail +2 deps.tmp >> $(notdir $@).deps
260
                @echo >> $(notdir $@).deps
261
                @rm deps.tmp
262
                # Then build version with checksum from previously built image.
263
                $(CC) -c -DCHECKSUM=`$(dir $<)flash_cksum.tcl src/gdb_module_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/gdb_module.o $<
264
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module.tmp src/gdb_module.o
265
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module.tmp $(@:.bin=.img)
266
                $(OBJCOPY) -O binary $(@:.bin=.img) src/gdb_module.bin
267
                uuencode src/gdb_module.bin gdb_module.bin | tr '`' ' ' > $(@:.bin=.img.UU)
268
                @rm src/gdb_module.tmp src/gdb_module_ncs.bin
269
                @mv src/gdb_module.bin $@
270
            }
271
        }
272
    }
273
 
274
    cdl_component CYGHWR_MEMORY_LAYOUT {
275
        display "Memory layout"
276
        flavor data
277
        no_define
278
        calculated { (CYG_HAL_STARTUP == "RAM") ? "frv_mb93091_ram" :     \
279
                     (CYG_HAL_STARTUP == "ROM") ? "frv_mb93091_rom" :     \
280
                     (CYG_HAL_STARTUP == "ROMRAM") ? "frv_mb93091_romram" :     \
281
                      "frv_mb93091_UNKNOWN" }
282
 
283
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
284
            display "Memory layout linker script fragment"
285
            flavor data
286
            no_define
287
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
288
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :     \
289
                         (CYG_HAL_STARTUP == "ROM") ? "" :     \
290
                         (CYG_HAL_STARTUP == "ROMRAM") ? "" :     \
291
                         "" }
292
        }
293
 
294
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
295
            display "Memory layout header file"
296
            flavor data
297
            no_define
298
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
299
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :     \
300
                         (CYG_HAL_STARTUP == "ROM") ? "" :     \
301
                         (CYG_HAL_STARTUP == "ROMRAM") ? "" :     \
302
                          "" }
303
        }
304
    }
305
 
306
    cdl_option CYGSEM_HAL_ROM_MONITOR {
307
        display       "Behave as a ROM monitor"
308
        flavor        bool
309
        default_value 0
310
        parent        CYGPKG_HAL_ROM_MONITOR
311
        requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
312
        description   "
313
            Enable this option if this program is to be used as a ROM monitor,
314
            i.e. applications will be loaded into RAM on the board, and this
315
            ROM monitor may process exceptions or interrupts generated from the
316
            application. This enables features such as utilizing a separate
317
            interrupt stack when exceptions are generated."
318
    }
319
 
320
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
321
         display       "Work with a ROM monitor"
322
         flavor        booldata
323
         legal_values  { "Generic" "GDB_stubs" }
324
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
325
         parent        CYGPKG_HAL_ROM_MONITOR
326
         requires      { CYG_HAL_STARTUP == "RAM" }
327
         description   "
328
             Support can be enabled for different varieties of ROM monitor.
329
             This support changes various eCos semantics such as the encoding
330
             of diagnostic output, or the overriding of hardware interrupt
331
             vectors.
332
             Firstly there is \"Generic\" support which prevents the HAL
333
             from overriding the hardware vectors that it does not use, to
334
             instead allow an installed ROM monitor to handle them. This is
335
             the most basic support which is likely to be common to most
336
             implementations of ROM monitor.
337
             \"GDB_stubs\" provides support when GDB stubs are included in
338
             the ROM monitor or boot ROM."
339
     }
340
 
341
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
342
        display       "Redboot HAL options"
343
        flavor        none
344
        no_define
345
        parent        CYGPKG_REDBOOT
346
        active_if     CYGPKG_REDBOOT
347
        description   "
348
            This option lists the target's requirements for a valid Redboot
349
            configuration."
350
 
351
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
352
            display       "Build Redboot ROM binary image"
353
            active_if     CYGBLD_BUILD_REDBOOT
354
            default_value 1
355
            no_define
356
            description "This option enables the conversion of the Redboot ELF
357
                         image to a binary image suitable for ROM programming."
358
 
359
#            compile -library=libextras.a redboot_cmds.c
360
 
361
            make -priority 325 {
362
                /bin/redboot.bin : /bin/redboot.elf
363
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
364
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
365
                $(OBJCOPY) -O binary $< $@
366
            }
367
        }
368
    }
369
 
370
}

powered by: WebSVN 2.1.0

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