[ECOS] eCos newbie with a PowerPC Redboot build problem?

Chris Balthrop chris@mitsi.com
Wed Apr 13 22:10:00 GMT 2005


I hope this is a stupid newbie question, maybe something in my setup
that can be resolved easily!

.

.

.

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c: In function
`handle_exception_cleanup':

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:433: parse error
before `*'

Has anyone run into this problem before?

Thanks for any help resolving this,

Chris Balthrop

Sr. Engineer

chris AT mitsi DOT com

Micro Technology Services Inc.



History below:

I am starting an eCos port to a board containing a Xilinx Virtex II pro
with a PowerPC 405 processor.

Host is a wintel pc.

eCos config version 2.11.

gcc tools 2.95.2

I started with Anthony Massa's excellent book "Embedded Software
Development with eCos"

I setup the Cygwin, eCos, and WinCVS tools from the book's cd.

I worked through the i386 pc example in the book.

I setup the PowerPC tools from the cd and compiled the redboot monitor
for the Motorola MBX860/821.

I then used WinCVS to update the eCos packages from
anonCVS@eCos.sourceware.org.

This was primarily to obtain the TAMS PowerPC 405GPr (MOAB) board
package to use as a reference for the port.

When I tried to compile the redboot monitor for this package I got the
following error when the build

reached the /ecos-c/ecos/packages/hal/common/current/src/hal_stub.c
file:

.

.

.

powerpc-eabi-gcc

-c

-I/ecos-c/workdir/ppc/moab/redboot/redboot_install/include

-I/ecos-c/ecos/packages/hal/common/current

-I/ecos-c/ecos/packages/hal/common/current/src

-I/ecos-c/ecos/packages/hal/common/current/tests

-I.

-I/ecos-c/ecos/packages/hal/common/current/src/

-msoft-float

-mcpu=405

-Wall

-Wpointer-arith

-Wstrict-prototypes

-Winline

-Wundef

-g

-O2

-ffunction-sections

-fdata-sections

-fno-exceptions

-Wp,-MD,src/hal_stub.tmp

-o src/hal_common_hal_stub.o

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c: In function
`handle_exception_cleanup':

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:433: parse error
before `*'

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:433: `_i_'
undeclared (first use in this function)

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:433: (Each
undeclared identifier is reported only once

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:433: for each
function it appears in.)

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:433: `_gdb_'
undeclared (first use in this function)

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c: In function
`handle_exception_init':

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:489: parse error
before `*'

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:489: `_i_'
undeclared (first use in this function)

/ecos-c/ecos/packages/hal/common/current/src/hal_stub.c:489: `_gdb_'
undeclared (first use in this function)

make[1]: *** [src/hal_stub.o.d] Error 1

make[1]: Leaving directory
`/ecos-c/workdir/ppc/moab/redboot/redboot_build/hal/common/current'

make: *** [build] Error 2



I then tried to recompile from scratch the MBX board package and I get
the same error message.

Same result from the Adder PowerPC board also.

I then setup another PC from the CD from Massa's book to do a
comparison. (no MOAB or Adder packages

on the CD).

The MBX board package compiles OK on this setup.

I read thru the FAQ on the eCos sourceware

My /tmp directory is mounted in binary mode.

I have searched through the Bugzilla tracking list and the ecos_discuss
list and could not find

a reference to this problem.

The problem shows up in the HAL_GET_GDB_REGISTERS macro in the
C:\ecos\packages\hal\powerpc\arch\

current\include\hal_arch.h file.

The macro defines a union that contains a __typeof__(_aregval_)
_aregval2_ declaration.

The error occurs when the macro later tries to assign
__gdbregunion._aregval2_ = (_aregval_);

After searching through many files and makefiles and doing comparisons
between the packages I discovered

that ecos\packages\hal\powerpc\mbx\current\include\plf_stub.h had a

#include <pkgconf/hal_powerpc_mbx.h> reference that the new file did
not.

Adding this to the updated system's plf_stub.h file allowed a clean
compile on the MBX package.

However adding a simular reference <pkgconf/hal_powerpc_moab.h> to the
updated system's moab plf_stub.h

file did not solve the problem for the MOAB package.

There seems to be a lot of changes to the powerpc files in the updated
system and comparisons between

the files is difficult.

I hope this is just a setup problem.

Thanks again,

Chris



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list