1 # ====================================================================
5 # AEB1 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_AEB {
53 display "ARM AEB-1 evaluation board"
55 requires ! CYGHWR_THUMB
56 define_header hal_arm_aeb.h
60 The aeb HAL package provides the support needed to run
61 eCos on a ARM AEB-1 eval board."
63 compile hal_diag.c aeb_misc.c
65 implements CYGINT_HAL_DEBUG_GDB_STUBS
66 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
67 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
68 implements CYGINT_HAL_ARM_ARCH_ARM7
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_aeb.h>"
75 puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 100000"
78 cdl_component CYG_HAL_STARTUP {
79 display "Startup type"
82 legal_values {"RAM" "ROM"}
84 define -file system.h CYG_HAL_STARTUP
86 When targetting the AEB-1 eval board it is possible to build
87 the system for either RAM bootstrap or ROM bootstrap(s). Select
88 'ram' when building programs to load into RAM using onboard
89 debug software such as Angel or eCos GDB stubs. Select 'rom'
90 when building a stand-alone application which will be put
95 cdl_option CYGHWR_HAL_ARM_AEB_REVISION {
96 display "AEB board revision"
99 legal_values {"B" "C"}
101 The AEB-1 eval board exists in two revisions. Revision B
102 has 128kB of memory and a flawed CPU which means caches
103 must be disabled. Revision C has 256kB of memory and can
104 run with caches enabled."
107 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
108 display "Number of communication channels on the board"
113 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
114 display "Debug serial port"
115 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
117 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
120 The AEB board has only one serial port. This option
121 chooses which port will be used to connect to a host
125 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
126 display "Diagnostic serial port"
127 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
129 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
132 The AEB board has only one serial port. This option
133 chooses which port will be used for diagnostic output."
136 # Real-time clock/counter specifics
137 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
138 display "Real-time clock constants"
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 (240000/16)
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 { "arm-elf" }
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 { "-mcpu=arm7di -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 are used to
184 compile all packages by default. Individual packages may define
185 options which override these global flags."
188 cdl_option CYGBLD_GLOBAL_LDFLAGS {
189 display "Global linker flags"
192 default_value { "-mcpu=arm7di -Wl,--gc-sections -Wl,-static -g -nostdlib" }
194 This option controls the global linker flags. Individual
195 packages may define options which override these global flags."
198 cdl_option CYGBLD_BUILD_GDB_STUBS {
199 display "Build GDB stub ROM image"
201 requires { CYG_HAL_STARTUP == "ROM" }
202 requires CYGSEM_HAL_ROM_MONITOR
203 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
204 requires ! CYGBLD_BUILD_COMMON_GDB_STUBS
205 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
206 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
207 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
208 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
211 This option enables the building of the GDB stubs for the
212 board. This is a bit convoluted as it involves prepending
213 the image with a special header used by the AEB firmware
214 to keep track of multiple ROM images. This header includes
215 a checksum making it necessary to build twice."
218 <PREFIX>/bin/gdb_module.bin : <PACKAGE>/src/gdb_module.c
219 @sh -c "mkdir -p src $(dir $@)"
220 # First build version with no checksum.
221 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/gdb_module_ncs.o $<
222 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module_ncs.tmp src/gdb_module_ncs.o
223 $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module_ncs.tmp src/gdb_module_ncs.img
224 $(OBJCOPY) -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin
225 @rm src/gdb_module_ncs.tmp src/gdb_module_ncs.img
226 # Prepare dependency file
227 @echo $@ ": \\" > $(notdir $@).deps
228 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
229 @tail -n +2 deps.tmp >> $(notdir $@).deps
230 @echo >> $(notdir $@).deps
232 # Then build version with checksum from previously built image.
233 @cp $(dir $<)flash_cksum.tcl src/
234 $(CC) -c -DCHECKSUM=`src/flash_cksum.tcl src/gdb_module_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/gdb_module.o $<
235 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module.tmp src/gdb_module.o
236 $(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module.tmp $(@:.bin=.img)
237 $(OBJCOPY) -O binary $(@:.bin=.img) src/gdb_module.bin
238 uuencode src/gdb_module.bin gdb_module.bin | tr '`' ' ' > $(@:.bin=.img.UU)
239 @rm src/gdb_module.tmp src/gdb_module_ncs.bin
240 @mv src/gdb_module.bin $@
245 cdl_component CYGHWR_MEMORY_LAYOUT {
246 display "Memory layout"
249 calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
250 CYG_HAL_STARTUP == "RAM") ? "arm_aeb_ram" : \
251 (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
252 CYG_HAL_STARTUP == "ROM") ? "arm_aeb_rom" : \
253 (CYGHWR_HAL_ARM_AEB_REVISION == "C" && \
254 CYG_HAL_STARTUP == "RAM") ? "arm_aebC_ram" : \
257 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
258 display "Memory layout linker script fragment"
261 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
262 calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
263 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aeb_ram.ldi>" : \
264 (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
265 CYG_HAL_STARTUP == "ROM") ? "<pkgconf/mlt_arm_aeb_rom.ldi>" : \
266 (CYGHWR_HAL_ARM_AEB_REVISION == "C" && \
267 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aebC_ram.ldi>" : \
268 "<pkgconf/mlt_arm_aebC_rom.ldi>" }
271 cdl_option CYGHWR_MEMORY_LAYOUT_H {
272 display "Memory layout header file"
275 define -file system.h CYGHWR_MEMORY_LAYOUT_H
276 calculated { (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
277 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aeb_ram.h>" : \
278 (CYGHWR_HAL_ARM_AEB_REVISION == "B" && \
279 CYG_HAL_STARTUP == "ROM") ? "<pkgconf/mlt_arm_aeb_rom.h>" : \
280 (CYGHWR_HAL_ARM_AEB_REVISION == "C" && \
281 CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aebC_ram.h>" : \
282 "<pkgconf/mlt_arm_aebC_rom.h>" }
286 cdl_option CYGSEM_HAL_ROM_MONITOR {
287 display "Behave as a ROM monitor"
290 parent CYGPKG_HAL_ROM_MONITOR
291 requires { CYG_HAL_STARTUP == "ROM" }
293 Enable this option if this program is to be used as a ROM monitor,
294 i.e. applications will be loaded into RAM on the board, and this
295 ROM monitor may process exceptions or interrupts generated from the
296 application. This enables features such as utilizing a separate
297 interrupt stack when exceptions are generated."
300 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
301 display "Work with a ROM monitor"
303 legal_values { "Generic" "GDB_stubs" }
304 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
305 parent CYGPKG_HAL_ROM_MONITOR
306 requires { CYG_HAL_STARTUP == "RAM" }
308 Support can be enabled for different varieties of ROM monitor.
309 This support changes various eCos semantics such as the encoding
310 of diagnostic output, or the overriding of hardware interrupt
312 Firstly there is \"Generic\" support which prevents the HAL
313 from overriding the hardware vectors that it does not use, to
314 instead allow an installed ROM monitor to handle them. This is
315 the most basic support which is likely to be common to most
316 implementations of ROM monitor.
317 \"GDB_stubs\" provides support when GDB stubs are included in
318 the ROM monitor or boot ROM."