1 #==========================================================================
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 # Contributors: gthomas, jskov, r.cassebohm
45 # Grant Edwards <grante@visi.com>
50 #####DESCRIPTIONEND####
52 #========================================================================*/
55 cdl_package CYGPKG_HAL_ARM_AIM711 {
56 display "ARM Industrial Module AIM 711"
58 define_header hal_arm_aim711.h
62 The ARM Industrial Module AIM 711 HAL package provides the support
63 needed to run eCos on a ARM Industrial Module AIM 711 board from
66 compile hal_diag.c aim711_misc.c
68 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
69 implements CYGINT_HAL_DEBUG_GDB_STUBS
70 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
71 implements CYGINT_HAL_ARM_ARCH_ARM7
72 implements CYGINT_HAL_ARM_THUMB_ARCH
73 implements CYGINT_HAL_ARM_BIGENDIAN
75 requires { CYGHWR_HAL_ARM_BIGENDIAN == 1 }
76 requires { is_active(CYGPKG_DEVS_ETH_ARM_KS32C5000) implies
77 CYGPKG_DEVS_ETH_ARM_KS32C5000_PHY_RTL8201 }
78 requires { is_active(CYGPKG_DEVS_ETH_ARM_KS32C5000) implies
79 (CYGPKG_DEVS_ETH_ARM_KS32C5000_PHYADDR == 2) }
82 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_arm.h>"
83 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_aim711.h>"
85 puts $::cdl_header "#define HAL_PLATFORM_CPU \"ARM 7TDMI\""
86 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"AIM 711\""
87 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
89 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 140"
90 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x200000"
94 cdl_component CYG_HAL_STARTUP {
95 display "Startup type"
97 legal_values {"RAM" "ROM" "ROMRAM"}
100 define -file system.h CYG_HAL_STARTUP
102 When targetting the AIM 711 board it is possible to build
103 the system for either RAM, ROM or ROMRAM bootstrap.
104 RAM bootstrap generally requires that the board
105 is equipped with ROMs containing a suitable ROM monitor or
106 equivalent software that allows GDB to download the eCos
107 application on to the board. The ROM bootstrap typically
108 requires that the eCos application be blown into the FLASH.
109 The ROMRAM bootstrap is also stored in FLASH, but will be
113 cdl_component CYG_HAL_CPUTYPE {
116 calculated {"S3C4510A"}
118 define -file system.h CYG_HAL_CPUTYPE
119 description "Which version of processor is on board."
122 cdl_component CYGNUM_HAL_CPUCLOCK {
127 define -file system.h CYGNUM_HAL_CPUCLOCK
128 description "Frequency of cpu clock in Hz."
131 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
132 display "Number of diag/debug communication channels on the board"
137 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
138 display "Default console channel."
140 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
144 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
145 display "Debug serial port"
147 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
149 description "The AIM 711 board has two diag/debug
150 serial ports. This option chooses which port will
151 be used to connect to a host running GDB."
154 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
155 display "Diagnostic serial port"
157 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
158 default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
160 The AIM 711 board has two diag/debug serial ports. This option
161 chooses which port will be used for diagnostic output."
164 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
165 display "Console/GDB serial port baud rate"
167 legal_values 9600 19200 38400 57600 115200
170 This option controls the default baud rate used for the
171 Console/GDB connection."
174 # Real-time clock/counter specifics
175 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
176 display "Real-time clock constants"
179 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
180 display "Real-time clock numerator"
182 default_value 1000000000
184 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
185 display "Real-time clock denominator"
189 cdl_option CYGNUM_HAL_RTC_PERIOD {
190 display "Real-time clock period"
192 default_value (CYGNUM_HAL_CPUCLOCK/CYGNUM_HAL_RTC_DENOMINATOR)
196 cdl_component CYGBLD_GLOBAL_OPTIONS {
197 display "Global build options"
201 Global build options including control over
202 compiler flags, linker flags and choice of toolchain."
204 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
205 display "Global command prefix"
208 default_value { "arm-elf" }
210 This option specifies the command prefix used when
211 invoking the build tools."
214 cdl_option CYGBLD_GLOBAL_CFLAGS {
215 display "Global compiler flags"
219 default_value { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
220 (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
221 (CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian " : "") .
222 "-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" }
224 This option controls the global compiler flags which are used to
225 compile all packages by default. Individual packages may define
226 options which override these global flags."
229 cdl_option CYGBLD_GLOBAL_LDFLAGS {
230 display "Global linker flags"
233 default_value { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
234 (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
235 (CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian " : "") .
236 "-mno-short-load-words -g -nostdlib -Wl,--gc-sections -Wl,-static" }
238 This option controls the global linker flags. Individual
239 packages may define options which override these global flags."
242 cdl_option CYGBLD_BUILD_GDB_STUBS {
243 display "Build GDB stub ROM image"
245 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
246 requires CYGSEM_HAL_ROM_MONITOR
247 requires CYGBLD_BUILD_COMMON_GDB_STUBS
248 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
249 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
250 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
251 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
252 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
255 This option enables the building of the GDB stubs for the
256 board. The common HAL controls takes care of most of the
257 build process, but the final conversion from ELF image to
258 binary data is handled by the platform CDL, allowing
259 relocation of the data if necessary."
262 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
263 $(OBJCOPY) -O binary $< $@
268 cdl_component CYGHWR_MEMORY_LAYOUT {
269 display "Memory layout"
272 calculated { (CYG_HAL_STARTUP == "RAM") ? "arm_aim711_ram" :
273 (CYG_HAL_STARTUP == "ROMRAM") ? "arm_aim711_romram" :
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_aim711_ram.ldi>" :
283 (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_aim711_romram.ldi>" :
284 "<pkgconf/mlt_arm_aim711_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_aim711_ram.h>" :
293 (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_aim711_romram.h>" :
294 "<pkgconf/mlt_arm_aim711_rom.h>" }
298 cdl_option CYGSEM_HAL_ROM_MONITOR {
299 display "Behave as a ROM monitor"
302 parent CYGPKG_HAL_ROM_MONITOR
303 requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
305 Enable this option if this program is to be used as a ROM monitor,
306 i.e. applications will be loaded into RAM on the board, and this
307 ROM monitor may process exceptions or interrupts generated from the
308 application. This enables features such as utilizing a separate
309 interrupt stack when exceptions are generated."
312 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
313 display "Work with a ROM monitor"
315 legal_values { "Generic" "GDB_stubs" }
316 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
317 parent CYGPKG_HAL_ROM_MONITOR
318 requires { CYG_HAL_STARTUP == "RAM" }
320 Support can be enabled for different varieties of ROM monitor.
321 This support changes various eCos semantics such as the encoding
322 of diagnostic output, or the overriding of hardware interrupt
324 Firstly there is \"Generic\" support which prevents the HAL
325 from overriding the hardware vectors that it does not use, to
326 instead allow an installed ROM monitor to handle them. This is
327 the most basic support which is likely to be common to most
328 implementations of ROM monitor.
329 \"GDB_stubs\" provides support when GDB stubs are included in
330 the ROM monitor or boot ROM."
333 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
334 display "Redboot HAL options"
337 parent CYGPKG_REDBOOT
338 active_if CYGPKG_REDBOOT
340 This option lists the target's requirements for a valid Redboot
343 cdl_component CYGPKG_REDBOOT_AIM711_EEPROM_RDWR {
344 display "Provide the eeprom commands in RedBoot"
347 parent CYGPKG_REDBOOT_ARM_OPTIONS
348 #active_if CYGBLD_BUILD_REDBOOT_WITH_EXEC
350 This option provides the eeprom_read and eeprom_write
352 compile -library=libextras.a redboot_eeprom.c
355 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
356 display "Build Redboot ROM binary image"
357 active_if CYGBLD_BUILD_REDBOOT
360 description "This option enables the conversion of the Redboot ELF
361 image to a binary image suitable for ROM programming."
364 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
365 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
366 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
367 $(OBJCOPY) -O binary $< $@
372 cdl_option CYGSEM_HAL_LED_WITH_DELAY {
373 display "POST LED output with delays"
377 Enable this option to have delays between POST codes shown on the