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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [powerpc/] [mbx/] [v2_0/] [cdl/] [hal_powerpc_mbx.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_powerpc_mbx.cdl
4
#
5
#      PowerPC/MBX 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
## Copyright (C) 2002 Gary Thomas
13
##
14
## eCos is free software; you can redistribute it and/or modify it under
15
## the terms of the GNU General Public License as published by the Free
16
## Software Foundation; either version 2 or (at your option) any later version.
17
##
18
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19
## 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 along
24
## with eCos; if not, write to the Free Software Foundation, Inc.,
25
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26
##
27
## As a special exception, if other files instantiate templates or use macros
28
## or inline functions from this file, or you compile this file and link it
29
## with other works to produce a work based on this file, this file does not
30
## by itself cause the resulting work to be covered by the GNU General Public
31
## License. However the source code for this file must still be made available
32
## in accordance with section (3) of the GNU General Public License.
33
##
34
## This exception does not invalidate any other reasons why a work based on
35
## this file might be covered by the GNU General Public License.
36
##
37
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
38
## at http://sources.redhat.com/ecos/ecos-license/
39
## -------------------------------------------
40
#####ECOSGPLCOPYRIGHTEND####
41
# ====================================================================
42
######DESCRIPTIONBEGIN####
43
#
44
# Author(s):      jskov
45
# Original data:  hmt
46
# Contributors:
47
# Date:           1999-11-02
48
#
49
#####DESCRIPTIONEND####
50
#
51
# ====================================================================
52
 
53
cdl_package CYGPKG_HAL_POWERPC_MBX {
54
    display       "Motorola MBX PowerPC evaluation board"
55
    parent        CYGPKG_HAL_POWERPC
56
    requires      CYGPKG_HAL_POWERPC_MPC8xx
57
    define_header hal_powerpc_mbx.h
58
    include_dir   cyg/hal
59
    description   "
60
        The MBX HAL package provides the support needed to run
61
        eCos on a Motorola MBX board equipped with a PowerPC processor."
62
 
63
    compile       hal_diag.c hal_aux.c mbx.S
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    CYGNUM_HAL_QUICC_SMC1
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 HAL_PLATFORM_CPU    \"PowerPC 860\""
75
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Motorola MBX\""
76
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
77
    }
78
 
79
    cdl_component CYG_HAL_STARTUP {
80
        display       "Startup type"
81
        flavor        data
82
        legal_values  {"RAM" "ROM"}
83
        default_value {"RAM"}
84
        no_define
85
        define -file system.h CYG_HAL_STARTUP
86
        description   "
87
           This option is used to control where the application program will
88
           run, either from RAM or ROM (flash) memory.  ROM based applications
89
           must be self contained, while RAM applications will typically assume
90
           the existence of a debug environment, such as GDB stubs."
91
    }
92
 
93
    cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
94
        display          "Development board clock speed (MHz)"
95
        flavor           data
96
        legal_values     40 50
97
        default_value    50
98
        description      "
99
           MBX Development Boards have various system clock speeds
100
           depending on the processor fitted.  Select the clock speed
101
           appropriate for your board so that the system can set the serial
102
           baud rate correctly, amongst other things."
103
   }
104
 
105
   cdl_option CYGHWR_HAL_POWERPC_MBX_BOOT_32BIT_FLASH {
106
       display          "Boot ROM is 32-bit Flash device"
107
       default_value    0
108
       description      "
109
           MBX Development Boards have a socketed 8-bit ROM (AM27F040,
110
           AM29F040 or similar) and a permanently soldered 32-bit flash
111
           device.  Which is used for booting is link selectable (refer to
112
           the MBX Series documentation from Motorola).  Enable this option
113
           when booting from the 32-bit flash so that the correct memory
114
           timing and access method is initialized.  This consideration
115
           does apply to RAM start eCos applications as well as ROM start
116
           or stub ROMs."
117
   }
118
 
119
    # Real-time clock/counter specifics
120
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
121
        display       "Real-time clock constants."
122
        description   "
123
            Period is busclock/16/100."
124
        flavor        none
125
        no_define
126
 
127
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
128
            display       "Real-time clock numerator"
129
            flavor        data
130
            calculated    1000000000
131
        }
132
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
133
            display       "Real-time clock denominator"
134
            flavor        data
135
            default_value 100
136
            description   "
137
              This option selects the number of system clock 'ticks'
138
              per second.  This rate is sometimes known as the heartbeat rate."
139
        }
140
        cdl_option CYGNUM_HAL_RTC_PERIOD {
141
            display       "Real-time clock period"
142
            flavor        data
143
            calculated    { (((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/16)/CYGNUM_HAL_RTC_DENOMINATOR) }
144
        }
145
    }
146
 
147
    cdl_component CYGBLD_GLOBAL_OPTIONS {
148
        display "Global build options"
149
        flavor  none
150
        description   "
151
            Global build options including control over
152
            compiler flags, linker flags and choice of toolchain."
153
 
154
 
155
        parent  CYGPKG_NONE
156
 
157
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
158
            display "Global command prefix"
159
            flavor  data
160
            no_define
161
            default_value { "powerpc-eabi" }
162
            description "
163
                This option specifies the command prefix used when
164
                invoking the build tools."
165
        }
