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.
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':
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':
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!
/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!