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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [powerpc/] [csb281/] [current/] [cdl/] [hal_powerpc_csb281.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_powerpc_csb281.cdl
4
#
5
#      PowerPC/CSB281 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):      jskov
43
# Original data:  hmt
44
# Contributors:   gthomas
45
# Date:           1999-11-02
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_POWERPC_CSB281 {
52
    display       "Cogent CSB281 (PowerPC 8245) board"
53
    parent        CYGPKG_HAL_POWERPC
54
    requires      CYGPKG_HAL_POWERPC_PPC60x
55
    define_header hal_powerpc_csb281.h
56
    include_dir   cyg/hal
57
    description   "
58
        The CSB281 HAL package provides the support needed to run
59
        eCos on a Cogent PowerPC 8245 board."
60
 
61
    compile       hal_diag.c hal_aux.c csb281.S
62
 
63
    implements    CYGINT_HAL_DEBUG_GDB_STUBS
64
    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65
    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
66
# For now, until RedBoot is working
67
#    implements    CYGINT_HAL_USE_ROM_MONITOR_UNSUPPORTED
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_system_header "#define CYGBLD_HAL_PLF_IO_H   "
73
 
74
        puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 8245\""
75
        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Cogent CSB281\""
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" "ROMRAM"}
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_CPU_SPEED {
94
        display          "Development board clock speed (MHz)"
95
        flavor           data
96
        legal_values     333
97
        default_value    333
98
        description      "
99
           CSB281 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_MEM_SPEED {
106
        display          "Development board memory bus speed (MHz)"
107
        flavor           data
108
        legal_values     83
109
        default_value    83
110
        description      "
111
           CSB281 Development Boards have various system clock speeds
112
           depending on the processor fitted.  Select the clock speed
113
           appropriate for your board so that the system can set the serial
114
           baud rate correctly, amongst other things."
115
   }
116
 
117
    cdl_component CYGSEM_CSB281_LCD_SUPPORT {
118
        display        "Support LCD"
119
        flavor         bool
120
        default_value  1
121
        compile        lcd_support.c sed135x_16bit.c
122
        description    "
123
          Enabling this option will enable the use the LCD/CRT as a
124
          simple framebuffer, suitable for use with a windowing
125
          package."
126
 
127
        cdl_component CYGSEM_CSB281_LCD_COMM {
128
            display        "Support LCD/keyboard for comminication channel"
129
            active_if      CYGPKG_REDBOOT
130
            flavor         bool
131
            default_value  1
132
            description    "
133
              Enabling this option will use the LCD/CRT and keyboard for a
134
              communications channel, suitable for RedBoot, etc."
135
 
136
            cdl_option  CYGOPT_CSB281_LCD_COMM_LOGO {
137
                display       "Logo location"
138
                flavor        booldata
139
                legal_values  { "TOP" "BOTTOM" }
140
                default_value { "TOP" }
141
                description   "
142
                    Use this option to control where the logo is placed
143
                    on the LCD/CRT screen."
144
            }
145
        }
146
    }
147
 
148
   cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
149
       display      "Number of communication channels on the board"
150
       flavor       data
151
       calculated   2+CYGSEM_CSB281_LCD_COMM
152
   }
153
 
154
   cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
155
       display          "Debug serial port"
156
       active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
157
       flavor data
158
       legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
159
       default_value    0
160
       description      "
161
           The CSB281 board has only one serial port. This option
162
           chooses which port will be used to connect to a host
163
           running GDB."
164
    }
165
 
166
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
167
        display          "Diagnostic serial port"
168
        active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
169
        flavor data
170
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
171
        default_value    0
172
        description      "
173
           The CSB281 board has only one serial port.  This option
174
           chooses which port will be used for diagnostic output."
175
    }
176
 
177
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
178
        display       "Baud rate for the HAL diagnostic port"
179
        flavor        data
180
        legal_values  { 50 75 110 "134_5" 150 200 300 600 1200 1800 2400 3600
181
                      4800 7200 9600 14400 19200 38400 57600 115200 230400
182
        }
183
        default_value 38400
184
        description   "
185
            This option specifies the default baud rate (speed) for the
186
            HAL diagnostic port."
