1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# hal_frv_frv400.cdl
|
4 |
|
|
#
|
5 |
|
|
# FRV400 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 Free Software Foundation, 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
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY 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
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
# ====================================================================
|
40 |
|
|
######DESCRIPTIONBEGIN####
|
41 |
|
|
#
|
42 |
|
|
# Author(s): bartv
|
43 |
|
|
# Original data: gthomas
|
44 |
|
|
# Contributors:
|
45 |
|
|
# Date: 2001-09-07
|
46 |
|
|
#
|
47 |
|
|
#####DESCRIPTIONEND####
|
48 |
|
|
#
|
49 |
|
|
# ====================================================================
|
50 |
|
|
|
51 |
|
|
cdl_package CYGPKG_HAL_FRV_FRV400 {
|
52 |
|
|
display "FUJITSU MB93091 (FR-V 400) evaluation board"
|
53 |
|
|
parent CYGPKG_HAL_FRV
|
54 |
|
|
|
55 |
|
|
define_header hal_frv_frv400.h
|
56 |
|
|
include_dir cyg/hal
|
57 |
|
|
hardware
|
58 |
|
|
description "
|
59 |
|
|
The frv400 HAL package provides the support needed to run
|
60 |
|
|
eCos on a FUJITSU MB93091 (FR-V 400) eval board."
|
61 |
|
|
|
62 |
|
|
compile hal_diag.c frv400_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_FRV_ARCH_FR400
|
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 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_PLF_DEFS_H "
|
73 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_IO_H "
|
74 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_CPU \"Fujitsu FR400\""
|
75 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_BOARD \"MB93091-CB10 evaluation board\""
|
76 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
|
77 |
|
|
}
|
78 |
|
|
|
79 |
|
|
cdl_component CYG_HAL_STARTUP {
|
80 |
|
|
display "Startup type"
|
81 |
|
|
flavor data
|
82 |
|
|
default_value {"RAM"}
|
83 |
|
|
legal_values {"RAM" "ROM" "ROMRAM" }
|
84 |
|
|
no_define
|
85 |
|
|
define -file system.h CYG_HAL_STARTUP
|
86 |
|
|
description "
|
87 |
|
|
When targetting the MB93091 (FR-V 400) eval board it is possible to build
|
88 |
|
|
the system for either RAM bootstrap or ROM bootstrap(s). Select
|
89 |
|
|
'ram' when building programs to load into RAM using onboard
|
90 |
|
|
debug software such as Angel or eCos GDB stubs. Select 'rom'
|
91 |
|
|
when building a stand-alone application which will be put
|
92 |
|
|
into ROM. For the ROMRAM startup type, code will behave as
|
93 |
|
|
if in ROM, but will be copied to static RAM on the board before
|
94 |
|
|
execution."
|
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 2
|
101 |
|
|
}
|
102 |
|
|
|
103 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
|
104 |
|
|
display "Debug serial port"
|
105 |
|
|
active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
|
106 |
|
|
flavor data
|
107 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
108 |
|
|
default_value 0
|
109 |
|
|
description "
|
110 |
|
|
The FRV400 board has two serial ports. This option
|
111 |
|
|
chooses which port will be used to connect to a host
|
112 |
|
|
running GDB."
|
113 |
|
|
}
|
114 |
|
|
|
115 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT {
|
116 |
|
|
display "Default console channel."
|
117 |
|
|
flavor data
|
118 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
119 |
|
|
calculated 0
|
120 |
|
|
}
|
121 |
|
|
|
122 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
|
123 |
|
|
display "Diagnostic serial port"
|
124 |
|
|
active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
|
125 |
|
|
flavor data
|
126 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
127 |
|
|
default_value CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_DEFAULT
|
128 |
|
|
description "
|
129 |
|
|
The FRV400 board has two serial ports. This option
|
130 |
|
|
chooses which port will be used for diagnostic output."
|
131 |
|
|
}
|
132 |
|
|
|
133 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
|
134 |
|
|
display "Diagnostic serial port baud rate"
|
135 |
|
|
flavor data
|
136 |
|
|
legal_values 9600 19200 38400 115200
|
137 |
|
|
default_value 38400
|
138 |
|
|
description "
|
139 |
|
|
This option selects the baud rate used for the diagnostic port.
|
140 |
|
|
Note: this should match the value chosen for the GDB port if the
|
141 |
|
|
diagnostic and GDB port are the same."
|
142 |
|
|
}
|
143 |
|
|
|
144 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_BAUD {
|
145 |
|
|
display "GDB serial port baud rate"
|
146 |
|
|
flavor data
|
147 |
|
|
legal_values 9600 19200 38400 115200
|
148 |
|
|
default_value 38400
|
149 |
|
|
description "
|
150 |
|
|
This option selects the baud rate used for the diagnostic port.
|
151 |
|
|
Note: this should match the value chosen for the GDB port if the
|
152 |
|
|
diagnostic and GDB port are the same."
|
153 |
|
|
}
|
154 |
|
|
|
155 |
|
|
cdl_option CYGSEM_HAL_DIAG_USES_LEDS {
|
156 |
|
|
display "Use LED bank for feedback on serial port use"
|
157 |
|
|
flavor bool
|
158 |
|
|
default_value 1
|
159 |
|
|
description "
|
160 |
|
|
Enable this option to display information in the motherboard
|
161 |
|
|
LED array about serial I/O. Indications will be made while
|
162 |
|
|
data is being sent and received over the diagnostic serial ports.
|
163 |
|
|
This can be useful when the board is talking with GDB, etc."
|
164 |
|
|
}
|
165 |
|
|
|
166 |
|
|
# Real-time clock/counter specifics
|
167 |
|
|
cdl_component CYGNUM_HAL_RTC_CONSTANTS {
|
168 |
|
|
display "Real-time clock constants"
|
169 |
|
|
flavor none
|
170 |
|
|
|
171 |
|
|
cdl_option CYGNUM_HAL_RTC_NUMERATOR {
|
172 |
|
|
display "Real-time clock numerator"
|
173 |
|
|
flavor data
|
174 |
|
|
default_value 1000000000
|
175 |
|
|
}
|
176 |
|
|
cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
|
177 |
|
|
display "Real-time clock denominator"
|
178 |
|
|
flavor data
|
179 |
|
|
default_value 100
|
180 |
|
|
}
|
181 |
|
|
cdl_option CYGNUM_HAL_RTC_PERIOD {
|
182 |
|
|
display "Real-time clock period"
|
183 |
|
|
flavor data
|
184 |
|
|
# Internal clock set up to run at 1MHz
|
185 |
|
|
default_value { (1000000/CYGNUM_HAL_RTC_DENOMINATOR) }
|
186 |
|
|
}
|
187 |
|
|
}
|
188 |
|
|
|
189 |
|
|
cdl_component CYGBLD_GLOBAL_OPTIONS {
|
190 |
|
|
display "Global build options"
|
191 |
|
|
flavor none
|
192 |
|
|
parent CYGPKG_NONE
|
193 |
|
|
description "
|
194 |
|
|
Global build options including control over
|
195 |
|
|
compiler flags, linker flags and choice of toolchain."
|
196 |
|
|
|
197 |
|
|
|
198 |
|
|
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
|
199 |
|
|
display "Global command prefix"
|
200 |
|
|
flavor data
|
201 |
|
|
no_define
|
202 |
|
|
default_value { "frv-elf" }
|
203 |
|
|
description "
|
204 |
|
|
This option specifies the command prefix used when
|
205 |
|
|
invoking the build tools."
|
206 |
|
|
}
|
207 |
|
|
|
208 |
|
|
cdl_option CYGBLD_GLOBAL_CFLAGS {
|
209 |
|
|
display "Global compiler flags"
|
210 |
|
|
flavor data
|
211 |
|
|
no_define
|
212 |
|
|
default_value { CYGBLD_GLOBAL_WARNFLAGS . "-mcpu=fr400 -fPIC -G0 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
|
213 |
|
|
description "
|
214 |
|
|
This option controls the global compiler flags which are used to
|
215 |
|
|
compile all packages by default. Individual packages may define
|
216 |
|
|
options which override these global flags."
|
217 |
|
|
}
|
218 |
|
|
|
219 |
|
|
cdl_option CYGBLD_GLOBAL_LDFLAGS {
|
220 |
|
|
display "Global linker flags"
|
221 |
|
|
flavor data
|
222 |
|
|
no_define
|
223 |
|
|
default_value { "-mcpu=fr400 -fPIC -G0 -Wl,--gc-sections -Wl,-static -g -nostdlib" }
|
224 |
|
|
description "
|
225 |
|
|
This option controls the global linker flags. Individual
|
226 |
|
|
packages may define options which override these global flags."
|
227 |
|
|
}
|
228 |
|
|
|
229 |
|
|
cdl_option CYGBLD_BUILD_GDB_STUBS {
|
230 |
|
|
display "Build GDB stub ROM image"
|
231 |
|
|
default_value 0
|
232 |
|
|
requires { CYG_HAL_STARTUP == "ROM" }
|
233 |
|
|
requires CYGSEM_HAL_ROM_MONITOR
|
234 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
|
235 |
|
|
requires ! CYGBLD_BUILD_COMMON_GDB_STUBS
|
236 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
|
237 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
|
238 |
|
|
requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
|
239 |
|
|
requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
|
240 |
|
|
no_define
|
241 |
|
|
description "
|
242 |
|
|
This option enables the building of the GDB stubs for the
|
243 |
|
|
board. This is a bit convoluted as it involves prepending
|
244 |
|
|
the image with a special header used by the FRV400 firmware
|
245 |
|
|
to keep track of multiple ROM images. This header includes
|
246 |
|
|
a checksum making it necessary to build twice."
|
247 |
|
|
|
248 |
|
|
make -priority 320 {
|
249 |
|
|
/bin/gdb_module.bin : /src/gdb_module.c
|
250 |
|
|
@sh -c "mkdir -p src $(dir $@)"
|
251 |
|
|
# First build version with no checksum.
|
252 |
|
|
$(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/gdb_module_ncs.o $<
|
253 |
|
|
$(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module_ncs.tmp src/gdb_module_ncs.o
|
254 |
|
|
$(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module_ncs.tmp src/gdb_module_ncs.img
|
255 |
|
|
$(OBJCOPY) -O binary src/gdb_module_ncs.img src/gdb_module_ncs.bin
|
256 |
|
|
@rm src/gdb_module_ncs.tmp src/gdb_module_ncs.img
|
257 |
|
|
# Prepare dependency file
|
258 |
|
|
@echo $@ ": \\" > $(notdir $@).deps
|
259 |
|
|
@echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
|
260 |
|
|
@tail -n +2 deps.tmp >> $(notdir $@).deps
|
261 |
|
|
@echo >> $(notdir $@).deps
|
262 |
|
|
@rm deps.tmp
|
263 |
|
|
# Then build version with checksum from previously built image.
|
264 |
|
|
$(CC) -c -DCHECKSUM=`$(dir $<)flash_cksum.tcl src/gdb_module_ncs.bin` $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o src/gdb_module.o $<
|
265 |
|
|
$(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o src/gdb_module.tmp src/gdb_module.o
|
266 |
|
|
$(OBJCOPY) --strip-debug --change-addresses=0xFBFF4000 src/gdb_module.tmp $(@:.bin=.img)
|
267 |
|
|
$(OBJCOPY) -O binary $(@:.bin=.img) src/gdb_module.bin
|
268 |
|
|
uuencode src/gdb_module.bin gdb_module.bin | tr '`' ' ' > $(@:.bin=.img.UU)
|
269 |
|
|
@rm src/gdb_module.tmp src/gdb_module_ncs.bin
|
270 |
|
|
@mv src/gdb_module.bin $@
|
271 |
|
|
}
|
272 |
|
|
}
|
273 |
|
|
}
|
274 |
|
|
|
275 |
|
|
cdl_component CYGHWR_MEMORY_LAYOUT {
|
276 |
|
|
display "Memory layout"
|
277 |
|
|
flavor data
|
278 |
|
|
no_define
|
279 |
|
|
calculated { (CYG_HAL_STARTUP == "RAM") ? "frv_frv400_ram" : \
|
280 |
|
|
(CYG_HAL_STARTUP == "ROM") ? "frv_frv400_rom" : \
|
281 |
|
|
(CYG_HAL_STARTUP == "ROMRAM") ? "frv_frv400_romram" : \
|
282 |
|
|
"frv_frv400C_UNKNOWN" }
|
283 |
|
|
|
284 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
|
285 |
|
|
display "Memory layout linker script fragment"
|
286 |
|
|
flavor data
|
287 |
|
|
no_define
|
288 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
|
289 |
|
|
calculated { (CYG_HAL_STARTUP == "RAM") ? "" : \
|
290 |
|
|
(CYG_HAL_STARTUP == "ROM") ? "" : \
|
291 |
|
|
(CYG_HAL_STARTUP == "ROMRAM") ? "" : \
|
292 |
|
|
"" }
|
293 |
|
|
}
|
294 |
|
|
|
295 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_H {
|
296 |
|
|
display "Memory layout header file"
|
297 |
|
|
flavor data
|
298 |
|
|
no_define
|
299 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_H
|
300 |
|
|
calculated { (CYG_HAL_STARTUP == "RAM") ? "" : \
|
301 |
|
|
(CYG_HAL_STARTUP == "ROM") ? "" : \
|
302 |
|
|
(CYG_HAL_STARTUP == "ROMRAM") ? "" : \
|
303 |
|
|
"" }
|
304 |
|
|
}
|
305 |
|
|
}
|
306 |
|
|
|
307 |
|
|
cdl_option CYGSEM_HAL_ROM_MONITOR {
|
308 |
|
|
display "Behave as a ROM monitor"
|
309 |
|
|
flavor bool
|
310 |
|
|
default_value 0
|
311 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
312 |
|
|
requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
|
313 |
|
|
description "
|
314 |
|
|
Enable this option if this program is to be used as a ROM monitor,
|
315 |
|
|
i.e. applications will be loaded into RAM on the board, and this
|
316 |
|
|
ROM monitor may process exceptions or interrupts generated from the
|
317 |
|
|
application. This enables features such as utilizing a separate
|
318 |
|
|
interrupt stack when exceptions are generated."
|
319 |
|
|
}
|
320 |
|
|
|
321 |
|
|
cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
|
322 |
|
|
display "Work with a ROM monitor"
|
323 |
|
|
flavor booldata
|
324 |
|
|
legal_values { "Generic" "GDB_stubs" }
|
325 |
|
|
default_value { CYG_HAL_STARTUP == "RAM" ? "GDB_stubs" : 0 }
|
326 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
327 |
|
|
requires { CYG_HAL_STARTUP == "RAM" }
|
328 |
|
|
description "
|
329 |
|
|
Support can be enabled for different varieties of ROM monitor.
|
330 |
|
|
This support changes various eCos semantics such as the encoding
|
331 |
|
|
of diagnostic output, or the overriding of hardware interrupt
|
332 |
|
|
vectors.
|
333 |
|
|
Firstly there is \"Generic\" support which prevents the HAL
|
334 |
|
|
from overriding the hardware vectors that it does not use, to
|
335 |
|
|
instead allow an installed ROM monitor to handle them. This is
|
336 |
|
|
the most basic support which is likely to be common to most
|
337 |
|
|
implementations of ROM monitor.
|
338 |
|
|
\"GDB_stubs\" provides support when GDB stubs are included in
|
339 |
|
|
the ROM monitor or boot ROM."
|
340 |
|
|
}
|
341 |
|
|
|
342 |
|
|
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
|
343 |
|
|
display "Redboot HAL options"
|
344 |
|
|
flavor none
|
345 |
|
|
no_define
|
346 |
|
|
parent CYGPKG_REDBOOT
|
347 |
|
|
active_if CYGPKG_REDBOOT
|
348 |
|
|
description "
|
349 |
|
|
This option lists the target's requirements for a valid Redboot
|
350 |
|
|
configuration."
|
351 |
|
|
|
352 |
|
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN {
|
353 |
|
|
display "Build Redboot ROM binary image"
|
354 |
|
|
active_if CYGBLD_BUILD_REDBOOT
|
355 |
|
|
default_value 1
|
356 |
|
|
no_define
|
357 |
|
|
description "This option enables the conversion of the Redboot ELF
|
358 |
|
|
image to a binary image suitable for ROM programming."
|
359 |
|
|
|
360 |
|
|
# compile -library=libextras.a redboot_cmds.c
|
361 |
|
|
|
362 |
|
|
make -priority 325 {
|
363 |
|
|
/bin/redboot.bin : /bin/redboot.elf
|
364 |
|
|
$(OBJCOPY) --strip-debug $< $(@:.bin=.img)
|
365 |
|
|
$(OBJCOPY) -O srec $< $(@:.bin=.srec)
|
366 |
|
|
$(OBJCOPY) -O binary $< $@
|
367 |
|
|
}
|
368 |
|
|
}
|
369 |
|
|
}
|
370 |
|
|
|
371 |
|
|
}
|