1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# hal_powerpc_viper.cdl
|
4 |
|
|
#
|
5 |
|
|
# PowerPC/VIPER 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, 2003, 2004 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): jskov
|
43 |
|
|
# Original data: hmt
|
44 |
|
|
# Contributors: gthomas
|
45 |
|
|
# Date: 1999-11-02
|
46 |
|
|
#
|
47 |
|
|
#####DESCRIPTIONEND####
|
48 |
|
|
#
|
49 |
|
|
# ====================================================================
|
50 |
|
|
|
51 |
|
|
cdl_package CYGPKG_HAL_POWERPC_VIPER {
|
52 |
|
|
display "A&M Viper PowerPC evaluation board"
|
53 |
|
|
parent CYGPKG_HAL_POWERPC
|
54 |
|
|
requires CYGPKG_HAL_POWERPC_MPC8xx
|
55 |
|
|
define_header hal_powerpc_viper.h
|
56 |
|
|
include_dir cyg/hal
|
57 |
|
|
description "
|
58 |
|
|
The VIPER HAL package provides the support needed to run
|
59 |
|
|
eCos on a A&M Viper board equipped with a PowerPC processor."
|
60 |
|
|
|
61 |
|
|
compile hal_diag.c hal_aux.c viper.S
|
62 |
|
|
|
63 |
|
|
implements CYGINT_HAL_DEBUG_GDB_STUBS
|
64 |
|
|
implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
|
65 |
|
|
implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
|
66 |
|
|
implements CYGNUM_HAL_QUICC_SMC1
|
67 |
|
|
implements CYGNUM_HAL_QUICC_SCC1
|
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 |
|
|
|
74 |
|
|
cdl_component CYGPKG_HAL_POWERPC_VIPER_MODEL {
|
75 |
|
|
display "Viper model"
|
76 |
|
|
requires { (CYGHWR_HAL_POWERPC_VIPER_I + CYGHWR_HAL_POWERPC_VIPER_II) == 1 }
|
77 |
|
|
default_value 1
|
78 |
|
|
no_define
|
79 |
|
|
description "
|
80 |
|
|
The sub-options of this component define the model of Viper"
|
81 |
|
|
|
82 |
|
|
cdl_option CYGHWR_HAL_POWERPC_VIPER_I {
|
83 |
|
|
display "Viper-I with 860T"
|
84 |
|
|
requires !CYGHWR_HAL_POWERPC_VIPER_II
|
85 |
|
|
requires { (CYGHWR_HAL_POWERPC_MPC8XX == "860T") ||
|
86 |
|
|
(CYGHWR_HAL_POWERPC_MPC8XX == "862P") }
|
87 |
|
|
default_value 1
|
88 |
|
|
define_proc {
|
89 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_BOARD \"A&M Viper\""
|
90 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
|
91 |
|
|
}
|
92 |
|
|
description "
|
93 |
|
|
Select this model for an original Viper with the MPC860T or MPC862P processor."
|
94 |
|
|
}
|
95 |
|
|
|
96 |
|
|
cdl_option CYGHWR_HAL_POWERPC_VIPER_II {
|
97 |
|
|
display "Viper-I with 860T"
|
98 |
|
|
requires !CYGHWR_HAL_POWERPC_VIPER_I
|
99 |
|
|
requires { (CYGHWR_HAL_POWERPC_MPC8XX == "860T") ||
|
100 |
|
|
(CYGHWR_HAL_POWERPC_MPC8XX == "866T") }
|
101 |
|
|
default_value 0
|
102 |
|
|
define_proc {
|
103 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_BOARD \"A&M Viper\""
|
104 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
|
105 |
|
|
}
|
106 |
|
|
description "
|
107 |
|
|
Select this model for a Viper with the new board layout. This
|
108 |
|
|
version will be outfitted with either a MPC860T or MPC866T processor."
|
109 |
|
|
}
|
110 |
|
|
}
|
111 |
|
|
|
112 |
|
|
cdl_component CYG_HAL_STARTUP {
|
113 |
|
|
display "Startup type"
|
114 |
|
|
flavor data
|
115 |
|
|
legal_values {"RAM" "ROM" "ROMRAM"}
|
116 |
|
|
default_value {"RAM"}
|
117 |
|
|
no_define
|
118 |
|
|
define -file system.h CYG_HAL_STARTUP
|
119 |
|
|
description "
|
120 |
|
|
This option is used to control where the application program will
|
121 |
|
|
run, either from RAM or ROM (flash) memory. ROM based applications
|
122 |
|
|
must be self contained, while RAM applications will typically assume
|
123 |
|
|
the existence of a debug environment, such as GDB stubs."
|
124 |
|
|
}
|
125 |
|
|
|
126 |
|
|
cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
|
127 |
|
|
display "Development board clock speed (MHz)"
|
128 |
|
|
flavor data
|
129 |
|
|
legal_values { 47 51 55 59 63 100 133 }
|
130 |
|
|
default_value 63
|
131 |
|
|
description "
|
132 |
|
|
VIPER Development Boards have various system clock speeds
|
133 |
|
|
depending on the processor fitted. Select the clock speed
|
134 |
|
|
appropriate for your board so that the system can set the serial
|
135 |
|
|
baud rate correctly, amongst other things."
|
136 |
|
|
}
|
137 |
|
|
|
138 |
|
|
# Real-time clock/counter specifics
|
139 |
|
|
cdl_component CYGNUM_HAL_RTC_CONSTANTS {
|
140 |
|
|
display "Real-time clock constants."
|
141 |
|
|
description "
|
142 |
|
|
Period is busclock/16/100."
|
143 |
|
|
flavor none
|
144 |
|
|
|
145 |
|
|
cdl_option CYGNUM_HAL_RTC_NUMERATOR {
|
146 |
|
|
display "Real-time clock numerator"
|
147 |
|
|
flavor data
|
148 |
|
|
default_value 1000000000
|
149 |
|
|
}
|
150 |
|
|
cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
|
151 |
|
|
display "Real-time clock denominator"
|
152 |
|
|
flavor data
|
153 |
|
|
default_value 100
|
154 |
|
|
}
|
155 |
|
|
cdl_option CYGNUM_HAL_RTC_PERIOD {
|
156 |
|
|
display "Real-time clock period"
|
157 |
|
|
flavor data
|
158 |
|
|
default_value { ((((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/4)/16)/CYGNUM_HAL_RTC_DENOMINATOR) }
|
159 |
|
|
}
|
160 |
|
|
}
|
161 |
|
|
|
162 |
|
|
cdl_component CYGBLD_GLOBAL_OPTIONS {
|
163 |
|
|
display "Global build options"
|
164 |
|
|
flavor none
|
165 |
|
|
description "
|
166 |
|
|
Global build options including control over
|
167 |
|
|
compiler flags, linker flags and choice of toolchain."
|
168 |
|
|
|
169 |
|
|
|
170 |
|
|
parent CYGPKG_NONE
|
171 |
|
|
|
172 |
|
|
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
|
173 |
|
|
display "Global command prefix"
|
174 |
|
|
flavor data
|
175 |
|
|
no_define
|
176 |
|
|
default_value { "powerpc-eabi" }
|
177 |
|
|
description "
|
178 |
|
|
This option specifies the command prefix used when
|
179 |
|
|
invoking the build tools."
|
180 |
|
|
}
|
181 |
|
|
|
182 |
|
|
cdl_option CYGBLD_GLOBAL_CFLAGS {
|
183 |
|
|
display "Global compiler flags"
|
184 |
|
|
flavor data
|
185 |
|
|
no_define
|
186 |
|
|
default_value { CYGBLD_GLOBAL_WARNFLAGS . "-msoft-float -mcpu=860 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
|
187 |
|
|
description "
|
188 |
|
|
This option controls the global compiler flags which
|
189 |
|
|
are used to compile all packages by
|
190 |
|
|
default. Individual packages may define
|
191 |
|
|
options which override these global flags."
|
192 |
|
|
}
|
193 |
|
|
|
194 |
|
|
cdl_option CYGBLD_GLOBAL_LDFLAGS {
|
195 |
|
|
display "Global linker flags"
|
196 |
|
|
flavor data
|
197 |
|
|
no_define
|
198 |
|
|
default_value { "-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
|
199 |
|
|
description "
|
200 |
|
|
This option controls the global linker flags. Individual
|
201 |
|
|
packages may define options which override these global flags."
|
202 |
|
|
}
|
203 |
|
|
|
204 |
|
|
cdl_option CYGBLD_BUILD_GDB_STUBS {
|
205 |
|
|
display "Build GDB stub ROM image"
|
206 |
|
|
default_value 0
|
207 |
|
|
requires { CYG_HAL_STARTUP == "ROM" }
|
208 |
|
|
requires CYGSEM_HAL_ROM_MONITOR
|
209 |
|
|
requires CYGBLD_BUILD_COMMON_GDB_STUBS
|
210 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
|
211 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
|
212 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
|
213 |
|
|
requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
|
214 |
|
|
requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
|
215 |
|
|
no_define
|
216 |
|
|
description "
|
217 |
|
|
This option enables the building of the GDB stubs for the
|
218 |
|
|
board. The common HAL controls takes care of most of the
|
219 |
|
|
build process, but the platform CDL takes care of creating
|
220 |
|
|
an S-Record data file suitable for programming using
|
221 |
|
|
the board's EPPC-Bug firmware monitor."
|
222 |
|
|
|
223 |
|
|
make -priority 320 {
|
224 |
|
|
/bin/gdb_module.bin : /bin/gdb_module.img
|
225 |
|
|
$(OBJCOPY) -O srec --change-address=0x02000000 $< $(@:.bin=.srec)
|
226 |
|
|
$(OBJCOPY) -O binary $< $@
|
227 |
|
|
}
|
228 |
|
|
}
|
229 |
|
|
}
|
230 |
|
|
|
231 |
|
|
cdl_component CYGPKG_HAL_POWERPC_VIPER_OPTIONS {
|
232 |
|
|
display "VIPER build options"
|
233 |
|
|
flavor none
|
234 |
|
|
description "
|
235 |
|
|
Package specific build options including control over
|
236 |
|
|
compiler flags used only in building this package,
|
237 |
|
|
and details of which tests are built."
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
cdl_option CYGPKG_HAL_POWERPC_VIPER_CFLAGS_ADD {
|
241 |
|
|
display "Additional compiler flags"
|
242 |
|
|
flavor data
|
243 |
|
|
no_define
|
244 |
|
|
default_value { "" }
|
245 |
|
|
description "
|
246 |
|
|
This option modifies the set of compiler flags for
|
247 |
|
|
building the VIPER HAL. These flags are used in addition
|
248 |
|
|
to the set of global flags."
|
249 |
|
|
}
|
250 |
|
|
|
251 |
|
|
cdl_option CYGPKG_HAL_POWERPC_VIPER_CFLAGS_REMOVE {
|
252 |
|
|
display "Suppressed compiler flags"
|
253 |
|
|
flavor data
|
254 |
|
|
no_define
|
255 |
|
|
default_value { "" }
|
256 |
|
|
description "
|
257 |
|
|
This option modifies the set of compiler flags for
|
258 |
|
|
building the VIPER HAL. These flags are removed from
|
259 |
|
|
the set of global flags if present."
|
260 |
|
|
}
|
261 |
|
|
|
262 |
|
|
cdl_option CYGPKG_HAL_POWERPC_VIPER_TESTS {
|
263 |
|
|
display "VIPER tests"
|
264 |
|
|
flavor data
|
265 |
|
|
no_define
|
266 |
|
|
calculated { "tests/vipertime" }
|
267 |
|
|
description "
|
268 |
|
|
This option specifies the set of tests for the VIPER HAL."
|
269 |
|
|
}
|
270 |
|
|
}
|
271 |
|
|
|
272 |
|
|
cdl_component CYGHWR_MEMORY_LAYOUT {
|
273 |
|
|
display "Memory layout"
|
274 |
|
|
flavor data
|
275 |
|
|
no_define
|
276 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_viper_ram" : \
|
277 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "powerpc_viper_romram" : \
|
278 |
|
|
"powerpc_viper_rom" }
|
279 |
|
|
|
280 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
|
281 |
|
|
display "Memory layout linker script fragment"
|
282 |
|
|
flavor data
|
283 |
|
|
no_define
|
284 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
|
285 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
286 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "" : \
|
287 |
|
|
"" }
|
288 |
|
|
}
|
289 |
|
|
|
290 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_H {
|
291 |
|
|
display "Memory layout header file"
|
292 |
|
|
flavor data
|
293 |
|
|
no_define
|
294 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_H
|
295 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
296 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "" : \
|
297 |
|
|
"" }
|
298 |
|
|
}
|
299 |
|
|
}
|
300 |
|
|
|
301 |
|
|
cdl_option CYGSEM_HAL_ROM_MONITOR {
|
302 |
|
|
display "Behave as a ROM monitor"
|
303 |
|
|
flavor bool
|
304 |
|
|
default_value 0
|
305 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
306 |
|
|
requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
|
307 |
|
|
description "
|
308 |
|
|
Enable this option if this program is to be used as a ROM monitor,
|
309 |
|
|
i.e. applications will be loaded into RAM on the board, and this
|
310 |
|
|
ROM monitor may process exceptions or interrupts generated from the
|
311 |
|
|
application. This enables features such as utilizing a separate
|
312 |
|
|
interrupt stack when exceptions are generated."
|
313 |
|
|
}
|
314 |
|
|
|
315 |
|
|
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
|
316 |
|
|
display "Redboot HAL options"
|
317 |
|
|
flavor none
|
318 |
|
|
no_define
|
319 |
|
|
parent CYGPKG_REDBOOT
|
320 |
|
|
active_if CYGPKG_REDBOOT
|
321 |
|
|
description "
|
322 |
|
|
This option lists the target's requirements for a valid Redboot
|
323 |
|
|
configuration."
|
324 |
|
|
|
325 |
|
|
cdl_option CYGSEM_REDBOOT_PLF_LINUX_BOOT {
|
326 |
|
|
active_if CYGBLD_BUILD_REDBOOT_WITH_EXEC
|
327 |
|
|
display "Support booting Linux via RedBoot"
|
328 |
|
|
flavor bool
|
329 |
|
|
default_value 1
|
330 |
|
|
description "
|
331 |
|
|
This option enables RedBoot to support booting of a Linux kernel."
|
332 |
|
|
|
333 |
|
|
compile plf_redboot_linux_exec.c
|
334 |
|
|
}
|
335 |
|
|
|
336 |
|
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN {
|
337 |
|
|
display "Build Redboot ROM binary image"
|
338 |
|
|
active_if CYGBLD_BUILD_REDBOOT
|
339 |
|
|
default_value 1
|
340 |
|
|
no_define
|
341 |
|
|
description "This option enables the conversion of the Redboot ELF
|
342 |
|
|
image to a binary image suitable for ROM programming."
|
343 |
|
|
|
344 |
|
|
# compile -library=libextras.a redboot_cmds.c
|
345 |
|
|
|
346 |
|
|
make -priority 325 {
|
347 |
|
|
/bin/redboot.bin : /bin/redboot.elf
|
348 |
|
|
$(OBJCOPY) --strip-debug $< $(@:.bin=.img)
|
349 |
|
|
$(OBJCOPY) -O srec $< $(@:.bin=.srec)
|
350 |
|
|
$(OBJCOPY) -O binary $< $@
|
351 |
|
|
}
|
352 |
|
|
}
|
353 |
|
|
}
|
354 |
|
|
}
|