1 # ====================================================================
5 # Cogent CMA230 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.
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.
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
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.
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.
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.
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####
44 # Original data: gthomas
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_ARM_CMA230 {
53 display "Cogent Computer Systems CMA2xx boards"
57 define_header hal_arm_cma230.h
59 The cma230 HAL package provides the support needed to run
60 eCos on Cogent Computer Systems CMA2xx (CMA230, CMA222) boards."
62 compile hal_diag.c cma230_misc.c
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_ARM_ARCH_ARM7
68 implements CYGINT_HAL_ARM_THUMB_ARCH
69 implements CYGINT_HAL_TESTS_NO_CACHES
72 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
73 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_cma230.h>"
75 puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 100000"
78 cdl_option CYGHWR_HAL_ARM_CMA2XX_VARIANT {
79 display "Cogent CMA2xxx processor variant"
81 legal_values { "CMA230" "CMA222" }
82 default_value { "CMA230" }
84 The processor variant used by the Cogent board."
87 cdl_component CYG_HAL_STARTUP {
88 display "Startup type"
90 legal_values {"RAM" "ROM"}
93 define -file system.h CYG_HAL_STARTUP
95 When targetting the CMA230 board it is possible to build
96 the system for either RAM bootstrap or ROM bootstrap(s). Select
97 'ram' when building programs to load into RAM using onboard
98 debug software such as Angel or eCos GDB stubs. Select 'rom'
99 when building a stand-alone application which will be put
103 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
104 display "Diagnostic serial port baud rate"
106 legal_values 9600 19200 38400 115200
109 This option selects the baud rate used for the diagnostic port.
110 Note: this should match the value chosen for the GDB port if the
111 diagnostic and GDB port are the same."
114 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
115 display "GDB serial port baud rate"
117 legal_values 9600 19200 38400 115200
120 This option controls the baud rate used for the GDB connection."
123 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
124 display "Number of communication channels on the board"
129 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
130 display "Debug serial port"
131 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
133 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
136 The CMA230 board has two serial ports. This option
137 chooses which port will be used to connect to a host
141 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
142 display "Diagnostic serial port"
143 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
145 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
148 The CMA230 board has two serial ports. This option
149 chooses which port will be used for diagnostic output."
152 # Real-time clock/counter specifics
153 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
154 display "Real-time clock constants"
157 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
158 display "Real-time clock numerator"
160 default_value 1000000000
162 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
163 display "Real-time clock denominator"
167 cdl_option CYGNUM_HAL_RTC_PERIOD {
168 display "Real-time clock period"
170 default_value 5000 ;# 2us clock
174 cdl_component CYGBLD_GLOBAL_OPTIONS {
175 display "Global build options"
179 Global build options including control over
180 compiler flags, linker flags and choice of toolchain."
183 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
184 display "Global command prefix"
187 default_value { "arm-elf" }
189 This option specifies the command prefix used when
190 invoking the build tools."
193 cdl_option CYGBLD_GLOBAL_CFLAGS {
194 display "Global compiler flags"
197 default_value { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
198 (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
199 "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
201 This option controls the global compiler flags which are used to
202 compile all packages by default. Individual packages may define
203 options which override these global flags."
206 cdl_option CYGPKG_HAL_ARM_CMA2XX_CFLAGS_ADD {
207 display "Additional compiler flags"
210 default_value { CYGHWR_HAL_ARM_CMA2XX_VARIANT == "CMA222" ? "-D__CMA222" : "" }
212 This option modifies the set of compiler flags for
213 building the Cogent board HAL. These flags are used in addition
214 to the set of global flags."
217 cdl_option CYGPKG_HAL_ARM_CMA2XX_CFLAGS_REMOVE {
218 display "Suppressed compiler flags"
223 This option modifies the set of compiler flags for
224 building the Cogent board HAL. These flags are removed from
225 the set of global flags if present."
228 cdl_option CYGBLD_GLOBAL_LDFLAGS {
229 display "Global linker flags"
232 default_value { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
233 (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
234 "-g -nostdlib -Wl,--gc-sections -Wl,-static" }
236 This option controls the global linker flags. Individual
237 packages may define options which override these global flags."
240 cdl_option CYGBLD_BUILD_GDB_STUBS {
241 display "Build GDB stub ROM image"
243 requires CYGBLD_BUILD_COMMON_GDB_STUBS
244 requires { CYG_HAL_STARTUP == "ROM" }
245 requires CYGSEM_HAL_ROM_MONITOR
246 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
247 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
248 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
249 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
250 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
253 This option enables the building of the GDB stubs for the
257 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
258 @mv $< $(<:.img=.elf)
259 $(OBJCOPY) --strip-debug --change-addresses=0x10038000 $(<:.img=.elf) $<
260 $(OBJCOPY) -O binary $(<:.img=.elf) $@
265 cdl_component CYGHWR_MEMORY_LAYOUT {
266 display "Memory layout"
269 calculated { CYGHWR_HAL_ARM_CMA2XX_VARIANT == "CMA230" ? \
270 (CYG_HAL_STARTUP == "RAM" ? "arm_cma230_ram" : \
272 (CYG_HAL_STARTUP == "RAM" ? "arm_cma222_ram" : \
275 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
276 display "Memory layout linker script fragment"
279 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
280 calculated { CYGHWR_HAL_ARM_CMA2XX_VARIANT == "CMA230" ? \
281 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_cma230_ram.ldi>" : \
282 "<pkgconf/mlt_arm_cma230_rom.ldi>") : \
283 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_cma222_ram.ldi>" : \
284 "<pkgconf/mlt_arm_cma222_rom.ldi>") }
287 cdl_option CYGHWR_MEMORY_LAYOUT_H {
288 display "Memory layout header file"
291 define -file system.h CYGHWR_MEMORY_LAYOUT_H
292 calculated { CYGHWR_HAL_ARM_CMA2XX_VARIANT == "CMA230" ? \
293 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_cma230_ram.h>" : \
294 "<pkgconf/mlt_arm_cma230_rom.h>") : \
295 (CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_cma222_ram.h>" : \
296 "<pkgconf/mlt_arm_cma222_rom.h>") }
300 cdl_option CYGSEM_HAL_ROM_MONITOR {
301 display "Behave as a ROM monitor"
304 parent CYGPKG_HAL_ROM_MONITOR
305 requires { CYG_HAL_STARTUP == "ROM" }
307 Enable this option if this program is to be used as a ROM monitor,
308 i.e. applications will be loaded into RAM on the board, and this
309 ROM monitor may process exceptions or interrupts generated from the
310 application. This enables features such as utilizing a separate
311 interrupt stack when exceptions are generated."
314 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
315 display "Work with a ROM monitor"
317 legal_values { "Generic" "GDB_stubs" }
318 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
319 parent CYGPKG_HAL_ROM_MONITOR
320 requires { CYG_HAL_STARTUP == "RAM" }
322 Support can be enabled for different varieties of ROM monitor.
323 This support changes various eCos semantics such as the encoding
324 of diagnostic output, or the overriding of hardware interrupt
326 Firstly there is \"Generic\" support which prevents the HAL
327 from overriding the hardware vectors that it does not use, to
328 instead allow an installed ROM monitor to handle them. This is
329 the most basic support which is likely to be common to most
330 implementations of ROM monitor.
331 \"GDB_stubs\" provides support when GDB stubs are included in
332 the ROM monitor or boot ROM."