187
    }
188
 
189
    # This option is only used when USE_ROM_MONITOR is enabled - but
190
    # it cannot be a sub-option to that option, since the code uses the
191
    # definition in a preprocessor comparison.
192
    cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_ROM_DEBUG_CHANNEL {
193
        display          "Debug serial port used by ROM monitor"
194
        flavor data
195
        legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
196
        default_value    0
197
        description      "
198
            The CSB281 board has only one serial port.  This
199
            option tells the code which port is in use by the ROM
200
            monitor. It should only be necessary to change this
201
            option if a non-standard configurated eCos GDB stub is
202
            used."
203
    }
204
 
205
    # Real-time clock/counter specifics
206
    cdl_component CYGNUM_HAL_RTC_CONSTANTS {
207
        display       "Real-time clock constants."
208
        description   "
209
            Period is busclock/100."
210
        flavor        none
211
 
212
        cdl_option CYGNUM_HAL_RTC_NUMERATOR {
213
            display       "Real-time clock numerator"
214
            flavor        data
215
            default_value 1000000000
216
        }
217
        cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
218
            display       "Real-time clock denominator"
219
            flavor        data
220
            default_value 100
221
        }
222
        cdl_option CYGNUM_HAL_RTC_PERIOD {
223
            display       "Real-time clock period"
224
            flavor        data
225
            default_value { (((CYGHWR_HAL_POWERPC_MEM_SPEED*1000000)/4)/CYGNUM_HAL_RTC_DENOMINATOR) }
226
        }
227
    }
228
 
229
    cdl_component CYGBLD_GLOBAL_OPTIONS {
230
        display "Global build options"
231
        flavor  none
232
        description   "
233
            Global build options including control over
234
            compiler flags, linker flags and choice of toolchain."
235
 
236
 
237
        parent  CYGPKG_NONE
238
 
239
        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
240
            display "Global command prefix"
241
            flavor  data
242
            no_define
243
            default_value { "powerpc-eabi" }
244
            description "
245
                This option specifies the command prefix used when
246
                invoking the build tools."
247
        }
248
 
249
        cdl_option CYGBLD_GLOBAL_CFLAGS {
250
            display "Global compiler flags"
251
            flavor  data
252
            no_define
253
            default_value { CYGBLD_GLOBAL_WARNFLAGS . "-msoft-float -mcpu=603e -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
254
            description   "
255
                This option controls the global compiler flags which
256
                are used to compile all packages by
257
                default. Individual packages may define
258
                options which override these global flags."
259
        }
260
 
261
        cdl_option CYGBLD_GLOBAL_LDFLAGS {
262
            display "Global linker flags"
263
            flavor  data
264
            no_define
265
            default_value { "-msoft-float -mcpu=603e -g -nostdlib -Wl,--gc-sections -Wl,-static" }
266
            description   "
267
                This option controls the global linker flags. Individual
268
                packages may define options which override these global flags."
269
        }
270
 
271
        cdl_option CYGBLD_BUILD_GDB_STUBS {
272
            display "Build GDB stub ROM image"
273
            default_value 0
274
            requires { CYG_HAL_STARTUP == "ROM" }
275
            requires CYGSEM_HAL_ROM_MONITOR
276
            requires CYGBLD_BUILD_COMMON_GDB_STUBS
277
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
278
            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
279
            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
280
            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
281
            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
282
            no_define
283
            description "
284
                This option enables the building of the GDB stubs for the
285
                board. The common HAL controls takes care of most of the
286
                build process, but the platform CDL takes care of creating
287
                an S-Record data file suitable for programming using
288
                the board's EPPC-Bug firmware monitor."
289
 
290
            make -priority 320 {
291
                /bin/gdb_module.bin : /bin/gdb_module.img
292
                $(OBJCOPY) -O srec --change-address=0x02000000 $< $(@:.bin=.srec)
293
                $(OBJCOPY) -O binary $< $@
294
            }
295
        }
296
    }
297
 
