2 # ====================================================================
4 # hal_arm_mac7100_mace1.cdl
6 # ARM MAC7100 MACE1 HAL package configuration data
8 # ====================================================================
9 #####ECOSGPLCOPYRIGHTBEGIN####
10 ## -------------------------------------------
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 ## Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
13 ## Copyright (C) 2006 eCosCentric Ltd
15 ## eCos is free software; you can redistribute it and/or modify it under
16 ## the terms of the GNU General Public License as published by the Free
17 ## Software Foundation; either version 2 or (at your option) any later version.
19 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 ## You should have received a copy of the GNU General Public License along
25 ## with eCos; if not, write to the Free Software Foundation, Inc.,
26 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 ## As a special exception, if other files instantiate templates or use macros
29 ## or inline functions from this file, or you compile this file and link it
30 ## with other works to produce a work based on this file, this file does not
31 ## by itself cause the resulting work to be covered by the GNU General Public
32 ## License. However the source code for this file must still be made available
33 ## in accordance with section (3) of the GNU General Public License.
35 ## This exception does not invalidate any other reasons why a work based on
36 ## this file might be covered by the GNU General Public License.
37 ## -------------------------------------------
38 #####ECOSGPLCOPYRIGHTEND####
39 # ====================================================================
40 ######DESCRIPTIONBEGIN####
42 # Author(s): Ilija Koco <ilijak@siva.com.mk>
46 #####DESCRIPTIONEND####
48 # ====================================================================
50 cdl_package CYGPKG_HAL_ARM_MAC7100_MACE1 {
51 display "MACE1 - MAC7100 eval board HAL"
52 parent CYGPKG_HAL_ARM_MAC7100
53 define_header hal_arm_mac7100_mace1.h
57 The MACE1 HAL package provides the support needed to run
58 eCos on an MACE1 - MAC7100 eval board."
62 requires { CYGHWR_HAL_ARM_MAC7100 == "MAC7121" }
63 requires { CYGNUM_PIT_CHAN_CLOCK_PRIORITY ==
64 CYGNUM_KERNEL_COUNTERS_CLOCK_ISR_PRIORITY }
67 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
68 puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_arm_mac7100.h>"
69 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_mac7100_mace1.h>"
70 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM7TDMI\""
71 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"Freescale MAC7100/MACE1\""
72 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
75 cdl_component CYG_PIT_CLOCKS {
76 display "Real time clock configuration."
79 Periodic Interrupt Timer Module - PIT comprizes 11 timer
80 channels. RTI channel (PIT0) as well as PIT1 .. PIT4 can
81 generate interrupts and are eligible for the real time
84 cdl_option CYGNUM_PIT_CHAN_CLOCK {
85 display "System CLOCK device"
89 requires {CYGNUM_PIT_CHAN_CLOCK != CYGNUM_PIT_CHAN_US}
91 RTI (PIT0) and PIT1 .. PIT4 can be used for ral time
92 clock. RTI is clocked by oscillator clock while
93 channels 1 to 4 by 1/2 system clock frequency.
94 Selection of RTI vs PIT1 .. PIT4 affects Real-time
95 clock period (see Real-time clock constants). NOTE:
96 Real time clock channel must not be the same as US
101 cdl_option CYGNUM_PIT_CHAN_CLOCK_PRIORITY {
102 display "System clock's INTC priority"
107 INTC has 16 interrupt levels: 0 (lowest) to 15 (highest).
111 cdl_option CYGNUM_PIT_CHAN_US {
112 display "PIT channel for us delay"
116 requires {CYGNUM_PIT_CHAN_CLOCK != CYGNUM_PIT_CHAN_US}
118 RTI is clocked by oscillator while channels PIT1
119 .. PIT4 by half system clock frequency, hence RTI
120 should allow for larger maximal period. NOTE: US
121 delay channel must not be the same as real time clock
127 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
128 display "Real-time clock constants"
131 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
132 display "Real-time clock numerator"
134 default_value 1000000000
136 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
137 display "Real-time clock denominator"
141 cdl_option CYGNUM_HAL_RTC_PERIOD {
142 display "Real-time clock period"
144 default_value (CYGNUM_PIT_CHAN_CLOCK !=0 ? \
145 (CYGNUM_HAL_ARM_MAC7100_CLOCK_SPEED / 2 / CYGNUM_HAL_RTC_DENOMINATOR - 1) : \
146 (CYGNUM_HAL_ARM_MAC7100_Q_FREQ / CYGNUM_HAL_RTC_DENOMINATOR - 1))
150 cdl_component CYG_HAL_STARTUP {
151 display "Startup type"
155 define -file system.h CYG_HAL_STARTUP
157 Current MACE1 port supports only ROM startup type."
160 # Real-time clock/counter specifics
162 cdl_component CYG_HAL_MAC7100_OSC {
163 display "System Clocks Module"
166 cdl_option CYGNUM_HAL_ARM_MAC7100_F_OSC {
167 display "FOSC - Oscillator clock"
169 default_value 8000000
172 cdl_option CYGNUM_HAL_ARM_MAC7100_FDIV {
173 display "FDIV - Frequency divider for PLL"
178 If enabled (FDIV != 0),
179 you set divider for PLL.
180 Then REFDV is calculated as REFDV=FDIV-1;
181 If disabled (FDIV == 0),
182 REFDV is calculated from FOSC so that referent frequency
184 SYNR is then derived from desired CPU clock, FOSC and REFDV.
189 cdl_option CYGNUM_HAL_ARM_MAC7100_CLOCK_SPEED {
190 display "CPU clock - PLL frequency"
192 default_value 48000000
195 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
196 display "Number of communication channels on the board"
202 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
203 display "Debug serial port"
204 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
206 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
209 The MAC7100 MACE1 board has two serial ports. This option
210 chooses which port will be used to connect to a host
214 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
215 display "Diagnostic serial port"
216 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
218 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
221 The MAC7100 MACE1 board has two serial ports. This option
222 chooses which port will be used for diagnostic output."
225 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
226 display "Diagnostic serial port baud rate"
228 legal_values 9600 19200 38400
231 This option selects the baud rate used for the diagnostic port."
234 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
235 display "GDB serial port baud rate"
237 legal_values 9600 19200 38400
240 This option controls the baud rate used for the GDB connection."
243 cdl_option CYGSEM_HAL_ROM_MONITOR {
244 display "Behave as a ROM monitor"
247 parent CYGPKG_HAL_ROM_MONITOR
248 requires { CYG_HAL_STARTUP == "ROM" ||
249 CYG_HAL_STARTUP == "ROMRAM" }
251 Enable this option if this program is to be used as a ROM monitor,
252 i.e. applications will be loaded into RAM on the board, and this
253 ROM monitor may process exceptions or interrupts generated from the
254 application. This enables features such as utilizing a separate
255 interrupt stack when exceptions are generated."
258 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
259 display "Work with a ROM monitor"
261 legal_values { "Generic" "GDB_stubs" }
262 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
263 parent CYGPKG_HAL_ROM_MONITOR
264 requires { CYG_HAL_STARTUP == "RAM" }
266 Support can be enabled for different varieties of ROM monitor.
267 This support changes various eCos semantics such as the encoding
268 of diagnostic output, or the overriding of hardware interrupt
270 Firstly there is \"Generic\" support which prevents the HAL
271 from overriding the hardware vectors that it does not use, to
272 instead allow an installed ROM monitor to handle them. This is
273 the most basic support which is likely to be common to most
274 implementations of ROM monitor.
275 \"GDB_stubs\" provides support when GDB stubs are included in
276 the ROM monitor or boot ROM."
279 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
280 display "Redboot HAL options"
283 parent CYGPKG_REDBOOT
284 active_if CYGPKG_REDBOOT
286 This option lists the target's requirements for a valid Redboot
289 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
290 display "Build Redboot ROM binary image"
291 active_if CYGBLD_BUILD_REDBOOT
294 description "This option enables the conversion of the Redboot ELF
295 image to a binary image suitable for ROM programming."
298 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
299 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
300 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
301 $(OBJCOPY) -O binary $< $@
307 cdl_component CYGBLD_GLOBAL_OPTIONS {
308 display "Global build options"
312 Global build options including control over
313 compiler flags, linker flags and choice of toolchain."
315 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
316 display "Global command prefix"
319 default_value { "arm-elf" }
321 This option specifies the command prefix used when
322 invoking the build tools."
325 cdl_option CYGBLD_GLOBAL_CFLAGS {
326 display "Global compiler flags"
329 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mbig-endian -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -gdwarf-2 -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
331 This option controls the global compiler flags which
332 are used to compile all packages by
333 default. Individual packages may define options which
334 override these global flags."
338 cdl_option CYGBLD_GLOBAL_LDFLAGS {
339 display "Global linker flags"
342 default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mbig-endian -mno-short-load-words -Wl,--gc-sections -Wl,-static -gdwarf-2 -nostdlib" }
344 This option controls the global linker flags. Individual
345 packages may define options which override these global flags."
349 cdl_component CYGHWR_MEMORY_LAYOUT {
350 display "Memory layout"
353 calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_mac7100_mace1_ram" :
354 (CYG_HAL_STARTUP == "ROMRAM") ? "arm_mac7100_mace1_romram" :
355 "arm_mac7100_mace1_rom" }
357 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
358 display "Memory layout linker script fragment"
361 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
362 calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_mac7100_mace1_ram.ldi>" :
363 (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_mac7100_mace1_romram.ldi>" :
364 "<pkgconf/mlt_arm_mac7100_mace1_rom.ldi>" }
367 cdl_option CYGHWR_MEMORY_LAYOUT_H {
368 display "Memory layout header file"
371 define -file system.h CYGHWR_MEMORY_LAYOUT_H
372 calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_mac7100_mace1_ram.h>" :
373 (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_mac7100_mace1_romram.h>" :
374 "<pkgconf/mlt_arm_mac7100_mace1_rom.h>" }