]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/powerpc/cogent/v2_0/cdl/hal_powerpc_cogent.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / powerpc / cogent / v2_0 / cdl / hal_powerpc_cogent.cdl
1 # ====================================================================
2 #
3 #      hal_powerpc_cogent.cdl
4 #
5 #      PowerPC/Cogent 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) 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:  bartv
46 # Contributors:
47 # Date:           1999-11-02
48 #
49 #####DESCRIPTIONEND####
50 #
51 # ====================================================================
52
53 cdl_package CYGPKG_HAL_POWERPC_COGENT {
54     display       "Cogent PowerPC evaluation board"
55     parent        CYGPKG_HAL_POWERPC
56     requires      CYGPKG_HAL_POWERPC_MPC8xx
57     define_header hal_powerpc_cogent.h
58     include_dir   cyg/hal
59     description   "
60         The cogent HAL package provides the support needed to run
61         eCos on a Cogent board equipped with a PowerPC processor."
62
63     compile       hal_diag.c plf_misc.c cogent.S plf_stub.c
64
65     implements    CYGINT_HAL_DEBUG_GDB_STUBS
66     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
67     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
68
69     requires      { CYGHWR_HAL_POWERPC_MPC8XX == "823" }
70
71     define_proc {
72         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_powerpc_mpc8xx.h>"
73         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_powerpc_cogent.h>"
74     }
75
76     cdl_component CYG_HAL_STARTUP {
77         display       "Startup type"
78         flavor        data
79         legal_values  {"RAM" "ROM"}
80         default_value {"RAM"}
81         no_define
82         define -file system.h CYG_HAL_STARTUP
83         description   "
84            When targetting the cogent board it is possible to build
85            the system for either RAM bootstrap or ROM bootstrap. RAM
86            bootstrap generally requires that the board
87            is equipped with ROMs containing a suitable ROM monitor or
88            equivalent software that allows GDB to download the eCos
89            application on to the board. The ROM bootstrap typically
90            requires that the eCos application be blown into EPROMs or
91            equivalent technology."
92     }
93
94     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
95         display      "Number of communication channels on the board"
96         flavor       data
97         calculated   3
98         description      "
99             Channel 0: Serial A, Channel 1: Serial B, Channel 2: LCD"
100     }
101
102     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
103         display          "Debug serial port"
104         flavor data
105         legal_values     0 to 1
106         default_value    1
107         description      "
108            The Cogent board has two serial ports. This option
109            chooses which port will be used to connect to a host
110            running GDB."
111     }
112
113     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
114         display          "Diagnostic serial port"
115         flavor data
116         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
117         default_value    1
118         description      "
119            The Cogent board has two serial ports and an LCD.  This option
120            chooses which port will be used for diagnostic output."
121     }
122
123     cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
124         display          "Development board clock speed (MHz)"
125         flavor           data
126         default_value    33.330
127         description      "
128            MPC8xx development boards have various system clock speeds
129            depending on the processor fitted.  Select the clock speed
130            appropriate for your board so that the system can set the serial
131            baud rate correctly, amongst other things."
132     }
133
134     # Real-time clock/counter specifics
135     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
136         display       "Real-time clock constants."
137         description   "
138             Period is busclock/16/100."
139         flavor        none
140     
141         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
142             display       "Real-time clock numerator"
143             flavor        data
144             default_value 1000000000
145         }
146         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
147             display       "Real-time clock denominator"
148             flavor        data
149             default_value 100
150         }
151         cdl_option CYGNUM_HAL_RTC_PERIOD {
152             display       "Real-time clock period"
153             flavor        data
154             default_value { (((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/16)/CYGNUM_HAL_RTC_DENOMINATOR) }
155         }
156     }
157
158     cdl_component CYGBLD_GLOBAL_OPTIONS {
159         display "Global build options"
160         flavor  none
161         parent  CYGPKG_NONE
162         description   "
163             Global build options including control over
164             compiler flags, linker flags and choice of toolchain."
165
166
167         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
168             display "Global command prefix"
169             flavor  data
170             no_define
171             default_value { "powerpc-eabi" }
172             description "
173                 This option specifies the command prefix used when
174                 invoking the build tools."
175         }
176
177         cdl_option CYGBLD_GLOBAL_CFLAGS {
178             display "Global compiler flags"
179             flavor  data
180             no_define
181             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" }
182             description   "
183                 This option controls the global compiler flags which
184                 are used to compile all packages by
185                 default. Individual packages may define
186                 options which override these global flags."
187         }
188
189         cdl_option CYGBLD_GLOBAL_LDFLAGS {
190             display "Global linker flags"
191             flavor  data
192             no_define
193             default_value { "-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
194             description   "
195                 This option controls the global linker flags. Individual
196                 packages may define options which override these global flags."
197         }
198
199         cdl_option CYGBLD_BUILD_GDB_STUBS {
200             display "Build GDB stub ROM image"
201             default_value 0
202             requires { CYG_HAL_STARTUP == "ROM" }
203             requires CYGSEM_HAL_ROM_MONITOR
204             requires CYGBLD_BUILD_COMMON_GDB_STUBS
205             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
206             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
207             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
208             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
209             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
210             no_define
211             description "
212                 This option enables the building of the GDB stubs for the
213                 board. The common HAL controls takes care of most of the
214                 build process, but the final conversion from ELF image to
215                 binary data is handled by the platform CDL, allowing
216                 relocation of the data if necessary."
217
218             make -priority 320 {
219                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
220                 $(OBJCOPY) -O binary $< $@
221             }
222         }
223     }
224
225     cdl_component CYGHWR_MEMORY_LAYOUT {
226         display "Memory layout"
227         flavor data
228         no_define
229         calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_cogent_ram" : \
230                                                 "powerpc_cogent_rom" }
231
232         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
233             display "Memory layout linker script fragment"
234             flavor data
235             no_define
236             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
237             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_cogent_ram.ldi>" : \
238                                                     "<pkgconf/mlt_powerpc_cogent_rom.ldi>" }
239         }
240
241         cdl_option CYGHWR_MEMORY_LAYOUT_H {
242             display "Memory layout header file"
243             flavor data
244             no_define
245             define -file system.h CYGHWR_MEMORY_LAYOUT_H
246             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_cogent_ram.h>" : \
247                                                     "<pkgconf/mlt_powerpc_cogent_rom.h>" }
248         }
249     }
250
251     cdl_option CYGSEM_HAL_ROM_MONITOR {
252         display       "Behave as a ROM monitor"
253         flavor        bool
254         default_value 0
255         parent        CYGPKG_HAL_ROM_MONITOR
256         requires      { CYG_HAL_STARTUP == "ROM" }
257         description   "
258             Enable this option if this program is to be used as a ROM monitor,
259             i.e. applications will be loaded into RAM on the board, and this
260             ROM monitor may process exceptions or interrupts generated from the
261             application. This enables features such as utilizing a separate
262             interrupt stack when exceptions are generated."
263     }
264 }