My company has been building VxWorks binary based on the Tornado
environment. T2.2, VxWorks 5.5.
Because its a customized build environment, we have build a cross
compiler, gcc.3.3.5, using the headers and lib from T2.2 this gets
used in the Makefiles to be compiled. This works for VxWorks 5.5
I'm trying to replicate the same effort for VxWorks.6.4 and workbench.
1) wrenv.linux:
As far as I can tell, wrenv.linux sets up several environmental
variable before the windriver supplied gnu compiler,3.4.4, can be used
without complaining about WIND_LIC_PROXY, WIND_HOME etc. If you don't
then a simple hello world program takes ages to compile. I've manually
set these variable and the gnu compiler from windriver seem to be
working. Does wrenv.linux does anything else that is magical other
then setting global environments? What are the differences between the
supplied wind river 3.4.4 to the stock gcc 3.4.4?
2) Cross compiler for workbench.
I've been trying to create a gnu cross compiler based on the workbench
header and library files. What confused me is which set of headers do
I use? target/h or target/usr/h? I've read several sites on making a
cross compiler for vxworks. But all of them seem to be based on the
Tornadoe environment. Has anyone tried making a gnu cross compiler
based on the WorkBench headers, libraries? What are the steps that you
take to make a gnu cross compiler based on workbench?
wrenv just sets up environment variables, so the tools know where to
find
everything.
> 2) Cross compiler for workbench.
> I've been trying to create a gnu cross compiler based on the workbench
> header and library files. What confused me is which set of headers do
> I use? target/h or target/usr/h? I've read several sites on making a
> cross compiler for vxworks. But all of them seem to be based on the
> Tornadoe environment. Has anyone tried making a gnu cross compiler
> based on the WorkBench headers, libraries? What are the steps that you
> take to make a gnu cross compiler based on workbench?
If you are compiling code to link with the VxWorks kernel, the you
will
use the header files in target/h
The header files in target/usr/h are used if you are compiling an
executable (called an RTP; a Real Time Process) which runs as
a user mode application. That was added with VxWorks 6.0
If you are porting code from VxWorks 5.x, use the header files
in target/h
Note that the header files you mention are associated with VxWorks,
not with Workbench or Tornado; that is just the GUI.
Once you have setup the environment with wrenv.linux, you can
cross compile code using the CPU variable.
For example, if you have code you want to compile for PPC, you
would do
make CPU=PPC TOOL=gnu
For ARM (typically, v5 architecture), you would do
make CPU=ARMARCH5 TOOL=gnu
If you've got the Makefile right, if will generate a .o which
you can dynamically link with a running VxWorks kernel
using the 'ld' command from the VxWorks shell
You'll need to check out the Kernel Programmers' Manual
for further details
Cheers!
Jason
Thanks Jason, I'll give that a try :)