With this fix the `TARGET` variable is set correctly when the project directory
(or its path) contains spaces. So in this case:
/Users/Joe/Dropbox (Personal)/example project
`TARGET` will be set to `example_project` instead of `Dropbox example project`
(like it was before this fix).
Needed to fix the new wiring_pulse.S in IDE 1.6.5 which
also has a wiring_pulse.c source file.
Mostly rebased @peplin's PR #266, so should allow us
to support newer chipKIT builds too.
I found that the previous reset code did not work for Leonardo or Micro, nor did any reset code anywhere on the internet.
An examination of the Arduino IDE source code (and the JNI code behind its serial implementation) shows that it holds RTS high and DTR low when doing the 1200 baud open/close. And it turns out that's exactly what's needed!
For instance in the Sparkfun 1.6 core, we have:
promicro16.build.vid.0=0x1B4F
promicro16.build.vid.1=0x1B4F
promicro16.build.vid=0x1B4F
So we end up matching all 3 instead of just the last one.
Adding the = means we're looking for promicro16.build.vid= so
not catching the .0 or .1 version.
existing builds.
E.g. mega1280 and mega2560 previously *both* created a "build-mega" directory,
now they'll create build-mega-mega2560 and build-mega-mega1280
Only applies to 1.5+ of course, and only when BOARD_SUB is used. 1.0 will still
create build-mega2560 and build-mega1280 directories (just BOARD_TAG)
arduino-tiny and damellis' attiny85 cores don't use a vendor, but they
do use the avr architecture (subdirectory) in their 1.5/1.6 branches.
arduino-tiny builds and is auto-detected now, still needs some
work to support sub-cpu's and clocks.
damellis doesn't compile, but that's not our makefile it seems.
Subject to change during the beta phase, as its already different
than 1.5.6, also may change when packaged for Debian (usually symlinked)
Fixes issue #301
Double-quoting was added in 7618da7 to allow for spaces in paths,
that was a bad idea as:
1. most GNU Make functions can't handle spaces
2. it breaks variable expansion on Linux/OSX e.g. ~/sketchbook
3. Windows doesn't like double-quotes - see d5c7ed1
So basically, don't put spaces in your paths, as most Make functions
can't handle them, even if escaped, and its a bit dangerous when
shelling out to grep etc.
Single-quoting is no better either.
Changed RESET_CMD structure under Cygwin
Changed behaviour of get_monitor_port under Windows
DEVICE_PATH always becomes/dev/ttyS[0-9] on Windows
MONITOR_PORT always becomes com[0-9] on Windows
We currently pass the -D (do not erase) option to avrdude
unconditionally in order to work around an Arduino Mega bootloader bug.
However, this has the side-effect of breaking the ispload target for all
non-XMEGA chips, since a write operation on these chips essentially ANDs
the new program with the existing memory contents. If the memory is not
first erased to contain only 0xff, the resulting image is garbage. This
patch makes it so we pass -D when we're using the Arduino bootloader but
don't pass it when we're using ISP directly.