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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [aeb/] [current/] [cdl/] [hal_arm_aeb.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_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 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:           1999-06-13
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_ARM_AEB {
52
    display       "ARM AEB-1 evaluation board"
53
    parent        CYGPKG_HAL_ARM
54
    requires      ! CYGHWR_THUMB
55
    define_header hal_arm_aeb.h
56
    include_dir   cyg/hal
57
    hardware
58
    description   "
59
        The aeb HAL package provides the support needed to run
60
        eCos on a ARM AEB-1 eval board."
61
 
62
    compile       hal_diag.c aeb_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_ARM_ARCH_ARM7
68
    implements    CYGINT_HAL_TESTS_NO_CACHES
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
 
74
        puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 100000"
75
    }
76
 
77
    cdl_component CYG_HAL_STARTUP {
78
        display       "Startup type"
79
        flavor        data
80
        default_value {"RAM"}
81
        legal_values  {"RAM" "ROM"}
82
        no_define
83
        define -file system.h CYG_HAL_STARTUP
84
        description   "
85
            When targetting the AEB-1 eval board it is possible to build
86
            the system for either RAM bootstrap or ROM bootstrap(s). Select
87
            'ram' when building programs to load into RAM using onboard
88
            debug software such as Angel or eCos GDB stubs.  Select 'rom'
89
            when building a stand-alone application which will be put
90
            into ROM."
91
    }
92
 
93
 
94
    cdl_option CYGHWR_HAL_ARM_AEB_REVISION {
95
        display       "AEB board revision"
96
        flavor        data
97
        default_value {"B"}
98
        legal_values  {"B" "C"}
99
        description   "
100
            The AEB-1 eval board exists in two revisions. Revision B
101
            has 128kB of memory and a flawed CPU which means caches
102
            must be disabled. Revision C has 256kB of memory and can
103
            run with caches enabled."
104
    }
105
 
106
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
107
        display      "Number of communication channels on the board"
108
        flavor       data
109
        calculated   1
110
    }
111
 
112
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
113
        display          "Debug serial port"
114
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
115
        flavor data
116
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
117
        default_value    0
118
        description      "
119
            The AEB board has only one serial port. This option
120
            chooses which port will be used to connect to a host
121
            running GDB."
122
     }
123
 
124
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
125
         display          "Diagnostic serial port"
126
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
127
         flavor data
128
         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
129
         default_value    0
130
         description      "
131
            The AEB board has only one serial port.  This option
132
            chooses which port will be used for diagnostic output."
133
     }
134
 
135
    # Real-time clock/counter specifics
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
            default_value 1000000000
144
        }
145
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
146
            display       "Real-time clock denominator"
147
            flavor        data
148
            default_value 100
149
        }
150
        cdl_option CYGNUM_HAL_RTC_PERIOD {
151
            display       "Real-time clock period"
152
            flavor        data
153
            default_value (240000/16)
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 { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
181
                "-mcpu=arm7di -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
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 { CYGBLD_ARCH_LDFLAGS . "-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 -n +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.