This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Problem building library for Viper target
- From: Gary Thomas <gthomas at redhat dot com>
- To: Paul Randall <prandall at delta-info dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 19 Feb 2002 14:20:06 -0700
- Subject: Re: [ECOS] Problem building library for Viper target
- References: <3C72B90C.68434D47@delta-info.com>
On Tue, 2002-02-19 at 13:43, Paul Randall wrote:
> 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
> `/ecos-c/cygwin/src/ecos/viper_build/devs/eth/powerpc/fec/current'
> powerpc-eabi-gcc -c -I/ecos-c/cygwin/src/ecos/viper_install/include
> -I/ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current
> -I/ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src
> -I/ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/tests
> -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
> src/devs_eth_powerpc_fec_if_fec.o
> /ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c
>
> /ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c:
> In function `fec_eth_init':
> /ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c:260:
> warning: asm operand 0 probably doesn't match constraints
> /ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c:260:
> invalid lvalue in assignment
> /ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c:191:
> warning: `proc_rev' might be used uninitialized in this function
> /ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c:260:
> inconsistent operand constraints in an `asm'
> make[1]: *** [src/if_fec.o.d] Error 1
> make[1]: Leaving directory
> `/ecos-c/cygwin/src/ecos/viper_build/devs/eth/powerpc/fec/current'
> 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?
What version of GCC are you using?
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss