1 # ====================================================================
3 # hal_arm_xscale_tritetn_stk1.cdl
5 # Ka-Ro TRITON architectural 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
44 # Original data: usteinkohl
46 # Date: 10th March 2003
48 #####DESCRIPTIONEND####
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_XSCALE_TRITON_STK1 {
52 display "Karo Triton XScale evaluation boards"
54 define_header hal_arm_xscale_triton.h
58 The TRITON_STK1 HAL package provides the support needed to run
59 eCos on a Karo TRITON board located on a Starter Kit I."
61 compile hal_diag.c triton_misc.c
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_triton.h>"
74 puts $::cdl_system_header "#define TRITON_FLASH32_32"
75 puts $::cdl_system_header "#define TRITON_DRAM32_64"
76 puts $::cdl_system_header "#define TRITON_STK 1"
77 puts $::cdl_header "#define HAL_PLATFORM_CPU \"XScale\""
78 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"TRITON --STK1-- \""
79 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"developed and produced by Ka-Ro electronics GmbH, Germany\""
80 puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK triton_program_new_stack"
81 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 190"
84 cdl_component CYG_HAL_STARTUP {
85 display "Startup type"
88 legal_values {"RAM" "ROM"}
90 define -file system.h CYG_HAL_STARTUP
92 When targetting the KARO TRITON eval board it is possible to build
93 the system for either RAM bootstrap or ROM bootstrap(s). Select
94 'ram' when building programs to load into RAM using onboard
95 debug software such as Angel or eCos GDB stubs. Select 'rom'
96 when building a stand-alone application which will be put
97 into ROM. Selection of 'stubs' is for the special case of
98 building the eCos GDB stubs themselves."
101 cdl_option CYGSEM_HAL_ARM__XSCALE_TRITON_ARMBOOT {
102 display "Coexist with ARM bootloader"
106 Enable this option if the ARM bootloader is programmed into
107 the FLASH boot sector on the board."
115 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
116 display "Default console channel."
118 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
122 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
123 display "Number of communication channels on the board"
128 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
129 display "Debug serial port"
131 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
134 This option chooses which port will be used to connect to a host
138 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
139 display "Diagnostic serial port"
141 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
144 This option chooses which serial port will be used for diagnostic output."
147 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
148 display "Diagnostic serial port baud rate"
150 legal_values 9600 19200 38400 57600 115200
153 This option selects the baud rate used for the diagnostic port.
154 Note: this should match the value chosen for the GDB port if the
155 diagnostic and GDB port are the same."
158 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
159 display "GDB serial port baud rate"
161 legal_values 9600 19200 38400 57600 115200
164 This option selects the baud rate used for the GDB port."
167 # Real-time clock/counter specifics
168 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
169 display "Real-time clock constants"
172 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
173 display "Real-time clock numerator"
175 calculated 1000000000
177 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
178 display "Real-time clock denominator"
182 cdl_option CYGNUM_HAL_RTC_PERIOD {
183 display "Real-time clock period"
185 calculated 330000 ;# External timer is 33MHz
192 cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
193 display "Redboot for XScale options"
196 parent CYGPKG_REDBOOT
197 active_if CYGPKG_REDBOOT
199 This option lists the target's requirements for a valid Redboot
203 # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
205 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
212 cdl_component CYGBLD_GLOBAL_OPTIONS {
213 display "Global build options"
216 Global build options including control over
217 compiler flags, linker flags and choice of toolchain."
222 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
223 display "Global command prefix"
226 default_value { "xscale-elf" }
228 This option specifies the command prefix used when
229 invoking the build tools."
232 cdl_option CYGBLD_GLOBAL_CFLAGS {
233 display "Global compiler flags"
236 default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-builtin -fno-exceptions -finit-priority -mapcs-frame" }
237 # default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
239 This option controls the global compiler flags which are used to
240 compile all packages by default. Individual packages may define
241 options which override these global flags."
244 cdl_option CYGBLD_GLOBAL_LDFLAGS {
245 display "Global linker flags"
248 default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
250 This option controls the global linker flags. Individual
251 packages may define options which override these global flags."
254 cdl_option CYGBLD_BUILD_GDB_STUBS {
255 display "Build GDB stub ROM image"
257 requires { CYG_HAL_STARTUP == "ROM" }
258 requires CYGSEM_HAL_ROM_MONITOR
259 requires CYGBLD_BUILD_COMMON_GDB_STUBS
260 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
261 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
262 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
263 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
264 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
267 This option enables the building of the GDB stubs for the
268 board. The common HAL controls takes care of most of the
269 build process, but the final conversion from ELF image to
270 binary data is handled by the platform CDL, allowing
271 relocation of the data if necessary."
274 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
275 $(OBJCOPY) -O binary $< $@
283 # cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
284 # display "Number of breakpoints supported by the HAL."
288 # This option determines the number of breakpoints supported by the HAL."
291 cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON_OPTIONS {
292 display "XScale TRITON build options"
295 Package specific build options including control over
296 compiler flags used only in building this package,
297 and details of which tests are built."
300 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_ADD {
301 display "Additional compiler flags"
306 This option modifies the set of compiler flags for
307 building the XScale TRITON HAL. These flags are used
308 in addition to the set of global flags."
311 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_REMOVE {
312 display "Suppressed compiler flags"
317 This option modifies the set of compiler flags for
318 building the XScale TRITON HAL. These flags are
319 removed from the set of global flags if present."
322 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_TESTS {
323 display "XScale TRITON tests"
328 This option specifies the set of tests for the XScale TRITON HAL."
332 cdl_component CYGHWR_MEMORY_LAYOUT {
333 display "Memory layout"
336 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_triton_ram" : \
337 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "arm_xscale_triton_roma" : \
338 "arm_xscale_triton_rom" }
340 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
341 display "Memory layout linker script fragment"
344 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
345 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_stk_ram.ldi>" : \
346 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_stk_roma.ldi>" : \
347 "<pkgconf/mlt_arm_xscale_triton_stk_rom.ldi>" }
350 cdl_option CYGHWR_MEMORY_LAYOUT_H {
351 display "Memory layout header file"
354 define -file system.h CYGHWR_MEMORY_LAYOUT_H
355 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_stk_ram.h>" : \
356 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_stk_roma.h>" : \
357 "<pkgconf/mlt_arm_xscale_triton_stk_rom.h>" }
361 cdl_option CYGSEM_HAL_ROM_MONITOR {
362 display "Behave as a ROM monitor"
365 parent CYGPKG_HAL_ROM_MONITOR
366 requires { CYG_HAL_STARTUP == "ROM" }
368 Enable this option if this program is to be used as a ROM monitor,
369 i.e. applications will be loaded into RAM on the board, and this
370 ROM monitor may process exceptions or interrupts generated from the
371 application. This enables features such as utilizing a separate
372 interrupt stack when exceptions are generated."
375 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
376 display "Work with a ROM monitor"
378 legal_values { "Generic" "GDB_stubs" }
379 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
380 parent CYGPKG_HAL_ROM_MONITOR
381 requires { CYG_HAL_STARTUP == "RAM" }
383 Support can be enabled for different varieties of ROM monitor.
384 This support changes various eCos semantics such as the encoding
385 of diagnostic output, or the overriding of hardware interrupt
387 Firstly there is \"Generic\" support which prevents the HAL
388 from overriding the hardware vectors that it does not use, to
389 instead allow an installed ROM monitor to handle them. This is
390 the most basic support which is likely to be common to most
391 implementations of ROM monitor.
392 \"GDB_stubs\" provides support when GDB stubs are included in
393 the ROM monitor or boot ROM."
396 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
397 display "Redboot HAL options"
400 parent CYGPKG_REDBOOT
401 active_if CYGPKG_REDBOOT
403 This option lists the target's requirements for a valid Redboot
407 compile -library=libextras.a redboot_cmds.c
412 # cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
413 # display "Support booting Linux via RedBoot"
417 # This option enables RedBoot to support booting of a Linux kernel."
419 # compile -library=libextras.a redboot_linux_exec.c
425 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
426 display "Build Redboot ROM binary image"
427 active_if CYGBLD_BUILD_REDBOOT
430 description "This option enables the conversion of the Redboot ELF
431 image to a binary image suitable for ROM programming."
434 <PREFIX>/bin/std_stk1.bin : <PREFIX>/bin/redboot.elf
435 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
436 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
437 $(OBJCOPY) -O binary $< $@
438 #>>> Lothar_2002_08_05
439 $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
440 #<<< Lothar_2002_08_05
447 # the following causes cyclone specific tests to be built in.
448 # It might me nice/necessary to modify these for triton
449 # compile -library=libextras.a diag/diag.c diag/io_utils.c diag/external_timer.c \
450 # diag/i557_eep.c diag/interrupts.c \
451 # diag/xscale_test.c diag/flash.c diag/lubduart.c \
452 # diag/ether_test.c diag/memtest.c diag/test_menu.c \