Author Topic: Cross Compiling - Issues  (Read 2962 times)

StephenB

  • Guest
Cross Compiling - Issues
« on: February 08, 2007, 09:27:30 pm »
Greetings All,
    Thanks for a wonderful IDE, looks fairly promising.  However, I have an issue that doesn't seem solvable.
    I'm trying to cross-compile (with a cross compiler, I do embedded development) on a Linux Box from my Windows PC.  I have MinGW installed for local simulation development, but then I need to re-build the code to run an embedded target (PPC based).
     I've installed C::B and I have Uniwin also on my PC.  I've followed the recommendations found in the Wiki as well as the forums and still, I cannot seem to get this to work. 
     A couple of issues that might be getting in the way:
1.  The Unix server is a stand-alone box, no local disk storage, it's all on a SAN network (i.e. the big disk in the sky).  We can mount our home directories via SAMBA and map to a drive on our PC's. Could this be causing a problem?
2.  I realize that Uniwin specifies some directory mapping between the Linux(Unix) world and the PC.  I have this defined.  My question is:  Does the "project" reside locally on the PC or remotely on the Server?  Seems irrelevant, since I can map the Unix Drive and "see" it from the PC.  But I'm not sure where C::B and/or Uniwin expect things to be.  The Uniwin documentation is unclear.
3.  In addition, I'm trying to use my own makefile, not one created by C::B.  The reason is that I have to setup an environment on the Linux Server to point to the tools, etc.  These already exist.  These cannot be duplicated on the PC, since the tools reside (and are compiled to run) on Linux.  I found information on how to setup C::B to use this.
3.  Following the instructions provided in the Wiki to setup the remote compile, and using my own makefile, I setup a test, using just the "normal" gcc compiler for now, just to see how things work.  When I do a "build" in C::B, I get the following error:
gcc -c -Wall hw.c
gcc: hw.c: No such file or directory
gcc: no input files
gcc hw.o -o hello
gcc: hw.o: No such file or directory
gcc: no input files
Process terminated with status 0 (0 minutes, 33 seconds)
0 errors, 0 warnings
  It does appear that the make file is being called.  However, I get this same error if I just logged into the Linux Server and type "gcc hw.c".  I get the first 2 lines.  Which makes me think that Uniwin did not "cd" into the proper directory where my code is.  This seems strange.  Is this part of the mapping??
My mapping is:  C:\TEMP\Workspace\cdTest => /home/beckwith/EETest/cdTest
I have the same source file and make file in both places.

I greatly appreciate your expertise and feedback.
Thanks for creating C::B.  This could very well become my "standard" IDE for my work.
Regards,
Stephen

StephenB

  • Guest
Re: Cross Compiling - Issues
« Reply #1 on: February 09, 2007, 05:05:01 pm »
After some late night debugging (on a sugar high of course), I FINALLY was able to get Uniwin to work with C::B. 
It seems that the project needs to exist on the PC and the "mirror" needs to be setup in Uniwin.  Also, the project/target setup needs to call out the GCC-Uniwin compiler properly.   Once done, I was able to the build my program using my own makefile and get the correct output file. 

Thanks for creating a very nice IDE.

Regards,
Stephen