aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEAGMnor <emilio.antonio.garcia.morales@nordicsemi.no>2014-04-11 15:13:42 +0200
committerSudar <sudar@sudarmuthu.com>2014-04-11 20:24:17 +0530
commit32d35da2a0162b1b06ea7926e01a496dfacedc98 (patch)
tree689abf00cb77ea380bb4a9c90009288c55d5b106
parent87129f1d2bce5576ac85fb7fb95574d80204e2a8 (diff)
Tweak AVRdude conf file detection in windows
On windows the AVRdude configuration file is now detected properly. The comments and `README` are updated as well. Fix #187
-rw-r--r--Arduino.mk27
-rw-r--r--HISTORY.md1
-rw-r--r--README.md24
3 files changed, 51 insertions, 1 deletions
diff --git a/Arduino.mk b/Arduino.mk
index 84d8af5..31ce76f 100644
--- a/Arduino.mk
+++ b/Arduino.mk
@@ -56,6 +56,24 @@
# ARDMK_DIR = /usr/share/arduino
# AVR_TOOLS_DIR = /usr
#
+# On Windows declare this environmental variables using the windows
+# configuration options. Control Panel > System > Advanced system settings
+# Also take into account that when you set them you have to add '\' on
+# all spaces and special characters.
+# ARDUINO_DIR and AVR_TOOLS_DIR have to be relative and not absolute.
+# This are just examples, you have to adapt this variables accordingly to
+# your system.
+#
+# ARDUINO_DIR =../../../../../Arduino
+# AVR_TOOLS_DIR =../../../../../Arduino/hardware/tools/avr
+# ARDMK_DIR = /cygdrive/c/Users/"YourUser"/Arduino-Makefile
+#
+# On Windows it is highly recommended that you create a symbolic link directory
+# for avoiding using the normal directories name of windows such as
+# c:\Program Files (x86)\Arduino
+# For this use the command mklink on the console.
+#
+#
# You can either set these up in the Makefile, or put them in your
# environment e.g. in your .bashrc
#
@@ -395,6 +413,15 @@ ifndef AVR_TOOLS_DIR
else
$(call show_config_variable,AVR_TOOLS_DIR,[USER])
+
+ # Check in Windows as Cygwin is being used, that the configuration file for the AVRDUDE is set
+ # Check if it works on MAC
+ ifeq ($(CURRENT_OS),WINDOWS)
+ ifndef AVRDUDE_CONF
+ AVRDUDE_CONF = $(AVR_TOOLS_DIR)/etc/avrdude.conf
+ endif
+ endif
+
endif #ndef AVR_TOOLS_DIR
ifndef AVR_TOOLS_PATH
diff --git a/HISTORY.md b/HISTORY.md
index 7c126da..c093a99 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -19,6 +19,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- Tweak: Replace perl reset script with Python script. (https://github.com/sej7278)
- Tweak: Made choice of Python2/3 interpreter up to the OS. (https://github.com/peplin)
- Tweak: Simplified packaging dependencies. (https://github.com/sej7278)
+- Tweak: Tweak AVRDUDE conf detection in windows. (https://github.com/EAGMnor)
### 1.3.1 (2014-02-04)
- Fix: BUNDLED_AVR_TOOLS_DIR is now set properly when using only arduino-core and not the whole arduino package. (https://github.com/sej7278)
diff --git a/README.md b/README.md
index 5441f66..5898daa 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,8 @@ On Mac using MacPorts:
On Windows:
+You need to install Cygwin and its packages for Make, Perl and the next Serial library.
+
pySerial can be downloaded from PyPi
On other systems:
@@ -93,12 +95,32 @@ On Windows (using cygwin), you might want to set:
MONITOR_PORT = com3
BOARD_TAG = mega2560
+It is recommended in Windows that you create a symbolic link directory for avoiding problem with folder naming conventions on Windows. Specially if your your Arduino folder is in:
+
+c:\Program Files (x86)\Arduino
+
+You will get problem for the special characters on the folder name. More details about this can be found on https://github.com/sudar/Arduino-Makefile/issues/94
+
+For creating a symbolic link you have to use the command “mklink” on Windows, e.g.
+
+mklink /d c:\Arduino c:\Program Files (x86)\Arduino
+
+At the end the variables end up being.
+
+ARDUINO_DIR=../../../../../Arduino
+
+Instead of
+
+ARDUINO_DIR=../../../../../Program\ Files\ \(x86\)/Arduino
+
+
+
- `BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards`
- `MONITOR_PORT` - The port where your Arduino is plugged in, usually `/dev/ttyACM0` or `/dev/ttyUSB0` in Linux or Mac OS X and `com3`, `com4`, etc. in Windows.
- `ARDUINO_DIR` - Path to Arduino installation. In Cygwin in Windows this path must be
relative, not absolute (e.g. "../../arduino" and not "/c/cygwin/Arduino").
- `ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino`
-- `AVR_TOOLS_DIR` - Path where the avr tools chain binaries are present. If you are going to use the binaries that came with Arduino installation, then you don't have to set it.
+- `AVR_TOOLS_DIR` - Path where the avr tools chain binaries are present. If you are going to use the binaries that came with Arduino installation, then you don't have to set it. Otherwise set it realtive and not absolute.
The list of all variables that can be overridden is available at [arduino-mk-vars.md](arduino-mk-vars.md) file.