]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/arm/aim711/v2_0/cdl/hal_arm_aim711.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / aim711 / v2_0 / cdl / hal_arm_aim711.cdl
1 #==========================================================================
2 #
3 #      hal_arm_aim711.cdl
4 #
5 #      
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 # Contributors: gthomas, jskov, r.cassebohm
45 #               Grant Edwards <grante@visi.com>
46 # Date:         2001-07-31
47 # Purpose:      
48 # Description:  
49 #
50 #####DESCRIPTIONEND####
51 #
52 #========================================================================*/
53
54
55 cdl_package CYGPKG_HAL_ARM_AIM711 {
56     display       "ARM Industrial Module AIM 711"
57     parent        CYGPKG_HAL_ARM
58     define_header hal_arm_aim711.h
59     include_dir   cyg/hal
60     hardware
61     description   "
62         The ARM Industrial Module AIM 711 HAL package provides the support
63         needed to run eCos on a ARM Industrial Module AIM 711 board from 
64         Vision Systems GmbH"
65
66     compile       hal_diag.c aim711_misc.c
67
68     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
69     implements    CYGINT_HAL_DEBUG_GDB_STUBS
70     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
71     implements    CYGINT_HAL_ARM_ARCH_ARM7
72     implements    CYGINT_HAL_ARM_THUMB_ARCH
73     implements    CYGINT_HAL_ARM_BIGENDIAN
74
75     requires { CYGHWR_HAL_ARM_BIGENDIAN == 1 }
76     requires { is_active(CYGPKG_DEVS_ETH_ARM_KS32C5000) implies 
77                CYGPKG_DEVS_ETH_ARM_KS32C5000_PHY_RTL8201 }
78     requires { is_active(CYGPKG_DEVS_ETH_ARM_KS32C5000) implies 
79                (CYGPKG_DEVS_ETH_ARM_KS32C5000_PHYADDR == 2) }
80
81     define_proc {
82         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
83         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_aim711.h>"
84         puts $::cdl_header ""
85         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM 7TDMI\""
86         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"AIM 711\""
87         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
88         puts $::cdl_header ""
89         puts $::cdl_header "#define HAL_PLATFORM_MACHINE_TYPE  140"
90         puts $::cdl_header "#define CYGHWR_REDBOOT_ARM_TRAMPOLINE_ADDRESS 0x200000"
91         puts $::cdl_header ""
92     }
93
94     cdl_component CYG_HAL_STARTUP {
95         display       "Startup type"
96         flavor        data
97         legal_values  {"RAM" "ROM" "ROMRAM"}
98         default_value {"RAM"}
99         no_define
100         define -file system.h CYG_HAL_STARTUP
101         description   "
102            When targetting the AIM 711 board it is possible to build
103            the system for either RAM, ROM or ROMRAM bootstrap.
104            RAM bootstrap generally requires that the board
105            is equipped with ROMs containing a suitable ROM monitor or
106            equivalent software that allows GDB to download the eCos
107            application on to the board. The ROM bootstrap typically
108            requires that the eCos application be blown into the FLASH.
109            The ROMRAM bootstrap is also stored in FLASH, but will be
110            executed in RAM."
111     }
112     
113     cdl_component CYG_HAL_CPUTYPE {
114         display       "cpu type"
115         flavor        data
116         calculated {"S3C4510A"}
117         no_define
118         define -file system.h CYG_HAL_CPUTYPE
119         description   "Which version of processor is on board."    
120     }
121         
122     cdl_component CYGNUM_HAL_CPUCLOCK {
123         display       "cpu clock"
124         flavor        data
125         calculated 50000000
126         no_define
127         define -file system.h CYGNUM_HAL_CPUCLOCK
128         description   "Frequency of cpu clock in Hz."
129     }
130
131     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
132         display      "Number of diag/debug communication channels on the board"
133         flavor       data
134         calculated   2
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_DEBUG_CHANNEL {
145         display          "Debug serial port"
146         flavor data
147         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
148         default_value    0
149         description      "The AIM 711 board has two diag/debug
150                           serial ports. This option chooses which port will
151                           be used to connect to a host running GDB."
152      }
153  
154      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
155          display          "Diagnostic serial port"
156          flavor data
157          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
158          default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
159          description      "
160             The AIM 711 board has two diag/debug serial ports.  This option
161             chooses which port will be used for diagnostic output."
162      }
163
164     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CHANNELS_DEFAULT_BAUD {
165         display       "Console/GDB serial port baud rate"
166         flavor        data
167         legal_values  9600 19200 38400 57600 115200
168         default_value 38400
169         description   "
170             This option controls the default baud rate used for the
171             Console/GDB connection."
172     }
173
174     # Real-time clock/counter specifics
175     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
176         display       "Real-time clock constants"
177         flavor        none
178     
179         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
180             display       "Real-time clock numerator"
181             flavor        data
182             default_value 1000000000
183         }
184         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
185             display       "Real-time clock denominator"
186             flavor        data
187             default_value 100
188         }
189         cdl_option CYGNUM_HAL_RTC_PERIOD {
190             display       "Real-time clock period"
191             flavor        data
192             default_value (CYGNUM_HAL_CPUCLOCK/CYGNUM_HAL_RTC_DENOMINATOR)
193         }
194     }
195
196     cdl_component CYGBLD_GLOBAL_OPTIONS {
197         display "Global build options"
198         flavor  none
199         parent  CYGPKG_NONE
200         description   "
201             Global build options including control over
202             compiler flags, linker flags and choice of toolchain."
203
204         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
205             display "Global command prefix"
206             flavor  data
207             no_define
208             default_value { "arm-elf" }
209             description "
210                 This option specifies the command prefix used when
211                 invoking the build tools."
212         }
213
214         cdl_option CYGBLD_GLOBAL_CFLAGS {
215             display "Global compiler flags"
216             flavor  data
217             no_define
218
219             default_value { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
220                             (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
221                             (CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian " : "") .
222                             "-mno-short-load-words -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 { (CYGHWR_THUMB ? "-mthumb " : "-mcpu=arm7tdmi ") .
234                             (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") .
235                             (CYGHWR_HAL_ARM_BIGENDIAN ? "-mbig-endian " : "") .
236                             "-mno-short-load-words -g -nostdlib -Wl,--gc-sections -Wl,-static" }
237             description   "
238                 This option controls the global linker flags. Individual
239                 packages may define options which override these global flags."
240         }
241         
242         cdl_option CYGBLD_BUILD_GDB_STUBS {
243             display "Build GDB stub ROM image"
244             default_value 0
245             requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
246             requires CYGSEM_HAL_ROM_MONITOR
247             requires CYGBLD_BUILD_COMMON_GDB_STUBS
248             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
249             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
250             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
251             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
252             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
253             no_define
254             description "
255                 This option enables the building of the GDB stubs for the
256                 board. The common HAL controls takes care of most of the
257                 build process, but the final conversion from ELF image to
258                 binary data is handled by the platform CDL, allowing
259                 relocation of the data if necessary."
260
261             make -priority 320 {
262                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
263                 $(OBJCOPY) -O binary $< $@
264             }
265         }
266     }
267
268     cdl_component CYGHWR_MEMORY_LAYOUT {
269         display "Memory layout"
270         flavor data
271         no_define
272         calculated { (CYG_HAL_STARTUP == "RAM") ?    "arm_aim711_ram" :
273                      (CYG_HAL_STARTUP == "ROMRAM") ? "arm_aim711_romram" :
274                                                      "arm_aim711_rom" }
275
276         
277         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
278             display "Memory layout linker script fragment"
279             flavor data
280             no_define
281             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
282             calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aim711_ram.ldi>" :
283                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_aim711_romram.ldi>" :
284                                                       "<pkgconf/mlt_arm_aim711_rom.ldi>" }
285         }
286
287         cdl_option CYGHWR_MEMORY_LAYOUT_H {
288             display "Memory layout header file"
289             flavor data
290             no_define
291             define -file system.h CYGHWR_MEMORY_LAYOUT_H
292             calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_aim711_ram.h>" :
293                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_aim711_romram.h>" :
294                                                       "<pkgconf/mlt_arm_aim711_rom.h>" }
295         }
296     }
297
298     cdl_option CYGSEM_HAL_ROM_MONITOR {
299         display       "Behave as a ROM monitor"
300         flavor        bool
301         default_value 0
302         parent        CYGPKG_HAL_ROM_MONITOR
303         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
304         description   "
305             Enable this option if this program is to be used as a ROM monitor,
306             i.e. applications will be loaded into RAM on the board, and this
307             ROM monitor may process exceptions or interrupts generated from the
308             application. This enables features such as utilizing a separate
309             interrupt stack when exceptions are generated."
310     }
311
312     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
313          display       "Work with a ROM monitor"
314          flavor        booldata
315          legal_values  { "Generic" "GDB_stubs" }
316          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
317          parent        CYGPKG_HAL_ROM_MONITOR
318          requires      { CYG_HAL_STARTUP == "RAM" }
319          description   "
320              Support can be enabled for different varieties of ROM monitor.
321              This support changes various eCos semantics such as the encoding
322              of diagnostic output, or the overriding of hardware interrupt
323              vectors.
324              Firstly there is \"Generic\" support which prevents the HAL
325              from overriding the hardware vectors that it does not use, to
326              instead allow an installed ROM monitor to handle them. This is
327              the most basic support which is likely to be common to most
328              implementations of ROM monitor.
329              \"GDB_stubs\" provides support when GDB stubs are included in
330              the ROM monitor or boot ROM."
331      }
332
333     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
334         display       "Redboot HAL options"
335         flavor        none
336         no_define
337         parent        CYGPKG_REDBOOT
338         active_if     CYGPKG_REDBOOT
339         description   "
340             This option lists the target's requirements for a valid Redboot
341             configuration."
342
343         cdl_component CYGPKG_REDBOOT_AIM711_EEPROM_RDWR {
344             display        "Provide the eeprom commands in RedBoot"
345             flavor         bool
346             default_value  1
347             parent         CYGPKG_REDBOOT_ARM_OPTIONS
348             #active_if      CYGBLD_BUILD_REDBOOT_WITH_EXEC
349             description    "
350                 This option provides the eeprom_read and eeprom_write
351                 commands."
352             compile -library=libextras.a redboot_eeprom.c
353         }
354
355         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
356             display       "Build Redboot ROM binary image"
357             active_if     CYGBLD_BUILD_REDBOOT
358             default_value 1
359             no_define
360             description "This option enables the conversion of the Redboot ELF
361                          image to a binary image suitable for ROM programming."
362     
363             make -priority 325 {
364                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
365                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
366                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
367                 $(OBJCOPY) -O binary $< $@
368             }
369         }
370     }
371
372     cdl_option CYGSEM_HAL_LED_WITH_DELAY {
373         display       "POST LED output with delays"
374         flavor        bool
375         default_value 0
376         description   "
377             Enable this option to have delays between POST codes shown on the
378             service board LEDs."
379     }
380 }