1 # ====================================================================
3 # triton_pxa270_sk3.cdl
5 # KARO TRITON PXA270 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): usteinkohl (karo electronics)
44 # Original data: usteinkohl
46 # Date: 20th August 2004
48 #####DESCRIPTIONEND####
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_XSCALE_TRITON270_SK3_16F32S {
52 display "KARO TRITON270 SK3 32 MB SDRAM / 16 MB P30 Flash"
54 define_header hal_arm_xscale_triton270.h
58 The KARO TRITON270 HAL package provides the support needed to run
59 eCos on a TRITON270 SK3 with 16MB Flash and 64MB DRAM."
61 compile hal_diag.c triton270_misc.c hal_initio.S
63 implements CYGINT_HAL_DEBUG_GDB_STUBS
64 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
65 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
66 implements CYGINT_HAL_ARM_ARCH_XSCALE
67 implements CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
68 implements CYGINT_HAL_PLF_IF_IDE
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_xscale_triton270.h>"
74 puts $::cdl_system_header "#define TRITON270_FLASH16_16_P30"
75 puts $::cdl_system_header "#define TRITON270_DRAM16_32"
76 puts $::cdl_system_header "#define DRAM_TEST32"
77 puts $::cdl_system_header "#define TRITON270_CS2_8900"
78 puts $::cdl_system_header "#define TRITON270_USE_STUART"
79 puts $::cdl_header "#define HAL_PLATFORM_CPU \"XScale\""
80 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"TRITON PXA270 16 MByte P30 Flash 32 MByte SDRAM\""
81 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"Ka-RO electronics GmbH\""
82 puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK triton270_program_new_stack"
83 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 190"
86 cdl_component CYG_HAL_STARTUP {
87 display "Startup type"
90 legal_values {"RAM" "ROM"}
92 define -file system.h CYG_HAL_STARTUP
94 When targetting the KARO TRITON270 eval board it is possible to build
95 the system for either RAM bootstrap or ROM bootstrap(s). Select
96 'ram' when building programs to load into RAM using onboard
97 debug software such as Angel or eCos GDB stubs. Select 'rom'
98 when building a stand-alone application which will be put
99 into ROM. Selection of 'stubs' is for the special case of
100 building the eCos GDB stubs themselves."
103 cdl_option CYGSEM_HAL_ARM__XSCALE_TRITON270_ARMBOOT {
104 display "Coexist with ARM bootloader"
108 Enable this option if the ARM bootloader is programmed into
109 the FLASH boot sector on the board."
117 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
118 display "Default console channel."
120 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
124 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
125 display "Number of communication channels on the board"
130 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
131 display "Debug serial port"
133 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
136 This option chooses which port will be used to connect to a host
140 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
141 display "Diagnostic serial port"
143 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
147 chooses which port will be used for diagnostic output."
150 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
151 display "Diagnostic serial port baud rate"
153 legal_values 9600 19200 38400 57600 115200
156 This option selects the baud rate used for the diagnostic port.
157 Note: this should match the value chosen for the GDB port if the
158 diagnostic and GDB port are the same."
161 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
162 display "GDB serial port baud rate"
164 legal_values 9600 19200 38400 57600 115200
167 This option selects the baud rate used for the GDB port."
170 # Real-time clock/counter specifics
171 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
172 display "Real-time clock constants"
175 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
176 display "Real-time clock numerator"
178 calculated 1000000000
180 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
181 display "Real-time clock denominator"
185 cdl_option CYGNUM_HAL_RTC_PERIOD {
186 display "Real-time clock period"
188 calculated 330000 ;# External timer is 33MHz
195 cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
196 display "Redboot for XScale options"
199 parent CYGPKG_REDBOOT
200 active_if CYGPKG_REDBOOT
202 This option lists the target's requirements for a valid Redboot
206 # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
208 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
215 cdl_component CYGBLD_GLOBAL_OPTIONS {
216 display "Global build options"
219 Global build options including control over
220 compiler flags, linker flags and choice of toolchain."
225 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
226 display "Global command prefix"
229 default_value { "xscale-elf" }
231 This option specifies the command prefix used when
232 invoking the build tools."
235 cdl_option CYGBLD_GLOBAL_CFLAGS {
236 display "Global compiler flags"
239 default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-builtin -fno-exceptions -finit-priority -mapcs-frame" }
240 # default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
242 This option controls the global compiler flags which are used to
243 compile all packages by default. Individual packages may define
244 options which override these global flags."
247 cdl_option CYGBLD_GLOBAL_LDFLAGS {
248 display "Global linker flags"
251 default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
253 This option controls the global linker flags. Individual
254 packages may define options which override these global flags."
257 cdl_option CYGBLD_BUILD_GDB_STUBS {
258 display "Build GDB stub ROM image"
260 requires { CYG_HAL_STARTUP == "ROM" }
261 requires CYGSEM_HAL_ROM_MONITOR
262 requires CYGBLD_BUILD_COMMON_GDB_STUBS
263 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
264 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
265 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
266 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
267 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
270 This option enables the building of the GDB stubs for the
271 board. The common HAL controls takes care of most of the
272 build process, but the final conversion from ELF image to
273 binary data is handled by the platform CDL, allowing
274 relocation of the data if necessary."
277 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
278 $(OBJCOPY) -O binary $< $@
286 # cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
287 # display "Number of breakpoints supported by the HAL."
291 # This option determines the number of breakpoints supported by the HAL."
294 cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON270_OPTIONS {
295 display "XScale TRITON270 build options"
298 Package specific build options including control over
299 compiler flags used only in building this package,
300 and details of which tests are built."
303 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_CFLAGS_ADD {
304 display "Additional compiler flags"
309 This option modifies the set of compiler flags for
310 building the XScale TRITON270 HAL. These flags are used
311 in addition to the set of global flags."
314 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_CFLAGS_REMOVE {
315 display "Suppressed compiler flags"
320 This option modifies the set of compiler flags for
321 building the XScale TRITON270 HAL. These flags are
322 removed from the set of global flags if present."
325 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_TESTS {
326 display "XScale TRITON270 tests"
331 This option specifies the set of tests for the XScale TRITON270 HAL."
335 cdl_component CYGHWR_MEMORY_LAYOUT {
336 display "Memory layout"
339 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_triton270_ram_16f32s" : \
340 CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "arm_xscale_triton270_roma" : \
341 "arm_xscale_triton270_rom_16f32s" }
343 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
344 display "Memory layout linker script fragment"
347 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
348 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton270_ram_16f32s.ldi>" : \
349 CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton270_roma.ldi>" : \
350 "<pkgconf/mlt_arm_xscale_triton270_rom_16f32s.ldi>" }
353 cdl_option CYGHWR_MEMORY_LAYOUT_H {
354 display "Memory layout header file"
357 define -file system.h CYGHWR_MEMORY_LAYOUT_H
358 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton270_ram_16f32s.h>" : \
359 CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton270_roma.h>" : \
360 "<pkgconf/mlt_arm_xscale_triton270_rom_16f32s.h>" }
364 cdl_option CYGSEM_HAL_ROM_MONITOR {
365 display "Behave as a ROM monitor"
368 parent CYGPKG_HAL_ROM_MONITOR
369 requires { CYG_HAL_STARTUP == "ROM" }
371 Enable this option if this program is to be used as a ROM monitor,
372 i.e. applications will be loaded into RAM on the board, and this
373 ROM monitor may process exceptions or interrupts generated from the
374 application. This enables features such as utilizing a separate
375 interrupt stack when exceptions are generated."
378 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
379 display "Work with a ROM monitor"
381 legal_values { "Generic" "GDB_stubs" }
382 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
383 parent CYGPKG_HAL_ROM_MONITOR
384 requires { CYG_HAL_STARTUP == "RAM" }
386 Support can be enabled for different varieties of ROM monitor.
387 This support changes various eCos semantics such as the encoding
388 of diagnostic output, or the overriding of hardware interrupt
390 Firstly there is \"Generic\" support which prevents the HAL
391 from overriding the hardware vectors that it does not use, to
392 instead allow an installed ROM monitor to handle them. This is
393 the most basic support which is likely to be common to most
394 implementations of ROM monitor.
395 \"GDB_stubs\" provides support when GDB stubs are included in
396 the ROM monitor or boot ROM."
399 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
400 display "Redboot HAL options"
403 parent CYGPKG_REDBOOT
404 active_if CYGPKG_REDBOOT
406 This option lists the target's requirements for a valid Redboot
410 compile -library=libextras.a redboot_cmds.c
411 # compile -library=libextras.a sdcard.c
416 # cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
417 # display "Support booting Linux via RedBoot"
421 # This option enables RedBoot to support booting of a Linux kernel."
423 # compile -library=libextras.a redboot_linux_exec.c
429 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
430 display "Build Redboot ROM binary image"
431 active_if CYGBLD_BUILD_REDBOOT
434 description "This option enables the conversion of the Redboot ELF
435 image to a binary image suitable for ROM programming."
438 <PREFIX>/bin/t27_3032.bin : <PREFIX>/bin/redboot.elf
439 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
440 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
441 $(OBJCOPY) -O binary $< $@
442 #>>> Lothar_2002_08_05
443 $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
444 #<<< Lothar_2002_08_05