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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [powerpc/] [vads/] [v2_0/] [cdl/] [hal_powerpc_vads.cdl] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_powerpc_vads.cdl
4
#
5
#      Motorola MPC8260 Voyager ADS 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):      wpd
45
# Original data:  hmt
46
# Contributors:
47
# Date:           YYYY-MM-DD
48
#
49
#####DESCRIPTIONEND####
50
#
51
# ====================================================================
52
 
53
cdl_package CYGPKG_HAL_POWERPC_VADS {
54
    display       "MPC8260 VADS board"
55
    parent        CYGPKG_HAL_POWERPC
56
    requires      CYGPKG_HAL_POWERPC_MPC8260
57
    define_header hal_powerpc_vads.h
58
    include_dir   cyg/hal
59
    description   "
60
        The VADS HAL package provides the support needed to run
61
        eCos on a Mototola MPC8260 VADS  board."
62
 
63
    compile       hal_diag.c hal_aux.c vads.S
64
 
65
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
66
# removed by WPD for now
67
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
68
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
69
# added by WPD for now
70
 
71
# Note: uncomment this to get old-style debug behaviour
72
#   implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_NOT_GUARANTEED
73
 
74
    define_proc {
75
        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   "
76
        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
77
 
78
        puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC MPC8260\""
79
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Voyager ADS\""
80
        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
81
    }
82
 
83
    cdl_component CYG_HAL_STARTUP {
84
        display       "Startup type"
85
        flavor        data
86
        legal_values  {"RAM" "ROM"}
87
        default_value {"RAM"}
88
        no_define
89
        define -file system.h CYG_HAL_STARTUP
90
        description   "
91
           This option is used to control where the application program will
92
           run, either from RAM or ROM (flash) memory.  ROM based applications
93
           must be self contained, while RAM applications will typically assume
94
           the existence of a debug environment, such as GDB stubs."
95
 
96
        cdl_option DCSPRI_HAL_VADS_ROM_MLT {
97
            display       "Memory Layout for ROM Startup"
98
            flavor        data
99
            legal_values  {"LOW" "HIGH" "RAM"}
100
            default_value {"HIGH"}
101
            description   "
102
 
103
                This option selects which memory layout file should be
104
                used when configuring the VADS board for ROM startup.
105
                The LOW option selects the memory layout for an image
106
                stored at the beginning of the FLASH.  It should be
107
                used when the (hard reset) IP and boot memory space
108
                are both mapped to address 0.
109
 
110
                The HIGH option selects the memory layout for an image
111
                stored in the last Megabyte of FLASH.  It should be
112
                used when the (hard reset) IP maps the interrupt
113
                vector base address to 0xFFF00000 and the boot memory
114
                space to the last 32 Megabytes of FLASH.
115
 
116
                The RAM option is a hack used to place the ROM image
117
                in RAM in order to simplify the development of a ROM
118
                monitor by using the existing ROM monitor to load it
119
                into RAM, but pretend like it is in ROM."
120
        }
121
 
122
    }
123
 
124
    cdl_option CYGHWR_HAL_POWERPC_DISABLE_MMU {
125
        display       "DISABLE MMU"
126
        flavor        bool
127
        default_value 1
128
        #        calculated    1
129
        description   "
130
            This option will disable the MMU enabled."
131
    }
132
 
133
    cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
134
        display          "Development board clock speed (MHz)"
135
        flavor           data
136
        legal_values     45 60 66
137
        default_value    66
138
        description      "
139
           The Delphi TigerSHARC-6 board will probably run at either
140
           45 or 60 MHz.  In the short term, however, we will be using
141
           an MPC8260ADS board running at 66 MHz.  Select the clock
142
           speed appropriate for your board so that the system can set
143
           the serial baud rate correctly, amongst other things."
144
   }
145
 
146
    # Real-time clock/counter specifics
147
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
148
        display       "Real-time clock constants."
149
        description   "
150
            Period is busclock/4/CYGNUM_HAL_RTC_DENOMINATOR.  VERIFY THIS!!!"
151
        flavor        none
152
        no_define
153
 
154
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
155
            display       "Real-time clock numerator"
156
            flavor        data
