1 |
1254 |
phoenix |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# hal_sh_sh7750_cq7750.cdl
|
4 |
|
|
#
|
5 |
|
|
# CQ7750 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 |
|
|
##
|
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): jskov
|
44 |
|
|
# Original data: jskov
|
45 |
|
|
# Contributors: Ryozaburo Suzuki
|
46 |
|
|
# Date: 1999-10-29
|
47 |
|
|
#
|
48 |
|
|
#####DESCRIPTIONEND####
|
49 |
|
|
#
|
50 |
|
|
# ====================================================================
|
51 |
|
|
|
52 |
|
|
cdl_package CYGPKG_HAL_SH_SH7750_CQ7750 {
|
53 |
|
|
display "CqREEK SH7750 board"
|
54 |
|
|
parent CYGPKG_HAL_SH
|
55 |
|
|
requires CYGPKG_HAL_SH_7750
|
56 |
|
|
define_header hal_sh_sh7750_cq7750.h
|
57 |
|
|
include_dir cyg/hal
|
58 |
|
|
description "
|
59 |
|
|
The cq HAL package provides the support needed to run
|
60 |
|
|
eCos on a CqREEK SH7750 board."
|
61 |
|
|
|
62 |
|
|
compile hal_diag.c plf_misc.c
|
63 |
|
|
|
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
|
68 |
|
|
|
69 |
|
|
define_proc {
|
70 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H "
|
71 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
|
72 |
|
|
|
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"
|
76 |
|
|
}
|
77 |
|
|
|
78 |
|
|
cdl_component CYG_HAL_STARTUP {
|
79 |
|
|
display "Startup type"
|
80 |
|
|
flavor data
|
81 |
|
|
legal_values {"RAM" "ROM"}
|
82 |
|
|
default_value {"RAM"}
|
83 |
|
|
no_define
|
84 |
|
|
define -file system.h CYG_HAL_STARTUP
|
85 |
|
|
description "
|
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."
|
94 |
|
|
}
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
|
98 |
|
|
display "Number of communication channels on the board"
|
99 |
|
|
flavor data
|
100 |
|
|
calculated 1
|
101 |
|
|
}
|
102 |
|
|
|
103 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
|
104 |
|
|
display "Debug serial port"
|
105 |
|
|
flavor data
|
106 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
107 |
|
|
default_value 0
|
108 |
|
|
description "
|
109 |
|
|
The CQ/7750 board has only one serial port. This option
|
110 |
|
|
chooses which port will be used to connect to a host
|
111 |
|
|
running GDB."
|
112 |
|
|
}
|
113 |
|
|
|
114 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
|
115 |
|
|
display "Diagnostic serial port"
|
116 |
|
|
flavor data
|
117 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
118 |
|
|
default_value 0
|
119 |
|
|
description "
|
120 |
|
|
The CQ/7750 board has only one serial port. This option
|
121 |
|
|
chooses which port will be used for diagnostic output."
|
122 |
|
|
}
|
123 |
|
|
|
124 |
|
|
cdl_component CYGHWR_HAL_SH_PLF_CLOCK_SETTINGS {
|
125 |
|
|
display "SH on-chip platform clock controls"
|
126 |
|
|
description "
|
127 |
|
|
The various clocks used by the system are derived from
|
128 |
|
|
these options."
|
129 |
|
|
flavor none
|
130 |
|
|
no_define
|
131 |
|
|
|
132 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_XTAL {
|
133 |
|
|
display "SH clock crystal"
|
134 |
|
|
flavor data
|
135 |
|
|
legal_values 9000000 to 66000000
|
136 |
|
|
default_value 33333333
|
137 |
|
|
no_define
|
138 |
|
|
description "
|
139 |
|
|
This option specifies the frequency of the crystal all
|
140 |
|
|
other clocks are derived from."
|
141 |
|
|
}
|
142 |
|
|
|
143 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_PLL_1 {
|
144 |
|
|
display "SH clock PLL circuit 1"
|
145 |
|
|
flavor data
|
146 |
|
|
default_value 6
|
147 |
|
|
legal_values { 0 6 }
|
148 |
|
|
description "
|
149 |
|
|
This selects the multiplication factor provided by
|
150 |
|
|
PLL1."
|
151 |
|
|
}
|
152 |
|
|
|
153 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_PLL_2 {
|
154 |
|
|
display "SH clock PLL circuit 2"
|
155 |
|
|
flavor data
|
156 |
|
|
default_value 1
|
157 |
|
|
legal_values { 0 1 }
|
158 |
|
|
description "
|
159 |
|
|
This selects the multiplication factor provided by
|
160 |
|
|
PLL2. If PLL2 is disabled this option should
|
161 |
|
|
be set to zero."
|
162 |
|
|
}
|
163 |
|
|
|
164 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_1 {
|
165 |
|
|
display "SH clock first clock divider"
|
166 |
|
|
flavor data
|
167 |
|
|
legal_values { 1 2 }
|
168 |
|
|
default_value 1
|
169 |
|
|
no_define
|
170 |
|
|
description "
|
171 |
|
|
First stage clock divider according to the mode (MD0..2).
|
172 |
|
|
Set 2 for mode 2 and 4, otherwise set 1."
|
173 |
|
|
}
|
174 |
|
|
|
175 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_IFC {
|
176 |
|
|
display "SH CPU clock divider"
|
177 |
|
|
flavor data
|
178 |
|
|
default_value 1
|
179 |
|
|
legal_values { 1 2 3 4 6 8 }
|
180 |
|
|
description "
|
181 |
|
|
This divider option affects the CPU clock."
|
182 |
|
|
}
|
183 |
|
|
|
184 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_BFC {
|
185 |
|
|
display "SH bus clock divider"
|
186 |
|
|
flavor data
|
187 |
|
|
default_value 3
|
188 |
|
|
legal_values { 1 2 3 4 6 8 }
|
189 |
|
|
description "
|
190 |
|
|
This divider option affects the bus clock."
|
191 |
|
|
}
|
192 |
|
|
|
193 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_PFC {
|
194 |
|
|
display "SH peripheral clock divider"
|
195 |
|
|
flavor data
|
196 |
|
|
default_value 6
|
197 |
|
|
legal_values { 1 2 3 4 6 8 }
|
198 |
|
|
description "
|
199 |
|
|
This divider option affects the peripheral clock."
|
200 |
|
|
}
|
201 |
|
|
|
202 |
|
|
cdl_option CYGHWR_HAL_SH_OOC_CLOCK_MODE {
|
203 |
|
|
display "SH clock mode"
|
204 |
|
|
flavor data
|
205 |
|
|
default_value 5
|
206 |
|
|
legal_values { 0 1 2 3 4 5 }
|
207 |
|
|
description "
|
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."
|
211 |
|
|
}
|
212 |
|
|
}
|
213 |
|
|
|
214 |
|
|
cdl_component CYGBLD_GLOBAL_OPTIONS {
|
215 |
|
|
display "Global build options"
|
216 |
|
|
flavor none
|
217 |
|
|
parent CYGPKG_NONE
|
218 |
|
|
description "
|
219 |
|
|
Global build options including control over
|
220 |
|
|
compiler flags, linker flags and choice of toolchain."
|
221 |
|
|
|
222 |
|
|
|
223 |
|
|
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
|
224 |
|
|
display "Global command prefix"
|
225 |
|
|
flavor data
|
226 |
|
|
no_define
|
227 |
|
|
default_value { "sh-elf" }
|
228 |
|
|
description "
|
229 |
|
|
This option specifies the command prefix used when
|
230 |
|
|
invoking the build tools."
|
231 |
|
|
}
|
232 |
|
|
|
233 |
|
|
# CPU flags should be -m4-nofpu
|
234 |
|
|
cdl_option CYGBLD_GLOBAL_CFLAGS {
|
235 |
|
|
display "Global compiler flags"
|
236 |
|
|
flavor data
|
237 |
|
|
no_define
|
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" }
|
239 |
|
|
description "
|
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."
|
244 |
|
|
}
|
245 |
|
|
|
246 |
|
|
cdl_option CYGBLD_GLOBAL_LDFLAGS {
|
247 |
|
|
display "Global linker flags"
|
248 |
|
|
flavor data
|
249 |
|
|
no_define
|
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" }
|
251 |
|
|
description "
|
252 |
|
|
This option controls the global linker flags. Individual
|
253 |
|
|
packages may define options which override these global flags."
|
254 |
|
|
}
|
255 |
|
|
|
256 |
|
|
cdl_option CYGBLD_BUILD_GDB_STUBS {
|
257 |
|
|
display "Build GDB stub ROM image"
|
258 |
|
|
default_value 0
|
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
|
267 |
|
|
no_define
|
268 |
|
|
description "
|
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."
|
274 |
|
|
|
275 |
|
|
make -priority 320 {
|
276 |
|
|
/bin/gdb_module.bin : /bin/gdb_module.img
|
277 |
|
|
$(OBJCOPY) -O binary $< $@
|
278 |
|
|
}
|
279 |
|
|
}
|
280 |
|
|
}
|
281 |
|
|
|
282 |
|
|
cdl_component CYGHWR_MEMORY_LAYOUT {
|
283 |
|
|
display "Memory layout"
|
284 |
|
|
flavor data
|
285 |
|
|
no_define
|
286 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "sh_sh7750_cq7750_ram" : \
|
287 |
|
|
"sh_sh7750_cq7750_rom" }
|
288 |
|
|
|
289 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
|
290 |
|
|
display "Memory layout linker script fragment"
|
291 |
|
|
flavor data
|
292 |
|
|
no_define
|
293 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
|
294 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
295 |
|
|
"" }
|
296 |
|
|
}
|
297 |
|
|
|
298 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_H {
|
299 |
|
|
display "Memory layout header file"
|
300 |
|
|
flavor data
|
301 |
|
|
no_define
|
302 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_H
|
303 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
304 |
|
|
"" }
|
305 |
|
|
}
|
306 |
|
|
}
|
307 |
|
|
|
308 |
|
|
cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
|
309 |
|
|
display "Work with a ROM monitor"
|
310 |
|
|
flavor booldata
|
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
|
316 |
|
|
description "
|
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
|
320 |
|
|
interrupt vectors."
|
321 |
|
|
}
|
322 |
|
|
|
323 |
|
|
cdl_option CYGSEM_HAL_ROM_MONITOR {
|
324 |
|
|
display "Behave as a ROM monitor"
|
325 |
|
|
flavor bool
|
326 |
|
|
default_value 0
|
327 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
328 |
|
|
requires { CYG_HAL_STARTUP == "ROM" }
|
329 |
|
|
description "
|
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."
|
335 |
|
|
}
|
336 |
|
|
|
337 |
|
|
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
|
338 |
|
|
display "Redboot HAL options"
|
339 |
|
|
flavor none
|
340 |
|
|
no_define
|
341 |
|
|
parent CYGPKG_REDBOOT
|
342 |
|
|
active_if CYGPKG_REDBOOT
|
343 |
|
|
description "
|
344 |
|
|
This option lists the target's requirements for a valid Redboot
|
345 |
|
|
configuration."
|
346 |
|
|
|
347 |
|
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN {
|
348 |
|
|
display "Build Redboot ROM binary image"
|
349 |
|
|
active_if CYGBLD_BUILD_REDBOOT
|
350 |
|
|
default_value 1
|
351 |
|
|
no_define
|
352 |
|
|
description "This option enables the conversion of the Redboot ELF
|
353 |
|
|
image to a binary image suitable for ROM programming."
|
354 |
|
|
|
355 |
|
|
make -priority 325 {
|
356 |
|
|
/bin/redboot.bin : /bin/redboot.elf
|
357 |
|
|
$(OBJCOPY) --strip-debug $< $(@:.bin=.img)
|
358 |
|
|
$(OBJCOPY) -O srec $< $(@:.bin=.srec)
|
359 |
|
|
$(OBJCOPY) -O binary $< $@
|
360 |
|
|
}
|
361 |
|
|
}
|
362 |
|
|
}
|
363 |
|
|
}
|