]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/ebsa285/v2_0/cdl/hal_arm_ebsa285.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / ebsa285 / v2_0 / cdl / hal_arm_ebsa285.cdl
1 # ====================================================================
2 #
3 #      hal_arm_ebsa285.cdl
4 #
5 #      Intel SA110/285 (EBSA285) 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):      jskov
44 # Original data:  hmt
45 # Contributors:
46 # Date:           1999-08-12
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_EBSA285 {
52     display       "Intel EBSA285 StrongARM evaluation boards"
53     parent        CYGPKG_HAL_ARM
54     define_header hal_arm_ebsa285.h
55     include_dir   cyg/hal
56     hardware
57     description   "
58         The EBSA285 HAL package provides the support needed to run
59         eCos on a Intel EBSA285 StrongARM eval board."
60
61     compile hal_diag.c ebsa285_misc.c mem285.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_MEM_REAL_REGION_TOP
67     implements    CYGINT_HAL_ARM_ARCH_STRONGARM
68
69     define_proc {
70         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
71         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_ebsa285.h>"
72         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"StrongARM 110\""
73         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"EBSA-285\""
74         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
75         puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK ebsa285_program_new_stack"
76
77         puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 1000000"
78     }
79
80     cdl_component CYG_HAL_STARTUP {
81         display       "Startup type"
82         flavor        data
83         default_value {"RAM"}
84         legal_values  {"RAM" "ROM" "ROMRAM"}
85         no_define
86         define -file system.h CYG_HAL_STARTUP
87         description   "
88            When targetting the EBSA285 eval board it is possible to build
89            the system for either RAM bootstrap or ROM bootstrap(s). Select
90            'ram' when building programs to load into RAM using onboard
91            debug software such as Angel or eCos GDB stubs.  Select 'rom'
92            when building a stand-alone application which will be put
93            into ROM. Using ROMRAM will allow the program to exist in
94            ROM, but be copied to RAM during startup."
95     }
96
97    cdl_option CYGHWR_HAL_ARM_EBSA285_PCI_MEM_MAP_BASE {
98        display            "Base of memory accessible via PCI space"
99        flavor             data
100        legal_values       {     0x200000 0x300000 0x400000 0x500000
101                                 0x600000 0x700000 0x800000 0x900000
102                                 0xa00000 0xb00000 0xc00000 0xd00000
103                                 0xe00000 0xf00000
104                           }
105        default_value      0x00f00000
106        active_if          CYGPKG_IO_PCI
107        description "
108            This option determines the base of the EBSA memory which
109            can be accessed via the PCI bus. The default is to allow
110            access to the upper 1MB of a 16MB system. 
111            NB: We advise *against* changing this option.
112            The value MUST match the base address of the section
113            'pci_window' in the Memory Layout Tool else this memory area
114            will be consumed by the malloc heap.
115            This error condition can only be detected at runtime in
116            current versions of the configuration tools.
117            CLI users can edit include/pkgconf/mlt_arm_ebsa285_*.h
118            and include/pkgconf/mlt_arm_ebsa285_*.ldi to achieve the
119            same effects as moving that region in the MLT."
120    }
121
122    cdl_option CYGHWR_HAL_ARM_EBSA285_PCI_MEM_MAP_SIZE {
123        display            "Size of memory accessible via PCI space"
124        flavor             data
125        legal_values       {     0x100000 0x200000 0x300000 0x400000
126                                 0x500000 0x600000 0x700000 0x800000
127                           }
128        default_value      0x00100000
129        active_if          CYGPKG_IO_PCI
130        description "
131            This option determines the size of the EBSA memory which
132            can be accessed via the PCI bus. The default is to allow
133            access to the upper 1MB of a 16MB system.
134            NB: We advise *against* changing this option.
135            The value MUST match the size of the section 'pci_window' in the
136            Memory Layout Tool else this memory area will be consumed by the
137            malloc heap.
138            Further caveats in the PCI base option."
139    }
140
141     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
142         display      "Default console channel."
143         flavor       data
144         calculated   0
145     }
146
147     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
148         display      "Number of communication channels on the board"
149         flavor       data
150         calculated   1
151     }
152  
153     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
154         display          "Debug serial port"
155         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
156         flavor data
157         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
158         default_value    0
159         description      "
160             The EBSA285 board has only one serial port. This option
161             chooses which port will be used to connect to a host
162             running GDB."
163      }
164  
165      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
166          display          "Diagnostic serial port"
167          active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
168          flavor data
169          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
170          default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
171          description      "
172             The EBSA285 board has only one serial port.  This option
173             chooses which port will be used for diagnostic output."
174      }
175
176     # Real-time clock/counter specifics
177     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
178         display       "Real-time clock constants"
179         flavor        none
180     
181         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
182             display       "Real-time clock numerator"
183             flavor        data
184             default_value 1000000000
185         }
186         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
187             display       "Real-time clock denominator"
188             flavor        data
189             default_value 100
190         }
191         cdl_option CYGNUM_HAL_RTC_PERIOD {
192             display       "Real-time clock period"
193             flavor        data
194             default_value 36800        ;# Timer3 clock is 3.68MHz
195         }
196     }
197
198     cdl_component CYGBLD_GLOBAL_OPTIONS {
199         display "Global build options"
200         flavor  none
201         description   "
202             Global build options including control over
203             compiler flags, linker flags and choice of toolchain."
204
205
206         parent  CYGPKG_NONE
207
208         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
209             display "Global command prefix"
210             flavor  data
211             no_define
212             default_value { "arm-elf" }
213             description "
214                 This option specifies the command prefix used when
215                 invoking the build tools."
216         }
217
218         cdl_option CYGBLD_GLOBAL_CFLAGS {
219             display "Global compiler flags"
220             flavor  data
221             no_define
222             default_value { "-mcpu=strongarm -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
223             description   "
224                 This option controls the global compiler flags which are used to
225                 compile all packages by default. Individual packages may define
226                 options which override these global flags."
227         }
228
229         cdl_option CYGBLD_GLOBAL_LDFLAGS {
230             display "Global linker flags"
231             flavor  data
232             no_define
233             default_value { "-Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
234             description   "
235                 This option controls the global linker flags. Individual
236                 packages may define options which override these global flags."
237         }
238
239         cdl_option CYGBLD_BUILD_GDB_STUBS {
240             display "Build GDB stub ROM image"
241             default_value 0
242             requires { CYG_HAL_STARTUP == "ROM" }
243             requires CYGSEM_HAL_ROM_MONITOR
244             requires CYGBLD_BUILD_COMMON_GDB_STUBS
245             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
246             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
247             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
248             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
249             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
250             no_define
251             description "
252                 This option enables the building of the GDB stubs for the
253                 board. The common HAL controls takes care of most of the
254                 build process, but the final conversion from ELF image to
255                 binary data is handled by the platform CDL, allowing
256                 relocation of the data if necessary."
257
258             make -priority 320 {
259                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
260                 $(OBJCOPY) -O binary $< $@
261             }
262         }
263     }
264
265     cdl_component CYGPKG_HAL_ARM_EBSA285_OPTIONS {
266         display "StrongARM EBSA285 build options"
267         flavor  none
268         description   "
269             Package specific build options including control over
270             compiler flags used only in building this package,
271             and details of which tests are built."
272
273
274         cdl_option CYGPKG_HAL_ARM_EBSA285_CFLAGS_ADD {
275             display "Additional compiler flags"
276             flavor  data
277             no_define
278             default_value { "" }
279             description   "
280                 This option modifies the set of compiler flags for
281                 building the StrongARM EBSA285 HAL. These flags are used in addition
282                 to the set of global flags."
283         }
284
285         cdl_option CYGPKG_HAL_ARM_EBSA285_CFLAGS_REMOVE {
286             display "Suppressed compiler flags"
287             flavor  data
288             no_define
289             default_value { "" }
290             description   "
291                 This option modifies the set of compiler flags for
292                 building the StrongARM EBSA285 HAL. These flags are removed from
293                 the set of global flags if present."
294         }
295
296         cdl_option CYGPKG_HAL_ARM_EBSA285_TESTS {
297             display "StrongARM EBSA285 tests"
298             flavor  data
299             no_define
300             calculated { "tests/sdram0" }
301             description   "
302                 This option specifies the set of tests for the StrongARM EBSA285 HAL."
303         }
304     }
305
306     cdl_component CYGHWR_MEMORY_LAYOUT {
307         display "Memory layout"
308         flavor data
309         no_define
310         calculated { (CYG_HAL_STARTUP == "RAM")    ? "arm_ebsa285_ram" : 
311                      (CYG_HAL_STARTUP == "ROMRAM") ? "arm_ebsa285_romram" : 
312                                                      "arm_ebsa285_rom" }
313
314         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
315             display "Memory layout linker script fragment"
316             flavor data
317             no_define
318             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
319             calculated { (CYG_HAL_STARTUP == "RAM") ?    "<pkgconf/mlt_arm_ebsa285_ram.ldi>" :
320                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_ebsa285_romram.ldi>" : 
321                                                          "<pkgconf/mlt_arm_ebsa285_rom.ldi>" }
322         }
323
324         cdl_option CYGHWR_MEMORY_LAYOUT_H {
325             display "Memory layout header file"
326             flavor data
327             no_define
328             define -file system.h CYGHWR_MEMORY_LAYOUT_H
329             calculated { (CYG_HAL_STARTUP == "RAM")    ? "<pkgconf/mlt_arm_ebsa285_ram.h>" : 
330                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_ebsa285_romram.h>" :        
331                                                          "<pkgconf/mlt_arm_ebsa285_rom.h>" }
332         }
333     }
334
335     cdl_option CYGSEM_HAL_ROM_MONITOR {
336         display       "Behave as a ROM monitor"
337         flavor        bool
338         default_value 0
339         parent        CYGPKG_HAL_ROM_MONITOR
340         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
341         description   "
342             Enable this option if this program is to be used as a ROM monitor,
343             i.e. applications will be loaded into RAM on the board, and this
344             ROM monitor may process exceptions or interrupts generated from the
345             application. This enables features such as utilizing a separate
346             interrupt stack when exceptions are generated."
347     }
348
349     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
350          display       "Work with a ROM monitor"
351          flavor        booldata
352          legal_values  { "Generic" "GDB_stubs" }
353          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
354          parent        CYGPKG_HAL_ROM_MONITOR
355          requires      { CYG_HAL_STARTUP == "RAM" }
356          description   "
357              Support can be enabled for different varieties of ROM monitor.
358              This support changes various eCos semantics such as the encoding
359              of diagnostic output, or the overriding of hardware interrupt
360              vectors.
361              Firstly there is \"Generic\" support which prevents the HAL
362              from overriding the hardware vectors that it does not use, to
363              instead allow an installed ROM monitor to handle them. This is
364              the most basic support which is likely to be common to most
365              implementations of ROM monitor.
366              \"GDB_stubs\" provides support when GDB stubs are included in
367              the ROM monitor or boot ROM."
368      }
369
370     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
371         display       "Redboot HAL options"
372         flavor        none
373         no_define
374         parent        CYGPKG_REDBOOT
375         active_if     CYGPKG_REDBOOT
376         description   "
377             This option lists the target's requirements for a valid Redboot
378             configuration."
379         
380         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
381             display       "Build Redboot ROM binary image"
382             active_if     CYGBLD_BUILD_REDBOOT
383             default_value 1
384             no_define
385             description "This option enables the conversion of the Redboot ELF
386                          image to a binary image suitable for ROM programming."
387     
388             make -priority 325 {
389                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
390                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
391                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
392                 $(OBJCOPY) -O binary $< $@
393             }
394         }
395     }
396
397 }