157
            calculated    1000000000
158
        }
159
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
160
            display       "Real-time clock denominator"
161
            flavor        data
162
            default_value 100
163
            description   "
164
              This option selects the number of system clock 'ticks'
165
              per second.  This rate is sometimes known as the heartbeat rate."
166
        }
167
        cdl_option CYGNUM_HAL_RTC_PERIOD {
168
            display       "Real-time clock period"
169
            flavor        data
170
            calculated    { (((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/4)/CYGNUM_HAL_RTC_DENOMINATOR) }
171
        }
172
    }
173
 
174
    cdl_component CYGBLD_GLOBAL_OPTIONS {
175
        display "Global build options"
176
        flavor  none
177
        description   "
178
            Global build options including control over
179
            compiler flags, linker flags and choice of toolchain."
180
 
181
 
182
        parent  CYGPKG_NONE
183
 
184
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
185
            display "Global command prefix"
186
            flavor  data
187
            no_define
188
            default_value { "powerpc-eabi" }
189
            description "
190
                This option specifies the command prefix used when
191
                invoking the build tools."
192
        }
193
 
194
        cdl_option CYGBLD_GLOBAL_CFLAGS {
195
            display "Global compiler flags"
196
            flavor  data
197
            no_define
198
            default_value { "-msoft-float -mcpu=603e -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
199
            description   "
200
                This option controls the global compiler flags which
201
                are used to compile all packages by
202
                default. Individual packages may define
203
                options which override these global flags."
204
        }
205
 
206
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
207
            display "Global linker flags"
208
            flavor  data
209
            no_define
210
            default_value { "-msoft-float -mcpu=603e -g -nostdlib -Wl,--gc-sections -Wl,-static" }
211
            description   "
212
                This option controls the global linker flags. Individual
213
                packages may define options which override these global flags."
214
        }
215
 
216
        cdl_option CYGBLD_BUILD_GDB_STUBS {
217
            display "Build GDB stub ROM image"
218
            default_value 0
219
            requires { CYG_HAL_STARTUP == "ROM" }
220
            requires CYGSEM_HAL_ROM_MONITOR
221
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
222
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
223
 
224
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
225
# We don't support GDB BREAK (yet)
226
#            requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
227
#
228
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
229
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
230
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
231
            no_define
232
            description "
233
                This option enables the building of the GDB stubs for the
234
                board. The common HAL controls takes care of most of the
235
                build process, but the platform CDL takes care of creating
236
                an S-Record data file. -- This needs more work"
237
 
238
            make -priority 320 {
239
                /bin/gdb_module.bin : /bin/gdb_module.img
240
                $(OBJCOPY) -O srec --srec-forceS3 $< $(@:.bin=.s19)
241
                $(OBJCOPY) -O binary $< $@
242
#            }
243
# Changed the .srec extentsion to .txt for ease of downloading with hyperterm
244
# Changed the .txt extentsion to .s19 for ease of downloading with OCD
245
        }
246
    }
247
 
248
    cdl_component CYGPKG_HAL_POWERPC_VADS_OPTIONS {
249
        display "MPC8260 VADS build options"
250
        flavor  none
251
        description   "
252
            Package specific build options including control over
253
            compiler flags used only in building this package,
254
            and details of which tests are built."
255
 
256
 
257
        cdl_option CYGPKG_HAL_POWERPC_VADS_CFLAGS_ADD {
258
            display "Additional compiler flags"
259
            flavor  data
260
            no_define
261
            default_value { "" }
262
            description   "
263
                This option modifies the set of compiler flags for
264
                building the VADS HAL. These flags are used in addition
265
                to the set of global flags."
266
        }
267
 
268
        cdl_option CYGPKG_HAL_POWERPC_VADS_CFLAGS_REMOVE {
269
            display "Suppressed compiler flags"
270
            flavor  data
271
            no_define
272
            default_value { "" }
273
            description   "
274
                This option modifies the set of compiler flags for
275
                building the VADS HAL. These flags are removed from
276
                the set of global flags if present."
277
        }
278
    }
279
 
