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