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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [aeb/] [v2_0/] [cdl/] [hal_arm_aeb.cdl] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_arm_aeb.cdl
4
#
5
#      AEB1 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:           1999-06-13
47
#
48
#####DESCRIPTIONEND####
49
#
50
# ====================================================================
51
 
52
cdl_package CYGPKG_HAL_ARM_AEB {
53
    display       "ARM AEB-1 evaluation board"
54
    parent        CYGPKG_HAL_ARM
55
    requires      ! CYGHWR_THUMB
56
    define_header hal_arm_aeb.h
57
    include_dir   cyg/hal
58
    hardware
59
    description   "
60
        The aeb HAL package provides the support needed to run
61
        eCos on a ARM AEB-1 eval board."
62
 
63
    compile       hal_diag.c aeb_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_ARM_ARCH_ARM7
69
    implements    CYGINT_HAL_TESTS_NO_CACHES
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
 
75
        puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 100000"
76
    }
77
 
78
    cdl_component CYG_HAL_STARTUP {
79
        display       "Startup type"
80
        flavor        data
81
        default_value {"RAM"}
82
        legal_values  {"RAM" "ROM"}
83
        no_define
84
        define -file system.h CYG_HAL_STARTUP
85
        description   "
86
            When targetting the AEB-1 eval board it is possible to build
87
            the system for either RAM bootstrap or ROM bootstrap(s). Select
88
            'ram' when building programs to load into RAM using onboard
89
            debug software such as Angel or eCos GDB stubs.  Select 'rom'
90
            when building a stand-alone application which will be put
91
            into ROM."
92
    }
93
 
94
 
95
    cdl_option CYGHWR_HAL_ARM_AEB_REVISION {
96
        display       "AEB board revision"
97
        flavor        data
98
        default_value {"B"}
99
        legal_values  {"B" "C"}
100
        description   "
101
            The AEB-1 eval board exists in two revisions. Revision B
102
            has 128kB of memory and a flawed CPU which means caches
103
            must be disabled. Revision C has 256kB of memory and can
104
            run with caches enabled."
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   1
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 AEB board has only one serial port. 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 {
126
         display          "Diagnostic serial port"
127
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
128
         flavor data
129
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
130
         default_value    0
131
         description      "
132
            The AEB board has only one serial port.  This option
133
            chooses which port will be used for diagnostic output."
134
     }
135
 
136
    # Real-time clock/counter specifics
137
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
138
        display       "Real-time clock constants"
139
        flavor        none
140
 
141
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
142
            display       "Real-time clock numerator"
143
            flavor        data
144
            calculated    1000000000
145
        }
146
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
147
            display       "Real-time clock denominator"
148
            flavor        data
149
            calculated    100
150
        }
151
        cdl_option CYGNUM_HAL_RTC_PERIOD {
152
            display       "Real-time clock period"
153
            flavor        data
154
            calculated    (240000/16)
155
        }
156
    }
157
 
158
    cdl_component CYGBLD_GLOBAL_OPTIONS {
159
        display "Global build options"
160
        flavor  none
161
        parent  CYGPKG_NONE
162
        description   "
163
            Global build options including control over
164
            compiler flags, linker flags and choice of toolchain."
165
 
166
 
167
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
168
            display "Global command prefix"
169
            flavor  data
170
            no_define
171
            default_value { "arm-elf" }
172
            description "
173
                This option specifies the command prefix used when
174
                invoking the build tools."
175
        }
176
 
177
        cdl_option CYGBLD_GLOBAL_CFLAGS {
178
            display "Global compiler flags"
179
            flavor  data
180
            no_define
181
            default_value { "-mcpu=arm7di -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
182
            description   "
183
                This option controls the global compiler flags which are used to
184
                compile all packages by default. Individual packages may define
185
                options which override these global flags."
186
        }
187
 
188
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
189
            display "Global linker flags"
190
            flavor  data
191
            no_define
192
            default_value { "-mcpu=arm7di -Wl,--gc-sections -Wl,-static -g -nostdlib" }
193
            description   "
194
                This option controls the global linker flags. Individual
195
                packages may define options which override these global flags."
196
        }
197
 
