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

Subversion Repositories openrisc

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

powered by: WebSVN 2.1.0

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