]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/fr30/skmb91302/v2_0/cdl/hal_fr30_skmb91302.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / fr30 / skmb91302 / v2_0 / cdl / hal_fr30_skmb91302.cdl
1 # ====================================================================
2 #
3 #      hal_fr30_skmb91302.cdl
4 #
5 #   Fujitsu Starterkit MB91302 board 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 ## Copyright (C) 2007 eCosCentric Ltd
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
43 cdl_package CYGPKG_HAL_FR30_MB91301_SKMB91302 {
44     display         "Fujitsu Starterkit MB91302 board"
45     parent          CYGPKG_HAL_FR30
46     requires        CYGPKG_HAL_FR30_MB91301
47     define_header   hal_fr30_skmb91302.h
48     include_dir     cyg/hal
49
50     description   "Fujitsu Starterkit MB91302 board platform HAL
51                 package should be used when targeting the actual hardware for
52                 the Fujitsu Starterkit MB91302 board platform."
53
54     compile     platform.S plf_misc.c ser.c
55     implements      CYGINT_HAL_DEBUG_GDB_STUBS
56     implements      CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
57     implements  CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
58
59     define_proc {
60         puts $::cdl_header "#include <pkgconf/hal_fr30_mb91301.h>"
61         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_fr30.h>"
62         puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H <pkgconf/hal_fr30_mb91301.h>"
63         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_fr30_skmb91302.h>"
64     }
65
66     cdl_component CYG_HAL_STARTUP {
67         display         "Startup type"
68         flavor          data
69         legal_values    {"RAM" "ROM" "ROMRAM"}
70         default_value   {"ROM"}
71             no_define
72             define -file system.h CYG_HAL_STARTUP
73
74         description   "Should the system run from RAM, ROM, or copy itself from ROM 
75                        and RAM and then run in RAM?"
76     }
77
78     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
79         display      "Number of communication channels on the board"
80         flavor       data
81         calculated   2
82         description      "The MB91302 board has 3 serial ports. Only the first
83                           2 have mounted 9 pin connectors. The 3rd is not
84                           connected and should therefore not be used."
85     }
86
87      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
88          display      "Default console channel."
89          flavor       data
90          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
91          calculated   0
92     }
93
94     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
95         display          "Debug serial port"
96         flavor data
97         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
98         default_value    0
99         description      "This option chooses which port will be used to connect
100             to a host running GDB."
101     }
102
103      cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
104          display          "Diagnostic serial port"
105          flavor data
106          legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
107          default_value    CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
108          description      "
109             This option chooses which port will be used for diagnostic output."
110     }
111
112     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
113         display       "Diagnostic serial port baud rate"
114         flavor        data
115         legal_values  9600 19200 38400 57600 115200
116         default_value 57600
117         description   "
118             This option selects the baud rate used for the diagnostic port.
119             Note: this should match the value chosen for the GDB port if the
120             diagnostic and GDB port are the same."
121     }
122
123     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
124         display       "GDB serial port baud rate"
125         flavor        data
126         legal_values  9600 19200 38400 57600 115200
127         default_value 57600
128         description   "
129             This option selects the baud rate used for the diagnostic port.
130             Note: this should match the value chosen for the GDB port if the
131             diagnostic and GDB port are the same."
132     }
133
134     cdl_component CYGBLD_GLOBAL_OPTIONS {
135         display "Global build options"
136         flavor  none
137         parent  CYGPKG_NONE
138
139         description   "Global build options including control over compiler
140                        flags, linker flags and choice of toolchain."
141
142         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
143             display "Global command prefix"
144             flavor  data
145             no_define
146             default_value { "fr30-unknown-elf" }
147             description       "This option specifies  the command prefix  used
148                                when invoking the build tools."
149
150         }
151
152         cdl_option CYGBLD_GLOBAL_CFLAGS {
153             display "Global compiler flags"
154             flavor  data
155             no_define
156             default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -finit-priority -fomit-frame-pointer" }
157             description       "This option controls the global compiler  flags
158                                which are used to compile all packages by default.
159                                Individual  packages  may  define  options   which
160                                override these global flags."
161
162         }
163
164         cdl_option CYGBLD_GLOBAL_LDFLAGS {
165             display "Global linker flags"
166             flavor  data
167             no_define
168             default_value { " -g -nostdlib -Wl,--gc-sections -Wl,-static" }
169             description       "This option controls  the global linker  flags.
170                                Individual  packages  may  define  options   which
171                                override these global flags."
172
173         }
174
175         cdl_option CYGBLD_BUILD_GDB_STUBS {
176             display "Build GDB stub ROM image"
177             default_value 0
178             requires { CYG_HAL_STARTUP == "ROM" }
179             requires CYGSEM_HAL_ROM_MONITOR
180             requires CYGBLD_BUILD_COMMON_GDB_STUBS
181             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
182             requires ! CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
183             requires ! CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
184             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
185             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
186             no_define
187             description       "This option enables the  building  of  the  GDB
188                                stubs for the  board.   The  common  HAL  controls
189                                takes care of most of  the build process, but  the
190                                final conversion from ELF image to binary data  is
191                                handled by the  platform CDL, allowing  relocation
192                                of the data if necessary."
193
194             make -priority 320 {
195                 <PREFIX>/bin/gdb_module.srec : <PREFIX>/bin/gdb_module.img
196                 $(OBJCOPY) -O srec $< $@
197             }
198         }
199     }
200
201     cdl_component CYGHWR_MEMORY_LAYOUT {
202         display "Memory layout"
203         flavor data
204         no_define
205         calculated { CYG_HAL_STARTUP == "RAM" ? "mlt_fr30_skmb91302_ram" : \
206                                                 "mlt_fr30_skmb91302_rom" }
207
208         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
209             display "Memory layout linker script fragment"
210             flavor data
211             no_define
212             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
213             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_fr30_skmb91302_ram.ldi>" : \
214                                                     "<pkgconf/mlt_fr30_skmb91302_rom.ldi>" }
215         }
216
217         cdl_option CYGHWR_MEMORY_LAYOUT_H {
218             display "Memory layout header file"
219             flavor data
220             no_define
221             define -file system.h CYGHWR_MEMORY_LAYOUT_H
222             calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_fr30_skmb91302_ram.h>" : \
223                                                     "<pkgconf/mlt_fr30_skmb91302_rom.h>" }
224         }
225     }
226
227     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
228     display       "Work with a ROM monitor"
229         flavor        bool
230         default_value { CYG_HAL_STARTUP == "RAM" ? 1 : 0 }
231         parent        CYGPKG_HAL_ROM_MONITOR
232         requires      { CYG_HAL_STARTUP == "RAM" }
233         description   "
234             Allow coexistence with ROM monitor (CygMon or GDB stubs) by
235             only initializing interrupt vectors on startup, thus leaving
236             exception handling to the ROM monitor."
237     }
238
239     cdl_option CYGSEM_HAL_ROM_MONITOR {
240         display       "Behave as a ROM monitor"
241         flavor        bool
242         default_value 0
243         parent        CYGPKG_HAL_ROM_MONITOR
244         requires      { CYG_HAL_STARTUP == "ROM" }
245
246         description    "Enable this option if this program is to be used as
247                         a ROM monitor, i.e.  applications will be loaded  into
248                         RAM on the  board, and  this ROM  monitor may  process
249                         exceptions   or   interrupts   generated   from    the
250                         application.  This enables features such as  utilizing
251                         a  separate  interrupt   stack  when  exceptions   are
252                         generated."
253
254     }
255
256         cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
257         display       "Redboot HAL options"
258         flavor        none
259         no_define
260         parent        CYGPKG_REDBOOT
261         active_if     CYGPKG_REDBOOT
262         description   "
263             This option lists the target's requirements for a valid Redboot
264             configuration."
265
266         cdl_option CYGBLD_BUILD_REDBOOT_BIN {
267             display       "Build Redboot ROM binary image"
268             active_if     CYGBLD_BUILD_REDBOOT
269             default_value 1
270             no_define
271             description "This option enables the conversion of the Redboot ELF
272                          image to a binary image suitable for ROM programming."
273
274             make -priority 325 {
275                 <PREFIX>/bin/redboot.srec : <PREFIX>/bin/redboot.elf
276                 $(OBJCOPY) --strip-all $< $(@:.srec=.img)
277                 $(OBJCOPY) -O srec $< $@
278             }
279         }
280     }
281
282 }