queezythegreat / arduino-cmake

Arduino CMake Build system
644 stars 216 forks source link

need help or info working with windows #57

Closed noobee closed 11 years ago

noobee commented 11 years ago

First, thank you for a very nice project!

Second, my apologies if this is not the right forum to discuss this issue. Please redirect me to the right place if appropriate.

I'm having some trouble setting up the environment for a windows machine. i've tried searching for information, discussion forums, or tutorials in this topic, but am unable to find much useful data. Hence, i'm filing this issue.

I followed the instructions in your tutorial to set up the environment for windows, with the following key parameters,

i've attached the full error log (may be for a later run) at https://docs.google.com/document/d/1x9LiaN9OlhSii-cPBDriTVF9FhbY37zefvrnbg2HV1Q/pub

i am not sure how to proceed and would love to hear any advice.

thank you!

queezythegreat commented 11 years ago

Hi, could you try the following:

  1. Put the Arduino SDK into C:\Program Files\
  2. Add C:\Program Files\arduino-1.0.1\hardware\tools\avr\utils\bin onto your system path ( and remove all your previous entries except for CMake)
set PATH=%PATH%;C:\Program Files\arduino-1.0.1\hardware\tools\avr\utils\bin
set PATH=%PATH%;C:\Program Files (x86)\CMake 2.8\bin
  1. Enter the arduino-cmake directory, then create a build directory and enter it:
cd arduino-cmake
mkdir build
cd build
  1. Confiugre and run:
cmake -G"MinGW Makefiles" ..
make

By the way, the example provided is expected to work without any modifications, you just need to specify arduino-cmake as the source directory.

I tried the following with the latest version of the Arduino SDK version 1.0.3. I did have some problems with the configuration, but that was caused by me having MinGW and MsysGit installed on my system (but fixed the problem by removing the offending entries in the system path).

noobee commented 11 years ago

your walkthrough works!!

for some reason, it'll only work if the arduino SDK is located at c:\program files\arduino-1.0.1 but not when it is located at c:\arduino-1.0.1, even after i tried setting the right path and also tried adding set(ARDUINO_SDK_PATH c:/arduino-1.0.1) in the top-level CMakelists.txt.

i also made the mistake of trying to build from the ./example subdirectory instead of the top-level `arduino-cmake'.

in any case, i was able to build the example that you provided and i think i should be able to adapt it towards my project.

one small suggestion i have is to add a note in README.rst to try installing the arduino SDK in the preferred C:\Programs File path instead of the SYSTEM PATH. it made the difference for me.

i would like to thank you very much again for your help!