1 # ====================================================================
5 # PowerPC/MBX 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) 2002, 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####
49 #####DESCRIPTIONEND####
51 # ====================================================================
53 cdl_package CYGPKG_HAL_POWERPC_MBX {
54 display "Motorola MBX PowerPC evaluation board"
55 parent CYGPKG_HAL_POWERPC
56 requires CYGPKG_HAL_POWERPC_MPC8xx
57 define_header hal_powerpc_mbx.h
60 The MBX HAL package provides the support needed to run
61 eCos on a Motorola MBX board equipped with a PowerPC processor."
63 compile hal_diag.c hal_aux.c mbx.S
65 implements CYGINT_HAL_DEBUG_GDB_STUBS
66 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
67 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
68 implements CYGNUM_HAL_QUICC_SMC1
70 requires { CYGHWR_HAL_POWERPC_MPC8XX == "860" }
73 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_powerpc_mpc8xx.h>"
74 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_powerpc_mbx.h>"
76 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Motorola MBX\""
77 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
80 cdl_component CYG_HAL_STARTUP {
81 display "Startup type"
83 legal_values {"RAM" "ROM"}
86 define -file system.h CYG_HAL_STARTUP
88 This option is used to control where the application program will
89 run, either from RAM or ROM (flash) memory. ROM based applications
90 must be self contained, while RAM applications will typically assume
91 the existence of a debug environment, such as GDB stubs."
94 cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
95 display "Development board clock speed (MHz)"
100 MBX Development Boards have various system clock speeds
101 depending on the processor fitted. Select the clock speed
102 appropriate for your board so that the system can set the serial
103 baud rate correctly, amongst other things."
106 cdl_option CYGHWR_HAL_POWERPC_MBX_BOOT_32BIT_FLASH {
107 display "Boot ROM is 32-bit Flash device"
110 MBX Development Boards have a socketed 8-bit ROM (AM27F040,
111 AM29F040 or similar) and a permanently soldered 32-bit flash
112 device. Which is used for booting is link selectable (refer to
113 the MBX Series documentation from Motorola). Enable this option
114 when booting from the 32-bit flash so that the correct memory
115 timing and access method is initialized. This consideration
116 does apply to RAM start eCos applications as well as ROM start
120 # Real-time clock/counter specifics
121 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
122 display "Real-time clock constants."
124 Period is busclock/16/100."
128 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
129 display "Real-time clock numerator"
131 default_value 1000000000
133 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
134 display "Real-time clock denominator"
138 This option selects the number of system clock 'ticks'
139 per second. This rate is sometimes known as the heartbeat rate."
141 cdl_option CYGNUM_HAL_RTC_PERIOD {
142 display "Real-time clock period"
144 default_value { (((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/16)/CYGNUM_HAL_RTC_DENOMINATOR) }
148 cdl_component CYGBLD_GLOBAL_OPTIONS {
149 display "Global build options"
152 Global build options including control over
153 compiler flags, linker flags and choice of toolchain."
158 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
159 display "Global command prefix"
162 default_value { "powerpc-eabi" }
164 This option specifies the command prefix used when
165 invoking the build tools."
168 cdl_option CYGBLD_GLOBAL_CFLAGS {
169 display "Global compiler flags"
172 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" }
174 This option controls the global compiler flags which
175 are used to compile all packages by
176 default. Individual packages may define
177 options which override these global flags."
180 cdl_option CYGBLD_GLOBAL_LDFLAGS {
181 display "Global linker flags"
184 default_value { "-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
186 This option controls the global linker flags. Individual
187 packages may define options which override these global flags."
190 cdl_option CYGBLD_BUILD_GDB_STUBS {
191 display "Build GDB stub ROM image"
193 requires { CYG_HAL_STARTUP == "ROM" }
194 requires CYGSEM_HAL_ROM_MONITOR
195 requires CYGBLD_BUILD_COMMON_GDB_STUBS
196 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
197 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
198 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
199 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
200 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
203 This option enables the building of the GDB stubs for the
204 board. The common HAL controls takes care of most of the
205 build process, but the platform CDL takes care of creating
206 an S-Record data file suitable for programming using
207 the board's EPPC-Bug firmware monitor."
210 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
211 $(OBJCOPY) -O srec --change-address=0x02040000 $< $(@:.bin=.srec)
212 $(OBJCOPY) -O binary $< $@
217 cdl_component CYGPKG_HAL_POWERPC_MBX_OPTIONS {
218 display "MBX build options"
221 Package specific build options including control over
222 compiler flags used only in building this package,
223 and details of which tests are built."
226 cdl_option CYGPKG_HAL_POWERPC_MBX_CFLAGS_ADD {
227 display "Additional compiler flags"
232 This option modifies the set of compiler flags for
233 building the MBX HAL. These flags are used in addition
234 to the set of global flags."
237 cdl_option CYGPKG_HAL_POWERPC_MBX_CFLAGS_REMOVE {
238 display "Suppressed compiler flags"
243 This option modifies the set of compiler flags for
244 building the MBX HAL. These flags are removed from
245 the set of global flags if present."
248 cdl_option CYGPKG_HAL_POWERPC_MBX_TESTS {
252 calculated { "tests/mbxtime" }
254 This option specifies the set of tests for the MBX HAL."
258 cdl_component CYGHWR_MEMORY_LAYOUT {
259 display "Memory layout"
262 calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_mbx_ram" : \
265 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
266 display "Memory layout linker script fragment"
269 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
270 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_mbx_ram.ldi>" : \
271 "<pkgconf/mlt_powerpc_mbx_rom.ldi>" }
274 cdl_option CYGHWR_MEMORY_LAYOUT_H {
275 display "Memory layout header file"
278 define -file system.h CYGHWR_MEMORY_LAYOUT_H
279 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_mbx_ram.h>" : \
280 "<pkgconf/mlt_powerpc_mbx_rom.h>" }
284 cdl_option CYGSEM_HAL_ROM_MONITOR {
285 display "Behave as a ROM monitor"
288 parent CYGPKG_HAL_ROM_MONITOR
289 requires { CYG_HAL_STARTUP == "ROM" }
291 Enable this option if this program is to be used as a ROM monitor,
292 i.e. applications will be loaded into RAM on the board, and this
293 ROM monitor may process exceptions or interrupts generated from the
294 application. This enables features such as utilizing a separate
295 interrupt stack when exceptions are generated."
298 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
299 display "Redboot HAL options"
302 parent CYGPKG_REDBOOT
303 active_if CYGPKG_REDBOOT
305 This option lists the target's requirements for a valid Redboot
308 cdl_option CYGSEM_REDBOOT_PLF_LINUX_BOOT {
309 active_if CYGBLD_BUILD_REDBOOT_WITH_EXEC
310 display "Support booting Linux via RedBoot"
314 This option enables RedBoot to support booting of a Linux kernel."
316 compile plf_redboot_linux_exec.c
319 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
320 display "Build Redboot ROM binary image"
321 active_if CYGBLD_BUILD_REDBOOT
324 description "This option enables the conversion of the Redboot ELF
325 image to a binary image suitable for ROM programming."
328 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
329 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
330 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
331 $(OBJCOPY) -O srec --change-address=0x02040000 $< $(@:.bin=.ppcbug)
332 $(OBJCOPY) -O binary $< $@