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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [gps4020/] [current/] [cdl/] [hal_arm_gps4020.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_arm_gps4020.cdl
4
#
5
#      GPS4020 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, 2003 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_GPS4020 {
52
    display       "GPS4020 evaluation board"
53
    parent        CYGPKG_HAL_ARM
54
    define_header hal_arm_gps4020.h
55
    include_dir   cyg/hal
56
    hardware
57
    description   "
58
        The gps4020 HAL package provides the support needed to run
59
        eCos on a ARM GPS4020-1 eval board."
60
 
61
    compile       hal_diag.c gps4020_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_TESTS_NO_CACHES
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
        puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 100000"
73
        puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM7TDMI\""
74
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"GPS-4020\""
75
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
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 GPS4020-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
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
95
        display      "Number of communication channels on the board"
96
        flavor       data
97
        calculated   1
98
    }
99
 
100
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
101
        display          "Debug serial port"
102
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
103
        flavor data
104
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
105
        default_value    0
106
        description      "
107
            The GPS4020 board has only one serial port. This option
108
            chooses which port will be used to connect to a host
109
            running GDB."
110
     }
111
 
112
     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
113
         display          "Diagnostic serial port"
114
         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_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 GPS4020 board has only one serial port.  This option
120
            chooses which port will be used for diagnostic output."
121
     }
122
 
123
    # Real-time clock/counter specifics
124
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
125
        display       "Real-time clock constants"
126
        flavor        none
127
 
128
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
129
            display       "Real-time clock numerator"
130
            flavor        data
131
            default_value 1000000000
132
        }
133
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
134
            display       "Real-time clock denominator"
135
            flavor        data
136
            default_value 100
137
        }
138
        cdl_option CYGNUM_HAL_RTC_PERIOD {
139
            display       "Real-time clock period"
140
            flavor        data
141
            default_value ((CYGNUM_HAL_RTC_NUMERATOR/1000)/CYGNUM_HAL_RTC_DENOMINATOR)
142
        }
143
    }
144
 
145
    cdl_component CYGBLD_GLOBAL_OPTIONS {
146
        display "Global build options"
147
        flavor  none
148
        parent  CYGPKG_NONE
149
        description   "
150
            Global build options including control over
151
            compiler flags, linker flags and choice of toolchain."
152
 
153
 
154
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
155
            display "Global command prefix"
156
            flavor  data
157
            no_define
158
            default_value { "arm-eabi"}
159
            description "
160
                This option specifies the command prefix used when
161
                invoking the build tools."
162
        }
163
 
164
        cdl_option CYGBLD_GLOBAL_CFLAGS {
165
            display "Global compiler flags"
166
            flavor  data
167
            no_define
168
            default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGBLD_ARCH_CFLAGS .
169
                            "-mcpu=arm7tdmi -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
170
            description   "
171
                This option controls the global compiler flags which are used to
172
                compile all packages by default. Individual packages may define
173
                options which override these global flags."
174
        }
175
 
176
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
177
            display "Global linker flags"
178
            flavor  data
179
            no_define
180
            default_value { CYGBLD_ARCH_LDFLAGS . "-mcpu=arm7tdmi -Wl,--gc-sections -Wl,-static -g -nostdlib" }
181
            description   "
182
                This option controls the global linker flags. Individual
183
                packages may define options which override these global flags."
184
        }
185
 
186
        cdl_option CYGBLD_BUILD_GDB_STUBS {
187
            display "Build GDB stub ROM image"
188
            default_value 0
189
            requires { CYG_HAL_STARTUP == "ROM" }
190
            requires CYGSEM_HAL_ROM_MONITOR
191
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
192
            requires ! CYGBLD_BUILD_COMMON_GDB_STUBS
193
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
194
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
195
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
196
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
197
            no_define
198
            description "
199
                This option enables the building of the GDB stubs for the
200
                board. This is a bit convoluted as it involves prepending
201
                the image with a special header used by the GPS4020 firmware
202
                to keep track of multiple ROM images. This header includes
203
                a checksum making it necessary to build twice."
204
 
205
            make -priority 320 {
206
                /bin/gdb_module.bin : /src/gdb_module.c
207
                @sh -c "mkdir -p src $(dir $@)"
208
                # First build version with no checksum.
209
                $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/gdb_module_ncs.o $<
210
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module_ncs.tmp src/gdb_module_ncs.o
211
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module_ncs.tmp src/gdb_module_ncs.img
212
                $(OBJCOPY) -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin
213
                @rm src/gdb_module_ncs.tmp src/gdb_module_ncs.img
214
                # Prepare dependency file
215
                @echo $@ ": \\" > $(notdir $@).deps
216
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
217
                @tail -n +2 deps.tmp >> $(notdir $@).deps
218
                @echo >> $(notdir $@).deps
219
                @rm deps.tmp
220
                # Then build version with checksum from previously built image.
221
                @cp $(dir $<)flash_cksum.tcl src/
222
                $(CC) -c -DCHECKSUM=`src/flash_cksum.tcl src/gdb_module_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/gdb_module.o $<
223
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module.tmp src/gdb_module.o
224
                $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module.tmp $(@:.bin=.img)
225
                $(OBJCOPY) -O binary $(@:.bin=.img) src/gdb_module.bin
226
                uuencode src/gdb_module.bin gdb_module.bin | tr '`' ' ' > $(@:.bin=.img.UU)
227
                @rm src/gdb_module.tmp src/gdb_module_ncs.bin
228
                @mv src/gdb_module.bin $@
229
            }
230
        }
