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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [frv/] [mb93093/] [current/] [cdl/] [hal_frv_mb93093.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_frv_mb93093.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_MB93093 {
52
    display       "FUJITSU MB93093-PD00 (FR-V 403) evaluation board"
53
    parent        CYGPKG_HAL_FRV
54
 
55
    define_header hal_frv_mb93093.h
56
    include_dir   cyg/hal
57
    hardware
58
    description   "
59
        The mb93093 HAL package provides the support needed to run
60
        eCos on a FUJITSU MB93093-PD00 Portable Demonstration Kit."
61
 
62
    compile       mb93093_misc.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_FRV_ARCH_FR400
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
        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 FR403\""
76
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"MB93093-PD00 Portable Demonstration Kit\""
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 MB93093-PD00 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   1
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
        calculated   0
109
    }
110
 
111
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
112
        display      "Default console channel."
113
        flavor       data
114
        calculated   0
115
    }
116
 
117
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
118
        display      "Diagnostic serial port"
119
        active_if    CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
120
        flavor       data
121
        calculated   0
122
    }
123
 
124
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
125
        display       "Diagnostic serial port baud rate"
126
        flavor        data
127
        legal_values  9600 19200 38400 115200 230400 460800
128
        default_value 115200
129
        description   "
130
            This option selects the baud rate used for the diagnostic port."
131
    }
132
 
133
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
134
        display       "GDB serial port baud rate"
135
        flavor        data
136
        calculated    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD
137
    }
138
 
139
    # Real-time clock/counter specifics
140
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
141
        display       "Real-time clock constants"
142
        flavor        none
143
 
144
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
145
            display       "Real-time clock numerator"
146
            flavor        data
147
            calculated    1000000000
148
        }
149
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
150
            display       "Real-time clock denominator"
151
            flavor        data
152
            calculated    100
153
        }
154
        cdl_option CYGNUM_HAL_RTC_PERIOD {
155
            display       "Real-time clock period"
156
            flavor        data
157
# Internal clock set up to run at 1MHz
158
            calculated    { (1000000/CYGNUM_HAL_RTC_DENOMINATOR) }
159
        }
160
    }
161
 
162
    cdl_component CYGBLD_GLOBAL_OPTIONS {
163
        display "Global build options"
164
        flavor  none
165
        parent  CYGPKG_NONE
166
        description   "
167
            Global build options including control over
168
            compiler flags, linker flags and choice of toolchain."
169
 
170
 
171
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
172
            display "Global command prefix"
173
            flavor  data
174
            no_define
175
            default_value { "frv-elf" }
176
            description "
177
                This option specifies the command prefix used when
178
                invoking the build tools."
179
        }
180
 
181
        cdl_option CYGBLD_GLOBAL_CFLAGS {
182
            display "Global compiler flags"
183
            flavor  data
184
            no_define
185
             default_value { CYGBLD_GLOBAL_WARNFLAGS . "-mcpu=fr400 -mno-fdpic -G0 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions" }
186
            description   "
187
                This option controls the global compiler flags which are used to
188
                compile all packages by default. Individual packages may define
189
                options which override these global flags."
190
        }
191
 
192
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
193
            display "Global linker flags"
194
            flavor  data
195
            no_define
196
             default_value { "-mcpu=fr400 -mno-fdpic -G0 -Wl,--gc-sections -Wl,-static -g -nostdlib" }
197
            description   "
198
                This option controls the global linker flags. Individual
199
                packages may define options which override these global flags."
200
        }
201
 
202
        cdl_option CYGBLD_BUILD_GDB_STUBS {
203
            display "Build GDB stub ROM image"
204
            default_value 0
205
            requires { CYG_HAL_STARTUP == "ROM" }
206
            requires CYGSEM_HAL_ROM_MONITOR
207
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
208
            requires ! CYGBLD_BUILD_COMMON_GDB_STUBS
209
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
210
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
211
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
212
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
213
            no_define
214
            description "
215
                This option enables the building of the GDB stubs for the
216
                board. This is a bit convoluted as it involves prepending
217
                the image with a special header used by the MB93093 firmware
218
                to keep track of multiple ROM images. This header includes
219
                a checksum making it necessary to build twice."
220
 
221
            make -priority 320 {
222
                /bin/gdb_module.bin : /src/gdb_module.c
223
                @sh -c "mkdir -p src $(dir $@)"
224
                # First build version with no checksum.
225
                $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/gdb_module_ncs.o $<
226
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module_ncs.tmp src/gdb_module_ncs.o
227
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module_ncs.tmp src/gdb_module_ncs.img
228
                $(OBJCOPY) -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin
229
                @rm src/gdb_module_ncs.tmp src/gdb_module_ncs.img
230
                # Prepare dependency file
231
                @echo $@ ": \\" > $(notdir $@).deps
232
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
233
                @tail +2 deps.tmp >> $(notdir $@).deps
234
                @echo >> $(notdir $@).deps
235
                @rm deps.tmp
236
                # Then build version with checksum from previously built image.
237
                $(CC) -c -DCHECKSUM=`$(dir $<)flash_cksum.tcl src/gdb_module_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/gdb_module.o $<
238
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module.tmp src/gdb_module.o
239
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module.tmp $(@:.bin=.img)
240
                $(OBJCOPY) -O binary $(@:.bin=.img) src/gdb_module.bin
241
                uuencode src/gdb_module.bin gdb_module.bin | tr '`' ' ' > $(@:.bin=.img.UU)
242
                @rm src/gdb_module.tmp src/gdb_module_ncs.bin
243
                @mv src/gdb_module.bin $@
244
            }
245
        }
