The Positive Rail
  • Blog
  • About
  • Contact

External build settings in XCode 6.1.1

1/3/2015

0 Comments

 
Some notes on setting up external build settings in XCode 6.1.1:

I set up an XCode project to use external build settings.  I added all of my files to the project, then hit 'build'.  But it stalled, and complained: 

make: arm-none-eabi-gcc: No such file or directory

My build chain is using the standard /usr/bin/make, which invokes arm-none-eabi-gcc, the microcontroller compiler.

XCode was complaining that it could not find arm-none-eabi-gcc.  


I played around with all of the typical places where the path to that executable is found - .profile, .bashrc, .bash_profile, but nothing seemed to work.

After some searching, it turns out that the fix is simple.
XCode does -not- read the usual .profile, .bashrc and .bash_profile environment files when executing make.  Since this is usually where the path to the arm-non-eabi-gcc are specified, it gives you an error.

In earlier versions of XCode, you had to go through a big process to set environment variables in which you built a special environment file and specify a PATH variable.

But in XCode 6.1 this process is now much simpler.  To use the correct compiler (the gcc-arm-none-eabi that I installed in my $HOME/devtools directory) you want to add a PATH variable to the build settings.

To get to this click on the project icon in the upper left hand side - you'll see a bunch of settings pop up in the main window.  Click on the + button and add a 'User-defined setting':
Picture
The name of the variable should be "PATH" and the value should be this path specification:

/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/devtools/gcc-arm-none-eabi-4_9-2014q4/bin

where the last path ($HOME/devtools/gcc-arm-none-eabi-4_9-2014q4/bin) is the path to the gcc that you want to use.  Also note that you must use $HOME rather than ~.

Happy building!


0 Comments



Leave a Reply.

    What is this about?

    Embedded systems, nascent markets and minimalist product development

    Archives

    September 2014
    August 2014
    July 2014
    June 2014

    Categories

    All

    RSS Feed