]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/xscale/triton270/v2_0/cdl/triton_pxa270_sk3_F16S64.cdl
RedBoot TX53 Release 2012-02-15
[karo-tx-redboot.git] / packages / hal / arm / xscale / triton270 / v2_0 / cdl / triton_pxa270_sk3_F16S64.cdl
1 # ====================================================================
2 #
3 #      triton_pxa270_sk3.cdl
4 #
5 #      KARO TRITON PXA270 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 (karo electronics)
44 # Original data:  usteinkohl
45 # Contributors:
46 # Date:           20th August 2004
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_XSCALE_TRITON270_SK3_16F64S {
52     display       "KARO TRITON270 SK3 64 MB SDRAM / 16 MB P30 Flash"
53     parent        CYGPKG_HAL_ARM
54     define_header hal_arm_xscale_triton270.h
55     include_dir   cyg/hal
56     hardware
57     description   "
58         The KARO TRITON270 HAL package provides the support needed to run
59         eCos on a TRITON270 SK3 with 16MB Flash and 64MB DRAM."
60
61     compile hal_diag.c triton270_misc.c  hal_initio.S
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_triton270.h>"
74         puts $::cdl_system_header "#define TRITON270_FLASH16_16_P30"
75         puts $::cdl_system_header "#define TRITON270_DRAM32_64"
76         puts $::cdl_system_header "#define DRAM_TEST32"        
77         puts $::cdl_system_header "#define TRITON270_CS2_8900"
78         puts $::cdl_system_header "#define TRITON270_USE_STUART"
79         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"XScale\""
80         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"TRITON PXA270 16 MByte P30 Flash 64 MByte SDRAM\""
81         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"Ka-RO electronics GmbH\""
82         puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK triton270_program_new_stack"
83         puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE  190"
84     }
85
86     cdl_component CYG_HAL_STARTUP {
87         display       "Startup type"
88         flavor        data
89         default_value {"RAM"}
90         legal_values  {"RAM" "ROM"}
91         no_define
92         define -file system.h CYG_HAL_STARTUP
93         description   "
94            When targetting the KARO TRITON270 eval board it is possible to build
95            the system for either RAM bootstrap or ROM bootstrap(s). Select
96            'ram' when building programs to load into RAM using onboard
97            debug software such as Angel or eCos GDB stubs.  Select 'rom'
98            when building a stand-alone application which will be put
99            into ROM.  Selection of 'stubs' is for the special case of
100            building the eCos GDB stubs themselves."
101     }
102
103     cdl_option CYGSEM_HAL_ARM__XSCALE_TRITON270_ARMBOOT {
104         display       "Coexist with ARM bootloader"
105         flavor        bool
106         default_value 0
107         description   "
108             Enable this option if the ARM bootloader is programmed into
109             the FLASH boot sector on the board."
110     }
111     
112     
113    
114     
115     
116
117     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
118         display      "Default console channel."
119         flavor       data
120         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
121         calculated   2
122     }
123  
124     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
125         display      "Number of communication channels on the board"
126         flavor       data
127         calculated   3
128     }
129  
130     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
131         display          "Debug serial port"
132         flavor data
133         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
134         default_value    2
135         description      "
136             This option chooses which port will be used to connect to a host
137             running GDB."
138      }
139  
140      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
141          display          "Diagnostic serial port"
142          flavor data
143          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
144          default_value    2
145          description      "
146             This option
147             chooses which port will be used for diagnostic output."
148      }
149
150     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
151         display       "Diagnostic serial port baud rate"
152         flavor        data
153         legal_values  9600 19200 38400 57600 115200
154         default_value 38400
155         description   "
156             This option selects the baud rate used for the diagnostic port.
157             Note: this should match the value chosen for the GDB port if the
158             diagnostic and GDB port are the same."
159     }
160
161     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
162         display       "GDB serial port baud rate"
163         flavor        data
164         legal_values  9600 19200 38400 57600 115200
165         default_value 38400
166         description   "
167             This option selects the baud rate used for the GDB port."
168     }
169
170     # Real-time clock/counter specifics
171     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
172         display       "Real-time clock constants"
173         flavor        none
174     
175         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
176             display       "Real-time clock numerator"
177             flavor        data
178             calculated    1000000000
179         }
180         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
181             display       "Real-time clock denominator"
182             flavor        data
183             calculated    100
184         }
185         cdl_option CYGNUM_HAL_RTC_PERIOD {
186             display       "Real-time clock period"
187             flavor        data
188             calculated    330000        ;# External timer is 33MHz
189         }
190     }
191     
192     
193     
194     
195     cdl_component CYGPKG_REDBOOT_XSCALE_OPTIONS {
196         display       "Redboot for XScale options"
197         flavor        none
198         no_define
199         parent        CYGPKG_REDBOOT
200         active_if     CYGPKG_REDBOOT
201         description   "
202             This option lists the target's requirements for a valid Redboot
203             configuration."
204
205         # RedBoot details
206         # requires { CYGHWR_REDBOOT_ARM_LINUX_EXEC_ADDRESS_DEFAULT == 0xA0008000 }
207         define_proc {
208             puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0xa0001f00"
209         }
210     }
211     
212     
213     
214
215     cdl_component CYGBLD_GLOBAL_OPTIONS {
216         display "Global build options"
217         flavor  none
218         description   "
219             Global build options including control over
220             compiler flags, linker flags and choice of toolchain."
221
222
223         parent  CYGPKG_NONE
224
225         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
226             display "Global command prefix"
227             flavor  data
228             no_define
229             default_value { "xscale-elf" }
230             description "
231                 This option specifies the command prefix used when
232                 invoking the build tools."
233         }
234
235         cdl_option CYGBLD_GLOBAL_CFLAGS {
236             display "Global compiler flags"
237             flavor  data
238             no_define
239             default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -O2 -ffunction-sections -fdata-sections -fno-builtin -fno-exceptions -finit-priority -mapcs-frame" }
240 #            default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
241             description   "
242                 This option controls the global compiler flags which are used to
243                 compile all packages by default. Individual packages may define
244                 options which override these global flags."
245         }
246
247         cdl_option CYGBLD_GLOBAL_LDFLAGS {
248             display "Global linker flags"
249             flavor  data
250             no_define
251             default_value { "-Wl,--gc-sections -Wl,-static -O2 -nostdlib" }
252             description   "
253                 This option controls the global linker flags. Individual
254                 packages may define options which override these global flags."
255         }
256
257         cdl_option CYGBLD_BUILD_GDB_STUBS {
258             display "Build GDB stub ROM image"
259             default_value 0
260             requires { CYG_HAL_STARTUP == "ROM" }
261             requires CYGSEM_HAL_ROM_MONITOR
262             requires CYGBLD_BUILD_COMMON_GDB_STUBS
263             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
264             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
265             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
266             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
267             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
268             no_define
269             description "
270                 This option enables the building of the GDB stubs for the
271                 board. The common HAL controls takes care of most of the
272                 build process, but the final conversion from ELF image to
273                 binary data is handled by the platform CDL, allowing
274                 relocation of the data if necessary."
275
276             make -priority 320 {
277                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
278                 $(OBJCOPY) -O binary $< $@
279             }
280         }
281     }
282
283
284
285
286 #    cdl_option CYGNUM_HAL_BREAKPOINT_LIST_SIZE {
287 #       display       "Number of breakpoints supported by the HAL."
288 #        flavor        data
289 #        default_value 32
290 #        description   "
291 #            This option determines the number of breakpoints supported by the HAL."
292 #    }
293
294     cdl_component CYGPKG_HAL_ARM_XSCALE_TRITON270_OPTIONS {
295         display "XScale TRITON270 build options"
296         flavor  none
297         description   "
298             Package specific build options including control over
299             compiler flags used only in building this package,
300             and details of which tests are built."
301
302
303         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_CFLAGS_ADD {
304             display "Additional compiler flags"
305             flavor  data
306             no_define
307             default_value { "" }
308             description   "
309                 This option modifies the set of compiler flags for
310                 building the XScale TRITON270 HAL. These flags are used
311                 in addition to the set of global flags."
312         }
313
314         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_CFLAGS_REMOVE {
315             display "Suppressed compiler flags"
316             flavor  data
317             no_define
318             default_value { "" }
319             description   "
320                 This option modifies the set of compiler flags for
321                 building the XScale TRITON270 HAL. These flags are
322                 removed from the set of global flags if present."
323         }
324
325         cdl_option CYGPKG_HAL_ARM_XSCALE_TRITON270_TESTS {
326             display "XScale TRITON270 tests"
327             flavor  data
328             no_define
329             calculated { "" }
330             description   "
331                 This option specifies the set of tests for the XScale TRITON270 HAL."
332         }
333     }
334
335     cdl_component CYGHWR_MEMORY_LAYOUT {
336         display "Memory layout"
337         flavor data
338         no_define
339         calculated { CYG_HAL_STARTUP == "RAM" ?       "arm_xscale_triton270_ram_16f64s" : \
340                      CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "arm_xscale_triton270_roma" : \
341                                                       "arm_xscale_triton270_rom_16f64s" }
342
343         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
344             display "Memory layout linker script fragment"
345             flavor data
346             no_define
347             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
348             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton270_ram_16f64s.ldi>" : \
349                          CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton270_roma.ldi>" : \
350                                                     "<pkgconf/mlt_arm_xscale_triton270_rom_16f64s.ldi>" }
351         }
352
353         cdl_option CYGHWR_MEMORY_LAYOUT_H {
354             display "Memory layout header file"
355             flavor data
356             no_define
357             define -file system.h CYGHWR_MEMORY_LAYOUT_H
358             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_xscale_triton270_ram_16f64s.h>" : \
359                          CYGSEM_HAL_ARM_XSCALE_TRITON270_ARMBOOT ? "<pkgconf/mlt_arm_xscale_triton270_roma.h>" : \
360                                                     "<pkgconf/mlt_arm_xscale_triton270_rom_16f64s.h>" }
361         }
362     }
363
364     cdl_option CYGSEM_HAL_ROM_MONITOR {
365         display       "Behave as a ROM monitor"
366         flavor        bool
367         default_value 1
368         parent        CYGPKG_HAL_ROM_MONITOR
369         requires      { CYG_HAL_STARTUP == "ROM" }
370         description   "
371             Enable this option if this program is to be used as a ROM monitor,
372             i.e. applications will be loaded into RAM on the board, and this
373             ROM monitor may process exceptions or interrupts generated from the
374             application. This enables features such as utilizing a separate
375             interrupt stack when exceptions are generated."
376     }
377
378     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
379          display       "Work with a ROM monitor"
380          flavor        booldata
381          legal_values  { "Generic" "GDB_stubs" }
382          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
383          parent        CYGPKG_HAL_ROM_MONITOR
384          requires      { CYG_HAL_STARTUP == "RAM" }
385          description   "
386              Support can be enabled for different varieties of ROM monitor.
387              This support changes various eCos semantics such as the encoding
388              of diagnostic output, or the overriding of hardware interrupt
389              vectors.
390              Firstly there is \"Generic\" support which prevents the HAL
391              from overriding the hardware vectors that it does not use, to
392              instead allow an installed ROM monitor to handle them. This is
393              the most basic support which is likely to be common to most
394              implementations of ROM monitor.
395              \"GDB_stubs\" provides support when GDB stubs are included in
396              the ROM monitor or boot ROM."
397      }
398
399     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
400         display       "Redboot HAL options"
401         flavor        none
402         no_define
403         parent        CYGPKG_REDBOOT
404         active_if     CYGPKG_REDBOOT
405         description   "
406             This option lists the target's requirements for a valid Redboot
407             configuration."
408  
409  
410              compile -library=libextras.a redboot_cmds.c
411 #             compile -library=libextras.a sdcard.c
412        
413         
414         
415             
416 #        cdl_option CYGSEM_REDBOOT_LINUX_BOOT {
417 #            display        "Support booting Linux via RedBoot"
418 #            flavor         bool
419 #            default_value  1
420 #            description    "
421 #               This option enables RedBoot to support booting of a Linux kernel."
422 #
423 #            compile -library=libextras.a redboot_linux_exec.c
424 #        }
425 #            
426             
427             
428     
429         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
430             display       "Build Redboot ROM binary image"
431             active_if     CYGBLD_BUILD_REDBOOT
432             default_value 1
433             no_define
434             description "This option enables the conversion of the Redboot ELF
435                          image to a binary image suitable for ROM programming."
436     
437             make -priority 325 {
438                 <PREFIX>/bin/t27_3052.bin : <PREFIX>/bin/redboot.elf
439                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
440                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
441                 $(OBJCOPY) -O binary $< $@
442 #>>> Lothar_2002_08_05
443                 $(COMMAND_PREFIX)nm $< | awk 'NF == 3 {print}' | sort > $(<:.elf=.map)
444 #<<< Lothar_2002_08_05
445             }
446         }
447     }
448
449 }
450
451
452