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_ETN_STK1 {
52 display "Karo Triton XScale evaluation boards"
54 define_header hal_arm_xscale_triton.h
58 The TRITON_ETN_STK1 HAL package provides the support needed to run
59 eCos on a Karo TRITON ETN 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 ETN --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 The TRITON board has only one serial port. This option
145 chooses which port will be used for diagnostic output."
148 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
149 display "Diagnostic serial port baud rate"
151 legal_values 9600 19200 38400 57600 115200
154 This option selects the baud rate used for the diagnostic port.
155 Note: this should match the value chosen for the GDB port if the
156 diagnostic and GDB port are the same."
159 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
160 display "GDB serial port baud rate"
162 legal_values 9600 19200 38400 57600 115200
165 This option selects the baud rate used for the GDB port."
168 # Real-time clock/counter specifics
169 cdl_component CYGNUM_HAL_RTC_CONSTANTS {
170 display "Real-time clock constants"
173 cdl_option CYGNUM_HAL_RTC_NUMERATOR {
174 display "Real-time clock numerator"
176 calculated 1000000000
178 cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
179 display "Real-time clock denominator"
183 cdl_option CYGNUM_HAL_RTC_PERIOD {
184 display "Real-time clock period"
186 calculated 330000 ;# External timer is 33MHz
193 cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
194 display "Redboot for XScale options"
197 parent CYGPKG_REDBOOT
198 active_if CYGPKG_REDBOOT
200 This option lists the target's requirements for a valid Redboot
204 # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
206 puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
213 cdl_component CYGBLD_GLOBAL_OPTIONS {
214 display "Global build options"
217 Global build options including control over
218 compiler flags, linker flags and choice of toolchain."
223 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
224 display "Global command prefix"
227 default_value { "xscale-elf" }
229 This option specifies the command prefix used when
230 invoking the build tools."
233 cdl_option CYGBLD_GLOBAL_CFLAGS {
234 display "Global compiler flags"
237 default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-builtin -fno-exceptions -finit-priority -mapcs-frame" }
238 # default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
240 This option controls the global compiler flags which are used to
241 compile all packages by default. Individual packages may define
242 options which override these global flags."
245 cdl_option CYGBLD_GLOBAL_LDFLAGS {
246 display "Global linker flags"
249 default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
251 This option controls the global linker flags. Individual
252 packages may define options which override these global flags."
255 cdl_option CYGBLD_BUILD_GDB_STUBS {
256 display "Build GDB stub ROM image"
258 requires { CYG_HAL_STARTUP == "ROM" }
259 requires CYGSEM_HAL_ROM_MONITOR
260 requires CYGBLD_BUILD_COMMON_GDB_STUBS
261 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
262 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
263 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
264 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
265 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
268 This option enables the building of the GDB stubs for the
269 board. The common HAL controls takes care of most of the
270 build process, but the final conversion from ELF image to
271 binary data is handled by the platform CDL, allowing
272 relocation of the data if necessary."
275 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
276 $(OBJCOPY) -O binary $< $@
284 # cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
285 # display "Number of breakpoints supported by the HAL."
289 # This option determines the number of breakpoints supported by the HAL."
292 cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON_OPTIONS {
293 display "XScale TRITON build options"
296 Package specific build options including control over
297 compiler flags used only in building this package,
298 and details of which tests are built."
301 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_ADD {
302 display "Additional compiler flags"
307 This option modifies the set of compiler flags for
308 building the XScale TRITON HAL. These flags are used
309 in addition to the set of global flags."
312 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_REMOVE {
313 display "Suppressed compiler flags"
318 This option modifies the set of compiler flags for
319 building the XScale TRITON HAL. These flags are
320 removed from the set of global flags if present."
323 cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_TESTS {
324 display "XScale TRITON tests"
329 This option specifies the set of tests for the XScale TRITON HAL."
333 cdl_component CYGHWR_MEMORY_LAYOUT {
334 display "Memory layout"
337 calculated { CYG_HAL_STARTUP == "RAM" ? "arm_xscale_triton_ram" : \
338 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "arm_xscale_triton_roma" : \
339 "arm_xscale_triton_rom" }
341 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
342 display "Memory layout linker script fragment"
345 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
346 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_stk_ram.ldi>" : \
347 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_stk_roma.ldi>" : \
348 "<pkgconf/mlt_arm_xscale_triton_stk_rom.ldi>" }
351 cdl_option CYGHWR_MEMORY_LAYOUT_H {
352 display "Memory layout header file"
355 define -file system.h CYGHWR_MEMORY_LAYOUT_H
356 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_stk_ram.h>" : \
357 CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_stk_roma.h>" : \
358 "<pkgconf/mlt_arm_xscale_triton_stk_rom.h>" }
362 cdl_option CYGSEM_HAL_ROM_MONITOR {
363 display "Behave as a ROM monitor"
366 parent CYGPKG_HAL_ROM_MONITOR
367 requires { CYG_HAL_STARTUP == "ROM" }
369 Enable this option if this program is to be used as a ROM monitor,
370 i.e. applications will be loaded into RAM on the board, and this
371 ROM monitor may process exceptions or interrupts generated from the
372 application. This enables features such as utilizing a separate
373 interrupt stack when exceptions are generated."
376 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
377 display "Work with a ROM monitor"
379 legal_values { "Generic" "GDB_stubs" }
380 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
381 parent CYGPKG_HAL_ROM_MONITOR
382 requires { CYG_HAL_STARTUP == "RAM" }
384 Support can be enabled for different varieties of ROM monitor.
385 This support changes various eCos semantics such as the encoding
386 of diagnostic output, or the overriding of hardware interrupt
388 Firstly there is \"Generic\" support which prevents the HAL
389 from overriding the hardware vectors that it does not use, to
390 instead allow an installed ROM monitor to handle them. This is
391 the most basic support which is likely to be common to most
392 implementations of ROM monitor.
393 \"GDB_stubs\" provides support when GDB stubs are included in
394 the ROM monitor or boot ROM."
397 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
398 display "Redboot HAL options"
401 parent CYGPKG_REDBOOT
402 active_if CYGPKG_REDBOOT
404 This option lists the target's requirements for a valid Redboot
408 compile -library=libextras.a redboot_cmds.c
413 # cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
414 # display "Support booting Linux via RedBoot"
418 # This option enables RedBoot to support booting of a Linux kernel."
420 # compile -library=libextras.a redboot_linux_exec.c
426 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
427 display "Build Redboot ROM binary image"
428 active_if CYGBLD_BUILD_REDBOOT
431 description "This option enables the conversion of the Redboot ELF
432 image to a binary image suitable for ROM programming."
435 <PREFIX>/bin/triton_etn_stk1.bin : <PREFIX>/bin/redboot.elf
436 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
437 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
438 $(OBJCOPY) -O binary $< $@
439 #>>> Lothar_2002_08_05
440 $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
441 #<<< Lothar_2002_08_05
448 # the following causes cyclone specific tests to be built in.
449 # It might me nice/necessary to modify these for triton
450 # compile -library=libextras.a diag/diag.c diag/io_utils.c diag/external_timer.c \
451 # diag/i557_eep.c diag/interrupts.c \
452 # diag/xscale_test.c diag/flash.c diag/lubduart.c \
453 # diag/ether_test.c diag/memtest.c diag/test_menu.c \