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_32F {
52 display "KARO TRITON270 SK3 64 MB DRAM / 32 MB 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 32MB 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 TEST_PLATFORM"
75 puts $::cdl_system_header "#define TRITON270_FLASH16_32"
76 puts $::cdl_system_header "#define TRITON270_DRAM32_64"
77 puts $::cdl_system_header "#define DRAM_TEST32"
78 puts $::cdl_system_header "#define TRITON270_CS2_8900"
79 puts $::cdl_system_header "#define TRITON270_USE_STUART"
80 puts $::cdl_header "#define HAL_PLATFORM_CPU \"XScale\""
81 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"TRITON PXA270 32 MByte Flash \""
82 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"Ka-RO electronics GmbH\""
83 puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK triton270_program_new_stack"
84 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 190"
87 cdl_component CYG_HAL_STARTUP {
88 display "Startup type"
91 legal_values {"RAM" "ROM"}
93 define -file system.h CYG_HAL_STARTUP
95 When targetting the KARO TRITON270 eval board it is possible to build
96 the system for either RAM bootstrap or ROM bootstrap(s). Select
97 'ram' when building programs to load into RAM using onboard
98 debug software such as Angel or eCos GDB stubs. Select 'rom'
99 when building a stand-alone application which will be put
100 into ROM. Selection of 'stubs' is for the special case of
101 building the eCos GDB stubs themselves."
104 cdl_option CYGSEM_HAL_ARM__XSCALE_TRITON270_ARMBOOT {
105 display "Coexist with ARM bootloader"
109 Enable this option if the ARM bootloader is programmed into
110 the FLASH boot sector on the board."
118 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
119 display "Default console channel."
121 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
125 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
126 display "Number of communication channels on the board"
131 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
132 display "Debug serial port"
134 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
137 This option chooses which port will be used to connect to a host
141 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
142 display "Diagnostic serial port"
144 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
148 chooses which port will be used for diagnostic output."
151 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
152 display "Diagnostic serial port baud rate"
154 legal_values 9600 19200 38400 57600 115200
157 This option selects the baud rate used for the diagnostic port.
158 Note: this should match the value chosen for the GDB port if the
159 diagnostic and GDB port are the same."
162 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
163 display "GDB serial port baud rate"
165 legal_values 9600 19200 38400 57600 115200
168 This option selects the baud rate used for the GDB port."
171 # Real-time clock/counter specifics
172 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
173 display "Real-time clock constants"
176 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
177 display "Real-time clock numerator"
179 calculated 1000000000
181 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
182 display "Real-time clock denominator"
186 cdl_option CYGNUM_HAL_RTC_PERIOD {
187 display "Real-time clock period"
189 calculated 330000 ;# External timer is 33MHz
196 cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
197 display "Redboot for XScale options"
200 parent CYGPKG_REDBOOT
201 active_if CYGPKG_REDBOOT
203 This option lists the target's requirements for a valid Redboot
207 # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
209 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
216 cdl_component CYGBLD_GLOBAL_OPTIONS {
217 display "Global build options"
220 Global build options including control over
221 compiler flags, linker flags and choice of toolchain."
226 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
227 display "Global command prefix"
230 default_value { "xscale-elf" }
232 This option specifies the command prefix used when
233 invoking the build tools."
236 cdl_option CYGBLD_GLOBAL_CFLAGS {
237 display "Global compiler flags"
240 default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-builtin -fno-exceptions -finit-priority -mapcs-frame" }
241 # default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
243 This option controls the global compiler flags which are used to
244 compile all packages by default. Individual packages may define
245 options which override these global flags."
248 cdl_option CYGBLD_GLOBAL_LDFLAGS {
249 display "Global linker flags"
252 default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
254 This option controls the global linker flags. Individual
255 packages may define options which override these global flags."
258 cdl_option CYGBLD_BUILD_GDB_STUBS {
259 display "Build GDB stub ROM image"
261 requires { CYG_HAL_STARTUP == "ROM" }
262 requires CYGSEM_HAL_ROM_MONITOR
263 requires CYGBLD_BUILD_COMMON_GDB_STUBS
264 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
265 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
266 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
267 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
268 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
271 This option enables the building of the GDB stubs for the
272 board. The common HAL controls takes care of most of the
273 build process, but the final conversion from ELF image to
274 binary data is handled by the platform CDL, allowing
275 relocation of the data if necessary."
278 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
279 $(OBJCOPY) -O binary $< $@
287 # cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
288 # display "Number of breakpoints supported by the HAL."
292 # This option determines the number of breakpoints supported by the HAL."
295 cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON270_OPTIONS {
296 display "XScale TRITON270 build options"
299 Package specific build options including control over
300 compiler flags used only in building this package,
301 and details of which tests are built."
304 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_CFLAGS_ADD {
305 display "Additional compiler flags"
310 This option modifies the set of compiler flags for
311 building the XScale TRITON270 HAL. These flags are used
312 in addition to the set of global flags."
315 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_CFLAGS_REMOVE {
316 display "Suppressed compiler flags"
321 This option modifies the set of compiler flags for
322 building the XScale TRITON270 HAL. These flags are
323 removed from the set of global flags if present."
326 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_TESTS {
327 display "XScale TRITON270 tests"
332 This option specifies the set of tests for the XScale TRITON270 HAL."
336 cdl_component CYGHWR_MEMORY_LAYOUT {
337 display "Memory layout"
340 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_triton270_ram_32f" : \
341 CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "arm_xscale_triton270_roma" : \
342 "arm_xscale_triton270_rom_32f" }
344 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
345 display "Memory layout linker script fragment"
348 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
349 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton270_ram_32f.ldi>" : \
350 CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton270_roma.ldi>" : \
351 "<pkgconf/mlt_arm_xscale_triton270_rom_32f.ldi>" }
354 cdl_option CYGHWR_MEMORY_LAYOUT_H {
355 display "Memory layout header file"
358 define -file system.h CYGHWR_MEMORY_LAYOUT_H
359 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton270_ram_32f.h>" : \
360 CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton270_roma.h>" : \
361 "<pkgconf/mlt_arm_xscale_triton270_rom_32f.h>" }
365 cdl_option CYGSEM_HAL_ROM_MONITOR {
366 display "Behave as a ROM monitor"
369 parent CYGPKG_HAL_ROM_MONITOR
370 requires { CYG_HAL_STARTUP == "ROM" }
372 Enable this option if this program is to be used as a ROM monitor,
373 i.e. applications will be loaded into RAM on the board, and this
374 ROM monitor may process exceptions or interrupts generated from the
375 application. This enables features such as utilizing a separate
376 interrupt stack when exceptions are generated."
379 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
380 display "Work with a ROM monitor"
382 legal_values { "Generic" "GDB_stubs" }
383 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
384 parent CYGPKG_HAL_ROM_MONITOR
385 requires { CYG_HAL_STARTUP == "RAM" }
387 Support can be enabled for different varieties of ROM monitor.
388 This support changes various eCos semantics such as the encoding
389 of diagnostic output, or the overriding of hardware interrupt
391 Firstly there is \"Generic\" support which prevents the HAL
392 from overriding the hardware vectors that it does not use, to
393 instead allow an installed ROM monitor to handle them. This is
394 the most basic support which is likely to be common to most
395 implementations of ROM monitor.
396 \"GDB_stubs\" provides support when GDB stubs are included in
397 the ROM monitor or boot ROM."
400 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
401 display "Redboot HAL options"
404 parent CYGPKG_REDBOOT
405 active_if CYGPKG_REDBOOT
407 This option lists the target's requirements for a valid Redboot
411 compile -library=libextras.a redboot_cmds.c
412 # compile -library=libextras.a sdcard.c
417 # cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
418 # display "Support booting Linux via RedBoot"
422 # This option enables RedBoot to support booting of a Linux kernel."
424 # compile -library=libextras.a redboot_linux_exec.c
430 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
431 display "Build Redboot ROM binary image"
432 active_if CYGBLD_BUILD_REDBOOT
435 description "This option enables the conversion of the Redboot ELF
436 image to a binary image suitable for ROM programming."
439 <PREFIX>/bin/t270_f32.bin : <PREFIX>/bin/redboot.elf
440 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
441 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
442 $(OBJCOPY) -O binary $< $@
443 #>>> Lothar_2002_08_05
444 $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
445 #<<< Lothar_2002_08_05