]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/xscale/triton/v2_0/cdl/hal_arm_xscale_triton_stk1.cdl
RedBoot TX53 Release 2012-02-15
[karo-tx-redboot.git] / packages / hal / arm / xscale / triton / v2_0 / cdl / hal_arm_xscale_triton_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_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_STK1 HAL package provides the support needed to run
59         eCos on a Karo TRITON 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  --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 {"ROM"}
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         default_value   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             This option chooses which serial port will be used for diagnostic output."
145      }
146
147     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
148         display       "Diagnostic serial port baud rate"
149         flavor        data
150         legal_values  9600 19200 38400 57600 115200
151         default_value 38400
152         description   "
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."
156     }
157
158     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
159         display       "GDB serial port baud rate"
160         flavor        data
161         legal_values  9600 19200 38400 57600 115200
162         default_value 38400
163         description   "
164             This option selects the baud rate used for the GDB port."
165     }
166
167     # Real-time clock/counter specifics
168     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
169         display       "Real-time clock constants"
170         flavor        none
171     
172         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
173             display       "Real-time clock numerator"
174             flavor        data
175             calculated    1000000000
176         }
177         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
178             display       "Real-time clock denominator"
179             flavor        data
180             calculated    100
181         }
182         cdl_option CYGNUM_HAL_RTC_PERIOD {
183             display       "Real-time clock period"
184             flavor        data
185             calculated    330000        ;# External timer is 33MHz
186         }
187     }
188     
189     
190     
191     
192     cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
193         display       "Redboot for XScale options"
194         flavor        none
195         no_define
196         parent        CYGPKG_REDBOOT
197         active_if     CYGPKG_REDBOOT
198         description   "
199             This option lists the target's requirements for a valid Redboot
200             configuration."
201
202         # RedBoot details
203         # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
204         define_proc {
205             puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
206         }
207     }
208     
209     
210     
211
212     cdl_component CYGBLD_GLOBAL_OPTIONS {
213         display "Global build options"
214         flavor  none
215         description   "
216             Global build options including control over
217             compiler flags, linker flags and choice of toolchain."
218
219
220         parent  CYGPKG_NONE
221
222         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
223             display "Global command prefix"
224             flavor  data
225             no_define
226             default_value { "xscale-elf" }
227             description "
228                 This option specifies the command prefix used when
229                 invoking the build tools."
230         }
231
232         cdl_option CYGBLD_GLOBAL_CFLAGS {
233             display "Global compiler flags"
234             flavor  data
235             no_define
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" }
238             description   "
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."
242         }
243
244         cdl_option CYGBLD_GLOBAL_LDFLAGS {
245             display "Global linker flags"
246             flavor  data
247             no_define
248             default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
249             description   "
250                 This option controls the global linker flags. Individual
251                 packages may define options which override these global flags."
252         }
253
254         cdl_option CYGBLD_BUILD_GDB_STUBS {
255             display "Build GDB stub ROM image"
256             default_value 0
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
265             no_define
266             description "
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."
272
273             make -priority 320 {
274                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
275                 $(OBJCOPY) -O binary $< $@
276             }
277         }
278     }
279
280
281
282
283 #    cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
284 #       display       "Number of breakpoints supported by the HAL."
285 #        flavor        data
286 #        default_value 32
287 #        description   "
288 #            This option determines the number of breakpoints supported by the HAL."
289 #    }
290
291     cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON_OPTIONS {
292         display "XScale TRITON build options"
293         flavor  none
294         description   "
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."
298
299
300         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_ADD {
301             display "Additional compiler flags"
302             flavor  data
303             no_define
304             default_value { "" }
305             description   "
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."
309         }
310
311         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_CFLAGS_REMOVE {
312             display "Suppressed compiler flags"
313             flavor  data
314             no_define
315             default_value { "" }
316             description   "
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."
320         }
321
322         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON_TESTS {
323             display "XScale TRITON tests"
324             flavor  data
325             no_define
326             calculated { "" }
327             description   "
328                 This option specifies the set of tests for the XScale TRITON HAL."
329         }
330     }
331
332     cdl_component CYGHWR_MEMORY_LAYOUT {
333         display "Memory layout"
334         flavor data
335         no_define
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" }
339
340         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
341             display "Memory layout linker script fragment"
342             flavor data
343             no_define
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>" }
348         }
349
350         cdl_option CYGHWR_MEMORY_LAYOUT_H {
351             display "Memory layout header file"
352             flavor data
353             no_define
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>" }
358         }
359     }
360
361     cdl_option CYGSEM_HAL_ROM_MONITOR {
362         display       "Behave as a ROM monitor"
363         flavor        bool
364         default_value 1
365         parent        CYGPKG_HAL_ROM_MONITOR
366         requires      { CYG_HAL_STARTUP == "ROM" }
367         description   "
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."
373     }
374
375     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
376          display       "Work with a ROM monitor"
377          flavor        booldata
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" }
382          description   "
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
386              vectors.
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."
394      }
395
396     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
397         display       "Redboot HAL options"
398         flavor        none
399         no_define
400         parent        CYGPKG_REDBOOT
401         active_if     CYGPKG_REDBOOT
402         description   "
403             This option lists the target's requirements for a valid Redboot
404             configuration."
405  
406  
407              compile -library=libextras.a redboot_cmds.c
408            
409         
410         
411             
412 #        cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
413 #            display        "Support booting Linux via RedBoot"
414 #            flavor         bool
415 #            default_value  1
416 #            description    "
417 #               This option enables RedBoot to support booting of a Linux kernel."
418 #
419 #            compile -library=libextras.a redboot_linux_exec.c
420 #        }
421 #            
422             
423             
424     
425         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
426             display       "Build Redboot ROM binary image"
427             active_if     CYGBLD_BUILD_REDBOOT
428             default_value 1
429             no_define
430             description "This option enables the conversion of the Redboot ELF
431                          image to a binary image suitable for ROM programming."
432     
433             make -priority 325 {
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
441             }
442         }
443     }
444
445 }
446
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          \
453 #                               diag/irq.S