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