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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [e7t/] [current/] [cdl/] [hal_arm_e7t.cdl] - Blame information for rev 856

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

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_arm_e7t.cdl
4
#
5
#      Evaluator7T (AEB2) 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):      gthomas
43
# Contributors:   gthomas, jskov
44
# Date:           2001-03-16
45
#
46
#####DESCRIPTIONEND####
47
#
48
# ====================================================================
49
 
50
cdl_package CYGPKG_HAL_ARM_E7T {
51
    display       "ARM Evaluator7T (AEB2) evaluation board"
52
    parent        CYGPKG_HAL_ARM
53
    define_header hal_arm_e7t.h
54
    include_dir   cyg/hal
55
    hardware
56
    description   "
57
        The E7T HAL package provides the support needed to run
58
        eCos on an ARM E7T eval board."
59
 
60
    compile       hal_diag.c e7t_misc.c
61
 
62
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
63
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
64
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
65
    implements    CYGINT_HAL_ARM_ARCH_ARM7
66
    implements    CYGINT_HAL_ARM_THUMB_ARCH
67
 
68
    define_proc {
69
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
70
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
71
    }
72
 
73
    cdl_component CYG_HAL_STARTUP {
74
        display       "Startup type"
75
        flavor        data
76
        default_value {"RAM"}
77
        legal_values  {"RAM" "ROM"}
78
        no_define
79
        define -file system.h CYG_HAL_STARTUP
80
        description   "
81
            When targetting the E7T eval board it is possible to build
82
            the system for either RAM bootstrap or ROM bootstrap(s). Select
83
            'ram' when building programs to load into RAM using onboard
84
            debug software such as Angel or eCos GDB stubs.  Select 'rom'
85
            when building a stand-alone application which will be put
86
            into ROM."
87
    }
88
 
89
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
90
        display      "Number of communication channels on the board"
91
        flavor       data
92
        calculated   2
93
    }
94
 
95
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
96
        display          "Debug serial port"
97
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
98
        flavor data
99
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
100
        default_value    1
101
        description      "
102
            The E7T board has two serial ports. This option
103
            chooses which port will be used to connect to a host
104
            running GDB."
105
     }
106
 
107
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
108
         display          "Diagnostic serial port"
109
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
110
         flavor data
111
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
112
         default_value    1
113
         description      "
114
            The E7T board has two serial ports. This option
115
            chooses which port will be used for diagnostic output."
116
     }
117
 
118
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
119
        display       "Console/GDB serial port baud rate"
120
        flavor        data
121
        legal_values  9600 19200 38400 57600 115200
122
        default_value 38400
123
        description   "
124
            This option controls the default baud rate used for the
125
            Console/GDB connection."
126
    }
127
 
128
    # Real-time clock/counter specifics
129
    cdl_option CYGNUM_HAL_ARM_E7T_CLOCK_SPEED {
130
        display       "CPU clock speed"
131
        flavor        data
132
        calculated    50000000
133
    }
134
 
135
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
136
        display       "Real-time clock constants"
137
        flavor        none
138
 
139
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
140
            display       "Real-time clock numerator"
141
            flavor        data
142
            default_value 1000000000
143
        }
144
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
145
            display       "Real-time clock denominator"
146
            flavor        data
147
            default_value 100
148
        }
149
        cdl_option CYGNUM_HAL_RTC_PERIOD {
150
            display       "Real-time clock period"
151
            flavor        data
152
            default_value (CYGNUM_HAL_ARM_E7T_CLOCK_SPEED / CYGNUM_HAL_RTC_DENOMINATOR)
153
        }
154
    }
155
 
156
    cdl_component CYGBLD_GLOBAL_OPTIONS {
157
        display "Global build options"
158
        flavor  none
159
        parent  CYGPKG_NONE
160
        description   "
161
            Global build options including control over
162
            compiler flags, linker flags and choice of toolchain."
163
 
164
 
165
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
166
            display "Global command prefix"
167
            flavor  data
168
            no_define
169
            default_value { "arm-eabi"}
170
            description "
171
                This option specifies the command prefix used when
172
                invoking the build tools."
173
        }
174
 
175
        cdl_option CYGBLD_GLOBAL_CFLAGS {
176
            display "Global compiler flags"
177
            flavor  data
178
            no_define
179
            default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
180
                            "-mcpu=arm7tdmi -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
181
            description   "
182
                This option controls the global compiler flags which are used to
183
                compile all packages by default. Individual packages may define
184
                options which override these global flags."
185
        }
186
 
187
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
188
            display "Global linker flags"
189
            flavor  data
190
            no_define
191
            default_value { CYGBLD_ARCH_LDFLAGS . "-mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib" }
