1 # ====================================================================
3 # hal_arm_integrator.cdl
5 # INTEGRATOR 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####
43 # Author(s): David A Rusling
44 # Original data: gthomas
45 # Contributors: Philippe Robin
46 # Date: November 7, 2000
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_ARM_INTEGRATOR {
53 display "ARM INTEGRATOR evaluation board"
55 define_header hal_arm_integrator.h
59 The integrator HAL package provides the support needed to run
60 eCos on an ARM INTEGRATOR evaluation board."
62 compile hal_diag.c integrator_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_TESTS_NO_CACHES
70 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
71 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_integrator.h>"
73 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"INTEGRATOR\""
74 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
78 cdl_component CYGPKG_HAL_ARM_INTEGRATOR_ARM7 {
79 display "ARM 7 specialization"
80 active_if !CYGPKG_HAL_ARM_ARM9
81 calculated !CYGPKG_HAL_ARM_ARM9
83 implements CYGINT_HAL_ARM_ARCH_ARM7
86 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM 7TDMI\""
90 cdl_component CYGPKG_HAL_ARM_INTEGRATOR_ARM9 {
91 display "ARM 9 specialization"
92 active_if CYGPKG_HAL_ARM_ARM9
93 calculated CYGPKG_HAL_ARM_ARM9
95 requires CYGPKG_HAL_ARM_ARM9_ARM966E
98 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM 9\""
103 cdl_component CYG_HAL_STARTUP {
104 display "Startup type"
106 legal_values {"RAM" "ROM" "ROMRAM"}
107 default_value {"RAM"}
109 define -file system.h CYG_HAL_STARTUP
111 When targetting the INTEGRATOR eval board it is possible to build
112 the system for either RAM bootstrap or ROM bootstrap(s). Select
113 'ram' when building programs to load into RAM using onboard
114 debug software such as Angel or eCos GDB stubs. Select 'rom'
115 when building a stand-alone application which will be put
120 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
121 display "Default console channel."
126 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
127 display "Diagnostic serial port baud rate"
129 legal_values 9600 19200 38400 115200
132 This option selects the baud rate used for the diagnostic port.
133 Note: this should match the value chosen for the GDB port if the
134 diagnostic and GDB port are the same."
137 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
138 display "GDB serial port baud rate"
140 legal_values 9600 19200 38400 115200
143 This option controls the baud rate used for the GDB connection."
146 cdl_option CYGHWR_HAL_ARM_INTEGRATOR_DIAG_LEDS {
147 display "Enable use of PPx LEDs"
150 Enabling this option causes eCos to flash the LEDs during
151 early board initialization. See vectors.S for
152 details. Before calling cyg_start, PP0 is switched on,
153 PP1-3 are switched off. The application code can use the
154 function hal_diag_led() to control the LEDs after this
158 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
159 display "Number of communication channels on the board"
164 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
165 display "Debug serial port"
166 active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
168 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
171 The INTEGRATOR board has two serial ports. This option
172 chooses which port will be used to connect to a host
176 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
177 display "Diagnostic serial port"
178 active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
180 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
181 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
183 The INTEGRATOR board has two serial ports. This option
184 chooses which port will be used for diagnostic output."
187 # Real-time clock/counter specifics
188 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
189 display "Real-time clock constants"
192 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
193 display "Real-time clock numerator"
195 default_value 1000000000
197 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
198 display "Real-time clock denominator"
202 cdl_option CYGNUM_HAL_RTC_PERIOD {
203 display "Real-time clock period"
209 cdl_component CYGBLD_GLOBAL_OPTIONS {
210 display "Global build options"
214 Global build options including control over
215 compiler flags, linker flags and choice of toolchain."
218 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
219 display "Global command prefix"
222 default_value { "arm-elf" }
224 This option specifies the command prefix used when
225 invoking the build tools."
228 cdl_option CYGBLD_GLOBAL_CFLAGS {
229 display "Global compiler flags"
233 CYGPKG_HAL_ARM_INTEGRATOR_ARM9 ? "-mcpu=arm9 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" :
234 "-mcpu=arm7tdmi -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-schedule-insns -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority"
238 This option controls the global compiler flags which are used to
239 compile all packages by default. Individual packages may define
240 options which override these global flags."
243 cdl_option CYGBLD_GLOBAL_LDFLAGS {
244 display "Global linker flags"
248 CYGPKG_HAL_ARM_INTEGRATOR_ARM9 ? "-Wl,-Map,map -mcpu=arm9 -g -nostdlib -Wl,--gc-sections -Wl,-static" :
249 "-Wl,-Map,map -mcpu=arm7tdmi -g -nostdlib -Wl,--gc-sections -Wl,-static" }
251 This option controls the global linker flags. Individual
252 packages may define options which override these global flags."
255 cdl_option CYGBLD_BUILD_GDB_STUBS {
256 display "Build GDB stub ROM image"
258 requires CYGBLD_BUILD_COMMON_GDB_STUBS
259 requires { CYG_HAL_STARTUP != "RAM" }
260 requires CYGSEM_HAL_ROM_MONITOR
261 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
262 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
263 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
264 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
265 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
268 This option enables the building of the GDB stubs for the
269 board. The address of the ELF headers in the image are
270 adjusted to ensure loading at an address in memory used
274 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
275 @mv $< $(<:.img=.elf)
276 $(OBJCOPY) --strip-debug --change-addresses=0xFC060000 $(<:.img=.elf) $<
277 $(OBJCOPY) -O binary $(<:.img=.elf) $@
281 cdl_option CYGBLD_BUILD_FLASH_TOOL {
282 display "Build flash programming tool"
284 requires { CYG_HAL_STARTUP == "RAM" }
285 requires CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL == 1
287 requires CYGPKG_KERNEL
289 description "This option enables the building of the flash programming tool for copying the GDB stubs into flash memory."
291 <PREFIX>/bin/prog_flash.img : <PACKAGE>/src/prog_flash.c
292 @sh -c "mkdir -p src $(dir $@)"
293 $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/prog_flash.o $<
294 @echo $@ ": \\" > $(notdir $@).deps
295 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
296 @tail -n +2 deps.tmp >> $(notdir $@).deps
297 @echo >> $(notdir $@).deps
299 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/prog_flash.o
303 cdl_option CYGBLD_BUILD_FLASH_TOOL_BE {
304 display "Build flash programming tool for BE images on LE boards"
306 requires { CYG_HAL_STARTUP == "RAM" }
307 requires CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL == 1
309 requires CYGPKG_KERNEL
311 description "This option enables the building of the flash
312 programming tool for copying the GDB stubs
313 into flash memory. The tool built by enabling
314 this option must be used when programming BE
315 images on LE boards."
317 <PREFIX>/bin/prog_flash_BE_image_LE_system.img : <PACKAGE>/src/prog_flash.c
318 @sh -c "mkdir -p src $(dir $@)"
319 $(CC) -DBE_IMAGE -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/prog_flash_be.o $<
320 @echo $@ ": \\" > $(notdir $@).deps
321 @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
322 @tail -n +2 deps.tmp >> $(notdir $@).deps
323 @echo >> $(notdir $@).deps
325 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/prog_flash_be.o
330 cdl_component CYGHWR_MEMORY_LAYOUT {
331 display "Memory layout"
334 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_integrator_ram" : \
335 CYG_HAL_STARTUP == "ROMRAM" ? "arm_integrator_romram" : \
336 "arm_integrator_rom" }
338 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
339 display "Memory layout linker script fragment"
342 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
343 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_integrator_ram.ldi>" : \
344 CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_arm_integrator_romram.ldi>" : \
345 "<pkgconf/mlt_arm_integrator_rom.ldi>" }
348 cdl_option CYGHWR_MEMORY_LAYOUT_H {
349 display "Memory layout header file"
352 define -file system.h CYGHWR_MEMORY_LAYOUT_H
353 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_integrator_ram.h>" : \
354 CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_arm_integrator_romram.h>" : \
355 "<pkgconf/mlt_arm_integrator_rom.h>" }
360 cdl_option CYGSEM_HAL_ROM_MONITOR {
361 display "Behave as a ROM monitor"
364 parent CYGPKG_HAL_ROM_MONITOR
365 requires { CYG_HAL_STARTUP != "RAM" }
367 Enable this option if this program is to be used as a ROM monitor,
368 i.e. applications will be loaded into RAM on the board, and this
369 ROM monitor may process exceptions or interrupts generated from the
370 application. This enables features such as utilizing a separate
371 interrupt stack when exceptions are generated."
374 cdl_component CYGPKG_CYGMON_HAL_OPTIONS {
375 display "CygMon HAL options"
379 active_if CYGPKG_CYGMON
381 This option also lists the target's requirements for a valid CygMon
384 cdl_option CYGBLD_BUILD_CYGMON_BIN {
385 display "Build CygMon ROM binary image"
386 active_if CYGBLD_BUILD_CYGMON
389 description "This option enables the conversion of the CygMon ELF
390 image to a binary image suitable for ROM programming."
393 <PREFIX>/bin/cygmon.bin : <PREFIX>/bin/cygmon.elf
394 $(OBJCOPY) --strip-debug --change-addresses=0xFC060000 $< $(@:.bin=.img)
395 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
396 $(OBJCOPY) -O binary $< $@
401 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
402 display "Work with a ROM monitor"
404 legal_values { "Generic" "GDB_stubs" }
405 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
406 parent CYGPKG_HAL_ROM_MONITOR
407 requires { CYG_HAL_STARTUP == "RAM" }
409 Support can be enabled for different varieties of ROM monitor.
410 This support changes various eCos semantics such as the encoding
411 of diagnostic output, or the overriding of hardware interrupt
413 Firstly there is \"Generic\" support which prevents the HAL
414 from overriding the hardware vectors that it does not use, to
415 instead allow an installed ROM monitor to handle them. This is
416 the most basic support which is likely to be common to most
417 implementations of ROM monitor.
418 \"GDB_stubs\" provides support when GDB stubs are included in
419 the ROM monitor or boot ROM."
422 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
423 display "Redboot HAL options"
426 parent CYGPKG_REDBOOT
427 active_if CYGPKG_REDBOOT
429 This option lists the target's requirements for a valid Redboot
432 requires { !CYGPKG_REDBOOT_FLASH || (CYGBLD_REDBOOT_MIN_IMAGE_SIZE == 0x40000) }
433 requires { !CYGOPT_REDBOOT_FIS_REDBOOT_BACKUP }
435 cdl_option CYGBLD_BUILD_REDBOOT_BIN_ROM {
436 display "Build Redboot ROM startup ROM binary image"
437 active_if { CYGBLD_BUILD_REDBOOT && CYG_HAL_STARTUP == "ROM" }
440 description "This option enables the conversion of the Redboot ELF
441 image to S-Record and binary image suitable for ROM
445 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
446 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
447 $(OBJCOPY) -O srec --gap-fill 0 $< $(@:.bin=.srec)
448 $(OBJCOPY) -O binary $< $@
452 cdl_option CYGBLD_BUILD_REDBOOT_BIN_ROMRAM {
453 display "Build Redboot ROMRAM startup ROM binary image"
454 active_if { CYGBLD_BUILD_REDBOOT && CYG_HAL_STARTUP == "ROMRAM" }
457 description "This option enables the conversion of the Redboot ELF
458 image to S-Record and binary images suitable for ROM
462 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
463 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
464 $(OBJCOPY) -O srec --adjust-vma 0x24000000 --gap-fill 0 $< $(@:.bin=.srec)
465 $(OBJCOPY) -O binary $< $@