Build error after exported to Eclipse (GCC (Code Sourcery))

11 Jun 2012

Hi, All,

Following the instructions at( http://mbed.org/handbook/Exporting-to-offline-toolchains ), I first delete the mBed library and imported the export library (http://mbed.org/projects/libraries/svn/mbed/export/trunk) into my online project, then export to my local disk.

Then open the eclipse, create a new project and import these files that were just exported from mBed online IDE. When I build the project (Ctrl+B) at Eclipse,I got the following error in file \export\DirHandle.h:

fatal error: sys/syslimits.h: No such file or directory

I cannot find any sys folder in my project folder. Is this file a Linux related file? Where can I find such a file?

By the way, my cross-compiler (Sourcery) is installed in Win7. I also get a Cygwin, but I donot think the Sourcery use the Cygwin. I can use the Sourcery cross-compiler in Eclipse to compile program for unbuntu 11.04 at Beagleboard (ARM-Cotex-A8). I think the compiler should not be the reason for this error.

Any comments are appreciated.

Dan

11 Jun 2012

Dan,

This would appear to be a problem in your cross-compiler set-up. You need correct it by -

  1. Creating a 'sys/' sub-directory in the directory where your other target headers reside.
  2. Move a version of 'syslimits.h' for your target system (not the host system) into 'sys/'.
14 Jun 2012

Daniel Dai wrote:

fatal error: sys/syslimits.h: No such file or directory

My CodeSourcery installation has this header in its arm-none-eabi/include/sys directory. Maybe your Eclipse setup isn't somehow using the correct CodeSourcery toolchain on your machine?

You could bring up a Command Prompt and cd into the root directory of the project that you exported from the mbed website and try running

cs-make

to build it outside of Eclipse and get that to work first. The only problem you should have running that would be if you didn't let Code Sourcery put itself in the PATH during its installation.