Difference between revisions of "Building a delivery for VxWorks on Windows"
(eifinit is now part of studio) |
(the help/defaults does not contain a platform specific directory.) |
||
Line 56: | Line 56: | ||
mkdir $ISE_PLATFORM/bin | mkdir $ISE_PLATFORM/bin | ||
mv unix/* $ISE_PLATFORM/bin | mv unix/* $ISE_PLATFORM/bin | ||
− | |||
− | |||
cd ../../../.. | cd ../../../.. | ||
Revision as of 12:47, 3 March 2008
For the time being the discussion below will only address building for VxWorks from Windows. But even if we are on Windows, we do as if we were on Unix since VxWorks uses a modified version of the gnu toolset.
Contents
Setting up the environment
You first need to properly set the ISE_PLATFORM environment variable to the corresponding VxWorks architecture. You also need to define the VXWORKS environment variable to point to the root of the Tornado delivery. For the PPC port it meant defining:
set ISE_PLATFORM=vxworks-ppc set VXWORKS=C:/Tornado2.2
You also need to set the PATH environment variable so that the GNU toolset of VxWorks is first in the path. Very important in case you also have the Cygwin environment installed. However we found that the `make' that comes with VxWorks is not Unix friendly so we use the one from Cygwin. So we had to create a directory in which `make.exe' from Cygwin was copied and put this directory first in the PATH. Here is what we did:
set PATH=C:\ISE\apps\bin;%PATH% set PATH=%PATH%;C:\Tornado2.2\host\x86-win32\bin set PATH=%PATH%;C:\ISE\apps\cygwin\bin
Where C:\ISE\apps\bin is the directory where `make.exe' is located and C:\ISE\apps\cygwin\bin are the cygwin tools. They are at the end otherwise they would conflicts with the one from VxWorks.
Compiling runtime for VxWorks
Since the `Configure' script cannot be run on the target platform, we have to manually find what is available and what is not for the target. To do so, we simply look at the target header file or the VxWorks documentation and create in the CONFIGS directory of the run-time the template for the config.sh configuration file.
At the moment for VxWorks we have 3 templates for MIPS, HPPA and PPC. Only the PPC is up-to-date, the first two are from 1998 and haven't been updated.
Once you have a first skeleton, you can launch `bash' and then do quick_configure to start the compilation process.
Uncompilable parts
Some parts of the runtime do not compile, this is ok. The uncompilable parts correspond to all the communication stuff which is used when debugging applications from EiffelStudio. Our embedded configuration does not yet support workbench mode, thus only the finalized code is useful to us at this point.
So basically make sure that in C/run-time/ you have at least libfinalized.a
Building x2c
Because x2c has to run on the host and not on the target, you need to use the C compiler of your host to compile the program. Usually the following command is enough:
gcc x2c.c -o x2c.exe -I.. -I. -I./include
Preparing the Eiffel delivery
Once you have compiled the run-time, you need to prepare the delivery of EiffelStudio for compiling code for the VxWorks target. The operations below have been tested under bash.
First the core:
mkdir EiffelXX cd EiffelXX svn co $SVNROOT/Delivery/studio studio cd studio/config mv unix $ISE_PLATFORM cd ../spec mkdir $ISE_PLATFORM mkdir $ISE_PLATFORM/lib mkdir $ISE_PLATFORM/include mkdir $ISE_PLATFORM/bin mv unix/* $ISE_PLATFORM/bin cd ../../../..
Then the libraries and samples:
cd EiffelXX mkdir library cd library svn co $SVNROOT/Src/library/base base svn co $SVNROOT/Src/library/lex lex svn co $SVNROOT/Src/library/parse parse svn co $SVNROOT/Src/library/thread thread svn co $SVNROOT/Src/library/time time cd .. mkdir examples cd examples svn co $SVNROOT/Src/examples/base base svn co $SVNROOT/Src/examples/cecil cecil svn co $SVNROOT/Src/examples/lex lex svn co $SVNROOT/Src/examples/parse parse svn co $SVNROOT/Src/examples/thread thread svn co $SVNROOT/Src/examples/time time cd ../..
Then copying the runtimes and header files:
cd EiffelXX cd studio/spec/$ISE_PLATFORM/lib cp $EIFFEL_SRC/C/run-time/lib*.a . cd ../include cp $EIFFEL_SRC/C/run-time/*.h . cp $EIFFEL_SRC/C/config.sh . cp $EIFFEL_SRC/C/eif_portable.h . cp $EIFFEL_SRC/C/eif_confmagic.h . cp $EIFFEL_SRC/C/eif_config.h . cd ../bin cp $EIFFEL_SRC/C/run-time/x2c.exe . cd ../../../..
Then finally copying the platform specific executables onto this delivery. I suppose that $ISE_EIFFEL_NATIVE points to that location.
cd EiffelXX cd studio/spec/$ISE_PLATFORM/bin cp $ISE_EIFFEL_NATIVE/studio/spec/windows/bin/ec.exe . cp $ISE_EIFFEL_NATIVE/studio/spec/windows/bin/estudio.exe . cp $ISE_EIFFEL_NATIVE/studio/spec/windows/bin/quick_finalize.exe . cp $ISE_EIFFEL_NATIVE/studio/spec/windows/bin/wel_hook.dll . cd ../../../..