]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/sh/dreamcast/v2_0/cdl/hal_sh_sh7750_dreamcast.cdl
6082b39bbd2b6d9b2e8bbfe708b1d60b32843c11
[karo-tx-redboot.git] / packages / hal / sh / dreamcast / v2_0 / cdl / hal_sh_sh7750_dreamcast.cdl
1 # ====================================================================
2 #
3 #      hal_sh_sh7750_dreamcast.cdl
4 #
5 #      SEGA Dreamcast 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):      t@keshi.org
44 # Contributors:   t@keshi.org, jskov
45 # Date:           2001-07-30
46 #
47 #####DESCRIPTIONEND####
48 #
49 # ====================================================================
50
51 cdl_package CYGPKG_HAL_SH_SH7750_DREAMCAST {
52     display       "SEGA Dreamcast"
53     parent        CYGPKG_HAL_SH
54     requires      CYGPKG_HAL_SH_7750
55     requires      ! CYGHWR_HAL_SH_BIGENDIAN
56     define_header hal_sh_sh7750_dreamcast.h
57     include_dir   cyg/hal
58     description   "
59         The HAL package provides the support needed to run
60         eCos on SEGA Dreamcast."
61
62     requires      { CYGDAT_REDBOOT_SH_LINUX_BOOT_ENTRY == 0x8c210000 }
63     requires      { CYGDAT_REDBOOT_SH_LINUX_BOOT_BASE_ADDR == 0x8c001000 }
64     requires      { CYGDAT_REDBOOT_SH_LINUX_BOOT_COMMAND_LINE == "mem=16M" }
65
66     compile       hal_diag.c plf_misc.c dreamcast_pci.c fb_support.c
67     compile       -library=libextras.a boot.S
68
69     implements    CYGINT_HAL_DEBUG_GDB_STUBS
70     implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
71     implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
72     implements    CYGINT_HAL_PLF_IF_INIT
73
74     define_proc {
75         puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_sh.h>"
76         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_sh_sh7750_dreamcast.h>"
77         puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_IO_H <cyg/hal/plf_io.h>"
78         puts $::cdl_header "#define CYGNUM_HAL_SH_SH4_SCIF_PORTS 1"
79         puts $::cdl_header "#define CYGHWR_HAL_VSR_TABLE 0x8c010000"
80         puts $::cdl_header "#define CYGHWR_HAL_VECTOR_TABLE 0x8c010100"
81     }
82
83     cdl_component CYG_HAL_STARTUP {
84         display       "Startup type"
85         flavor        data
86         legal_values  {"RAM"}
87         default_value {"RAM"}
88         no_define
89         define -file system.h CYG_HAL_STARTUP
90         description   "
91            When targetting the Dreamcast it is possible to build
92            the system only for RAM bootstrap via a CD ROM."
93     }
94
95     cdl_option CYGSEM_DREAMCAST_FB_COMM {
96         display        "Support framebuffer for communication channel"
97         active_if      CYGPKG_REDBOOT
98         flavor         bool
99         default_value  1
100     }
101
102     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
103         display      "Number of communication channels on the board"
104         flavor       data
105         calculated   1+CYGSEM_DREAMCAST_FB_COMM
106     }
107
108     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
109         display          "Debug serial port"
110         flavor data
111         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
112         default_value    0
113         description      "
114            Dreamcast has only one serial port. This option
115            chooses which port will be used to connect to a host
116            running GDB."
117     }
118
119     cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
120         display          "Diagnostic serial port"
121         flavor data
122         legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
123         default_value    0
124         description      "
125            Dreamcast has only one serial port.  This option
126            chooses which port will be used for diagnostic output."
127     }
128
129     cdl_option CYGNUM_HAL_SH_SH4_SCIF_BAUD_RATE_DEFAULT {
130         flavor data
131         calculated       115200
132     };
133
134     cdl_component CYGHWR_HAL_SH_PLF_CLOCK_SETTINGS {
135         display          "SH on-chip platform clock controls"
136         description      "
137             The various clocks used by the system are derived from
138             these options."
139         flavor        none
140         no_define
141                      
142         cdl_option CYGHWR_HAL_SH_OOC_XTAL {
143             display          "SH clock crystal"
144             flavor           data
145             calculated       33333333
146             no_define
147             description      "
148                 This option specifies the frequency of the crystal all
149                 other clocks are derived from."
150         }
151
152         cdl_option CYGHWR_HAL_SH_OOC_CKIO {
153             display          "SH clock CKIO output enable"
154             default_value    1
155             description      "
156                 This selects whether CKIO output is enabled."
157         }
158
159         cdl_option CYGHWR_HAL_SH_OOC_PLL_1 {
160             display          "SH clock PLL circuit 1"
161             flavor           data
162             calculated       6
163             description      "
164                 This selects whether PLL1 is enabled."
165         }
166
167         cdl_option CYGHWR_HAL_SH_OOC_PLL_2 {
168             display          "SH clock PLL circuit 2"
169             flavor           data
170             calculated       1
171             description      "
172                 This selects whether PLL2 is enabled."
173         }
174
175         cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_1 {
176             display          "SH clock first clock divider"
177             flavor           data
178             legal_values     { 1 2 }
179             default_value    1
180             no_define
181             description      "
182                 First stage clock divider according to the mode (MD0..2).
183                 Set 2 for mode 2 and 4, otherwise set 1."
184         }
185
186         cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_IFC {
187             display          "SH clock divider, core"
188             flavor           data
189             calculated       1
190             description      "
191                 This divider option affects the CPU core clock."
192         }
193
194         cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_BFC {
195             display          "SH clock divider, bus"
196             flavor           data
197             calculated       2
198             description      "
199                 This divider option affects the bus clock."
200         }
201
202         cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_PFC {
203             display          "SH clock divider, peripheral"
204             flavor           data
205             calculated       4
206             description      "
207                 This divider option affects the peripheral clock."
208         }
209
210         cdl_option CYGHWR_HAL_SH_OOC_CLOCK_MODE {
211             display          "SH clock mode"
212             flavor           data
213             calculated       5
214             description      "
215                 This option must mirror the clock mode hardwired on
216                 the MD0-MD2 pins of the CPU in order to correctly
217                 initialize the FRQCR register."
218         }
219     }
220
221     cdl_component CYGBLD_GLOBAL_OPTIONS {
222         display "Global build options"
223         flavor  none
224         parent  CYGPKG_NONE
225         description   "
226             Global build options including control over
227             compiler flags, linker flags and choice of toolchain."
228
229
230         cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
231             display "Global command prefix"
232             flavor  data
233             no_define
234             default_value { "sh-elf" }
235             description "
236                 This option specifies the command prefix used when
237                 invoking the build tools."
238         }
239
240         cdl_option CYGBLD_GLOBAL_CFLAGS {
241             display "Global compiler flags"
242             flavor  data
243             no_define
244             default_value { "-ml -m3 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -ggdb -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
245             description   "
246                 This option controls the global compiler flags which
247                 are used to compile all packages by
248                 default. Individual packages may define
249                 options which override these global flags."
250         }
251
252         cdl_option CYGBLD_GLOBAL_LDFLAGS {
253             display "Global linker flags"
254             flavor  data
255             no_define
256             default_value { "-ml -m3 -ggdb -nostdlib -Wl,--gc-sections -Wl,-static" }
257             description   "
258                 This option controls the global linker flags. Individual
259                 packages may define options which override these global flags."
260         }
261
262         cdl_option CYGBLD_BUILD_GDB_STUBS {
263             display "Build GDB stub ROM image"
264             default_value 0
265             requires CYGSEM_HAL_ROM_MONITOR
266             requires CYGBLD_BUILD_COMMON_GDB_STUBS
267             requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
268             requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
269             requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
270             requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
271             requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
272             no_define
273             description "
274                 This option enables the building of the GDB stubs for the
275                 board. The common HAL controls takes care of most of the
276                 build process, but the final conversion from ELF image to
277                 binary data is handled by the platform CDL, allowing
278                 relocation of the data if necessary."
279
280             make -priority 320 {
281                 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
282                 $(OBJCOPY) -O binary $< $@
283             }
284         }
285     }
286
287     cdl_component CYGHWR_MEMORY_LAYOUT {
288         display "Memory layout"
289         flavor data
290         no_define
291         calculated { "sh_sh7750_dreamcast_ram" }
292
293         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
294             display "Memory layout linker script fragment"
295             flavor data
296             no_define
297             define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
298             calculated { "<pkgconf/mlt_sh_sh7750_dreamcast_ram.ldi>" }
299         }
300
301         cdl_option CYGHWR_MEMORY_LAYOUT_H {
302             display "Memory layout header file"
303             flavor data
304             no_define
305             define -file system.h CYGHWR_MEMORY_LAYOUT_H
306             calculated { "<pkgconf/mlt_sh_sh7750_dreamcast_ram.h>" }
307         }
308     }
309
310     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
311         display       "Work with a ROM monitor"
312         flavor        booldata
313         legal_values  { "GDB_stubs" }
314         default_value 0
315         requires      { CYG_HAL_STARTUP == "RAM" }
316         parent        CYGPKG_HAL_ROM_MONITOR
317         requires      !CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
318         description   "
319             Support can be enabled for boot ROMs or ROM monitors which contain
320             GDB stubs. This support changes various eCos semantics such as
321             the encoding of diagnostic output, and the overriding of hardware
322             interrupt vectors."
323     }
324
325     cdl_option CYGSEM_HAL_ROM_MONITOR {
326         display       "Behave as a ROM monitor"
327         flavor        bool
328         default_value 0
329         parent        CYGPKG_HAL_ROM_MONITOR
330         requires      { CYG_HAL_STARTUP == "ROM" }
331         description   "
332             Enable this option if this program is to be used as a ROM monitor,
333             i.e. applications will be loaded into RAM on the board, and this
334             ROM monitor may process exceptions or interrupts generated from the
335             application. This enables features such as utilizing a separate
336             interrupt stack when exceptions are generated."
337     }
338 }