192
            description   "
193
                This option controls the global linker flags. Individual
194
                packages may define options which override these global flags."
195
        }
196
    }
197
 
198
    cdl_component CYGHWR_MEMORY_LAYOUT {
199
        display "Memory layout"
200
        flavor data
201
        no_define
202
        calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_e7t_ram" : "arm_e7t_rom" }
203
 
204
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
205
            display "Memory layout linker script fragment"
206
            flavor data
207
            no_define
208
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
209
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :
210
                                                      "" }
211
        }
212
 
213
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
214
            display "Memory layout header file"
215
            flavor data
216
            no_define
217
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
218
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :     \
219
                                                      "" }
220
        }
221
    }
222
 
223
    cdl_option CYGSEM_HAL_ROM_MONITOR {
224
        display       "Behave as a ROM monitor"
225
        flavor        bool
226
        default_value 0
227
        parent        CYGPKG_HAL_ROM_MONITOR
228
        requires      { CYG_HAL_STARTUP == "ROM" }
229
        description   "
230
            Enable this option if this program is to be used as a ROM monitor,
231
            i.e. applications will be loaded into RAM on the board, and this
232
            ROM monitor may process exceptions or interrupts generated from the
233
            application. This enables features such as utilizing a separate
234
            interrupt stack when exceptions are generated."
235
    }
236
 
237
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
238
         display       "Work with a ROM monitor"
239
         flavor        booldata
240
         legal_values  { "Generic" "GDB_stubs" }
241
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
242
         parent        CYGPKG_HAL_ROM_MONITOR
243
         requires      { CYG_HAL_STARTUP == "RAM" }
244
         description   "
245
             Support can be enabled for different varieties of ROM monitor.
246
             This support changes various eCos semantics such as the encoding
247
             of diagnostic output, or the overriding of hardware interrupt
248
             vectors.
249
             Firstly there is \"Generic\" support which prevents the HAL
250
             from overriding the hardware vectors that it does not use, to
251
             instead allow an installed ROM monitor to handle them. This is
252
             the most basic support which is likely to be common to most
253
             implementations of ROM monitor.
254
             \"GDB_stubs\" provides support when GDB stubs are included in
255
             the ROM monitor or boot ROM."
256
     }
257
 
258
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
259
        display       "Redboot HAL options"
260
        flavor        none
261
        no_define
262
        parent        CYGPKG_REDBOOT
263
        active_if     CYGPKG_REDBOOT
264
        description   "
265
            This option lists the target's requirements for a valid Redboot
266
            configuration."
267
 
268
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
269
            display       "Build Redboot ROM binary image"
270
            active_if     CYGBLD_BUILD_REDBOOT
271
            default_value 1
272
            no_define
273
            description "This option enables the conversion of the Redboot ELF
274
                         image to a binary image suitable for ROM programming."
275
 
276
            make -priority 325 {
277
                /bin/redboot.bin : /src/redboot_module.c $(PREFIX)/lib/target.ld $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a $(PREFIX)/lib/libextras.a
278
                @sh -c "mkdir -p src $(dir $@)"
279
                # First build version with no checksum.
280
                $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/redboot_ncs.o $<
281
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/redboot_ncs.tmp $(PREFIX)/lib/version.o src/redboot_ncs.o
282
                $(OBJCOPY) --strip-debug src/redboot_ncs.tmp src/redboot_ncs.img
283
                $(OBJCOPY) -O binary src/redboot_ncs.img src/redboot_ncs.bin
284
#                @rm src/redboot_ncs.tmp src/redboot_ncs.img
285
                # Prepare dependency file
286
                @echo $@ ": \\" > $(notdir $@).deps
287
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
288
                @tail -n +2 deps.tmp >> $(notdir $@).deps
289
                @echo >> $(notdir $@).deps
290
                @rm deps.tmp
291
                # Then build version with checksum from previously built image.
292
                @cp $(dir $<)flash_cksum.tcl src/
293
                $(CC) -c -DCHECKSUM=`src/flash_cksum.tcl src/redboot_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/redboot.o $<
294
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/redboot.tmp $(PREFIX)/lib/version.o src/redboot.o
295
                $(OBJCOPY) --strip-debug src/redboot.tmp $(@:.bin=.img)
296
                $(OBJCOPY) -O binary $(@:.bin=.img) src/redboot.bin
297
                uuencode src/redboot.bin redboot.bin | tr '`' ' ' > $(@:.bin=.UU)
298
                @rm src/redboot.tmp src/redboot_ncs.bin
299
                @mv src/redboot.bin $@
300
            }
301
 
302
        }
303
    }
304
}

powered by: WebSVN 2.1.0

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