-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test the makefile in windows #94
Comments
@ibespwn posted this at #128 (comment) If you want, I can work with you in this thread to help test it in Windows. Or we can use the Issue link you provided. Bear in mind, I'm using cygwin, so it may work better/worse with GNU Make and Windows Command Prompt. I'm working out of your examples/Blink directory. Cygwin adds some confusion in that executables compiled for Windows (like cc1plus.exe) expect Windows style paths (C:\arduino-1.0.5), but Cygwin uses unix style paths (/cygdrive/c/arduino-1.0.5/). Cygwin also seems to get Windows applications (even Windows Command Prompt) to recognize forward slashes as directory delimiters, though, so it recognizes "C:/arduino-1.0.5/" as well. I had to modify Arduino.mk to get it to find Arduino.h with ARDUINO_HEADER in a couple places. If this was a mistake (maybe I pointed to the wrong one or something), let me know!
Here's what my makefile looks like:
When I try to compile:
At this point, we're getting outside of my realm of understanding, and I'm not sure where to go to continue finding ways to fix the compile errors. |
You are correct, it's a bug. I have created a separate issue to track it - #131 In your makefile you are defining this In your makefile you are also defining the following
These are needed only if you are using a non-standard or unofficial Arduino board. It seems you are trying this in Uno, so you don't have to declare them. Kindly remove these 3 lines from your makefile and let me know if that helps. |
Without those three files included.
With just ARDUINO_HEADER="/arduino-1.0.5/hardware/arduino/cores/arduino/Arduino.h"
|
For some reason in windows, the compiler is not able to find the include header files. Can you enable verbose mode in Arduino IDE and then post the compilation message in a gist? |
I've had some success in Windows if you use a relative path for ARDUINO_DIR instead of an absolute path. If you give the compiler an absolute path, it seems to expect it to be a Windows-style path and not UNIX (i.e. with forward slashes). |
@peplin Did you do any other change to the makefile to make it work in Windows? |
Building from master today (xxx) it works for the BlinkChipKIT example if I set a relative path for MPIDE_DIR, e.g. just
If I set an absolute path for MPIDE_DIR, it fails:
Building the
and with an absolute path for ARDUINO_DIR, I see the same errors as @ibespwn:
|
@peplin Thanks for testing this. I was under the impression that lot of things were broken in Windows. Didn't realize that just using relative paths will solve most of it. Also did you try to upload it to the board or you just tried to compile them alone? |
Tonight I tried uploading and I ran into some issues. I think it has to do with the naming of the serial device. The Windows tools need the COM port style names, e.g. "com16" but the Makefile is too aggressively rejecting that device name because it can't find the file (e.g. it's expecting something like /dev/ttyACM0). In Cygwin, a
I tested ard-reset-arduino in isolation, and it chokes on any name I give it: com16, COM16, /dev/ttyS15. Digging around online, it seems like you may have to use |
What was the exact change that you did? I thought we weren't doing any check on
I have created a new issue to track this #139. Hopefully someone with a better Perl skill than mine could fix it so that it works on Windows as well. |
I changed the
and
|
@peplin Thanks for all the pull requests. I will merge all of them by tomorrow. |
Yeah, I'm able to compile for and flash both an Arduino Uno and the chipKIT Max32 from Cygwin. We definitely need another person or two to give it a test to make sure all is well, though. |
@sej7278 - Yeah definitely. I generally try to adhere to Semantic Versioning and will never change a release (or tag) after it is released. I have already created a github milestone for 1.3.0 and all these changes would go into v1.3.0. Also we can update the package once v1.3.0 is released. |
@sudar done (after some minor testing on my mega): http://www.the-jedi.co.uk/downloads/arduino/ i'll inform @maqifrnswa in a mo |
@sej7278 Thanks. |
Hallo, I have been trying to use the makefile for Windows and I have gotten some issues. So far I have been able to overcome must of them and the reason of this post is just to let you know about them because others that want to use the makefile on Windows might face them as well. The main issue was due to the folder naming conventions on Windows. By the way I am using Cygwin. My Arduino folder is in "C:\Program Files (x86)\Arduino" First to overcome this I added to the makefile quotation marks (“”) every time the variables ARDUINO_DIR and AVR_TOOLS_DIR are used, e.g. VERSION_FILE := “$(ARDUINO_DIR)”/lib/version.txt In my case these two variables had to be relative otherwise the files would not be found. This worked more or less but I was not able to get all the core files compiled. After some tries I found that the $(wildcard) function on which the folders directory was used to search for some files, did not detect well the parenthesis and was giving as a result an empty string. For example in this line CORE_C_SRCS = Even by hardcoding ( so the parenthesis by taken into account as a special string, still was not working. At the end to avoid all of this I made a symbolic link using the command “mklink” on Windows so my variables end up being ARDUINO_DIR=../../../../../Arduino Instead of ARDUINO_DIR=../../../../../Program\ Files\ (x86)/Arduino I created a directory symbolic link by typing on the windows console Mklink /d c:\Arduino c:\Program Files (x86)\Arduino So far this is what I have done and still I have other problems. The next issue is that I get ../../Arduino.mk:940: *** multiple target patterns. Stop. But still have not being able to found the solution. Any idea would be well appreciated :D ps. Hope this is the right place to post this |
Found the problem... The other variable ARDMK_DIR was sent like this ARDMK_DIR=C:\Users"YourUser"\Arduino-Makefile and Cygwin is not converting them to its naming convention. The only variable that is convert is Home. At the end my variable end up being ARDMK_DIR=/cygdrive/c/Users/"YourUser"/Arduino-Makefile Hope this information is useful for someone else that wants to use this Makefile on Windows |
I actually had to include one line for detecting the conf file for the AVR_DUDE... will create a fork and make a pull request. |
The current state of makefile in windows is "supposed to work". I don't think anyone has tested the makefile in Windows to confirm whether it works or not.
It would be nice if someone who has access to a Windows box tests and reports whether it works properly or not.
The text was updated successfully, but these errors were encountered: