]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/xscale/triton/v2_0/cdl/hal_arm_xscale_tritetn_stk2.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / xscale / triton / v2_0 / cdl / hal_arm_xscale_tritetn_stk2.cdl
1 # ====================================================================
2 #
3 #      hal_arm_xscale_tritetn_stk2.cdl
4 #
5 #      Ka-Ro TRITON architectural HAL package configuration data
6 #
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.
12 ##
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.
16 ##
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
20 ## for more details.
21 ##
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.
25 ##
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.
32 ##
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.
35 ##
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####
42 #
43 # Author(s):      usteinkohl
44 # Original data:  usteinkohl
45 # Contributors:
46 # Date:           2003-03-10
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_XSCALE_TRITON_ETN_STK2 {
52     display       "Karo Triton XScale evaluation boards"
53     parent        CYGPKG_HAL_ARM
54     define_header hal_arm_xscale_triton.h
55     include_dir   cyg/hal
56     hardware
57     description   "
58         The TRITON_ETN_STK2 HAL package provides the support needed to run
59         eCos on a Karo TRITON ETN board located on a Starter Kit II."
60
61     compile hal_diag.c triton_misc.c
62
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
69
70
71     define_proc {
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_CS2_SMSC"
77         puts $::cdl_system_header "#define TRITON_STK 2"
78                 puts $::cdl_header "#define HAL_PLATFORM_CPU    \"XScale\""
79         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"TRITON ETN --STK2-- \""
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"
83     }
84
85     cdl_component CYG_HAL_STARTUP {
86         display       "Startup type"
87         flavor        data
88         default_value {"RAM"}
89         legal_values  {"RAM" "ROM"}
90         no_define
91         define -file system.h CYG_HAL_STARTUP
92         description   "
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."
100     }
101
102     cdl_option CYGSEM_HAL_ARM__XSCALE_TRITON_ARMBOOT {
103         display       "Coexist with ARM bootloader"
104         flavor        bool
105         default_value 0
106         description   "
107             Enable this option if the ARM bootloader is programmed into
108             the FLASH boot sector on the board."
109     }
110     
111     
112    
113     
114     
115
116     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
117         display      "Default console channel."
118         flavor       data
119         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
120         calculated   0
121     }
122  
123     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
124         display      "Number of communication channels on the board"
125         flavor       data
126         calculated   1
127     }
128  
129     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
130         display          "Debug serial port"
131         flavor data
132         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
133         default_value    0
134         description      "
135             This option chooses which port will be used to connect to a host
136             running GDB."
137      }
138  
139      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
140          display          "Diagnostic serial port"
141          flavor data
142          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
143          default_value    0
144          description      "
145             The TRITON board has only one serial port.  This option
146             chooses which port will be used for diagnostic output."
147      }
148
149     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
150         display       "Diagnostic serial port baud rate"
151         flavor        data
152         legal_values  9600 19200 38400 57600 115200
153         default_value 38400
154         description   "
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."
158     }
159
160     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
161         display       "GDB serial port baud rate"
162         flavor        data
163         legal_values  9600 19200 38400 57600 115200
164         default_value 38400
165         description   "
166             This option selects the baud rate used for the GDB port."
167     }
168
169     # Real-time clock/counter specifics
170     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
171         display       "Real-time clock constants"
172         flavor        none
173     
174         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
175             display       "Real-time clock numerator"
176             flavor        data
177             calculated    1000000000
178         }
179         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
180             display       "Real-time clock denominator"
181             flavor        data
182             calculated    100
183         }
184         cdl_option CYGNUM_HAL_RTC_PERIOD {
185             display       "Real-time clock period"
186             flavor        data
187             calculated    330000        ;# External timer is 33MHz
188         }
189     }
190     
191     
192     
193     
194     cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
195         display       "Redboot for XScale options"
196         flavor        none
197         no_define
198         parent        CYGPKG_REDBOOT
199         active_if     CYGPKG_REDBOOT
200         description   "
201             This option lists the target's requirements for a valid Redboot
202             configuration."
203
204         # RedBoot details
205         # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
206         define_proc {
207             puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
208         }
209     }
210     
211     
212     
213
214     cdl_component CYGBLD_GLOBAL_OPTIONS {
215         display "Global build options"
216         flavor  none
217         description   "
218             Global build options including control over
219             compiler flags, linker flags and choice of toolchain."
220
221
222         parent  CYGPKG_NONE
223
224         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
225             display "Global command prefix"
226             flavor  data
227             no_define
228             default_value { "xscale-elf" }
229             description "
230                 This option specifies the command prefix used when
231                 invoking the build tools."
232         }
233
234         cdl_option CYGBLD_GLOBAL_CFLAGS {
235             display "Global compiler flags"
236             flavor  data
237             no_define
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" }
240             description   "
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."
244         }
245
246         cdl_option CYGBLD_GLOBAL_LDFLAGS {
247             display "Global linker flags"
248             flavor  data
249             no_define
250             default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
251             description   "
252                 This option controls the global linker flags. Individual
253                 packages may define options which override these global flags."
254         }
255
256         cdl_option CYGBLD_BUILD_GDB_STUBS {
257             display "Build GDB stub ROM image"
258             default_value 0
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
267             no_define
268             description "
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."
274
275             make -priority 320 {
276                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
277                 $(OBJCOPY) -O binary $< $@
278             }
279         }
280     }
281
282
283
284
285 #    cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
286 #       display       "Number of breakpoints supported by the HAL."
287 #        flavor        data
288 #        default_value 32
289 #        description   "
290 #            This option determines the number of breakpoints supported by the HAL."
291 #    }
292
293     cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON_OPTIONS {
294         display "XScale TRITON build options"
295         flavor  none
296         description   "
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."
300
301
302         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_ADD {
303             display "Additional compiler flags"
304             flavor  data
305             no_define
306             default_value { "" }
307             description   "
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."
311         }
312
313         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_REMOVE {
314             display "Suppressed compiler flags"
315             flavor  data
316             no_define
317             default_value { "" }
318             description   "
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."
322         }
323
324         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_TESTS {
325             display "XScale TRITON tests"
326             flavor  data
327             no_define
328             calculated { "" }
329             description   "
330                 This option specifies the set of tests for the XScale TRITON HAL."
331         }
332     }
333
334     cdl_component CYGHWR_MEMORY_LAYOUT {
335         display "Memory layout"
336         flavor data
337         no_define
338         calculated { CYG_HAL_STARTUP == "RAM" ?       "arm_xscale_triton_ram" : \
339                      CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "arm_xscale_triton_roma" : \
340                                                       "arm_xscale_triton_rom" }
341
342         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
343             display "Memory layout linker script fragment"
344             flavor data
345             no_define
346             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
347             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_stk_ram.ldi>" : \
348                          CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_stk_roma.ldi>" : \
349                                                     "<pkgconf/mlt_arm_xscale_triton_stk_rom.ldi>" }
350         }
351
352         cdl_option CYGHWR_MEMORY_LAYOUT_H {
353             display "Memory layout header file"
354             flavor data
355             no_define
356             define -file system.h CYGHWR_MEMORY_LAYOUT_H
357             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton_stk_ram.h>" : \
358                          CYGSEM_HAL_ARM_XSCALE_TRITON_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton_stk_roma.h>" : \
359                                                     "<pkgconf/mlt_arm_xscale_triton_stk_rom.h>" }
360         }
361     }
362
363     cdl_option CYGSEM_HAL_ROM_MONITOR {
364         display       "Behave as a ROM monitor"
365         flavor        bool
366         default_value 1
367         parent        CYGPKG_HAL_ROM_MONITOR
368         requires      { CYG_HAL_STARTUP == "ROM" }
369         description   "
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."
375     }
376
377     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
378          display       "Work with a ROM monitor"
379          flavor        booldata
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" }
384          description   "
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
388              vectors.
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."
396      }
397
398     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
399         display       "Redboot HAL options"
400         flavor        none
401         no_define
402         parent        CYGPKG_REDBOOT
403         active_if     CYGPKG_REDBOOT
404         description   "
405             This option lists the target's requirements for a valid Redboot
406             configuration."
407  
408  
409              compile -library=libextras.a redboot_cmds.c
410            
411         
412         
413             
414 #        cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
415 #            display        "Support booting Linux via RedBoot"
416 #            flavor         bool
417 #            default_value  1
418 #            description    "
419 #               This option enables RedBoot to support booting of a Linux kernel."
420 #
421 #            compile -library=libextras.a redboot_linux_exec.c
422 #        }
423 #            
424             
425             
426     
427         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
428             display       "Build Redboot ROM binary image"
429             active_if     CYGBLD_BUILD_REDBOOT
430             default_value 1
431             no_define
432             description "This option enables the conversion of the Redboot ELF
433                          image to a binary image suitable for ROM programming."
434     
435             make -priority 325 {
436                 <PREFIX>/bin/etn_stk2.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
443             }
444         }
445     }
446
447 }
448
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          \
455 #                               diag/irq.S