1 # ====================================================================
3 # hal_sh_sh7750_cq7750.cdl
5 # CQ7750 board HAL package configuration data
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.
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.
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
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.
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.
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.
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####
44 # Original data: jskov
45 # Contributors: Ryozaburo Suzuki
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_SH_SH7750_CQ7750 {
53 display "CqREEK SH7750 board"
55 requires CYGPKG_HAL_SH_7750
56 define_header hal_sh_sh7750_cq7750.h
59 The cq HAL package provides the support needed to run
60 eCos on a CqREEK SH7750 board."
62 compile hal_diag.c plf_misc.c
64 implements CYGINT_HAL_DEBUG_GDB_STUBS
65 implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
66 implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
67 implements CYGINT_HAL_SH_PLF_BIGENDIAN_DEFAULT
70 puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H <pkgconf/hal_sh.h>"
71 puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_sh_sh7750_cq7750.h>"
73 puts $::cdl_header "#define CYGNUM_HAL_SH_SH4_SCIF_PORTS 1"
74 puts $::cdl_header "#define CYGHWR_HAL_VSR_TABLE 0x08000000"
75 puts $::cdl_header "#define CYGHWR_HAL_VECTOR_TABLE 0x08000100"
78 cdl_component CYG_HAL_STARTUP {
79 display "Startup type"
81 legal_values {"RAM" "ROM"}
84 define -file system.h CYG_HAL_STARTUP
86 When targetting the CQ7750 board it is possible to build
87 the system for either RAM bootstrap or ROM bootstrap.
88 RAM bootstrap generally requires that the board
89 is equipped with ROMs containing a suitable ROM monitor or
90 equivalent software that allows GDB to download the eCos
91 application on to the board. The ROM bootstrap typically
92 requires that the eCos application be blown into EPROMs or
93 equivalent technology."
97 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
98 display "Number of communication channels on the board"
103 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
104 display "Debug serial port"
106 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
109 The CQ/7750 board has only one serial port. This option
110 chooses which port will be used to connect to a host
114 cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
115 display "Diagnostic serial port"
117 legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
120 The CQ/7750 board has only one serial port. This option
121 chooses which port will be used for diagnostic output."
124 cdl_component CYGHWR_HAL_SH_PLF_CLOCK_SETTINGS {
125 display "SH on-chip platform clock controls"
127 The various clocks used by the system are derived from
132 cdl_option CYGHWR_HAL_SH_OOC_XTAL {
133 display "SH clock crystal"
135 legal_values 9000000 to 66000000
136 default_value 33333333
139 This option specifies the frequency of the crystal all
140 other clocks are derived from."
143 cdl_option CYGHWR_HAL_SH_OOC_PLL_1 {
144 display "SH clock PLL circuit 1"
149 This selects the multiplication factor provided by
153 cdl_option CYGHWR_HAL_SH_OOC_PLL_2 {
154 display "SH clock PLL circuit 2"
159 This selects the multiplication factor provided by
160 PLL2. If PLL2 is disabled this option should
164 cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_1 {
165 display "SH clock first clock divider"
171 First stage clock divider according to the mode (MD0..2).
172 Set 2 for mode 2 and 4, otherwise set 1."
175 cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_IFC {
176 display "SH CPU clock divider"
179 legal_values { 1 2 3 4 6 8 }
181 This divider option affects the CPU clock."
184 cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_BFC {
185 display "SH bus clock divider"
188 legal_values { 1 2 3 4 6 8 }
190 This divider option affects the bus clock."
193 cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_PFC {
194 display "SH peripheral clock divider"
197 legal_values { 1 2 3 4 6 8 }
199 This divider option affects the peripheral clock."
202 cdl_option CYGHWR_HAL_SH_OOC_CLOCK_MODE {
203 display "SH clock mode"
206 legal_values { 0 1 2 3 4 5 }
208 This option must mirror the clock mode hardwired on
209 the MD0-MD2 pins of the CPU in order to correctly
210 initialize the FRQCR register."
214 cdl_component CYGBLD_GLOBAL_OPTIONS {
215 display "Global build options"
219 Global build options including control over
220 compiler flags, linker flags and choice of toolchain."
223 cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
224 display "Global command prefix"
227 default_value { "sh-elf" }
229 This option specifies the command prefix used when
230 invoking the build tools."
233 # CPU flags should be -m4-nofpu
234 cdl_option CYGBLD_GLOBAL_CFLAGS {
235 display "Global compiler flags"
238 default_value { CYGHWR_HAL_SH_BIGENDIAN ? "-mb -m3 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -ggdb -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" : "-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" }
240 This option controls the global compiler flags which
241 are used to compile all packages by
242 default. Individual packages may define
243 options which override these global flags."
246 cdl_option CYGBLD_GLOBAL_LDFLAGS {
247 display "Global linker flags"
250 default_value { CYGHWR_HAL_SH_BIGENDIAN ? "-mb -m3 -ggdb -nostdlib -Wl,--gc-sections -Wl,-static" : "-ml -m3 -ggdb -nostdlib -Wl,--gc-sections -Wl,-static" }
252 This option controls the global linker flags. Individual
253 packages may define options which override these global flags."
256 cdl_option CYGBLD_BUILD_GDB_STUBS {
257 display "Build GDB stub ROM image"
259 requires { CYG_HAL_STARTUP == "ROM" }
260 requires CYGSEM_HAL_ROM_MONITOR
261 requires CYGBLD_BUILD_COMMON_GDB_STUBS
262 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
263 requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
264 requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
265 requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
266 requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
269 This option enables the building of the GDB stubs for the
270 board. The common HAL controls takes care of most of the
271 build process, but the final conversion from ELF image to
272 binary data is handled by the platform CDL, allowing
273 relocation of the data if necessary."
276 <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
277 $(OBJCOPY) -O binary $< $@
282 cdl_component CYGHWR_MEMORY_LAYOUT {
283 display "Memory layout"
286 calculated { CYG_HAL_STARTUP == "RAM" ? "sh_sh7750_cq7750_ram" : \
287 "sh_sh7750_cq7750_rom" }
289 cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
290 display "Memory layout linker script fragment"
293 define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
294 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_sh_sh7750_cq7750_ram.ldi>" : \
295 "<pkgconf/mlt_sh_sh7750_cq7750_rom.ldi>" }
298 cdl_option CYGHWR_MEMORY_LAYOUT_H {
299 display "Memory layout header file"
302 define -file system.h CYGHWR_MEMORY_LAYOUT_H
303 calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_sh_sh7750_cq7750_ram.h>" : \
304 "<pkgconf/mlt_sh_sh7750_cq7750_rom.h>" }
308 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
309 display "Work with a ROM monitor"
311 legal_values { "GDB_stubs" }
312 default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
313 requires { CYG_HAL_STARTUP == "RAM" }
314 parent CYGPKG_HAL_ROM_MONITOR
315 requires !CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
317 Support can be enabled for boot ROMs or ROM monitors which contain
318 GDB stubs. This support changes various eCos semantics such as
319 the encoding of diagnostic output, and the overriding of hardware
323 cdl_option CYGSEM_HAL_ROM_MONITOR {
324 display "Behave as a ROM monitor"
327 parent CYGPKG_HAL_ROM_MONITOR
328 requires { CYG_HAL_STARTUP == "ROM" }
330 Enable this option if this program is to be used as a ROM monitor,
331 i.e. applications will be loaded into RAM on the board, and this
332 ROM monitor may process exceptions or interrupts generated from the
333 application. This enables features such as utilizing a separate
334 interrupt stack when exceptions are generated."
337 cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
338 display "Redboot HAL options"
341 parent CYGPKG_REDBOOT
342 active_if CYGPKG_REDBOOT
344 This option lists the target's requirements for a valid Redboot
347 cdl_option CYGBLD_BUILD_REDBOOT_BIN {
348 display "Build Redboot ROM binary image"
349 active_if CYGBLD_BUILD_REDBOOT
352 description "This option enables the conversion of the Redboot ELF
353 image to a binary image suitable for ROM programming."
356 <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
357 $(OBJCOPY) --strip-debug $< $(@:.bin=.img)
358 $(OBJCOPY) -O srec $< $(@:.bin=.srec)
359 $(OBJCOPY) -O binary $< $@