]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/at91/phycore/v2_0/cdl/hal_arm_at91_phycore.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / at91 / phycore / v2_0 / cdl / hal_arm_at91_phycore.cdl
1 # ====================================================================
2 #
3 #      hal_arm_at91_phycore.cdl
4 #
5 #      ARM AT91 phycore HAL package configuration data
6 #      running on a Phytec phycore AT91M55800A on a Phytec HDV200
7 #
8 # ====================================================================
9 #####ECOSGPLCOPYRIGHTBEGIN####
10 ## -------------------------------------------
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12 ## Copyright (C) 2003 Nick Garnett <nickg@calivar.com>
13 ##
14 ## eCos is free software; you can redistribute it and/or modify it under
15 ## the terms of the GNU General Public License as published by the Free
16 ## Software Foundation; either version 2 or (at your option) any later version.
17 ##
18 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21 ## for more details.
22 ##
23 ## You should have received a copy of the GNU General Public License along
24 ## with eCos; if not, write to the Free Software Foundation, Inc.,
25 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 ##
27 ## As a special exception, if other files instantiate templates or use macros
28 ## or inline functions from this file, or you compile this file and link it
29 ## with other works to produce a work based on this file, this file does not
30 ## by itself cause the resulting work to be covered by the GNU General Public
31 ## License. However the source code for this file must still be made available
32 ## in accordance with section (3) of the GNU General Public License.
33 ##
34 ## This exception does not invalidate any other reasons why a work based on
35 ## this file might be covered by the GNU General Public License.
36 ##
37 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
38 ## at http://sources.redhat.com/ecos/ecos-license/
39 ## -------------------------------------------
40 #####ECOSGPLCOPYRIGHTEND####
41 # ====================================================================
42 ######DESCRIPTIONBEGIN####
43 #
44 # Author(s):      gthomas
45 # Contributors:   gthomas, tkoeller, tdrury, nickg, block
46 # Date:           2001-07-12
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_HAL_ARM_AT91_PHYCORE {
53     display       "PHYTEC phyCore AT91M55800A eval board HAL"
54     parent        CYGPKG_HAL_ARM_AT91
55     define_header hal_arm_at91_phycore.h
56     include_dir   cyg/hal
57     hardware
58     description   "
59         The pyhcore HAL package provides the support needed to run
60         eCos on an Phytec phyCORE - AT91M55800A eval board."
61
62     compile       phycore_misc.c
63
64     requires      { CYGHWR_HAL_ARM_AT91 == "M55800A" }
65
66     define_proc {
67         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_arm.h>"
68         puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H  <pkgconf/hal_arm_at91.h>"
69         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_at91_phycore.h>"
70         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM7TDMI\""
71         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"phyCORE AT91M55800A\""
72         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
73     }
74
75     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
76         display       "Real-time clock constants"
77         flavor        none
78
79         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
80             display       "Real-time clock numerator"
81             flavor        data
82             default_value 1000000000
83         }
84         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
85             display       "Real-time clock denominator"
86             flavor        data
87             default_value 100
88         }
89         cdl_option CYGNUM_HAL_RTC_PERIOD {
90             display       "Real-time clock period"
91             flavor        data
92             default_value ((CYGNUM_HAL_ARM_AT91_CLOCK_SPEED/32) / CYGNUM_HAL_RTC_DENOMINATOR)
93         }
94     }
95     
96     cdl_component CYG_HAL_STARTUP {
97         display       "Startup type"
98         flavor        data
99         default_value {"RAM"}
100         legal_values  {"RAM" "ROM" "ROMRAM"}
101             no_define
102             define -file system.h CYG_HAL_STARTUP
103         description   "
104             When targetting the AT91 EBxx eval board it is possible to build
105             the system for either RAM bootstrap or ROM bootstrap(s). Select
106             'ram' when building programs to load into RAM using onboard
107             debug software such as Angel or eCos GDB stubs.  Select 'rom'
108             when building a stand-alone application which will be put
109             into ROM.  Using ROMRAM will allow the program to exist in
110             ROM, but be copied to RAM during startup."
111     }
112
113     # Real-time clock/counter specifics
114     cdl_option CYGNUM_HAL_ARM_AT91_CLOCK_SPEED {
115         display       "CPU clock speed"
116         flavor        data
117         default_value 32768000
118     }
119
120     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
121         display      "Number of communication channels on the board"
122         flavor       data
123         calculated   3
124     }
125  
126     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
127         display          "Debug serial port"
128         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
129         flavor data
130         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
131         default_value    0
132         description      "
133             The AT91 EBxx board has two serial ports. This option
134             chooses which port will be used to connect to a host
135             running GDB."
136      }
137  
138      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
139          display          "Diagnostic serial port"
140          active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
141          flavor data
142          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
143          default_value    0
144          description      "
145             The AT91 EBxx board has two serial ports. This option
146             chooses which port will be used for diagnostic output."
147      }
148      
149      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
150         display       "Diagnostic serial port baud rate"
151         flavor        data
152         legal_values  9600 19200 38400 57600 115200
153         default_value 38400
154         description   "
155             This option selects the baud rate used for the diagnostic port."
156     }
157  
158     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
159          display       "GDB serial port baud rate"
160          flavor        data
161          legal_values  9600 19200 38400 57600 115200
162          default_value 38400
163          description   "
164             This option controls the baud rate used for the GDB connection."
165      }
166
167     cdl_option CYGSEM_HAL_ROM_MONITOR {
168         display       "Behave as a ROM monitor"
169         flavor        bool
170         default_value 0
171         parent        CYGPKG_HAL_ROM_MONITOR
172         requires      { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
173         description   "
174             Enable this option if this program is to be used as a ROM monitor,
175             i.e. applications will be loaded into RAM on the board, and this
176             ROM monitor may process exceptions or interrupts generated from the
177             application. This enables features such as utilizing a separate
178             interrupt stack when exceptions are generated."
179     }
180
181     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
182          display       "Work with a ROM monitor"
183          flavor        booldata
184          legal_values  { "Generic" "GDB_stubs" }
185          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
186          parent        CYGPKG_HAL_ROM_MONITOR
187          requires      { CYG_HAL_STARTUP == "RAM" }
188          description   "
189              Support can be enabled for different varieties of ROM monitor.
190              This support changes various eCos semantics such as the encoding
191              of diagnostic output, or the overriding of hardware interrupt
192              vectors.
193              Firstly there is \"Generic\" support which prevents the HAL
194              from overriding the hardware vectors that it does not use, to
195              instead allow an installed ROM monitor to handle them. This is
196              the most basic support which is likely to be common to most
197              implementations of ROM monitor.
198              \"GDB_stubs\" provides support when GDB stubs are included in
199              the ROM monitor or boot ROM."
200      }
201
202     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
203         display       "Redboot HAL options"
204         flavor        none
205         no_define
206         parent        CYGPKG_REDBOOT
207         active_if     CYGPKG_REDBOOT
208         description   "
209             This option lists the target's requirements for a valid Redboot
210             configuration."
211
212         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
213             display       "Build Redboot ROM binary image"
214             active_if     CYGBLD_BUILD_REDBOOT
215             default_value 1
216             no_define
217             description "This option enables the conversion of the Redboot ELF
218                          image to a binary image suitable for ROM programming."
219     
220             make -priority 325 {
221                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
222                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
223                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
224                 $(OBJCOPY) -O binary $< $@
225             }
226
227         }
228     }
229  
230     cdl_component CYGBLD_GLOBAL_OPTIONS {
231         display "Global build options"
232         flavor  none
233         parent  CYGPKG_NONE
234         description   "
235             Global build options including control over
236             compiler flags, linker flags and choice of toolchain."
237
238
239         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
240             display "Global command prefix"
241             flavor  data
242             no_define
243             default_value { "arm-elf" }
244             description "
245                 This option specifies the command prefix used when
246                 invoking the build tools."
247         }
248
249         cdl_option CYGBLD_GLOBAL_CFLAGS {
250             display "Global compiler flags"
251             flavor  data
252             no_define
253             default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -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" }
254             description   "
255                 This option controls the global compiler flags which are used to
256                 compile all packages by default. Individual packages may define
257                 options which override these global flags."
258         }
259
260         cdl_option CYGBLD_GLOBAL_LDFLAGS {
261             display "Global linker flags"
262             flavor  data
263             no_define
264             default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections -Wl,-static -g -nostdlib" }
265             description   "
266                 This option controls the global linker flags. Individual
267                 packages may define options which override these global flags."
268         }
269     }
270
271     cdl_component CYGHWR_MEMORY_LAYOUT {
272         display "Memory layout"
273         flavor data
274         no_define
275         calculated { (CYG_HAL_STARTUP == "RAM") ?    "arm_at91_phycore_ram" :
276                      (CYG_HAL_STARTUP == "ROMRAM") ? "arm_at91_phycore_romram" :
277                                                      "arm_at91_phycore_rom" }
278
279         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
280             display "Memory layout linker script fragment"
281             flavor data
282             no_define
283             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
284             calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_at91_phycore_ram.ldi>" :
285                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_at91_phycore_romram.ldi>" :
286                                                       "<pkgconf/mlt_arm_at91_phycore_rom.ldi>" }
287         }
288
289         cdl_option CYGHWR_MEMORY_LAYOUT_H {
290             display "Memory layout header file"
291             flavor data
292             no_define
293             define -file system.h CYGHWR_MEMORY_LAYOUT_H
294             calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_at91_phycore_ram.h>" :
295                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_at91_phycore_romram.h>" :
296                                                       "<pkgconf/mlt_arm_at91_phycore_rom.h>" }
297         }
298     }
299
300 }