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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [at91/] [v2_0/] [cdl/] [hal_arm_at91.cdl] - Blame information for rev 631

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

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_arm_at91.cdl
4
#
5
#      Atmel evaluation board (EB40) 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
45
# Date:           2001-07-12
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_ARM_AT91 {
52
    display       "Atmel evaluation board (EB40)"
53
    parent        CYGPKG_HAL_ARM
54
    define_header hal_arm_at91.h
55
    include_dir   cyg/hal
56
    hardware
57
    description   "
58
        The AT91 HAL package provides the support needed to run
59
        eCos on an Atmel AT91/EB40 eval board."
60
 
61
    compile       hal_diag.c at91_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
        puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM7TDMI\""
73
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Atmel AT91/EB40\""
74
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
75
    }
76
 
77
    cdl_component CYG_HAL_STARTUP {
78
        display       "Startup type"
79
        flavor        data
80
        default_value {"RAM"}
81
        legal_values  {"RAM" "ROM" "ROMRAM"}
82
        no_define
83
        define -file system.h CYG_HAL_STARTUP
84
        description   "
85
            When targetting the AT91 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.  Using ROMRAM will allow the program to exist in
91
            ROM, but be copied to RAM during startup."
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   2
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 AT91 board has two serial ports. 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 AT91 board has two serial ports. This option
120
            chooses which port will be used for diagnostic output."
121
     }
122
 
123
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
124
        display       "Console/GDB serial port baud rate"
125
        flavor        data
126
        legal_values  9600 19200 38400 57600 115200
127
        default_value 38400
128
        description   "
129
            This option controls the default baud rate used for the
130
            Console/GDB connection."
131
    }
132
 
133
    # Real-time clock/counter specifics
134
    cdl_option CYGNUM_HAL_ARM_AT91_CLOCK_SPEED {
135
        display       "CPU clock speed"
136
        flavor        data
137
        calculated    32768000
138
    }
139
 
140
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
141
        display       "Real-time clock constants"
142
        flavor        none
143
 
144
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
145
            display       "Real-time clock numerator"
146
            flavor        data
147
            calculated    1000000000
148
        }
149
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
150
            display       "Real-time clock denominator"
151
            flavor        data
152
            calculated    100
153
        }
154
        cdl_option CYGNUM_HAL_RTC_PERIOD {
155
            display       "Real-time clock period"
156
            flavor        data
157
            calculated    ((CYGNUM_HAL_ARM_AT91_CLOCK_SPEED/32) / CYGNUM_HAL_RTC_DENOMINATOR)
158
        }
159
    }
160
 
161
    cdl_component CYGBLD_GLOBAL_OPTIONS {
162
        display "Global build options"
163
        flavor  none
164
        parent  CYGPKG_NONE
165
        description   "
166
            Global build options including control over
167
            compiler flags, linker flags and choice of toolchain."
168
 
169
 
170
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
171
            display "Global command prefix"
172
            flavor  data
173
            no_define
174
            default_value { "arm-elf" }
175
            description "
176
                This option specifies the command prefix used when
177
                invoking the build tools."
178
        }
179
 
180
        cdl_option CYGBLD_GLOBAL_CFLAGS {
181
            display "Global compiler flags"
182
            flavor  data
183
            no_define
184
            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" }
185
            description   "
186
                This option controls the global compiler flags which are used to
187
                compile all packages by default. Individual packages may define
188
                options which override these global flags."
189
        }
190
 
191
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
192
            display "Global linker flags"
193
            flavor  data
194
            no_define
195
            default_value { "-mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections -Wl,-static -g -nostdlib" }
196
            description   "
197
                This option controls the global linker flags. Individual
198
                packages may define options which override these global flags."
199
        }
200
    }
201
 
202
    cdl_component CYGHWR_MEMORY_LAYOUT {
203
        display "Memory layout"
204
        flavor data
205
        no_define
206
        calculated { (CYG_HAL_STARTUP == "RAM") ?    "arm_at91_eb40_ram" :
207
                     (CYG_HAL_STARTUP == "ROMRAM") ? "arm_at91_eb40_romram" :
208
                                                     "arm_at91_eb40_rom" }
209
 
210
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
211
            display "Memory layout linker script fragment"
212
            flavor data
213
            no_define
214
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
215
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :
216
                         (CYG_HAL_STARTUP == "ROMRAM") ? "" :
217
                                                      "" }
218
        }
219
 
220
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
221
            display "Memory layout header file"
222
            flavor data
223
            no_define
224
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
225
            calculated { (CYG_HAL_STARTUP == "RAM") ? "" :
226
                         (CYG_HAL_STARTUP == "ROMRAM") ? "" :
227
                                                      "" }
228
        }
229
    }
230
 
231
    cdl_option CYGSEM_HAL_ROM_MONITOR {
232
        display       "Behave as a ROM monitor"
233
        flavor        bool
234
        default_value 0
235
        parent        CYGPKG_HAL_ROM_MONITOR
236
        requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
237
        description   "
238
            Enable this option if this program is to be used as a ROM monitor,
239
            i.e. applications will be loaded into RAM on the board, and this
240
            ROM monitor may process exceptions or interrupts generated from the
241
            application. This enables features such as utilizing a separate
242
            interrupt stack when exceptions are generated."
243
    }
244
 
245
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
246
         display       "Work with a ROM monitor"
247
         flavor        booldata
248
         legal_values  { "Generic" "GDB_stubs" }
249
         default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
250
         parent        CYGPKG_HAL_ROM_MONITOR
251
         requires      { CYG_HAL_STARTUP == "RAM" }
252
         description   "
253
             Support can be enabled for different varieties of ROM monitor.
254
             This support changes various eCos semantics such as the encoding
255
             of diagnostic output, or the overriding of hardware interrupt
256
             vectors.
257
             Firstly there is \"Generic\" support which prevents the HAL
258
             from overriding the hardware vectors that it does not use, to
259
             instead allow an installed ROM monitor to handle them. This is
260
             the most basic support which is likely to be common to most
261
             implementations of ROM monitor.
262
             \"GDB_stubs\" provides support when GDB stubs are included in
263
             the ROM monitor or boot ROM."
264
     }
265
 
266
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
267
        display       "Redboot HAL options"
268
        flavor        none
269
        no_define
270
        parent        CYGPKG_REDBOOT
271
        active_if     CYGPKG_REDBOOT
272
        description   "
273
            This option lists the target's requirements for a valid Redboot
274
            configuration."
275
 
276
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
277
            display       "Build Redboot ROM binary image"
278
            active_if     CYGBLD_BUILD_REDBOOT
279
            default_value 1
280
            no_define
281
            description "This option enables the conversion of the Redboot ELF
282
                         image to a binary image suitable for ROM programming."
283
 
284
            make -priority 325 {
285
                /bin/redboot.bin : /bin/redboot.elf
286
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
287
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
288
                $(OBJCOPY) -O binary $< $@
289
            }
290
 
291
        }
292
    }
293
}

powered by: WebSVN 2.1.0

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