1 # ====================================================================
3 # hal_fr30_skmb91302.cdl
5 # Fujitsu Starterkit MB91302 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) 2007 eCosCentric Ltd
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 # ====================================================================
43 cdl_package CYGPKG_HAL_FR30_MB91301_SKMB91302 {
44 display "Fujitsu Starterkit MB91302 board"
45 parent CYGPKG_HAL_FR30
46 requires CYGPKG_HAL_FR30_MB91301
47 define_header hal_fr30_skmb91302.h
50 description "Fujitsu Starterkit MB91302 board platform HAL
51 package should be used when targeting the actual hardware for
52 the Fujitsu Starterkit MB91302 board platform."
54 compile platform.S plf_misc.c ser.c
55 implements CYGINT_HAL_DEBUG_GDB_STUBS
56 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
57 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
60 puts $::cdl_header "#include <pkgconf/hal_fr30_mb91301.h>"
61 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_fr30.h>"
62 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_fr30_mb91301.h>"
63 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_fr30_skmb91302.h>"
66 cdl_component CYG_HAL_STARTUP {
67 display "Startup type"
69 legal_values {"RAM" "ROM" "ROMRAM"}
72 define -file system.h CYG_HAL_STARTUP
74 description "Should the system run from RAM, ROM, or copy itself from ROM
75 and RAM and then run in RAM?"
78 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
79 display "Number of communication channels on the board"
82 description "The MB91302 board has 3 serial ports. Only the first
83 2 have mounted 9 pin connectors. The 3rd is not
84 connected and should therefore not be used."
87 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
88 display "Default console channel."
90 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
94 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
95 display "Debug serial port"
97 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
99 description "This option chooses which port will be used to connect
100 to a host running GDB."
103 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
104 display "Diagnostic serial port"
106 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
107 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
109 This option chooses which port will be used for diagnostic output."
112 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
113 display "Diagnostic serial port baud rate"
115 legal_values 9600 19200 38400 57600 115200
118 This option selects the baud rate used for the diagnostic port.
119 Note: this should match the value chosen for the GDB port if the
120 diagnostic and GDB port are the same."
123 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
124 display "GDB serial port baud rate"
126 legal_values 9600 19200 38400 57600 115200
129 This option selects the baud rate used for the diagnostic port.
130 Note: this should match the value chosen for the GDB port if the
131 diagnostic and GDB port are the same."
134 cdl_component CYGBLD_GLOBAL_OPTIONS {
135 display "Global build options"
139 description "Global build options including control over compiler
140 flags, linker flags and choice of toolchain."
142 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
143 display "Global command prefix"
146 default_value { "fr30-unknown-elf" }
147 description "This option specifies the command prefix used
148 when invoking the build tools."
152 cdl_option CYGBLD_GLOBAL_CFLAGS {
153 display "Global compiler flags"
156 default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -finit-priority -fomit-frame-pointer" }
157 description "This option controls the global compiler flags
158 which are used to compile all packages by default.
159 Individual packages may define options which
160 override these global flags."
164 cdl_option CYGBLD_GLOBAL_LDFLAGS {
165 display "Global linker flags"
168 default_value { " -g -nostdlib -Wl,--gc-sections -Wl,-static" }
169 description "This option controls the global linker flags.
170 Individual packages may define options which
171 override these global flags."
175 cdl_option CYGBLD_BUILD_GDB_STUBS {
176 display "Build GDB stub ROM image"
178 requires { CYG_HAL_STARTUP == "ROM" }
179 requires CYGSEM_HAL_ROM_MONITOR
180 requires CYGBLD_BUILD_COMMON_GDB_STUBS
181 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
182 requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
183 requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
184 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
185 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
187 description "This option enables the building of the GDB
188 stubs for the board. The common HAL controls
189 takes care of most of the build process, but the
190 final conversion from ELF image to binary data is
191 handled by the platform CDL, allowing relocation
192 of the data if necessary."
195 <PREFIX>/bin/gdb_module.srec : <PREFIX>/bin/gdb_module.img
196 $(OBJCOPY) -O srec $< $@
201 cdl_component CYGHWR_MEMORY_LAYOUT {
202 display "Memory layout"
205 calculated { CYG_HAL_STARTUP == "RAM" ? "mlt_fr30_skmb91302_ram" : \
206 "mlt_fr30_skmb91302_rom" }
208 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
209 display "Memory layout linker script fragment"
212 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
213 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_fr30_skmb91302_ram.ldi>" : \
214 "<pkgconf/mlt_fr30_skmb91302_rom.ldi>" }
217 cdl_option CYGHWR_MEMORY_LAYOUT_H {
218 display "Memory layout header file"
221 define -file system.h CYGHWR_MEMORY_LAYOUT_H
222 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_fr30_skmb91302_ram.h>" : \
223 "<pkgconf/mlt_fr30_skmb91302_rom.h>" }
227 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
228 display "Work with a ROM monitor"
230 default_value { CYG_HAL_STARTUP == "RAM" ? 1 : 0 }
231 parent CYGPKG_HAL_ROM_MONITOR
232 requires { CYG_HAL_STARTUP == "RAM" }
234 Allow coexistence with ROM monitor (CygMon or GDB stubs) by
235 only initializing interrupt vectors on startup, thus leaving
236 exception handling to the ROM monitor."
239 cdl_option CYGSEM_HAL_ROM_MONITOR {
240 display "Behave as a ROM monitor"
243 parent CYGPKG_HAL_ROM_MONITOR
244 requires { CYG_HAL_STARTUP == "ROM" }
246 description "Enable this option if this program is to be used as
247 a ROM monitor, i.e. applications will be loaded into
248 RAM on the board, and this ROM monitor may process
249 exceptions or interrupts generated from the
250 application. This enables features such as utilizing
251 a separate interrupt stack when exceptions are
256 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
257 display "Redboot HAL options"
260 parent CYGPKG_REDBOOT
261 active_if CYGPKG_REDBOOT
263 This option lists the target's requirements for a valid Redboot
266 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
267 display "Build Redboot ROM binary image"
268 active_if CYGBLD_BUILD_REDBOOT
271 description "This option enables the conversion of the Redboot ELF
272 image to a binary image suitable for ROM programming."
275 <PREFIX>/bin/redboot.srec : <PREFIX>/bin/redboot.elf
276 $(OBJCOPY) --strip-all $< $(@:.srec=.img)
277 $(OBJCOPY) -O srec $< $@