231
    }
232
 
233
    cdl_option CYGSEM_HAL_ROM_MONITOR {
234
        display       "Behave as a ROM monitor"
235
        flavor        bool
236
        default_value 0
237
        parent        CYGPKG_HAL_ROM_MONITOR
238
        requires      { CYG_HAL_STARTUP == "ROM" }
239
        description   "
240
            Enable this option if this program is to be used as a ROM monitor,
241
            i.e. applications will be loaded into RAM on the board, and this
242
            ROM monitor may process exceptions or interrupts generated from the
243
            application. This enables features such as utilizing a separate
244
            interrupt stack when exceptions are generated."
245
    }
246
 
247
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
248
         display       "Work with a ROM monitor"
249
         flavor        booldata
250
         legal_values  { "Generic" "GDB_stubs" }
251
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
252
         parent        CYGPKG_HAL_ROM_MONITOR
253
         requires      { CYG_HAL_STARTUP == "RAM" }
254
         description   "
255
             Support can be enabled for different varieties of ROM monitor.
256
             This support changes various eCos semantics such as the encoding
257
             of diagnostic output, or the overriding of hardware interrupt
258
             vectors.
259
             Firstly there is \"Generic\" support which prevents the HAL
260
             from overriding the hardware vectors that it does not use, to
261
             instead allow an installed ROM monitor to handle them. This is
262
             the most basic support which is likely to be common to most
263
             implementations of ROM monitor.
264
             \"GDB_stubs\" provides support when GDB stubs are included in
265
             the ROM monitor or boot ROM."
266
     }
267
 
268
    cdl_component CYGHWR_MEMORY_LAYOUT {
269
        display "Memory layout"
270
        flavor data
271
        no_define
272
        calculated { CYG_HAL_STARTUP == "RAM" ? "arm_gps4020_ram" : \
273
                     CYG_HAL_STARTUP == "ROM" ? "arm_gps4020_rom" : \
274
                                                "??" }
275
 
276
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
277
            display "Memory layout linker script fragment"
278
            flavor data
279
            no_define
280
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
281
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
282
                         CYG_HAL_STARTUP == "ROM" ? "" : \
283
                                                    "" }
284
        }
285
 
286
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
287
            display "Memory layout header file"
288
            flavor data
289
            no_define
290
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
291
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
292
                         CYG_HAL_STARTUP == "ROM" ? "" : \
293
                                                    "" }
294
        }
295
    }
296
 
297
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
298
        display       "Redboot HAL options"
299
        flavor        none
300
        no_define
301
        parent        CYGPKG_REDBOOT
302
        active_if     CYGPKG_REDBOOT
303
        description   "
304
            This option lists the target's requirements for a valid Redboot
305
            configuration."
306
 
307
        # The backup image is not needed, since ROMRAM is the normal
308
        # RedBoot startup type.
309
        requires {!CYGPKG_REDBOOT_FLASH || CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP == 0}
310
 
311
        # RedBoot details
312
        requires { !CYGBLD_BUILD_REDBOOT_WITH_EXEC }
313
 
314
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
315
            display       "Build Redboot ROM binary image"
316
            active_if     CYGBLD_BUILD_REDBOOT
317
            default_value 1
318
            no_define
319
            description "This option enables the conversion of the Redboot ELF
320
                         image to the various relocated SREC images needed
321
                         for flash updating."
322
 
323
            make -priority 325 {
324
                /bin/redboot.bin : /bin/redboot.elf
325
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
326
                $(OBJCOPY) -O binary $< $@
327
            }
328
        }
329
    }
330
 
331
}

powered by: WebSVN 2.1.0

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