1 # ====================================================================
3 # hal_arm_xscale_triteco_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_ECO_STK1 {
52 display "Karo Triton XScale evaluation boards"
54 define_header hal_arm_xscale_triton.h
58 The TRITON_ECO_STK1 HAL package provides the support needed to run
59 eCos on a Karo TRITON ECO 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_FLASH16_16"
75 puts $::cdl_system_header "#define TRITON_DRAM16_16_MOBILE"
76 puts $::cdl_system_header "#define TRITON_STK 1"
77 puts $::cdl_system_header "#define TRITON_CS2_8900"
78 puts $::cdl_header "#define HAL_PLATFORM_CPU \"XScale\""
79 puts $::cdl_header "#define HAL_PLATFORM_BOARD \"TRITON ECO --STK1-- \""
80 puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"developed and produced by Ka-Ro electronics GmbH, Germany\""
81 puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK triton_program_new_stack"
82 puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE 190"
85 cdl_component CYG_HAL_STARTUP {
86 display "Startup type"
89 legal_values {"RAM" "ROM"}
91 define -file system.h CYG_HAL_STARTUP
93 When targetting the KARO TRITON eval board it is possible to build
94 the system for either RAM bootstrap or ROM bootstrap(s). Select
95 'ram' when building programs to load into RAM using onboard
96 debug software such as Angel or eCos GDB stubs. Select 'rom'
97 when building a stand-alone application which will be put
98 into ROM. Selection of 'stubs' is for the special case of
99 building the eCos GDB stubs themselves."
102 cdl_option CYGSEM_HAL_ARM__XSCALE_TRITON_ARMBOOT {
103 display "Coexist with ARM bootloader"
107 Enable this option if the ARM bootloader is programmed into
108 the FLASH boot sector on the board."
116 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
117 display "Default console channel."
119 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
123 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
124 display "Number of communication channels on the board"
129 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
130 display "Debug serial port"
132 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
135 This option chooses which port will be used to connect to a host
139 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
140 display "Diagnostic serial port"
142 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
145 The TRITON board has only one serial port. This option
146 chooses which port will be used for diagnostic output."
149 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
150 display "Diagnostic serial port baud rate"
152 legal_values 9600 19200 38400 57600 115200
155 This option selects the baud rate used for the diagnostic port.
156 Note: this should match the value chosen for the GDB port if the
157 diagnostic and GDB port are the same."
160 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
161 display "GDB serial port baud rate"
163 legal_values 9600 19200 38400 57600 115200
166 This option selects the baud rate used for the GDB port."
169 # Real-time clock/counter specifics
170 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
171 display "Real-time clock constants"
174 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
175 display "Real-time clock numerator"
177 calculated 1000000000
179 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
180 display "Real-time clock denominator"
184 cdl_option CYGNUM_HAL_RTC_PERIOD {
185 display "Real-time clock period"
187 calculated 330000 ;# External timer is 33MHz
194 cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
195 display "Redboot for XScale options"
198 parent CYGPKG_REDBOOT
199 active_if CYGPKG_REDBOOT
201 This option lists the target's requirements for a valid Redboot
205 # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
207 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
214 cdl_component CYGBLD_GLOBAL_OPTIONS {
215 display "Global build options"
218 Global build options including control over
219 compiler flags, linker flags and choice of toolchain."
224 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
225 display "Global command prefix"
228 default_value { "xscale-elf" }
230 This option specifies the command prefix used when
231 invoking the build tools."
234 cdl_option CYGBLD_GLOBAL_CFLAGS {
235 display "Global compiler flags"
238 default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-builtin -fno-exceptions -finit-priority -mapcs-frame" }
239 # default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
241 This option controls the global compiler flags which are used to
242 compile all packages by default. Individual packages may define
243 options which override these global flags."
246 cdl_option CYGBLD_GLOBAL_LDFLAGS {
247 display "Global linker flags"
250 default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
252 This option controls the global linker flags. Individual
253 packages may define options which override these global flags."
256 cdl_option CYGBLD_BUILD_GDB_STUBS {
257 display "Build GDB stub ROM image"
259 requires { CYG_HAL_STARTUP == "ROM" }
260 requires CYGSEM_HAL_ROM_MONITOR
261 requires CYGBLD_BUILD_COMMON_GDB_STUBS
262 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
263 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
264 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
265 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
266 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
269 This option enables the building of the GDB stubs for the
270 board. The common HAL controls takes care of most of the
271 build process, but the final conversion from ELF image to
272 binary data is handled by the platform CDL, allowing
273 relocation of the data if necessary."
276 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
277 $(OBJCOPY) -O binary $< $@
285 # cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
286 # display "Number of breakpoints supported by the HAL."
290 # This option determines the number of breakpoints supported by the HAL."
293 cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON_OPTIONS {
294 display "XScale TRITON build options"
297 Package specific build options including control over
298 compiler flags used only in building this package,
299 and details of which tests are built."
302 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_ADD {
303 display "Additional compiler flags"
308 This option modifies the set of compiler flags for
309 building the XScale TRITON HAL. These flags are used
310 in addition to the set of global flags."
313 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_REMOVE {
314 display "Suppressed compiler flags"
319 This option modifies the set of compiler flags for
320 building the XScale TRITON HAL. These flags are
321 removed from the set of global flags if present."
324 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_TESTS {
325 display "XScale TRITON tests"
330 This option specifies the set of tests for the XScale TRITON HAL."
334 cdl_component CYGHWR_MEMORY_LAYOUT {
335 display "Memory layout"
338 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_triton_lp_ram" : \
339 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "arm_xscale_triton_lp_roma" : \
340 "arm_xscale_triton_lp_rom" }
342 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
343 display "Memory layout linker script fragment"
346 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
347 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_lp_ram.ldi>" : \
348 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_lp_roma.ldi>" : \
349 "<pkgconf/mlt_arm_xscale_triton_lp_rom.ldi>" }
352 cdl_option CYGHWR_MEMORY_LAYOUT_H {
353 display "Memory layout header file"
356 define -file system.h CYGHWR_MEMORY_LAYOUT_H
357 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_lp_ram.h>" : \
358 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_lp_roma.h>" : \
359 "<pkgconf/mlt_arm_xscale_triton_lp_rom.h>" }
363 cdl_option CYGSEM_HAL_ROM_MONITOR {
364 display "Behave as a ROM monitor"
367 parent CYGPKG_HAL_ROM_MONITOR
368 requires { CYG_HAL_STARTUP == "ROM" }
370 Enable this option if this program is to be used as a ROM monitor,
371 i.e. applications will be loaded into RAM on the board, and this
372 ROM monitor may process exceptions or interrupts generated from the
373 application. This enables features such as utilizing a separate
374 interrupt stack when exceptions are generated."
377 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
378 display "Work with a ROM monitor"
380 legal_values { "Generic" "GDB_stubs" }
381 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
382 parent CYGPKG_HAL_ROM_MONITOR
383 requires { CYG_HAL_STARTUP == "RAM" }
385 Support can be enabled for different varieties of ROM monitor.
386 This support changes various eCos semantics such as the encoding
387 of diagnostic output, or the overriding of hardware interrupt
389 Firstly there is \"Generic\" support which prevents the HAL
390 from overriding the hardware vectors that it does not use, to
391 instead allow an installed ROM monitor to handle them. This is
392 the most basic support which is likely to be common to most
393 implementations of ROM monitor.
394 \"GDB_stubs\" provides support when GDB stubs are included in
395 the ROM monitor or boot ROM."
398 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
399 display "Redboot HAL options"
402 parent CYGPKG_REDBOOT
403 active_if CYGPKG_REDBOOT
405 This option lists the target's requirements for a valid Redboot
409 compile -library=libextras.a redboot_cmds.c
414 # cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
415 # display "Support booting Linux via RedBoot"
419 # This option enables RedBoot to support booting of a Linux kernel."
421 # compile -library=libextras.a redboot_linux_exec.c
427 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
428 display "Build Redboot ROM binary image"
429 active_if CYGBLD_BUILD_REDBOOT
432 description "This option enables the conversion of the Redboot ELF
433 image to a binary image suitable for ROM programming."
436 <PREFIX>/bin/eco_stk1.bin : <PREFIX>/bin/redboot.elf
437 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
438 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
439 $(OBJCOPY) -O binary $< $@
440 #>>> Lothar_2002_08_05
441 $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
442 #<<< Lothar_2002_08_05
449 # the following causes cyclone specific tests to be built in.
450 # It might me nice/necessary to modify these for triton
451 # compile -library=libextras.a diag/diag.c diag/io_utils.c diag/external_timer.c \
452 # diag/i557_eep.c diag/interrupts.c \
453 # diag/xscale_test.c diag/flash.c diag/lubduart.c \
454 # diag/ether_test.c diag/memtest.c diag/test_menu.c \