246
    }
247
 
248
    cdl_component CYGHWR_MEMORY_LAYOUT {
249
        display "Memory layout"
250
        flavor data
251
        no_define
252
        calculated { (CYG_HAL_STARTUP == "RAM") ? "frv_mb93093_ram" :     \
253
                     (CYG_HAL_STARTUP == "ROM") ? "frv_mb93093_rom" :     \
254
                     (CYG_HAL_STARTUP == "ROMRAM") ? "frv_mb93093_romram" :     \
255
                      "frv_mb93093_UNKNOWN" }
256
 
257
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
258
            display "Memory layout linker script fragment"
259
            flavor data
260
            no_define
261
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
262
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :     \
263
                         (CYG_HAL_STARTUP == "ROM") ? "" :     \
264
                         (CYG_HAL_STARTUP == "ROMRAM") ? "" :     \
265
                         "" }
266
        }
267
 
268
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
269
            display "Memory layout header file"
270
            flavor data
271
            no_define
272
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
273
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :     \
274
                         (CYG_HAL_STARTUP == "ROM") ? "" :     \
275
                         (CYG_HAL_STARTUP == "ROMRAM") ? "" :     \
276
                          "" }
277
        }
278
    }
279
 
280
    cdl_option CYGSEM_HAL_ROM_MONITOR {
281
        display       "Behave as a ROM monitor"
282
        flavor        bool
283
        default_value 0
284
        parent        CYGPKG_HAL_ROM_MONITOR
285
        requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
286
        description   "
287
            Enable this option if this program is to be used as a ROM monitor,
288
            i.e. applications will be loaded into RAM on the board, and this
289
            ROM monitor may process exceptions or interrupts generated from the
290
            application. This enables features such as utilizing a separate
291
            interrupt stack when exceptions are generated."
292
    }
293
 
294
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
295
         display       "Work with a ROM monitor"
296
         flavor        booldata
297
         legal_values  { "Generic" "GDB_stubs" }
298
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
299
         parent        CYGPKG_HAL_ROM_MONITOR
300
         requires      { CYG_HAL_STARTUP == "RAM" }
301
         description   "
302
             Support can be enabled for different varieties of ROM monitor.
303
             This support changes various eCos semantics such as the encoding
304
             of diagnostic output, or the overriding of hardware interrupt
305
             vectors.
306
             Firstly there is \"Generic\" support which prevents the HAL
307
             from overriding the hardware vectors that it does not use, to
308
             instead allow an installed ROM monitor to handle them. This is
309
             the most basic support which is likely to be common to most
310
             implementations of ROM monitor.
311
             \"GDB_stubs\" provides support when GDB stubs are included in
312
             the ROM monitor or boot ROM."
313
     }
314
 
315
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
316
        display       "Redboot HAL options"
317
        flavor        none
318
        no_define
319
        parent        CYGPKG_REDBOOT
320
        active_if     CYGPKG_REDBOOT
321
        description   "
322
            This option lists the target's requirements for a valid Redboot
323
            configuration."
324
 
325
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
326
            display       "Build Redboot ROM binary image"
327
            active_if     CYGBLD_BUILD_REDBOOT
328
            default_value 1
329
            no_define
330
            description "This option enables the conversion of the Redboot ELF
331
                         image to a binary image suitable for ROM programming."
332
 
333
#            compile -library=libextras.a redboot_cmds.c
334
 
335
            make -priority 325 {
336
                /bin/redboot.bin : /bin/redboot.elf
337
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
338
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
339
                $(OBJCOPY) -O binary $< $@
340
            }
341
        }
342
    }
343
 
344
}

powered by: WebSVN 2.1.0

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