166
 
167
        cdl_option CYGBLD_GLOBAL_CFLAGS {
168
            display "Global compiler flags"
169
            flavor  data
170
            no_define
171
            default_value { "-msoft-float -mcpu=860 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
172
            description   "
173
                This option controls the global compiler flags which
174
                are used to compile all packages by
175
                default. Individual packages may define
176
                options which override these global flags."
177
        }
178
 
179
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
180
            display "Global linker flags"
181
            flavor  data
182
            no_define
183
            default_value { "-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
184
            description   "
185
                This option controls the global linker flags. Individual
186
                packages may define options which override these global flags."
187
        }
188
 
189
        cdl_option CYGBLD_BUILD_GDB_STUBS {
190
            display "Build GDB stub ROM image"
191
            default_value 0
192
            requires { CYG_HAL_STARTUP == "ROM" }
193
            requires CYGSEM_HAL_ROM_MONITOR
194
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
195
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
196
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
197
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
198
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
199
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
200
            no_define
201
            description "
202
                This option enables the building of the GDB stubs for the
203
                board. The common HAL controls takes care of most of the
204
                build process, but the platform CDL takes care of creating
205
                an S-Record data file suitable for programming using
206
                the board's EPPC-Bug firmware monitor."
207
 
208
            make -priority 320 {
209
                /bin/gdb_module.bin : /bin/gdb_module.img
210
                $(OBJCOPY) -O srec --change-address=0x02040000 $< $(@:.bin=.srec)
211
                $(OBJCOPY) -O binary $< $@
212
            }
213
        }
214
    }
215
 
216
    cdl_component CYGPKG_HAL_POWERPC_MBX_OPTIONS {
217
        display "MBX build options"
218
        flavor  none
219
        description   "
220
            Package specific build options including control over
221
            compiler flags used only in building this package,
222
            and details of which tests are built."
223
 
224
 
225
        cdl_option CYGPKG_HAL_POWERPC_MBX_CFLAGS_ADD {
226
            display "Additional compiler flags"
227
            flavor  data
228
            no_define
229
            default_value { "" }
230
            description   "
231
                This option modifies the set of compiler flags for
232
                building the MBX HAL. These flags are used in addition
233
                to the set of global flags."
234
        }
235
 
236
        cdl_option CYGPKG_HAL_POWERPC_MBX_CFLAGS_REMOVE {
237
            display "Suppressed compiler flags"
238
            flavor  data
239
            no_define
240
            default_value { "" }
241
            description   "
242
                This option modifies the set of compiler flags for
243
                building the MBX HAL. These flags are removed from
244
                the set of global flags if present."
245
        }
246
 
247
        cdl_option CYGPKG_HAL_POWERPC_MBX_TESTS {
248
            display "MBX tests"
249
            flavor  data
250
            no_define
251
            calculated { "tests/mbxtime" }
252
            description   "
253
                This option specifies the set of tests for the MBX HAL."
254
        }
255
    }
256
 
257
    cdl_component CYGHWR_MEMORY_LAYOUT {
258
        display "Memory layout"
259
        flavor data
260
        no_define
261
        calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_mbx_ram" : \
262
                                                "powerpc_mbx_rom" }
263
 
264
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
265
            display "Memory layout linker script fragment"
266
            flavor data
267
            no_define
268
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
269
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
270
                                                    "" }
271
        }
272
 
273
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
274
            display "Memory layout header file"
275
            flavor data
276
            no_define
277
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
278
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
279
                                                    "" }
280
        }
281
    }
282
 
283
    cdl_option CYGSEM_HAL_ROM_MONITOR {
284
        display       "Behave as a ROM monitor"
285
        flavor        bool
286
        default_value 0
287
        parent        CYGPKG_HAL_ROM_MONITOR
288
        requires      { CYG_HAL_STARTUP == "ROM" }
289
        description   "
290
            Enable this option if this program is to be used as a ROM monitor,
291
            i.e. applications will be loaded into RAM on the board, and this
292
            ROM monitor may process exceptions or interrupts generated from the
293
            application. This enables features such as utilizing a separate
294
            interrupt stack when exceptions are generated."
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
        cdl_option CYGSEM_REDBOOT_HAL_LINUX_BOOT {
308
            active_if      CYGBLD_BUILD_REDBOOT_WITH_EXEC
309
            display        "Support booting Linux via RedBoot"
310
            flavor         bool
311
            default_value  1
312
            description    "
313
               This option enables RedBoot to support booting of a Linux kernel."
314
 
315
            compile -library=libextras.a redboot_linux_exec.c
316
        }
317
 
318
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
319
            display       "Build Redboot ROM binary image"
320
            active_if     CYGBLD_BUILD_REDBOOT
321
            default_value 1
322
            no_define
323
            description "This option enables the conversion of the Redboot ELF
324
                         image to a binary image suitable for ROM programming."
325
 
326
            make -priority 325 {
327
                /bin/redboot.bin : /bin/redboot.elf
328
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
329
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
330
                $(OBJCOPY) -O srec --change-address=0x02040000 $< $(@:.bin=.ppcbug)
331
                $(OBJCOPY) -O binary $< $@
332
            }
333
        }
334
    }
335
}

powered by: WebSVN 2.1.0

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