]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/powerpc/cme555/v2_0/cdl/hal_powerpc_cme555.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / powerpc / cme555 / v2_0 / cdl / hal_powerpc_cme555.cdl
1 # ====================================================================
2 #
3 #      hal_powerpc_cme555.cdl
4 #
5 #      PowerPC/cme555 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 ##
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 version.
16 ##
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20 ## for more details.
21 ##
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 ##
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
32 ##
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
35 ##
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
42 #
43 # Author(s):      Bob Koninckx
44 # Original data:  bartv
45 # Contributors:
46 # Date:           1999-11-02
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_HAL_POWERPC_CME555 {
53     display       "CME555 MPC555 evaluation board"
54     parent        CYGPKG_HAL_POWERPC
55     requires      CYGPKG_HAL_POWERPC_MPC5xx
56     define_header hal_powerpc_cme555.h
57     include_dir   cyg/hal
58     description   "
59         The CME555 HAL package provides the support needed to run
60         eCos on Axiom's CME555 MPC555 evaluation board."
61
62     compile       hal_diag.c plf_misc.c cme555.S plf_stub.c
63
64     implements    CYGINT_HAL_DEBUG_GDB_STUBS
65     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
67     implements    CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
68
69     define_proc {
70         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_powerpc_mpc5xx.h>"
71         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_powerpc_cme555.h>"
72     }
73
74     cdl_component CYG_HAL_STARTUP {
75         display       "Startup type"
76         flavor        data
77         legal_values  {"RAM" "ROM"}
78         default_value {"RAM"}
79         no_define
80         define -file system.h CYG_HAL_STARTUP
81         description   "
82            When targetting the CME555 board it is possible to build
83            the system for either RAM bootstrap or ROM bootstrap. RAM
84            bootstrap requires that the MPC555 internal flash contains a
85            suitable ROM monitor or equivalent software that allows GDB 
86            to download the eCos application on to the board. The ROM 
87            bootstrap requires that the eCos application be blown into 
88            the MPC555 internal flash array. Both types of startup require
89            the internal flash array to be enabled. Both startup types expect
90            the boards RAM to be present on CS0 and the external flash on
91            CS1. CS2 is not used by eCos and can e.g. be used for memory
92            mapped I/O by your application. Typical use of the board could be
93            to build GDB-stubs for ROM bootstrap, use AXIOM's monitor to 
94            program it in internal flash, and then change the necessary 
95            switches and jumpers to enable internal flash and get the memory 
96            map right. Consult the CME555 manual to make sure you have all
97            jumper settings correct."
98     }
99
100     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
101         display      "Number of communication channels on the board"
102         flavor       data
103         calculated   2
104         description      "
105             The CME555 has two serial ports. Channel 0 is indicated as Comm1 
106             on the board, channel 1 has the indication Comm2."
107     }
108
109     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
110         display          "Debug serial port"
111         flavor data
112         legal_values     0 to 1
113         default_value    0
114         description      "
115             The CME555 has two serial ports. Channel 0 is indicated as Comm1 
116             on the board, channel 1 has the indication Comm2. This option
117             chooses which port will be used to connect to a host running GDB."
118     }
119
120     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
121         display          "Diagnostic serial port"
122         flavor data
123         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
124         default_value    1
125         description      "
126             The CME555 has two serial ports. Channel 0 is indicated as Comm1 
127             on the board, channel 1 has the indication Comm2. This option
128             chooses which port will be used for diagnostic output."
129     }
130
131     cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
132         display          "Development board clock speed (MHz)"
133         flavor           data
134         calculated       40
135         description      "
136              The development boards is fitted with a 4MHz crystal. This frequency
137              is internally boosted to maximum 40MHz. The value is fixed to the 
138              maximum since this board is not really suited for low power application 
139              anyway."
140     }
141
142     cdl_option CYGHWR_HAL_POWERPC_FORCE_VECTOR_BASE_LOW {
143         display          "Force vector base at address 0x0000 0000"
144         flavor           bool
145         calculated       1
146         description      "
147              The powerpc architecture allows the vectorbase to live at either
148              0x0000 0000 or 0xfff0 0000. Since the CME-555 has no memory at the
149              high addresses, vectors may never be located at 0xfff0 0000 for this
150              board. They can be still be copied though if the internal flash is 
151              disabled and relocated to somewhere else"
152     }
153
154     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
155         display          "Baud rate for serial ports"
156         flavor           data
157         legal_values     300 600 1200 2400 4800 9600 14400 19200 28800 38400 57600 115200
158         default_value    38400
159         description      "
160              This option determines the baud rate that will be used on both the console
161              cannel and the debug channel."
162     }
163
164     # Real-time clock/counter specifics
165     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
166         display       "Real-time clock constants."
167         description   "
168             Period is busclock/16/100."
169         flavor        none
170     
171         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
172             display       "Real-time clock numerator"
173             flavor        data
174             default_value 1000000000
175         }
176         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
177             display       "Real-time clock denominator"
178             flavor        data
179             default_value 100
180         }
181         cdl_option CYGNUM_HAL_RTC_PERIOD {
182             display       "Real-time clock period"
183             flavor        data
184             default_value { (((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/16)/CYGNUM_HAL_RTC_DENOMINATOR) }
185         }
186     }
187
188     cdl_component CYGBLD_GLOBAL_OPTIONS {
189         display "Global build options"
190         flavor  none
191         parent  CYGPKG_NONE
192         description   "
193             Global build options including control over
194             compiler flags, linker flags and choice of toolchain."
195
196
197         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
198             display "Global command prefix"
199             flavor  data
200             no_define
201             default_value { "powerpc-eabi" }
202             description "
203                 This option specifies the command prefix used when
204                 invoking the build tools."
205         }
206
207         cdl_option CYGBLD_GLOBAL_CFLAGS {
208             display "Global compiler flags"
209             flavor  data
210             no_define
211             default_value { "-mcpu=505 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -mmultiple -fno-rtti -fno-exceptions -finit-priority" }
212             description   "
213                 This option controls the global compiler flags which
214                 are used to compile all packages by
215                 default. Individual packages may define
216                 options which override these global flags."
217         }
218
219         cdl_option CYGBLD_GLOBAL_LDFLAGS {
220             display "Global linker flags"
221             flavor  data
222             no_define
223             default_value { "-mcpu=505 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
224             description   "
225                 This option controls the global linker flags. Individual
226                 packages may define options which override these global flags."
227         }
228
229         cdl_option CYGBLD_BUILD_GDB_STUBS {
230             display "Build GDB stub ROM image"
231             default_value 0
232             requires { CYG_HAL_STARTUP == "ROM" }
233             requires CYGSEM_HAL_ROM_MONITOR
234             requires CYGBLD_BUILD_COMMON_GDB_STUBS
235             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
236             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
237             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
238             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
239             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
240             no_define
241             description "
242                 This option enables the building of the GDB stubs for the
243                 board. The common HAL controls takes care of most of the
244                 build process, but the final conversion from ELF image to
245                 binary data is handled by the platform CDL, allowing
246                 relocation of the data if necessary."
247
248             make -priority 320 {
249                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
250                 $(OBJCOPY) -O binary $< $@
251             }
252         }
253     }
254
255     cdl_component CYGHWR_MEMORY_LAYOUT {
256         display "Memory layout"
257         flavor data
258         no_define
259         calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_cme555_ram" : \
260                                                 "powerpc_cme555_rom" }
261
262         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
263             display "Memory layout linker script fragment"
264             flavor data
265             no_define
266             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
267             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_cme555_ram.ldi>" : \
268                                                     "<pkgconf/mlt_powerpc_cme555_rom.ldi>" }
269         }
270
271         cdl_option CYGHWR_MEMORY_LAYOUT_H {
272             display "Memory layout header file"
273             flavor data
274             no_define
275             define -file system.h CYGHWR_MEMORY_LAYOUT_H
276             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_cme555_ram.h>" : \
277                                                     "<pkgconf/mlt_powerpc_cme555_rom.h>" }
278         }
279     }
280
281     cdl_option CYGSEM_HAL_ROM_MONITOR {
282         display       "Behave as a ROM monitor"
283         flavor        bool
284         default_value 0
285         parent        CYGPKG_HAL_ROM_MONITOR
286         requires      { CYG_HAL_STARTUP == "ROM" }
287         description   "
288             Enable this option if this program is to be used as a ROM monitor,
289             i.e. applications will be loaded into RAM on the board, and this
290             ROM monitor may process exceptions or interrupts generated from the
291             application. This enables features such as utilizing a separate
292             interrupt stack when exceptions are generated."
293     }
294 }