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: Stephen Holford <SHolford at WESCAM dot com>
- To: Paul Randall <prandall at delta-info dot com>, ecos-discuss at sources dot redhat dot com
- Date: Tue, 19 Feb 2002 17:07:31 -0500
- Subject: Re: [ECOS] Problem building library for Viper target
- Organization: Wescam
- References: <3C72B90C.68434D47@delta-info.com>
- Reply-to: Stephen Holford <sholford at wescam dot com>
Hi Paul,
The macro args for CYGARC_MFSPR are backwards. Try this
// Set up parallel port for connection to ethernet tranceiver
eppc->pio_pdpar = 0x1FFF;
CYGARC_MFSPR( CYGARC_REG_PVR, proc_rev );
#define PROC_REVB 0x0020
if ((proc_rev & 0x0000FFFF) == PROC_REVB) {
Steve Holford
----------------------------------------------------------------
Stephen F. Holford, P.Eng.
Wescam
(905) 633-4000 x2119
----- Original Message -----
From: "Paul Randall" <prandall@delta-info.com>
To: <ecos-discuss@sources.redhat.com>
Sent: Tuesday, February 19, 2002 3:43 PM
Subject: [ECOS] Problem building library for Viper target
> 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:2
60:
> warning: asm operand 0 probably doesn't match constraints
>
/ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c:2
60:
> invalid lvalue in assignment
>
/ecos-c/cygwin/src/ecos/packages/devs/eth/powerpc/fec/current/src/if_fec.c:1
91:
> 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:2
60:
> 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?
>
> 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
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss