1 |
27 |
unneback |
# ====================================================================
|
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 Red Hat, Inc.
|
12 |
|
|
## Copyright (C) 2002 Gary Thomas
|
13 |
|
|
##
|
14 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
15 |
|
|
## the terms of the GNU General Public License as published by the Free
|
16 |
|
|
## Software Foundation; either version 2 or (at your option) any later version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
19 |
|
|
## 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 along
|
24 |
|
|
## with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use macros
|
28 |
|
|
## or inline functions from this file, or you compile this file and link it
|
29 |
|
|
## with other works to produce a work based on this file, this file does not
|
30 |
|
|
## by itself cause the resulting work to be covered by the GNU General Public
|
31 |
|
|
## License. However the source code for this file must still be made available
|
32 |
|
|
## in accordance with section (3) of the GNU General Public License.
|
33 |
|
|
##
|
34 |
|
|
## This exception does not invalidate any other reasons why a work based on
|
35 |
|
|
## this file might be covered by the GNU General Public License.
|
36 |
|
|
##
|
37 |
|
|
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
38 |
|
|
## at http://sources.redhat.com/ecos/ecos-license/
|
39 |
|
|
## -------------------------------------------
|
40 |
|
|
#####ECOSGPLCOPYRIGHTEND####
|
41 |
|
|
# ====================================================================
|
42 |
|
|
######DESCRIPTIONBEGIN####
|
43 |
|
|
#
|
44 |
|
|
# Author(s): jskov
|
45 |
|
|
# Original data: hmt
|
46 |
|
|
# Contributors: gthomas
|
47 |
|
|
# Date: 1999-11-02
|
48 |
|
|
#
|
49 |
|
|
#####DESCRIPTIONEND####
|
50 |
|
|
#
|
51 |
|
|
# ====================================================================
|
52 |
|
|
|
53 |
|
|
cdl_package CYGPKG_HAL_POWERPC_VIPER {
|
54 |
|
|
display "A&M VIPER PowerPC evaluation board"
|
55 |
|
|
parent CYGPKG_HAL_POWERPC
|
56 |
|
|
requires CYGPKG_HAL_POWERPC_MPC8xx
|
57 |
|
|
define_header hal_powerpc_viper.h
|
58 |
|
|
include_dir cyg/hal
|
59 |
|
|
description "
|
60 |
|
|
The VIPER HAL package provides the support needed to run
|
61 |
|
|
eCos on a A&M VIPER board equipped with a PowerPC processor."
|
62 |
|
|
|
63 |
|
|
compile hal_diag.c hal_aux.c viper.S
|
64 |
|
|
|
65 |
|
|
implements CYGINT_HAL_DEBUG_GDB_STUBS
|
66 |
|
|
implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
|
67 |
|
|
implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
|
68 |
|
|
implements CYGNUM_HAL_QUICC_SMC1
|
69 |
|
|
implements CYGNUM_HAL_QUICC_SCC1
|
70 |
|
|
|
71 |
|
|
define_proc {
|
72 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H "
|
73 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
|
74 |
|
|
|
75 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_CPU \"PowerPC 860\""
|
76 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_BOARD \"A&M VIPER\""
|
77 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
cdl_component CYG_HAL_STARTUP {
|
81 |
|
|
display "Startup type"
|
82 |
|
|
flavor data
|
83 |
|
|
legal_values {"RAM" "ROM" "ROMRAM"}
|
84 |
|
|
default_value {"RAM"}
|
85 |
|
|
no_define
|
86 |
|
|
define -file system.h CYG_HAL_STARTUP
|
87 |
|
|
description "
|
88 |
|
|
This option is used to control where the application program will
|
89 |
|
|
run, either from RAM or ROM (flash) memory. ROM based applications
|
90 |
|
|
must be self contained, while RAM applications will typically assume
|
91 |
|
|
the existence of a debug environment, such as GDB stubs."
|
92 |
|
|
}
|
93 |
|
|
|
94 |
|
|
cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
|
95 |
|
|
display "Development board clock speed (MHz)"
|
96 |
|
|
flavor data
|
97 |
|
|
legal_values { 47 51 55 59 63 }
|
98 |
|
|
default_value 63
|
99 |
|
|
description "
|
100 |
|
|
VIPER Development Boards have various system clock speeds
|
101 |
|
|
depending on the processor fitted. Select the clock speed
|
102 |
|
|
appropriate for your board so that the system can set the serial
|
103 |
|
|
baud rate correctly, amongst other things."
|
104 |
|
|
}
|
105 |
|
|
|
106 |
|
|
# Real-time clock/counter specifics
|
107 |
|
|
cdl_component CYGNUM_HAL_RTC_CONSTANTS {
|
108 |
|
|
display "Real-time clock constants."
|
109 |
|
|
description "
|
110 |
|
|
Period is busclock/16/100."
|
111 |
|
|
flavor none
|
112 |
|
|
|
113 |
|
|
cdl_option CYGNUM_HAL_RTC_NUMERATOR {
|
114 |
|
|
display "Real-time clock numerator"
|
115 |
|
|
flavor data
|
116 |
|
|
calculated 1000000000
|
117 |
|
|
}
|
118 |
|
|
cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
|
119 |
|
|
display "Real-time clock denominator"
|
120 |
|
|
flavor data
|
121 |
|
|
calculated 100
|
122 |
|
|
}
|
123 |
|
|
cdl_option CYGNUM_HAL_RTC_PERIOD {
|
124 |
|
|
display "Real-time clock period"
|
125 |
|
|
flavor data
|
126 |
|
|
calculated { ((((CYGHWR_HAL_POWERPC_BOARD_SPEED*1000000)/4)/16)/100) }
|
127 |
|
|
}
|
128 |
|
|
}
|
129 |
|
|
|
130 |
|
|
cdl_component CYGBLD_GLOBAL_OPTIONS {
|
131 |
|
|
display "Global build options"
|
132 |
|
|
flavor none
|
133 |
|
|
description "
|
134 |
|
|
Global build options including control over
|
135 |
|
|
compiler flags, linker flags and choice of toolchain."
|
136 |
|
|
|
137 |
|
|
|
138 |
|
|
parent CYGPKG_NONE
|
139 |
|
|
|
140 |
|
|
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
|
141 |
|
|
display "Global command prefix"
|
142 |
|
|
flavor data
|
143 |
|
|
no_define
|
144 |
|
|
default_value { "powerpc-eabi" }
|
145 |
|
|
description "
|
146 |
|
|
This option specifies the command prefix used when
|
147 |
|
|
invoking the build tools."
|
148 |
|
|
}
|
149 |
|
|
|
150 |
|
|
cdl_option CYGBLD_GLOBAL_CFLAGS {
|
151 |
|
|
display "Global compiler flags"
|
152 |
|
|
flavor data
|
153 |
|
|
no_define
|
154 |
|
|
default_value { "-msoft-float -mcpu=860 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" }
|
155 |
|
|
description "
|
156 |
|
|
This option controls the global compiler flags which
|
157 |
|
|
are used to compile all packages by
|
158 |
|
|
default. Individual packages may define
|
159 |
|
|
options which override these global flags."
|
160 |
|
|
}
|
161 |
|
|
|
162 |
|
|
cdl_option CYGBLD_GLOBAL_LDFLAGS {
|
163 |
|
|
display "Global linker flags"
|
164 |
|
|
flavor data
|
165 |
|
|
no_define
|
166 |
|
|
default_value { "-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
|
167 |
|
|
description "
|
168 |
|
|
This option controls the global linker flags. Individual
|
169 |
|
|
packages may define options which override these global flags."
|
170 |
|
|
}
|
171 |
|
|
|
172 |
|
|
cdl_option CYGBLD_BUILD_GDB_STUBS {
|
173 |
|
|
display "Build GDB stub ROM image"
|
174 |
|
|
default_value 0
|
175 |
|
|
requires { CYG_HAL_STARTUP == "ROM" }
|
176 |
|
|
requires CYGSEM_HAL_ROM_MONITOR
|
177 |
|
|
requires CYGBLD_BUILD_COMMON_GDB_STUBS
|
178 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
|
179 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
|
180 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
|
181 |
|
|
requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
|
182 |
|
|
requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
|
183 |
|
|
no_define
|
184 |
|
|
description "
|
185 |
|
|
This option enables the building of the GDB stubs for the
|
186 |
|
|
board. The common HAL controls takes care of most of the
|
187 |
|
|
build process, but the platform CDL takes care of creating
|
188 |
|
|
an S-Record data file suitable for programming using
|
189 |
|
|
the board's EPPC-Bug firmware monitor."
|
190 |
|
|
|
191 |
|
|
make -priority 320 {
|
192 |
|
|
/bin/gdb_module.bin : /bin/gdb_module.img
|
193 |
|
|
$(OBJCOPY) -O srec --change-address=0x02000000 $< $(@:.bin=.srec)
|
194 |
|
|
$(OBJCOPY) -O binary $< $@
|
195 |
|
|
}
|
196 |
|
|
}
|
197 |
|
|
}
|
198 |
|
|
|
199 |
|
|
cdl_component CYGPKG_HAL_POWERPC_VIPER_OPTIONS {
|
200 |
|
|
display "VIPER build options"
|
201 |
|
|
flavor none
|
202 |
|
|
description "
|
203 |
|
|
Package specific build options including control over
|
204 |
|
|
compiler flags used only in building this package,
|
205 |
|
|
and details of which tests are built."
|
206 |
|
|
|
207 |
|
|
|
208 |
|
|
cdl_option CYGPKG_HAL_POWERPC_VIPER_CFLAGS_ADD {
|
209 |
|
|
display "Additional compiler flags"
|
210 |
|
|
flavor data
|
211 |
|
|
no_define
|
212 |
|
|
default_value { "" }
|
213 |
|
|
description "
|
214 |
|
|
This option modifies the set of compiler flags for
|
215 |
|
|
building the VIPER HAL. These flags are used in addition
|
216 |
|
|
to the set of global flags."
|
217 |
|
|
}
|
218 |
|
|
|
219 |
|
|
cdl_option CYGPKG_HAL_POWERPC_VIPER_CFLAGS_REMOVE {
|
220 |
|
|
display "Suppressed compiler flags"
|
221 |
|
|
flavor data
|
222 |
|
|
no_define
|
223 |
|
|
default_value { "" }
|
224 |
|
|
description "
|
225 |
|
|
This option modifies the set of compiler flags for
|
226 |
|
|
building the VIPER HAL. These flags are removed from
|
227 |
|
|
the set of global flags if present."
|
228 |
|
|
}
|
229 |
|
|
|
230 |
|
|
cdl_option CYGPKG_HAL_POWERPC_VIPER_TESTS {
|
231 |
|
|
display "VIPER tests"
|
232 |
|
|
flavor data
|
233 |
|
|
no_define
|
234 |
|
|
calculated { "tests/vipertime" }
|
235 |
|
|
description "
|
236 |
|
|
This option specifies the set of tests for the VIPER HAL."
|
237 |
|
|
}
|
238 |
|
|
}
|
239 |
|
|
|
240 |
|
|
cdl_component CYGHWR_MEMORY_LAYOUT {
|
241 |
|
|
display "Memory layout"
|
242 |
|
|
flavor data
|
243 |
|
|
no_define
|
244 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_viper_ram" : \
|
245 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "powerpc_viper_romram" : \
|
246 |
|
|
"powerpc_viper_rom" }
|
247 |
|
|
|
248 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
|
249 |
|
|
display "Memory layout linker script fragment"
|
250 |
|
|
flavor data
|
251 |
|
|
no_define
|
252 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
|
253 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
254 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "" : \
|
255 |
|
|
"" }
|
256 |
|
|
}
|
257 |
|
|
|
258 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_H {
|
259 |
|
|
display "Memory layout header file"
|
260 |
|
|
flavor data
|
261 |
|
|
no_define
|
262 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_H
|
263 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
264 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "" : \
|
265 |
|
|
"" }
|
266 |
|
|
}
|
267 |
|
|
}
|
268 |
|
|
|
269 |
|
|
cdl_option CYGSEM_HAL_ROM_MONITOR {
|
270 |
|
|
display "Behave as a ROM monitor"
|
271 |
|
|
flavor bool
|
272 |
|
|
default_value 0
|
273 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
274 |
|
|
requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
|
275 |
|
|
description "
|
276 |
|
|
Enable this option if this program is to be used as a ROM monitor,
|
277 |
|
|
i.e. applications will be loaded into RAM on the board, and this
|
278 |
|
|
ROM monitor may process exceptions or interrupts generated from the
|
279 |
|
|
application. This enables features such as utilizing a separate
|
280 |
|
|
interrupt stack when exceptions are generated."
|
281 |
|
|
}
|
282 |
|
|
|
283 |
|
|
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
|
284 |
|
|
display "Redboot HAL options"
|
285 |
|
|
flavor none
|
286 |
|
|
no_define
|
287 |
|
|
parent CYGPKG_REDBOOT
|
288 |
|
|
active_if CYGPKG_REDBOOT
|
289 |
|
|
description "
|
290 |
|
|
This option lists the target's requirements for a valid Redboot
|
291 |
|
|
configuration."
|
292 |
|
|
|
293 |
|
|
cdl_option CYGSEM_REDBOOT_HAL_LINUX_BOOT {
|
294 |
|
|
active_if CYGBLD_BUILD_REDBOOT_WITH_EXEC
|
295 |
|
|
display "Support booting Linux via RedBoot"
|
296 |
|
|
flavor bool
|
297 |
|
|
default_value 1
|
298 |
|
|
description "
|
299 |
|
|
This option enables RedBoot to support booting of a Linux kernel."
|
300 |
|
|
|
301 |
|
|
compile -library=libextras.a redboot_linux_exec.c
|
302 |
|
|
}
|
303 |
|
|
|
304 |
|
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN {
|
305 |
|
|
display "Build Redboot ROM binary image"
|
306 |
|
|
active_if CYGBLD_BUILD_REDBOOT
|
307 |
|
|
default_value 1
|
308 |
|
|
no_define
|
309 |
|
|
description "This option enables the conversion of the Redboot ELF
|
310 |
|
|
image to a binary image suitable for ROM programming."
|
311 |
|
|
|
312 |
|
|
# compile -library=libextras.a redboot_cmds.c
|
313 |
|
|
|
314 |
|
|
make -priority 325 {
|
315 |
|
|
/bin/redboot.bin : /bin/redboot.elf
|
316 |
|
|
$(OBJCOPY) --strip-debug $< $(@:.bin=.img)
|
317 |
|
|
$(OBJCOPY) -O srec $< $(@:.bin=.srec)
|
318 |
|
|
$(OBJCOPY) -O binary $< $@
|
319 |
|
|
}
|
320 |
|
|
}
|
321 |
|
|
}
|
322 |
|
|
}
|