[ECOS] Problem building library for Viper target

Paul Randall prandall@delta-info.com
Tue Feb 19 12:44:00 GMT 2002

Hi all,

I am building the eCos library for the A&M Viper board.  The build goes
successfully except for some code in if_fec.c (ethernet drivers for the
PowerPC MPC860T).  The build produces the following error:

make[1]: Entering directory
powerpc-eabi-gcc -c  -I/ecos-c/cygwin/src/ecos/viper_install/include
-I. -I/ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/
-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
-D_KERNEL -D__ECOS -Wp,-MD,src/if_fec.tmp -o

In function `fec_eth_init':
warning: asm operand 0 probably doesn't match constraints
invalid lvalue in assignment
warning: `proc_rev' might be used uninitialized in this function
inconsistent operand constraints in an `asm'
make[1]: *** [src/if_fec.o.d] Error 1
make[1]: Leaving directory
make: *** [build] Error 2
make: Leaving directory `/ecos-c/cygwin/src/ecos/viper_build'

The following lines of code in fec_eth_init of if_fec.c are apparently
at fault:

260      CYGARC_MFSPR( proc_rev, CYGARC_REG_PVR );
261  #define PROC_REVB 0x0020
262      if ((proc_rev & 0x0000FFFF) == PROC_REVB) {
263          eppc->pio_pddir = 0x1C58;
264      } else {
265          eppc->pio_pddir = 0x1FFF;
266      }

The code is retrieving the processor revision from the Processor Version
Register in the Special Purpose Register and checking whether the MPC860
is revision B.  I commented out all the above lines except line 265
(assuming my target doesn't use the Rev. B processor) and the library
build was successful.  Do I need to set some additional compiler options
or does the code need to be changed?

Paul Randall
Delta Information Systems

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

More information about the Ecos-discuss mailing list