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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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