]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/arm/sa11x0/assabet/v2_0/cdl/hal_arm_sa11x0_assabet.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / sa11x0 / assabet / v2_0 / cdl / hal_arm_sa11x0_assabet.cdl
1 # ====================================================================
2 #
3 #      hal_arm_sa11x0_assabet.cdl
4 #
5 #      ARM SA1110/Assabet platform 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):      gthomas
44 # Original data:  gthomas
45 # Contributors:
46 # Date:           2000-05-08
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51 cdl_package CYGPKG_HAL_ARM_SA11X0_ASSABET {
52     display       "ARM SA1110/Assabet evaluation board"
53     parent        CYGPKG_HAL_ARM_SA11X0
54     hardware
55     include_dir   cyg/hal
56     define_header hal_arm_sa11x0_assabet.h
57     description   "
58         This HAL platform package provides generic
59         support for the Intel StrongARM SA1110 based evalation board, 
60         known as 'assabet'."
61
62     compile       assabet_misc.c lcd_support.c
63
64     implements    CYGINT_HAL_DEBUG_GDB_STUBS
65     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
67
68     implements    CYGHWR_HAL_ARM_SA11X0_UART1
69
70     define_proc {
71         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
72         puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H  <pkgconf/hal_arm_sa11x0.h>"
73         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_sa11x0_assabet.h>"
74         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"StrongARM 1110\""
75         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Assabet development system\""
76         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
77         puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE  25"
78         puts $::cdl_header "#define HAL_ARCH_PROGRAM_NEW_STACK assabet_program_new_stack"
79     }
80
81     cdl_component CYG_HAL_STARTUP {
82         display       "Startup type"
83         flavor        data
84         default_value {"RAM"}
85         legal_values  {"RAM" "ROM"}
86         no_define
87         define -file system.h CYG_HAL_STARTUP
88         description   "
89            When targetting the Assabet eval board it is possible to build
90            the system for either RAM bootstrap or ROM bootstrap(s). Select
91            'ram' when building programs to load into RAM using eCos GDB
92            stubs.  Select 'rom' when building a stand-alone application
93            which will be put into ROM, or for the special case of
94            building the eCos GDB stubs themselves."
95     }
96
97     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
98         display       "Diagnostic serial port baud rate"
99         flavor        data
100         legal_values  9600 19200 38400 115200
101         default_value 38400
102         description   "
103             This option selects the baud rate used for the diagnostic port.
104             Note: this should match the value chosen for the GDB port if the
105             diagnostic and GDB port are the same."
106     }
107
108     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
109         display       "GDB serial port baud rate"
110         flavor        data
111         legal_values  9600 19200 38400 115200
112         default_value 38400
113         description   "
114             This option selects the baud rate used for the diagnostic port.
115             Note: this should match the value chosen for the GDB port if the
116             diagnostic and GDB port are the same."
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   1
123     }
124  
125     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
126         display          "Debug serial port"
127         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
128         flavor data
129         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
130         default_value    0
131         description      "
132             The assabet board has only one serial port. This option
133             chooses which port will be used to connect to a host
134             running GDB."
135      }
136
137      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
138          display      "Default console channel."
139          flavor       data
140          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
141          calculated   0
142      }
143  
144      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
145          display          "Diagnostic serial port"
146          active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
147          flavor data
148          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
149          default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
150          description      "
151             The assabet board has only one serial port.  This option
152             chooses which port will be used for diagnostic output."
153      }
154  
155     cdl_component CYGBLD_GLOBAL_OPTIONS {
156         display "Global build options"
157         flavor  none
158         no_define
159         description   "
160             Global build options including control over
161             compiler flags, linker flags and choice of toolchain."
162
163
164         parent  CYGPKG_NONE
165
166         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
167             display "Global command prefix"
168             flavor  data
169             no_define
170             default_value { "arm-elf" }
171             description "
172                 This option specifies the command prefix used when
173                 invoking the build tools."
174         }
175
176         cdl_option CYGBLD_GLOBAL_CFLAGS {
177             display "Global compiler flags"
178             flavor  data
179             no_define
180             default_value { "-mcpu=strongarm1100 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
181             description   "
182                 This option controls the global compiler flags which are used to
183                 compile all packages by default. Individual packages may define
184                 options which override these global flags."
185         }
186
187         cdl_option CYGBLD_GLOBAL_LDFLAGS {
188             display "Global linker flags"
189             flavor  data
190             no_define
191             default_value { "-Wl,--gc-sections -Wl,-static -g -O2 -nostdlib" }
192             description   "
193                 This option controls the global linker flags. Individual
194                 packages may define options which override these global flags."
195         }
196
197         cdl_option CYGBLD_BUILD_GDB_STUBS {
198             display "Build GDB stub ROM image"
199             default_value 0
200             requires { CYG_HAL_STARTUP == "ROM" }
201             requires CYGSEM_HAL_ROM_MONITOR
202             requires CYGBLD_BUILD_COMMON_GDB_STUBS
203             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
204             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
205             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
206             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
207             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
208             no_define
209             description "
210                 This option enables the building of the GDB stubs for the
211                 board. The common HAL controls takes care of most of the
212                 build process, but the final conversion from ELF image to
213                 binary data is handled by the platform CDL, allowing
214                 relocation of the data if necessary."
215
216             make -priority 320 {
217                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
218                 $(OBJCOPY) --remove-section=.fixed_vectors -O binary $< $@
219             }
220         }
221     }
222
223     cdl_component CYGPKG_HAL_ARM_SA11X0_ASSABET_OPTIONS {
224         display "StrongARM SA1110/ASSABET build options"
225         flavor  none
226         no_define
227         description   "
228             Package specific build options including control over
229             compiler flags used only in building this package,
230             and details of which tests are built."
231
232         cdl_option CYGSEM_HAL_ARM_SA11X0_ASSABET_NEPONSET_TIMINGS {
233             display       "Enable special timings for Neponset board"
234             flavor        bool
235             default_value 0
236             description   "
237                 Enable this option to force initialization of memory timing
238                 parameters suitable for use with the Neponset expansion board.
239                 This is optional as it does not work for some versions of
240                 Assabet without the board plugged in."
241         }
242
243         cdl_option CYGPKG_HAL_ARM_SA11X0_ASSABET_CFLAGS_ADD {
244             display "Additional compiler flags"
245             flavor  data
246             no_define
247             default_value { "" }
248             description   "
249                 This option modifies the set of compiler flags for
250                 building the StrongARM Assabet HAL. These flags are used in addition
251                 to the set of global flags."
252         }
253
254         cdl_option CYGPKG_HAL_ARM_SA11X0_ASSABET_CFLAGS_REMOVE {
255             display "Suppressed compiler flags"
256             flavor  data
257             no_define
258             default_value { "" }
259             description   "
260                 This option modifies the set of compiler flags for
261                 building the StrongARM Assabet HAL. These flags are removed from
262                 the set of global flags if present."
263         }
264
265         cdl_option CYGPKG_HAL_ARM_SA11X0_ASSABET_TESTS {
266             display "StrongARM SA1110/Assabet tests"
267             flavor  data
268             no_define
269 #            calculated { "tests/dram-test" }
270             calculated { "" }
271             description   "
272                 This option specifies the set of tests for the StrongARM Assabet HAL."
273         }
274     }
275
276     cdl_component CYGHWR_MEMORY_LAYOUT {
277         display "Memory layout"
278         flavor data
279         no_define
280         calculated { CYG_HAL_STARTUP == "RAM" ? "arm_sa11x0_assabet_ram" : \
281                                                 "arm_sa11x0_assabet_rom" }
282
283         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
284             display "Memory layout linker script fragment"
285             flavor data
286             no_define
287             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
288             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_sa11x0_assabet_ram.ldi>" : \
289                                                     "<pkgconf/mlt_arm_sa11x0_assabet_rom.ldi>" }
290         }
291
292         cdl_option CYGHWR_MEMORY_LAYOUT_H {
293             display "Memory layout header file"
294             flavor data
295             no_define
296             define -file system.h CYGHWR_MEMORY_LAYOUT_H
297             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_arm_sa11x0_assabet_ram.h>" : \
298                                                     "<pkgconf/mlt_arm_sa11x0_assabet_rom.h>" }
299         }
300     }
301
302     cdl_option CYGSEM_HAL_ROM_MONITOR {
303         display       "Behave as a ROM monitor"
304         flavor        bool
305         default_value 0
306         parent        CYGPKG_HAL_ROM_MONITOR
307         requires      { CYG_HAL_STARTUP == "ROM" }
308         description   "
309             Enable this option if this program is to be used as a ROM monitor,
310             i.e. applications will be loaded into RAM on the board, and this
311             ROM monitor may process exceptions or interrupts generated from the
312             application. This enables features such as utilizing a separate
313             interrupt stack when exceptions are generated."
314     }
315
316     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
317          display       "Work with a ROM monitor"
318          flavor        booldata
319          legal_values  { "Generic" "GDB_stubs" }
320          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
321          parent        CYGPKG_HAL_ROM_MONITOR
322          requires      { CYG_HAL_STARTUP == "RAM" }
323          description   "
324              Support can be enabled for different varieties of ROM monitor.
325              This support changes various eCos semantics such as the encoding
326              of diagnostic output, or the overriding of hardware interrupt
327              vectors.
328              Firstly there is \"Generic\" support which prevents the HAL
329              from overriding the hardware vectors that it does not use, to
330              instead allow an installed ROM monitor to handle them. This is
331              the most basic support which is likely to be common to most
332              implementations of ROM monitor.
333              \"GDB_stubs\" provides support when GDB stubs are included in
334              the ROM monitor or boot ROM."
335      }
336
337     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
338         display       "Redboot HAL options"
339         flavor        none
340         no_define
341         parent        CYGPKG_REDBOOT
342         active_if     CYGPKG_REDBOOT
343         description   "
344             This option lists the target's requirements for a valid Redboot
345             configuration."
346
347         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
348             display       "Build Redboot ROM binary image"
349             active_if     CYGBLD_BUILD_REDBOOT
350             default_value 1
351             no_define
352             description "This option enables the conversion of the Redboot ELF
353                          image to a binary image suitable for ROM programming."
354
355             make -priority 325 {
356                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
357                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
358                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
359                 $(OBJCOPY) -O binary $< $@
360             }
361         }
362     }
363
364 }