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

Subversion Repositories openrisc

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

powered by: WebSVN 2.1.0

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