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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [e7t/] [v2_0/] [cdl/] [hal_arm_e7t.cdl] - Blame information for rev 587

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

Line No. Rev Author Line
1 27 unneback
# ====================================================================
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 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):      gthomas
44
# Contributors:   gthomas, jskov
45
# Date:           2001-03-16
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_ARM_E7T {
52
    display       "ARM Evaluator7T (AEB2) evaluation board"
53
    parent        CYGPKG_HAL_ARM
54
    define_header hal_arm_e7t.h
55
    include_dir   cyg/hal
56
    hardware
57
    description   "
58
        The E7T HAL package provides the support needed to run
59
        eCos on an ARM E7T eval board."
60
 
61
    compile       hal_diag.c e7t_misc.c
62
 
63
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
64
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
66
    implements    CYGINT_HAL_ARM_ARCH_ARM7
67
    implements    CYGINT_HAL_ARM_THUMB_ARCH
68
 
69
    define_proc {
70
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
71
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
72
    }
73
 
74
    cdl_component CYG_HAL_STARTUP {
75
        display       "Startup type"
76
        flavor        data
77
        default_value {"RAM"}
78
        legal_values  {"RAM" "ROM"}
79
        no_define
80
        define -file system.h CYG_HAL_STARTUP
81
        description   "
82
            When targetting the E7T eval board it is possible to build
83
            the system for either RAM bootstrap or ROM bootstrap(s). Select
84
            'ram' when building programs to load into RAM using onboard
85
            debug software such as Angel or eCos GDB stubs.  Select 'rom'
86
            when building a stand-alone application which will be put
87
            into ROM."
88
    }
89
 
90
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
91
        display      "Number of communication channels on the board"
92
        flavor       data
93
        calculated   2
94
    }
95
 
96
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
97
        display          "Debug serial port"
98
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
99
        flavor data
100
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
101
        default_value    1
102
        description      "
103
            The E7T board has two serial ports. This option
104
            chooses which port will be used to connect to a host
105
            running GDB."
106
     }
107
 
108
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
109
         display          "Diagnostic serial port"
110
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
111
         flavor data
112
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
113
         default_value    1
114
         description      "
115
            The E7T board has two serial ports. This option
116
            chooses which port will be used for diagnostic output."
117
     }
118
 
119
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
120
        display       "Console/GDB serial port baud rate"
121
        flavor        data
122
        legal_values  9600 19200 38400 57600 115200
123
        default_value 38400
124
        description   "
125
            This option controls the default baud rate used for the
126
            Console/GDB connection."
127
    }
128
 
129
    # Real-time clock/counter specifics
130
    cdl_option CYGNUM_HAL_ARM_E7T_CLOCK_SPEED {
131
        display       "CPU clock speed"
132
        flavor        data
133
        calculated    50000000
134
    }
135
 
136
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
137
        display       "Real-time clock constants"
138
        flavor        none
139
 
140
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
141
            display       "Real-time clock numerator"
142
            flavor        data
143
            calculated    1000000000
144
        }
145
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
146
            display       "Real-time clock denominator"
147
            flavor        data
148
            calculated    100
149
        }
150
        cdl_option CYGNUM_HAL_RTC_PERIOD {
151
            display       "Real-time clock period"
152
            flavor        data
153
            calculated    (CYGNUM_HAL_ARM_E7T_CLOCK_SPEED / CYGNUM_HAL_RTC_DENOMINATOR)
154
        }
155
    }
156
 
157
    cdl_component CYGBLD_GLOBAL_OPTIONS {
158
        display "Global build options"
159
        flavor  none
160
        parent  CYGPKG_NONE
161
        description   "
162
            Global build options including control over
163
            compiler flags, linker flags and choice of toolchain."
164
 
165
 
166
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
167
            display "Global command prefix"
168
            flavor  data
169
            no_define
170
            default_value { "arm-elf" }
171
            description "
172
                This option specifies the command prefix used when
173
                invoking the build tools."
174
        }
175
 
176
        cdl_option CYGBLD_GLOBAL_CFLAGS {
177
            display "Global compiler flags"
178
            flavor  data
179
            no_define
180
            default_value { "-mcpu=arm7tdmi -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
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 { "-mcpu=arm7tdmi -mno-short-load-words -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 +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.