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