2 Replies Latest reply on Feb 2, 2015 1:30 PM by CMata_Intel

    Need help compiling mraa/upm on Windows

    OutOfLines

      Hi,

       

      I have written code to interface the Edison mini breakout board with the ADS1112 i2c ADC and the LTC2602 SPI DAC and would like to add them to the UPM library.

       

      I am able to cross compile my code on windows using the iotdk-ide-win environment, but I would like to build it within the UPM library.

       

      I see messages for how to build mraa and upm on the Edison itself, but I would like to build it on my Windows machine using iotdk-ide-win.

       

      I installed cmake and tried to run via the cmake gui and the cmake command line, and I am getting errors.

       

      Here is my command-line and error (running from the upm/build directory).  The various paths and include were copied out of the ide's compiler settings.

      "c:/Program Files (x86)/CMake/bin/cmake.exe" -DCMAKE_CXX_FLAGS=C:/iotdk-ide-win/devkit-x86/sysroots/x86_64-pokysdk-mingw32/usr/bin/i586-poky-linux/i586-poky-linux-g++.exe -DCMAKE_C_FLAGS=-I"C:/iotdk-ide-win/devkit-x86/sysroots/i586-poky-linux/usr/include" -Os -g3 -Wall --sysroot="C:/iotdk-ide-win/devkit-x86/sysroots/i586-poky-linux" -m32 -march=i586 -c -ffunction-sections -fdata-sections -DCMAKE_C_COMPILER=C:/iotdk-ide-win/devkit-x86/sysroots/x86_64-pokysdk-mingw32/usr/bin/i586-poky-linux/i586-poky-linux-gcc.exe  -DCMAKE_CXX_COMPILER=C:/iotdk-ide-win/devkit-x86/sysroots/x86_64-pokysdk-mingw32/usr/bin/i586-poky-linux/i586-poky-linux-g++.exe ..

       

      -- The C compiler identification is GNU 4.8.2

      -- The CXX compiler identification is GNU 4.8.2

      -- Check for working C compiler: C:/iotdk-ide-win/devkit-x86/sysroots/x86_64-pokysdk-mingw32/usr/bin/i586-poky-linux/i586-poky-linux-gcc.exe

      CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTryCompileExec1910360624\fast"

      -- Check for working C compiler: C:/iotdk-ide-win/devkit-x86/sysroots/x86_64-pokysdk-mingw32/usr/bin/i586-poky-linux/i586-poky-linux-gcc.exe -- broken

      CMake Error at c:/Program Files (x86)/CMake/share/cmake-3.1/Modules/CMakeTestCCompiler.cmake:61 (message):

        The C compiler

        "C:/iotdk-ide-win/devkit-x86/sysroots/x86_64-pokysdk-mingw32/usr/bin/i586-poky-linux/i586-poky-linux-gcc.exe"

        is not able to compile a simple test program.

       

        It fails with the following output:

       

         Change Dir: C:/iotdk-ide-win/iot-devkit/workspace/mraa/upm/build/CMakeFiles/CMakeTmp

       

        Run Build Command:"nmake" "/NOLOGO" "cmTryCompileExec1910360624\fast"

       

        The system cannot find the file specified

       

        Generator: execution of make failed.  Make command was: "nmake" "/NOLOGO"

        "cmTryCompileExec1910360624\fast"

       

        CMake will not be able to correctly generate this project.

      Call Stack (most recent call first):

        CMakeLists.txt:2 (project)

       

      -- Configuring incomplete, errors occurred!

      See also "C:/iotdk-ide-win/iot-devkit/workspace/mraa/upm/build/CMakeFiles/CMakeOutput.log".

      See also "C:/iotdk-ide-win/iot-devkit/workspace/mraa/upm/build/CMakeFiles/CMakeError.log".

       

      I want to be able to run cmake so that I can verify that this is a publishable set of code.  Is that possible using cmake on windows or even from within the IDE?

       

      Thanks.