298
    cdl_component CYGPKG_HAL_POWERPC_CSB281_OPTIONS {
299
        display "CSB281 build options"
300
        flavor  none
301
        description   "
302
            Package specific build options including control over
303
            compiler flags used only in building this package,
304
            and details of which tests are built."
305
 
306
 
307
        cdl_option CYGPKG_HAL_POWERPC_CSB281_CFLAGS_ADD {
308
            display "Additional compiler flags"
309
            flavor  data
310
            no_define
311
            default_value { "" }
312
            description   "
313
                This option modifies the set of compiler flags for
314
                building the CSB281 HAL. These flags are used in addition
315
                to the set of global flags."
316
        }
317
 
318
        cdl_option CYGPKG_HAL_POWERPC_CSB281_CFLAGS_REMOVE {
319
            display "Suppressed compiler flags"
320
            flavor  data
321
            no_define
322
            default_value { "" }
323
            description   "
324
                This option modifies the set of compiler flags for
325
                building the CSB281 HAL. These flags are removed from
326
                the set of global flags if present."
327
        }
328
 
329
        cdl_option CYGPKG_HAL_POWERPC_CSB281_TESTS {
330
            display "CSB281 tests"
331
            flavor  data
332
            no_define
333
            default_value { "" }
334
            description   "
335
                This option specifies the set of tests for the CSB281 HAL."
336
        }
337
    }
338
 
339
    cdl_component CYGHWR_MEMORY_LAYOUT {
340
        display "Memory layout"
341
        flavor data
342
        no_define
343
        calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_csb281_ram" : \
344
                     CYG_HAL_STARTUP == "ROMRAM" ? "powerpc_csb281_romram" : \
345
                                                "powerpc_csb281_rom" }
346
 
347
        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
348
            display "Memory layout linker script fragment"
349
            flavor data
350
            no_define
351
            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
352
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
353
                         CYG_HAL_STARTUP == "ROMRAM" ? "" : \
354
                                                    "" }
355
        }
356
 
357
        cdl_option CYGHWR_MEMORY_LAYOUT_H {
358
            display "Memory layout header file"
359
            flavor data
360
            no_define
361
            define -file system.h CYGHWR_MEMORY_LAYOUT_H
362
            calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
363
                         CYG_HAL_STARTUP == "ROMRAM" ? "" : \
364
                                                    "" }
365
        }
366
    }
367
 
368
    cdl_option CYGSEM_HAL_ROM_MONITOR {
369
        display       "Behave as a ROM monitor"
370
        flavor        bool
371
        default_value 0
372
        parent        CYGPKG_HAL_ROM_MONITOR
373
        requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
374
        description   "
375
            Enable this option if this program is to be used as a ROM monitor,
376
            i.e. applications will be loaded into RAM on the board, and this
377
            ROM monitor may process exceptions or interrupts generated from the
378
            application. This enables features such as utilizing a separate
379
            interrupt stack when exceptions are generated."
380
    }
381
 
382
    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
383
        display       "Redboot HAL options"
384
        flavor        none
385
        no_define
386
        parent        CYGPKG_REDBOOT
387
        active_if     CYGPKG_REDBOOT
388
        description   "
389
            This option lists the target's requirements for a valid Redboot
390
            configuration."
391
 
392
        cdl_option CYGSEM_REDBOOT_PLF_LINUX_BOOT {
393
            active_if      CYGBLD_BUILD_REDBOOT_WITH_EXEC
394
            display        "Support booting Linux via RedBoot"
395
            flavor         bool
396
            default_value  1
397
            description    "
398
               This option enables RedBoot to support booting of a Linux kernel."
399
 
400
            compile plf_redboot_linux_exec.c
401
        }
402
 
403
        cdl_option CYGBLD_BUILD_REDBOOT_BIN {
404
            display       "Build Redboot ROM binary image"
405
            active_if     CYGBLD_BUILD_REDBOOT
406
            default_value 1
407
            no_define
408
            description "This option enables the conversion of the Redboot ELF
409
                         image to a binary image suitable for ROM programming."
410
 
411
#            compile -library=libextras.a redboot_cmds.c
412
 
413
            make -priority 325 {
414
                /bin/redboot.bin : /bin/redboot.elf
415
                $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
416
                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
417
                $(OBJCOPY) -O binary $< $@
418
            }
419
        }
420
    }
421
}

powered by: WebSVN 2.1.0

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