1 # ====================================================================
3 # hal_powerpc_cogent.cdl
5 # PowerPC/Cogent board HAL package configuration data
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
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.
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
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.
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.
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.
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####
45 # Original data: bartv
49 #####DESCRIPTIONEND####
51 # ====================================================================
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
60 The cogent HAL package provides the support needed to run
61 eCos on a Cogent board equipped with a PowerPC processor."
63 compile hal_diag.c plf_misc.c cogent.S plf_stub.c
65 implements CYGINT_HAL_DEBUG_GDB_STUBS
66 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
67 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
69 requires { CYGHWR_HAL_POWERPC_MPC8XX == "823" }
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>"
76 cdl_component CYG_HAL_STARTUP {
77 display "Startup type"
79 legal_values {"RAM" "ROM"}
82 define -file system.h CYG_HAL_STARTUP
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."
94 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
95 display "Number of communication channels on the board"
99 Channel 0: Serial A, Channel 1: Serial B, Channel 2: LCD"
102 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
103 display "Debug serial port"
108 The Cogent board has two serial ports. This option
109 chooses which port will be used to connect to a host
113 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
114 display "Diagnostic serial port"
116 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
119 The Cogent board has two serial ports and an LCD. This option
120 chooses which port will be used for diagnostic output."
123 cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
124 display "Development board clock speed (MHz)"
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."
134 # Real-time clock/counter specifics
135 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
136 display "Real-time clock constants."
138 Period is busclock/16/100."
141 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
142 display "Real-time clock numerator"
144 default_value 1000000000
146 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
147 display "Real-time clock denominator"
151 cdl_option CYGNUM_HAL_RTC_PERIOD {
152 display "Real-time clock period"
154 default_value { (((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/16)/CYGNUM_HAL_RTC_DENOMINATOR) }
158 cdl_component CYGBLD_GLOBAL_OPTIONS {
159 display "Global build options"
163 Global build options including control over
164 compiler flags, linker flags and choice of toolchain."
167 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
168 display "Global command prefix"
171 default_value { "powerpc-eabi" }
173 This option specifies the command prefix used when
174 invoking the build tools."
177 cdl_option CYGBLD_GLOBAL_CFLAGS {
178 display "Global compiler flags"
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" }
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."
189 cdl_option CYGBLD_GLOBAL_LDFLAGS {
190 display "Global linker flags"
193 default_value { "-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
195 This option controls the global linker flags. Individual
196 packages may define options which override these global flags."
199 cdl_option CYGBLD_BUILD_GDB_STUBS {
200 display "Build GDB stub ROM image"
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
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."
219 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
220 $(OBJCOPY) -O binary $< $@
225 cdl_component CYGHWR_MEMORY_LAYOUT {
226 display "Memory layout"
229 calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_cogent_ram" : \
230 "powerpc_cogent_rom" }
232 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
233 display "Memory layout linker script fragment"
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>" }
241 cdl_option CYGHWR_MEMORY_LAYOUT_H {
242 display "Memory layout header file"
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>" }
251 cdl_option CYGSEM_HAL_ROM_MONITOR {
252 display "Behave as a ROM monitor"
255 parent CYGPKG_HAL_ROM_MONITOR
256 requires { CYG_HAL_STARTUP == "ROM" }
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."