198
        cdl_option CYGBLD_BUILD_GDB_STUBS {
199
            display "Build GDB stub ROM image"
200
            default_value 0
201
            requires { CYG_HAL_STARTUP == "ROM" }
202
            requires CYGSEM_HAL_ROM_MONITOR
203
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
204
            requires ! CYGBLD_BUILD_COMMON_GDB_STUBS
205
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
206
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
207
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
208
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
209
            no_define
210
            description "
211
                This option enables the building of the GDB stubs for the
212
                board. This is a bit convoluted as it involves prepending
213
                the image with a special header used by the AEB firmware
214
                to keep track of multiple ROM images. This header includes
215
                a checksum making it necessary to build twice."
216
 
217
            make -priority 320 {
218
                /bin/gdb_module.bin : /src/gdb_module.c
219
                @sh -c "mkdir -p src $(dir $@)"
220
                # First build version with no checksum.
221
                $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/gdb_module_ncs.o $<
222
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module_ncs.tmp src/gdb_module_ncs.o
223
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module_ncs.tmp src/gdb_module_ncs.img
224
                $(OBJCOPY) -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin
225
                @rm src/gdb_module_ncs.tmp src/gdb_module_ncs.img
226
                # Prepare dependency file
227
                @echo $@ ": \\" > $(notdir $@).deps
228
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
229
                @tail +2 deps.tmp >> $(notdir $@).deps
230
                @echo >> $(notdir $@).deps
231
                @rm deps.tmp
232
                # Then build version with checksum from previously built image.
233
                @cp $(dir $<)flash_cksum.tcl src/
234
                $(CC) -c -DCHECKSUM=`src/flash_cksum.tcl src/gdb_module_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/gdb_module.o $<
235
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module.tmp src/gdb_module.o
236
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module.tmp $(@:.bin=.img)
237
                $(OBJCOPY) -O binary $(@:.bin=.img) src/gdb_module.bin
238
                uuencode src/gdb_module.bin gdb_module.bin | tr '`' ' ' > $(@:.bin=.img.UU)
239
                @rm src/gdb_module.tmp src/gdb_module_ncs.bin
240
                @mv src/gdb_module.bin $@
241
            }
242
        }
243
    }
244
 
245
    cdl_component CYGHWR_MEMORY_LAYOUT {
246
        display "Memory layout"
247
        flavor data
248
        no_define
249
        calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" &&           \
250
                      CYG_HAL_STARTUP == "RAM") ? "arm_aeb_ram" :     \
251
                     (CYGHWR_HAL_ARM_AEB_REVISION == "B" &&           \
252
                      CYG_HAL_STARTUP == "ROM") ? "arm_aeb_rom" :     \
253
                     (CYGHWR_HAL_ARM_AEB_REVISION == "C" &&           \
254
                      CYG_HAL_STARTUP == "RAM") ? "arm_aebC_ram" :    \
255
                      "arm_aebC_rom" }
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 { (CYGHWR_HAL_ARM_AEB_REVISION == "B" &&           \
263
                          CYG_HAL_STARTUP == "RAM") ? "" :     \
264
                         (CYGHWR_HAL_ARM_AEB_REVISION == "B" &&           \
265
                          CYG_HAL_STARTUP == "ROM") ? "" :     \
266
                         (CYGHWR_HAL_ARM_AEB_REVISION == "C" &&           \
267
                          CYG_HAL_STARTUP == "RAM") ? "" :    \
268
                         "" }
269
        }
270
 
271
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
272
            display "Memory layout header file"
273
            flavor data
274
            no_define
275
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
276
            calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" &&           \
277
                          CYG_HAL_STARTUP == "RAM") ? "" :     \
278
                         (CYGHWR_HAL_ARM_AEB_REVISION == "B" &&           \
279
                          CYG_HAL_STARTUP == "ROM") ? "" :     \
280
                         (CYGHWR_HAL_ARM_AEB_REVISION == "C" &&           \
281
                          CYG_HAL_STARTUP == "RAM") ? "" :    \
282
                          "" }
283
        }
284
    }
285
 
286
    cdl_option CYGSEM_HAL_ROM_MONITOR {
287
        display       "Behave as a ROM monitor"
288
        flavor        bool
289
        default_value 0
290
        parent        CYGPKG_HAL_ROM_MONITOR
291
        requires      { CYG_HAL_STARTUP == "ROM" }
292
        description   "
293
            Enable this option if this program is to be used as a ROM monitor,
294
            i.e. applications will be loaded into RAM on the board, and this
295
            ROM monitor may process exceptions or interrupts generated from the
296
            application. This enables features such as utilizing a separate
297
            interrupt stack when exceptions are generated."
298
    }
299
 
300
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
301
         display       "Work with a ROM monitor"
302
         flavor        booldata
303
         legal_values  { "Generic" "GDB_stubs" }
304
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
305
         parent        CYGPKG_HAL_ROM_MONITOR
306
         requires      { CYG_HAL_STARTUP == "RAM" }
307
         description   "
308
             Support can be enabled for different varieties of ROM monitor.
309
             This support changes various eCos semantics such as the encoding
310
             of diagnostic output, or the overriding of hardware interrupt
311
             vectors.
312
             Firstly there is \"Generic\" support which prevents the HAL
313
             from overriding the hardware vectors that it does not use, to
314
             instead allow an installed ROM monitor to handle them. This is
315
             the most basic support which is likely to be common to most
316
             implementations of ROM monitor.
317
             \"GDB_stubs\" provides support when GDB stubs are included in
318
             the ROM monitor or boot ROM."
319
     }
320
}

powered by: WebSVN 2.1.0

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