280
    cdl_component CYGHWR_MEMORY_LAYOUT {
281
        display "Memory layout"
282
        flavor data
283
        no_define
284
        calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_vads_ram" : \
285
                                                "powerpc_vads_rom" }
286
 
287
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
288
            display "Memory layout linker script fragment"
289
            flavor data
290
            no_define
291
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
292
            calculated { CYG_HAL_STARTUP == "RAM"          ? ""     : \
293
                         DCSPRI_HAL_VADS_ROM_MLT == "LOW"  ? ""  : \
294
                         DCSPRI_HAL_VADS_ROM_MLT == "HIGH" ? "" : \
295
                                                             "" }
296
        }
297
 
298
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
299
            display "Memory layout header file"
300
            flavor data
301
            no_define
302
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
303
            calculated { CYG_HAL_STARTUP == "RAM"          ? ""     : \
304
                         DCSPRI_HAL_VADS_ROM_MLT == "LOW"  ? ""  : \
305
                         DCSPRI_HAL_VADS_ROM_MLT == "HIGH" ? "" : \
306
                                                             "" }
307
        }
308
    }
309
 
310
    cdl_option CYGSEM_HAL_ROM_MONITOR {
311
        display       "Behave as a ROM monitor"
312
        flavor        bool
313
        default_value 0
314
        parent        CYGPKG_HAL_ROM_MONITOR
315
        requires      { CYG_HAL_STARTUP == "ROM" }
316
        description   "
317
            Enable this option if this program is to be used as a ROM monitor,
318
            i.e. applications will be loaded into RAM on the board, and this
319
            ROM monitor may process exceptions or interrupts generated from the
320
            application. This enables features such as utilizing a separate
321
            interrupt stack when exceptions are generated."
322
    }
323
 
324
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
325
        display       "Work with a ROM monitor"
326
        flavor        bool
327
        default_value { (CYG_HAL_STARTUP == "RAM" &&
328
                        !CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS &&
329
                        !CYGINT_HAL_USE_ROM_MONITOR_UNSUPPORTED &&
330
                        !CYGSEM_HAL_POWERPC_COPY_VECTORS) ? 1 : 0 }
331
        parent        CYGPKG_HAL_ROM_MONITOR
332
        requires      { CYG_HAL_STARTUP == "RAM" }
333
        requires      ! CYGSEM_HAL_POWERPC_COPY_VECTORS
334
        requires      ! CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
335
        requires      ! CYGINT_HAL_USE_ROM_MONITOR_UNSUPPORTED
336
        description   "
337
            Allow coexistence with ROM monitor (CygMon or GDB stubs) by
338
            only initializing interrupt vectors on startup, thus leaving
339
            exception handling to the ROM monitor."
340
    }
341
 
342
 
343
    # FIXME: the option above should be adjusted to select between monitor
344
    #        variants
345
    cdl_option CYGSEM_HAL_USE_ROM_MONITOR_GDB_stubs {
346
        parent        CYGPKG_HAL_ROM_MONITOR
347
        display "Bad CDL workaround"
348
        calculated 1
349
        active_if CYGSEM_HAL_USE_ROM_MONITOR
350
    }
351
 
352
 
353
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
354
        display       "Redboot HAL options"
355
        flavor        none
356
        no_define
357
        parent        CYGPKG_REDBOOT
358
        active_if     CYGPKG_REDBOOT
359
        description   "
360
            This option lists the target's requirements for a valid Redboot
361
            configuration."
362
 
363
#            compile -library=libextras.a redboot_cmds.c
364
 
365
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
366
            display       "Build Redboot ROM binary image"
367
            active_if     CYGBLD_BUILD_REDBOOT
368
            default_value 1
369
            no_define
370
            description "This option enables the conversion of the Redboot ELF
371
                         image to a binary image suitable for ROM programming.
372
                         This needs more work."
373
 
374
            make -priority 325 {
375
                /bin/redboot.bin : /bin/redboot.elf
376
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
377
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
378
                $(OBJCOPY) -O srec --change-address=0x02040000 $< $(@:.bin=.ppcbug)
379
                $(OBJCOPY) -O binary $< $@
380
            }
381
        }
382
    }
383
}

powered by: WebSVN 2.1.0

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