This is support for https://code.google.com/p/arduino-tiny
The arduino-tiny project provides a boards.txt file and a whole
separate Arduino core modified to work with attinies.
Arduino.mk will now switch to that core if it finds a
'build.core' parameter in boards.txt and a folder in
$(ALTERNATE_CORE_PATH)/cores by that name.
Include files are searched for in the include search path made up
from, among other places, the -I switches given to the gcc compiler.
The . (dot) used for the current directory is not in the search
path when the IDE builds the project and does not seem to be needed
in any reasonable case. Maybe it was included because someone thought
it meant to "search in the same directory as the file being compiled",
but I cannot tell because the switch was already included in the first
commit in this repo. In any case, the current file directory is already
searched by gcc before the search path is consulted, in any case, so
this switch is not needed to cause this behavior.
Including the "-I." switch causes compiles to fail when libraries
include a header which is coincidentally named the same as one of the
user headers. For example, if the user has a Udp.h file in his sketch
folder, the compile will fail if it includes the EthernetUdp.h file.
A simple example is the examples/WebServer code. It fails if you do
this:
touch examples/WebServer/Udp.h
make -C examples/WebServer
But it builds ok from the IDE which does not include "." in the
search path.
Similarly, HelloWorld fails for the same reason if you do this:
touch examples/HelloWorld/Print.h
make -C examples/HelloWorld
Remove the -I. switch from the CPPFLAGS directive altogether to
prevent this include filename confusion and to more closely model
the behavior of the IDE. Fixes#303.
It may also work to move the -I. to the end of the search path,
but this still would compile differently from the IDE and so it
is considered not to be a useful feature to retain in any case.
--
I did not add a test case here because it's not clear to me how it
should be added. Should I modify HelloWorld as described above,
or should I add examples/TestSearchPath/ with the same files
explicitly for this test? It would be clearer for me if there
was an explicit "tests" directory independent from "examples".
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.
- Add support for 1.5.x library layout.
(https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification)
- Allow using Arduino 1.5.x platform specific system libraries.
Arduino 1.5.x has additional directories for platform (vendor/architecture)
specific libraries - look there when searching for libraries.
In 1.5.6 the Due board has an underscore, this regex tweak allows for:
arduino_due_x_dbg Arduino Due (Programming Port)
arduino_due_x Arduino Due (Native USB Port)
with spaces in directory/file-names.
Removed $TARGETS as it was an unsafe wildcard and was only used
in "make clean" which itself has been simplified to just delete
the $OBJDIR rather than waste time deleting individual files.
If Flymake is configured to parse .ino files the same way as for c/c++
files, it creates a temporary file (_flymake.ino) in the same directory
as the original file. It fails with the current Arduino.mk because of
the check for multiple .ino files. This fix removes the check
only when flymake is calling the Makefile (Flymake will call make with
the variable CHK_SOURCES set to the temporary file name)
To make Flymake working with .ino file :
Add :
check-syntax:
$(CXX_NAME) -c -include Arduino.h -x c++ $(CXXFLAGS) $(CPPFLAGS) -fsyntax-only $(CHK_SOURCES)
in the project Makefile after the inclusion of the Arduino.mk file
Edit the flymake configuration :
M-x customize-option RET
flymake-allowed-file-name-masks RET (using auto completion !)
Add the line :
("\\.ino\\'" flymake-simple-make-init)
Then click on "Apply and Save" button
Fix#211
Whilst doing that, i noticed that there were some missing
targets to "make help" so added those in and re-ordered
and re-worded some of the targets to make more sense
e.g. all of the upload's are together, all of the
assemblers are together etc.
AVRDUDE requires -P usb to be passed as an argument for some ISP
devices, and it is also required in the case where you have multiple
usbtiny or usbasp devices connected at once to select a specific one.
Fix#167
This results in just a deprecated warning rather than an error
when using libraries (e.g. jeelib) that still use prog_XXX types
This is how the IDE does it, and means that libraries don't have to
add the #define __PROG_TYPES_COMPAT__ line
Reference: http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.htmlFix#169
so that installations using only the arduino-core packages that
don't have the $(ARDUINO_DIR)/hardware/tools/avr directory can
still use the avr-g++ tools found in the $PATH (/usr/bin)
Previously BUNDLED_AVR_TOOLS_DIR was set to an empty string as
the directory doesn't exist, which meant that "ifdef BUNDLED_AVR_TOOLS_DIR..."
was set rather than skipping to "else SYSTEMPATH_AVR_TOOLS_DIR...."
No user would set BUNDLED_AVR_TOOLS_DIR so the assignment operator
:= should be used not ?=
Updated the version info/changes in various locations.
* Strip leading "/dev/" from MONITOR_PORT before handing to avrdude in Windows.
* Use the more widely available awk tool instead of bc to subtract 1
from COM ID (as opposed to `bc`).
* Allow Windows user to specify "com1" or just "1".
* Document MONITOR_PORT format for Windows users.
Previously we were setting the AVR tools path to the PIC32 tools path because it
made grabbing the compiling tools easier. Consequently, it made finding the
avrdude path much harder, especially since the avrdude files are in different
locations in the Linux distributions of MPIDE and Arduino.
Instead, we set the AVR tools path to the *correct* path (where *AVR* dude
lives), and totally override the CC, CXX, etc. paths to point to their PIC32
equivalents.
Fix#147Fix#151Fix#153
The following are the detailed changes
- Remove ARDMK_PATH, ARDMK_FILE and arduino-mk subdirectory
- Looks for ard-reset-arduino in $PATH or ARDMK_DIR/bin
- Fix git-archive command in RPM SPEC file
- Remove some whitespace
- Remove arduino-mk dir from debian package's arduino-mk.install
- Update docs to reflect the above changes
- Bump Up version to 1.2.0