1 # ====================================================================
3 # hal_arm_at91_eb40a.cdl
5 # ARM AT91 EB40A HAL package configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 ## eCos is free software; you can redistribute it and/or modify it under
13 ## the terms of the GNU General Public License as published by the Free
14 ## Software Foundation; either version 2 or (at your option) any later version.
16 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 ## You should have received a copy of the GNU General Public License along
22 ## with eCos; if not, write to the Free Software Foundation, Inc.,
23 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 ## As a special exception, if other files instantiate templates or use macros
26 ## or inline functions from this file, or you compile this file and link it
27 ## with other works to produce a work based on this file, this file does not
28 ## by itself cause the resulting work to be covered by the GNU General Public
29 ## License. However the source code for this file must still be made available
30 ## in accordance with section (3) of the GNU General Public License.
32 ## This exception does not invalidate any other reasons why a work based on
33 ## this file might be covered by the GNU General Public License.
35 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
36 ## at http://sources.redhat.com/ecos/ecos-license/
37 ## -------------------------------------------
38 #####ECOSGPLCOPYRIGHTEND####
39 # ====================================================================
40 ######DESCRIPTIONBEGIN####
43 # Contributors: gthomas, tkoeller, tdrury, nickg
46 #####DESCRIPTIONEND####
48 # ====================================================================
50 cdl_package CYGPKG_HAL_ARM_AT91_EB40A {
51 display "Atmel EB40A eval board HAL"
52 parent CYGPKG_HAL_ARM_AT91
53 define_header hal_arm_at91_eb40a.h
57 The EB40A HAL package provides the support needed to run
58 eCos on an Atmel EB40A eval board."
62 requires { CYGHWR_HAL_ARM_AT91 == "R40008" }
65 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
66 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_arm_at91.h>"
67 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_at91_eb40a.h>"
68 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI\""
69 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Atmel AT91/EB40A\""
70 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
73 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
74 display "Real-time clock constants"
77 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
78 display "Real-time clock numerator"
80 default_value 1000000000
82 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
83 display "Real-time clock denominator"
87 cdl_option CYGNUM_HAL_RTC_PERIOD {
88 display "Real-time clock period"
90 default_value ((CYGNUM_HAL_ARM_AT91_CLOCK_SPEED/32) / CYGNUM_HAL_RTC_DENOMINATOR)
94 cdl_component CYG_HAL_STARTUP {
95 display "Startup type"
98 legal_values {"RAM" "ROM" "ROMRAM"}
100 define -file system.h CYG_HAL_STARTUP
102 When targetting the AT91 EBxx eval board it is possible to build
103 the system for either RAM bootstrap or ROM bootstrap(s). Select
104 'ram' when building programs to load into RAM using onboard
105 debug software such as Angel or eCos GDB stubs. Select 'rom'
106 when building a stand-alone application which will be put
107 into ROM. Using ROMRAM will allow the program to exist in
108 ROM, but be copied to RAM during startup."
111 # Real-time clock/counter specifics
112 cdl_option CYGNUM_HAL_ARM_AT91_CLOCK_SPEED {
113 display "CPU clock speed"
115 default_value 66000000
118 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
119 display "Number of communication channels on the board"
124 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
125 display "Debug serial port"
126 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
128 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
131 The AT91 EBxx board has two serial ports. This option
132 chooses which port will be used to connect to a host
136 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
137 display "Diagnostic serial port"
138 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
140 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
143 The AT91 EBxx board has two serial ports. This option
144 chooses which port will be used for diagnostic output."
147 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
148 display "Diagnostic serial port baud rate"
150 legal_values 9600 19200 38400 57600 115200
153 This option selects the baud rate used for the diagnostic port."
156 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
157 display "GDB serial port baud rate"
159 legal_values 9600 19200 38400 57600 115200
162 This option controls the baud rate used for the GDB connection."
165 cdl_option CYGSEM_HAL_ROM_MONITOR {
166 display "Behave as a ROM monitor"
169 parent CYGPKG_HAL_ROM_MONITOR
170 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
172 Enable this option if this program is to be used as a ROM monitor,
173 i.e. applications will be loaded into RAM on the board, and this
174 ROM monitor may process exceptions or interrupts generated from the
175 application. This enables features such as utilizing a separate
176 interrupt stack when exceptions are generated."
179 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
180 display "Work with a ROM monitor"
182 legal_values { "Generic" "GDB_stubs" }
183 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
184 parent CYGPKG_HAL_ROM_MONITOR
185 requires { CYG_HAL_STARTUP == "RAM" }
187 Support can be enabled for different varieties of ROM monitor.
188 This support changes various eCos semantics such as the encoding
189 of diagnostic output, or the overriding of hardware interrupt
191 Firstly there is \"Generic\" support which prevents the HAL
192 from overriding the hardware vectors that it does not use, to
193 instead allow an installed ROM monitor to handle them. This is
194 the most basic support which is likely to be common to most
195 implementations of ROM monitor.
196 \"GDB_stubs\" provides support when GDB stubs are included in
197 the ROM monitor or boot ROM."
200 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
201 display "Redboot HAL options"
204 parent CYGPKG_REDBOOT
205 active_if CYGPKG_REDBOOT
207 This option lists the target's requirements for a valid Redboot
210 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
211 display "Build Redboot ROM binary image"
212 active_if CYGBLD_BUILD_REDBOOT
215 description "This option enables the conversion of the Redboot ELF
216 image to a binary image suitable for ROM programming."
219 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
220 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
221 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
222 $(OBJCOPY) -O binary $< $@
228 cdl_component CYGBLD_GLOBAL_OPTIONS {
229 display "Global build options"
233 Global build options including control over
234 compiler flags, linker flags and choice of toolchain."
237 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
238 display "Global command prefix"
241 default_value { "arm-elf" }
243 This option specifies the command prefix used when
244 invoking the build tools."
247 cdl_option CYGBLD_GLOBAL_CFLAGS {
248 display "Global compiler flags"
251 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
253 This option controls the global compiler flags which are used to
254 compile all packages by default. Individual packages may define
255 options which override these global flags."
258 cdl_option CYGBLD_GLOBAL_LDFLAGS {
259 display "Global linker flags"
262 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections -Wl,-static -g -nostdlib" }
264 This option controls the global linker flags. Individual
265 packages may define options which override these global flags."
269 cdl_component CYGHWR_MEMORY_LAYOUT {
270 display "Memory layout"
273 calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_at91_eb40a_ram" :
274 (CYG_HAL_STARTUP == "ROMRAM") ? "arm_at91_eb40a_romram" :
275 "arm_at91_eb40a_rom" }
277 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
278 display "Memory layout linker script fragment"
281 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
282 calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_at91_eb40a_ram.ldi>" :
283 (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_at91_eb40a_romram.ldi>" :
284 "<pkgconf/mlt_arm_at91_eb40a_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 { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_at91_eb40a_ram.h>" :
293 (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_at91_eb40a_romram.h>" :
294 "<pkgconf/mlt_arm_at91_eb40a_rom.h>" }