Notes About Working with Various Arduino & Netduino Microcontroller Boards

Tuesday, May 26, 2015

Arduino Galileo Setup Error on Linux (invalid mode '+111')

I've had an Arduino Galileo (1st generation) board for more than a year, but I haven't done much with it.  I decided that I would perhaps get more use out of it if I could cross-compile C/C++ code to run on it.

To get the necessary version of gcc that servers as the crosscompiler, I downloaded the Linux version of the Arduino IDE for Intel from the Intel site and tried to install it on a virtual machine running Fedora 21, but the script that installs the Intel compiler and tools (arduino-1.5.3/hardware/tools/install_script.sh) kept terminating with an error. This script is run by the IDE the first time you try to compile a sketch. You have to run this script before you can work with the compiler and tools at the command line to cross-compile code for the Galileo.  The error message said

find: invalid mode '+111'

I found the solution to the problem in a post by Sulamita on the Intel Community discussion board. Her solution (changing +111 to /111 on line 111 of the script) fixed the problem for me.  I changed line 111 from

executable_files=$($SUDO_EXEC find "$native_sysroot" -type f -perm +111 -exec printf "\"%s\" " {} \; )

to

executable_files=$($SUDO_EXEC find "$native_sysroot" -type f -perm /111 -exec printf "\"%s\" " {} \; )

I can now compile C code for the Galileo following the steps show in the PDF "Quick Start Guide for Using Intel Compiler to Build Applications Targeting Quark SoC on Galileo Board."  (By the way, I boot my Galileo from an image on an SD card. The image is available at the Intel Support and Downloads site for Galileo.)

4 comments:

  1. I have ubuntu 16.04 and i tried changing the same in hardware/tool/install file but couldnt get the galileo to work.It is constantly throwing the same error.Kindly help me upload code onto galileo gen2

    ReplyDelete
  2. I have ubuntu 16.04 and i tried changing the same in hardware/tool/install file but couldnt get the galileo to work.It is constantly throwing the same error.Kindly help me upload code onto galileo gen2

    ReplyDelete