1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# hal_powerpc_moab.cdl
|
4 |
|
|
#
|
5 |
|
|
# PowerPC/MOAB 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_MOAB {
|
52 |
|
|
display "TAMS MOAB (PowerPC 405GPr) board"
|
53 |
|
|
parent CYGPKG_HAL_POWERPC
|
54 |
|
|
requires CYGPKG_HAL_POWERPC_PPC40x
|
55 |
|
|
define_header hal_powerpc_moab.h
|
56 |
|
|
include_dir cyg/hal
|
57 |
|
|
description "
|
58 |
|
|
The MOAB HAL package provides the support needed to run
|
59 |
|
|
eCos on a TAMS PowerPC 405GP board."
|
60 |
|
|
|
61 |
|
|
compile hal_aux.c moab.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 |
|
|
|
67 |
|
|
requires CYGSEM_HAL_POWERPC_RESET_USES_JUMP
|
68 |
|
|
requires { CYGHWR_HAL_POWERPC_PPC4XX == "405GP" }
|
69 |
|
|
# work around DCACHE problems - see errata for details, but
|
70 |
|
|
# basically, writethru mode is the only safe way to run this
|
71 |
|
|
requires { CYGSEM_HAL_DCACHE_STARTUP_MODE == "WRITETHRU" }
|
72 |
|
|
# having the MMU enabled just seems to cause no end of problems
|
73 |
|
|
requires { !CYGHWR_HAL_POWERPC_ENABLE_MMU }
|
74 |
|
|
#
|
75 |
|
|
requires { !CYGSEM_REDBOOT_FLASH_CONFIG ||
|
76 |
|
|
((CYGHWR_REDBOOT_FLASH_CONFIG_MEDIA == "EEPROM") &&
|
77 |
|
|
(CYGNUM_REDBOOT_FLASH_CONFIG_SIZE == CYGNUM_HAL_EEPROM_SIZE) &&
|
78 |
|
|
(CYGNUM_REDBOOT_FLASH_STRING_SIZE == 64) &&
|
79 |
|
|
(CYGNUM_REDBOOT_FLASH_SCRIPT_SIZE == 256)) }
|
80 |
|
|
requires { !CYGPKG_REDBOOT || CYGBLD_REDBOOT_MAX_MEM_SEGMENTS == 2 }
|
81 |
|
|
requires { !CYGPKG_REDBOOT || CYGSEM_REDBOOT_PLF_ESA_VALIDATE == 1 }
|
82 |
|
|
|
83 |
|
|
define_proc {
|
84 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H "
|
85 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H "
|
86 |
|
|
puts $::cdl_system_header "#define CYGBLD_HAL_PLF_IO_H "
|
87 |
|
|
}
|
88 |
|
|
|
89 |
|
|
cdl_component CYG_HAL_STARTUP {
|
90 |
|
|
display "Startup type"
|
91 |
|
|
flavor data
|
92 |
|
|
legal_values {"RAM" "ROM" "ROMRAM"}
|
93 |
|
|
default_value {"RAM"}
|
94 |
|
|
no_define
|
95 |
|
|
define -file system.h CYG_HAL_STARTUP
|
96 |
|
|
description "
|
97 |
|
|
This option is used to control where the application program will
|
98 |
|
|
run, either from RAM or ROM (flash) memory. ROM based applications
|
99 |
|
|
must be self contained, while RAM applications will typically assume
|
100 |
|
|
the existence of a debug environment, such as GDB stubs."
|
101 |
|
|
}
|
102 |
|
|
|
103 |
|
|
cdl_component CYG_HAL_MOAB_BOARD_REVISION {
|
104 |
|
|
display "PC revision"
|
105 |
|
|
flavor data
|
106 |
|
|
legal_values {"1_0" "1_1"}
|
107 |
|
|
default_value {"1_1"}
|
108 |
|
|
description "
|
109 |
|
|
This option describes the board (PC) revision. Certain changes were
|
110 |
|
|
made between the various revisions and this allows the kernel to adapt."
|
111 |
|
|
}
|
112 |
|
|
|
113 |
|
|
cdl_option CYGHWR_HAL_POWERPC_CPU_SPEED {
|
114 |
|
|
display "Development board clock speed (MHz)"
|
115 |
|
|
flavor data
|
116 |
|
|
legal_values 250 300 333 400
|
117 |
|
|
default_value { CYG_HAL_MOAB_BOARD_REVISION == "1_1" ? 400 : 250 }
|
118 |
|
|
description "
|
119 |
|
|
MOAB Development Boards have various system clock speeds
|
120 |
|
|
depending on the processor and oscillator fitted. Select
|
121 |
|
|
the clock speed appropriate for your board so that the system
|
122 |
|
|
can set the serial baud rate correctly, amongst other things."
|
123 |
|
|
}
|
124 |
|
|
|
125 |
|
|
cdl_option CYGHWR_HAL_POWERPC_MEM_SPEED {
|
126 |
|
|
display "Development board memory bus speed (MHz)"
|
127 |
|
|
flavor data
|
128 |
|
|
legal_values 66 100 133
|
129 |
|
|
default_value 66
|
130 |
|
|
description "
|
131 |
|
|
MOAB Development Boards have various system clock speeds
|
132 |
|
|
depending on the processor and oscillator fitted."
|
133 |
|
|
}
|
134 |
|
|
|
135 |
|
|
cdl_component CYGNUM_HAL_EEPROM_SIZE {
|
136 |
|
|
display "Size of EEPROM device"
|
137 |
|
|
flavor data
|
138 |
|
|
legal_values { 1024 2048 4096 }
|
139 |
|
|
default_value { 2048 }
|
140 |
|
|
description "
|
141 |
|
|
This option indicates the size (and type) of EEPROM fitted on the board"
|
142 |
|
|
}
|
143 |
|
|
|
144 |
|
|
cdl_component CYGSEM_HAL_IDE_SUPPORT {
|
145 |
|
|
display "HAL support for IDE disks"
|
146 |
|
|
flavor bool
|
147 |
|
|
active_if CYGPKG_IO_PCI
|
148 |
|
|
default_value 1
|
149 |
|
|
implements CYGINT_HAL_PLF_IF_IDE
|
150 |
|
|
compile moab_ide.c
|
151 |
|
|
description "
|
152 |
|
|
Enable this option to get support for IDE devices. This is useful
|
153 |
|
|
to allow RedBoot to boot directly from disk."
|
154 |
|
|
}
|
155 |
|
|
|
156 |
|
|
cdl_component CYGBLD_GLOBAL_OPTIONS {
|
157 |
|
|
display "Global build options"
|
158 |
|
|
flavor none
|
159 |
|
|
description "
|
160 |
|
|
Global build options including control over
|
161 |
|
|
compiler flags, linker flags and choice of toolchain."
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
parent CYGPKG_NONE
|
165 |
|
|
|
166 |
|
|
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
|
167 |
|
|
display "Global command prefix"
|
168 |
|
|
flavor data
|
169 |
|
|
no_define
|
170 |
|
|
default_value { "powerpc-eabi" }
|
171 |
|
|
description "
|
172 |
|
|
This option specifies the command prefix used when
|
173 |
|
|
invoking the build tools."
|
174 |
|
|
}
|
175 |
|
|
|
176 |
|
|
cdl_option CYGBLD_GLOBAL_CFLAGS {
|
177 |
|
|
display "Global compiler flags"
|
178 |
|
|
flavor data
|
179 |
|
|
no_define
|
180 |
|
|
default_value { CYGBLD_GLOBAL_WARNFLAGS . "-msoft-float -mcpu=405 -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions " }
|
181 |
|
|
description "
|
182 |
|
|
This option controls the global compiler flags which
|
183 |
|
|
are used to compile all packages by
|
184 |
|
|
default. Individual packages may define
|
185 |
|
|
options which override these global flags."
|
186 |
|
|
}
|
187 |
|
|
|
188 |
|
|
cdl_option CYGBLD_GLOBAL_LDFLAGS {
|
189 |
|
|
display "Global linker flags"
|
190 |
|
|
flavor data
|
191 |
|
|
no_define
|
192 |
|
|
default_value { "-msoft-float -mcpu=405 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
|
193 |
|
|
description "
|
194 |
|
|
This option controls the global linker flags. Individual
|
195 |
|
|
packages may define options which override these global flags."
|
196 |
|
|
}
|
197 |
|
|
|
198 |
|
|
cdl_option CYGBLD_BUILD_GDB_STUBS {
|
199 |
|
|
display "Build GDB stub ROM image"
|
200 |
|
|
default_value 0
|
201 |
|
|
requires { CYG_HAL_STARTUP == "ROM" }
|
202 |
|
|
requires CYGSEM_HAL_ROM_MONITOR
|
203 |
|
|
requires CYGBLD_BUILD_COMMON_GDB_STUBS
|
204 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
|
205 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
|
206 |
|
|
requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
|
207 |
|
|
requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
|
208 |
|
|
requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
|
209 |
|
|
no_define
|
210 |
|
|
description "
|
211 |
|
|
This option enables the building of the GDB stubs for the
|
212 |
|
|
board. The common HAL controls takes care of most of the
|
213 |
|
|
build process, but the platform CDL takes care of creating
|
214 |
|
|
an S-Record data file suitable for programming using
|
215 |
|
|
the board's EPPC-Bug firmware monitor."
|
216 |
|
|
|
217 |
|
|
make -priority 320 {
|
218 |
|
|
/bin/gdb_module.bin : /bin/gdb_module.img
|
219 |
|
|
$(OBJCOPY) -O srec --change-address=0x02000000 $< $(@:.bin=.srec)
|
220 |
|
|
$(OBJCOPY) -O binary $< $@
|
221 |
|
|
}
|
222 |
|
|
}
|
223 |
|
|
}
|
224 |
|
|
|
225 |
|
|
cdl_component CYGPKG_HAL_POWERPC_MOAB_OPTIONS {
|
226 |
|
|
display "MOAB build options"
|
227 |
|
|
flavor none
|
228 |
|
|
description "
|
229 |
|
|
Package specific build options including control over
|
230 |
|
|
compiler flags used only in building this package,
|
231 |
|
|
and details of which tests are built."
|
232 |
|
|
|
233 |
|
|
|
234 |
|
|
cdl_option CYGPKG_HAL_POWERPC_MOAB_CFLAGS_ADD {
|
235 |
|
|
display "Additional compiler flags"
|
236 |
|
|
flavor data
|
237 |
|
|
no_define
|
238 |
|
|
default_value { "" }
|
239 |
|
|
description "
|
240 |
|
|
This option modifies the set of compiler flags for
|
241 |
|
|
building the MOAB HAL. These flags are used in addition
|
242 |
|
|
to the set of global flags."
|
243 |
|
|
}
|
244 |
|
|
|
245 |
|
|
cdl_option CYGPKG_HAL_POWERPC_MOAB_CFLAGS_REMOVE {
|
246 |
|
|
display "Suppressed compiler flags"
|
247 |
|
|
flavor data
|
248 |
|
|
no_define
|
249 |
|
|
default_value { "" }
|
250 |
|
|
description "
|
251 |
|
|
This option modifies the set of compiler flags for
|
252 |
|
|
building the MOAB HAL. These flags are removed from
|
253 |
|
|
the set of global flags if present."
|
254 |
|
|
}
|
255 |
|
|
|
256 |
|
|
cdl_option CYGPKG_HAL_POWERPC_MOAB_TESTS {
|
257 |
|
|
display "MOAB tests"
|
258 |
|
|
flavor data
|
259 |
|
|
no_define
|
260 |
|
|
calculated { "" }
|
261 |
|
|
description "
|
262 |
|
|
This option specifies the set of tests for the MOAB HAL."
|
263 |
|
|
}
|
264 |
|
|
}
|
265 |
|
|
|
266 |
|
|
cdl_component CYGHWR_MEMORY_LAYOUT {
|
267 |
|
|
display "Memory layout"
|
268 |
|
|
flavor data
|
269 |
|
|
no_define
|
270 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_moab_ram" : \
|
271 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "powerpc_moab_romram" : \
|
272 |
|
|
"powerpc_moab_rom" }
|
273 |
|
|
|
274 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
|
275 |
|
|
display "Memory layout linker script fragment"
|
276 |
|
|
flavor data
|
277 |
|
|
no_define
|
278 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
|
279 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
280 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "" : \
|
281 |
|
|
"" }
|
282 |
|
|
}
|
283 |
|
|
|
284 |
|
|
cdl_option CYGHWR_MEMORY_LAYOUT_H {
|
285 |
|
|
display "Memory layout header file"
|
286 |
|
|
flavor data
|
287 |
|
|
no_define
|
288 |
|
|
define -file system.h CYGHWR_MEMORY_LAYOUT_H
|
289 |
|
|
calculated { CYG_HAL_STARTUP == "RAM" ? "" : \
|
290 |
|
|
CYG_HAL_STARTUP == "ROMRAM" ? "" : \
|
291 |
|
|
"" }
|
292 |
|
|
}
|
293 |
|
|
}
|
294 |
|
|
|
295 |
|
|
cdl_option CYGSEM_HAL_ROM_MONITOR {
|
296 |
|
|
display "Behave as a ROM monitor"
|
297 |
|
|
flavor bool
|
298 |
|
|
default_value 0
|
299 |
|
|
parent CYGPKG_HAL_ROM_MONITOR
|
300 |
|
|
requires { CYG_HAL_STARTUP == "ROM" || CYG_HAL_STARTUP == "ROMRAM" }
|
301 |
|
|
description "
|
302 |
|
|
Enable this option if this program is to be used as a ROM monitor,
|
303 |
|
|
i.e. applications will be loaded into RAM on the board, and this
|
304 |
|
|
ROM monitor may process exceptions or interrupts generated from the
|
305 |
|
|
application. This enables features such as utilizing a separate
|
306 |
|
|
interrupt stack when exceptions are generated."
|
307 |
|
|
}
|
308 |
|
|
|
309 |
|
|
cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
|
310 |
|
|
display "Redboot HAL options"
|
311 |
|
|
flavor none
|
312 |
|
|
no_define
|
313 |
|
|
parent CYGPKG_REDBOOT
|
314 |
|
|
active_if CYGPKG_REDBOOT
|
315 |
|
|
description "
|
316 |
|
|
This option lists the target's requirements for a valid Redboot
|
317 |
|
|
configuration."
|
318 |
|
|
|
319 |
|
|
define_proc {
|
320 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_CPU \"PowerPC 405GPr\""
|
321 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_BOARD \"TAMS MOAB\""
|
322 |
|
|
}
|
323 |
|
|
|
324 |
|
|
cdl_option CYGBLD_REDBOOT_MODE {
|
325 |
|
|
display "RedBoot operational mode"
|
326 |
|
|
flavor data
|
327 |
|
|
legal_values { "BOOT" "NAND" "RAM" }
|
328 |
|
|
default_value { CYG_HAL_STARTUP == "RAM" ? "RAM" : "NAND" }
|
329 |
|
|
define_proc {
|
330 |
|
|
puts $::cdl_header "#if defined(CYGBLD_REDBOOT_MODE_BOOT)"
|
331 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\[Bootstrap\]\""
|
332 |
|
|
puts $::cdl_header "#elif defined(CYGBLD_REDBOOT_MODE_NAND)"
|
333 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\""
|
334 |
|
|
puts $::cdl_header "#else"
|
335 |
|
|
puts $::cdl_header "#define HAL_PLATFORM_EXTRA \"\[RAM\]\""
|
336 |
|
|
puts $::cdl_header "#endif"
|
337 |
|
|
}
|
338 |
|
|
}
|
339 |
|
|
|
340 |
|
|
cdl_option CYGSEM_REDBOOT_PLF_LINUX_BOOT {
|
341 |
|
|
active_if CYGBLD_BUILD_REDBOOT_WITH_EXEC
|
342 |
|
|
display "Support booting Linux via RedBoot"
|
343 |
|
|
flavor bool
|
344 |
|
|
default_value 1
|
345 |
|
|
description "
|
346 |
|
|
This option enables RedBoot to support booting of a Linux kernel."
|
347 |
|
|
|
348 |
|
|
compile plf_redboot_linux_exec.c
|
349 |
|
|
}
|
350 |
|
|
|
351 |
|
|
cdl_component CYGBLD_BUILD_REDBOOT_OBJS {
|
352 |
|
|
display "Build Redboot image(s)"
|
353 |
|
|
active_if CYGBLD_BUILD_REDBOOT
|
354 |
|
|
default_value 1
|
355 |
|
|
no_define
|
356 |
|
|
description "This option enables the conversion of the Redboot ELF
|
357 |
|
|
image various formats which simplify further manipulatations.
|
358 |
|
|
The most basic of these forms is Motorola S-records, which
|
359 |
|
|
are simpler and more reliable than binary formats when used
|
360 |
|
|
for serial download."
|
361 |
|
|
|
362 |
|
|
make -priority 325 {
|
363 |
|
|
/bin/redboot.srec : /bin/redboot.elf
|
364 |
|
|
$(OBJCOPY) -O srec $< $(@:.bin=.srec)
|
365 |
|
|
}
|
366 |
|
|
|
367 |
|
|
cdl_option CYGBLD_BUILD_REDBOOT_BIN {
|
368 |
|
|
display "Build RedBoot ROM/FLASH binary image"
|
369 |
|
|
default_value { CYG_HAL_STARTUP != "RAM" }
|
370 |
|
|
description "This option enables the conversion of the Redboot ELF
|
371 |
|
|
image to a binary image suitable for ROM/FLASH programming."
|
372 |
|
|
make -priority 324 {
|
373 |
|
|
/bin/redboot.bin : /bin/redboot.elf
|
374 |
|
|
$(OBJCOPY) -O binary $< /tmp/__redboot.bin
|
375 |
|
|
make_MOAB_flash /tmp/__redboot.bin $@
|
376 |
|
|
rm -f /tmp/__redboot.bin
|
377 |
|
|
}
|
378 |
|
|
}
|
379 |
|
|
}
|
380 |
|
|
}
|
381 |
|
|
}
|