]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/mac7100/mace1/v2_0/cdl/hal_arm_mac7100_mace1.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / arm / mac7100 / mace1 / v2_0 / cdl / hal_arm_mac7100_mace1.cdl
1
2 # ====================================================================
3 #
4 #      hal_arm_mac7100_mace1.cdl
5 #
6 #      ARM MAC7100 MACE1 HAL package configuration data
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 ## Copyright (C) 2006 eCosCentric Ltd
14 ##
15 ## eCos is free software; you can redistribute it and/or modify it under
16 ## the terms of the GNU General Public License as published by the Free
17 ## Software Foundation; either version 2 or (at your option) any later version.
18 ##
19 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22 ## for more details.
23 ##
24 ## You should have received a copy of the GNU General Public License along
25 ## with eCos; if not, write to the Free Software Foundation, Inc.,
26 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
27 ##
28 ## As a special exception, if other files instantiate templates or use macros
29 ## or inline functions from this file, or you compile this file and link it
30 ## with other works to produce a work based on this file, this file does not
31 ## by itself cause the resulting work to be covered by the GNU General Public
32 ## License. However the source code for this file must still be made available
33 ## in accordance with section (3) of the GNU General Public License.
34 ##
35 ## This exception does not invalidate any other reasons why a work based on
36 ## this file might be covered by the GNU General Public License.
37 ## -------------------------------------------
38 #####ECOSGPLCOPYRIGHTEND####
39 # ====================================================================
40 ######DESCRIPTIONBEGIN####
41 #
42 # Author(s):      Ilija Koco <ilijak@siva.com.mk>
43 # Contributors:   
44 # Date:           2006-04-12
45 #
46 #####DESCRIPTIONEND####
47 #
48 # ====================================================================
49
50 cdl_package CYGPKG_HAL_ARM_MAC7100_MACE1 {
51     display       "MACE1 - MAC7100 eval board HAL"
52     parent        CYGPKG_HAL_ARM_MAC7100
53     define_header hal_arm_mac7100_mace1.h
54     include_dir   cyg/hal
55     hardware
56     description   "
57         The MACE1 HAL package provides the support needed to run
58         eCos on an MACE1 - MAC7100 eval board."
59
60     compile       mace1_misc.c
61
62     requires      { CYGHWR_HAL_ARM_MAC7100 == "MAC7121" }
63     requires      { CYGNUM_PIT_CHAN_CLOCK_PRIORITY == 
64                     CYGNUM_KERNEL_COUNTERS_CLOCK_ISR_PRIORITY }
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_mac7100.h>"
69         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_arm_mac7100_mace1.h>"
70         puts $::cdl_header "#define HAL_PLATFORM_CPU    \"ARM7TDMI\""
71         puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"Freescale MAC7100/MACE1\""
72         puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
73     }
74
75     cdl_component CYG_PIT_CLOCKS {
76         display "Real time clock configuration."
77         flavor   none
78         description "
79             Periodic Interrupt Timer Module - PIT comprizes 11 timer
80             channels.  RTI channel (PIT0) as well as PIT1 .. PIT4 can
81             generate interrupts and are eligible for the real time
82             clock.  "
83
84         cdl_option CYGNUM_PIT_CHAN_CLOCK {
85             display      "System CLOCK device"
86             flavor       data
87             legal_values 0 to 4
88             default_value   3
89             requires {CYGNUM_PIT_CHAN_CLOCK != CYGNUM_PIT_CHAN_US}
90             description "
91                 RTI (PIT0) and PIT1 .. PIT4 can be used for ral time
92                 clock.  RTI is clocked by oscillator clock while
93                 channels 1 to 4 by 1/2 system clock frequency.
94                 Selection of RTI vs PIT1 .. PIT4 affects Real-time
95                 clock period (see Real-time clock constants).  NOTE:
96                 Real time clock channel must not be the same as US
97                 delay channel.
98             "
99         }
100
101         cdl_option CYGNUM_PIT_CHAN_CLOCK_PRIORITY {
102             display      "System clock's INTC priority"
103             flavor       data
104             legal_values 0 to 15
105             default_value   12
106             description "
107                 INTC has 16 interrupt levels: 0 (lowest) to 15 (highest).
108             "
109         }
110
111         cdl_option CYGNUM_PIT_CHAN_US {
112             display      "PIT channel for us delay"
113             flavor       data
114             legal_values 0 to 4
115             default_value   0
116             requires {CYGNUM_PIT_CHAN_CLOCK != CYGNUM_PIT_CHAN_US}
117             description "
118                 RTI is clocked by oscillator while channels PIT1
119                 .. PIT4 by half system clock frequency, hence RTI
120                 should allow for larger maximal period.  NOTE: US
121                 delay channel must not be the same as real time clock
122                 channel.
123             "
124         }
125     }
126     
127     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
128         display       "Real-time clock constants"
129         flavor        none
130
131         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
132             display       "Real-time clock numerator"
133             flavor        data
134             default_value 1000000000
135         }
136         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
137             display       "Real-time clock denominator"
138             flavor        data
139             default_value 100
140         }
141         cdl_option CYGNUM_HAL_RTC_PERIOD {
142             display       "Real-time clock period"
143             flavor        data
144             default_value (CYGNUM_PIT_CHAN_CLOCK !=0 ? \
145                 (CYGNUM_HAL_ARM_MAC7100_CLOCK_SPEED / 2 / CYGNUM_HAL_RTC_DENOMINATOR - 1) : \
146                 (CYGNUM_HAL_ARM_MAC7100_Q_FREQ / CYGNUM_HAL_RTC_DENOMINATOR - 1))
147         }
148     }
149     
150     cdl_component CYG_HAL_STARTUP {
151         display       "Startup type"
152         flavor        data
153         calculated {"ROM"}
154         no_define
155         define -file system.h CYG_HAL_STARTUP
156         description   "
157             Current MACE1 port supports only ROM startup type."
158     }
159
160     # Real-time clock/counter specifics
161
162     cdl_component CYG_HAL_MAC7100_OSC {
163         display "System Clocks Module"
164         flavor  none
165
166         cdl_option CYGNUM_HAL_ARM_MAC7100_F_OSC {
167             display       "FOSC - Oscillator clock"
168             flavor        data
169             default_value 8000000
170         }
171         
172         cdl_option CYGNUM_HAL_ARM_MAC7100_FDIV {
173             display       "FDIV - Frequency divider for PLL"
174             flavor        booldata
175             legal_values 0 to 16
176             default_value 2
177             description "
178                 If enabled (FDIV != 0), 
179                    you set divider for PLL. 
180                    Then REFDV is calculated as REFDV=FDIV-1;
181                 If disabled (FDIV == 0), 
182                    REFDV is calculated from FOSC so that referent frequency 
183                    for PLL is 500kHz.
184                    SYNR is then derived from desired CPU clock, FOSC and REFDV.
185                 "
186         }
187     }
188
189     cdl_option CYGNUM_HAL_ARM_MAC7100_CLOCK_SPEED {
190         display       "CPU clock - PLL frequency"
191         flavor        data
192         default_value 48000000
193     }
194
195     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
196         display      "Number of communication channels on the board"
197         flavor       data
198         legal_values 0 1 2
199         default_value   2
200     }
201
202     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
203         display          "Debug serial port"
204         active_if        CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
205         flavor data
206         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
207         default_value    0
208         description      "
209             The MAC7100 MACE1 board has two serial ports. This option
210             chooses which port will be used to connect to a host
211             running GDB."
212      }
213  
214      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
215          display          "Diagnostic serial port"
216          active_if        CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
217          flavor data
218          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
219          default_value    0
220          description      "
221             The MAC7100 MACE1 board has two serial ports. This option
222             chooses which port will be used for diagnostic output."
223      }
224      
225      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
226         display       "Diagnostic serial port baud rate"
227         flavor        data
228         legal_values  9600 19200 38400
229         default_value 38400
230         description   "
231             This option selects the baud rate used for the diagnostic port."
232     }
233  
234     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
235          display       "GDB serial port baud rate"
236          flavor        data
237          legal_values  9600 19200 38400
238          default_value 38400
239          description   "
240             This option controls the baud rate used for the GDB connection."
241      }
242
243     cdl_option CYGSEM_HAL_ROM_MONITOR {
244         display       "Behave as a ROM monitor"
245         flavor        bool
246         default_value 0
247         parent        CYGPKG_HAL_ROM_MONITOR
248         requires      { CYG_HAL_STARTUP == "ROM" || 
249                         CYG_HAL_STARTUP == "ROMRAM" }
250         description   "
251             Enable this option if this program is to be used as a ROM monitor,
252             i.e. applications will be loaded into RAM on the board, and this
253             ROM monitor may process exceptions or interrupts generated from the
254             application. This enables features such as utilizing a separate
255             interrupt stack when exceptions are generated."
256     }
257
258     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
259          display       "Work with a ROM monitor"
260          flavor        booldata
261          legal_values  { "Generic" "GDB_stubs" }
262          default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
263          parent        CYGPKG_HAL_ROM_MONITOR
264          requires      { CYG_HAL_STARTUP == "RAM" }
265          description   "
266              Support can be enabled for different varieties of ROM monitor.
267              This support changes various eCos semantics such as the encoding
268              of diagnostic output, or the overriding of hardware interrupt
269              vectors.
270              Firstly there is \"Generic\" support which prevents the HAL
271              from overriding the hardware vectors that it does not use, to
272              instead allow an installed ROM monitor to handle them. This is
273              the most basic support which is likely to be common to most
274              implementations of ROM monitor.
275              \"GDB_stubs\" provides support when GDB stubs are included in
276              the ROM monitor or boot ROM."
277      }
278
279     cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
280         display       "Redboot HAL options"
281         flavor        none
282         no_define
283         parent        CYGPKG_REDBOOT
284         active_if     CYGPKG_REDBOOT
285         description   "
286             This option lists the target's requirements for a valid Redboot
287             configuration."
288
289         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
290             display       "Build Redboot ROM binary image"
291             active_if     CYGBLD_BUILD_REDBOOT
292             default_value 1
293             no_define
294             description "This option enables the conversion of the Redboot ELF
295                          image to a binary image suitable for ROM programming."
296     
297             make -priority 325 {
298                 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
299                 $(OBJCOPY) --strip-debug $< $(@:.bin=.img) 
300                 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
301                 $(OBJCOPY) -O binary $< $@
302             }
303
304         }
305     }
306  
307     cdl_component CYGBLD_GLOBAL_OPTIONS {
308         display "Global build options"
309         flavor  none
310         parent  CYGPKG_NONE
311         description   "
312         Global build options including control over
313         compiler flags, linker flags and choice of toolchain."
314
315         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
316             display "Global command prefix"
317             flavor  data
318             no_define
319             default_value { "arm-elf" }
320             description "
321                 This option specifies the command prefix used when
322                 invoking the build tools."
323         }
324
325         cdl_option CYGBLD_GLOBAL_CFLAGS {
326             display "Global compiler flags"
327             flavor  data
328             no_define
329             default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mbig-endian -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -gdwarf-2 -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
330             description   "
331                 This option controls the global compiler flags which
332                 are used to compile all packages by
333                 default. Individual packages may define options which
334                 override these global flags."
335
336         }
337
338         cdl_option CYGBLD_GLOBAL_LDFLAGS {
339             display "Global linker flags"
340             flavor  data
341             no_define
342             default_value { (CYGHWR_THUMB ? "-mthumb " : "") . (CYGBLD_ARM_ENABLE_THUMB_INTERWORK ? "-mthumb-interwork " : "") . "-mcpu=arm7tdmi -mbig-endian -mno-short-load-words -Wl,--gc-sections -Wl,-static -gdwarf-2 -nostdlib" }
343             description   "
344                 This option controls the global linker flags. Individual
345                 packages may define options which override these global flags."
346         }
347     }
348
349     cdl_component CYGHWR_MEMORY_LAYOUT {
350         display "Memory layout"
351         flavor data
352         no_define
353         calculated { (CYG_HAL_STARTUP == "RAM") ?    "arm_mac7100_mace1_ram" :
354                      (CYG_HAL_STARTUP == "ROMRAM") ? "arm_mac7100_mace1_romram" :
355                                                      "arm_mac7100_mace1_rom" }
356
357         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
358             display "Memory layout linker script fragment"
359             flavor data
360             no_define
361             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
362             calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_mac7100_mace1_ram.ldi>" :
363                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_mac7100_mace1_romram.ldi>" :
364                                                       "<pkgconf/mlt_arm_mac7100_mace1_rom.ldi>" }
365         }
366
367         cdl_option CYGHWR_MEMORY_LAYOUT_H {
368             display "Memory layout header file"
369             flavor data
370             no_define
371             define -file system.h CYGHWR_MEMORY_LAYOUT_H
372             calculated { (CYG_HAL_STARTUP == "RAM") ? "<pkgconf/mlt_arm_mac7100_mace1_ram.h>" :
373                          (CYG_HAL_STARTUP == "ROMRAM") ? "<pkgconf/mlt_arm_mac7100_mace1_romram.h>" :
374                                                       "<pkgconf/mlt_arm_mac7100_mace1_rom.h>" }
375         }
376     }
377 }