Till not it is not possible to build with Arduino core, without using a
.ino or .pde file. This commit removes that restriction.
However, the user has to explicitly include Arduino header files.
Fix#105
Both `ARDMK_DIR` and `ARDMK_PATH` needs to be set differently based on
whether the makefile is installed through a package or git checkout.
Refer to #111 to find out why it is needed.
If `ARDMK_DIR` is not defined, then it is assumed to be the directory
where `Arduino.mk` or `chipKIT.mk` is present.
Since this assumption is made, `ARDMK_DIR` will always be set, whether
the user has explicitly set it or not. Therefore checking whether
`ARDMK_DIR` is not set is unnecessary. This commit removes these
unnecessary checks.
When support for ChipKit was added recently (issue #98) it broke the way
ARDMK_PATH and ARDMK_DIR were handled, if the package was installed
through package. It was only working if you have done a git checkout.
This commit fixes it, but searching for `Common.mk` both in
`ARDMK_DIR/arduino-mk` and `ARDMK_DIR/` directories.
Fix#110
It should be possible to use the Makefile without ever running the
Arduino or chipKIT IDE. This change only looks for the preferences file
if the sketchbook path is not defined, and even then, will use the
default skethbook path if the preferences file is unavailable.
Working towards dropping the dependency on Perl (which very few Windows users
have), this commit implements the required functionality from ard-parse-boards
in a few shell commands from within the Makefile.
Fix#100
This commit modifies a few things in Arduino.mk to be able to support
overriding the necessary configuration options to support the chipKIT build,
and also includes an example sketch configured to build for the Max32 platform.
In addition the following changes were done as well
- Control C standard with a CFLAGS_STD flag, GNU99 by default.
- Duplicate show_config_variable in each sub-makefile.
- Remove redundant output of ARDUINO_PREFERENCES_PATH from config table.
- Defer Priting ARDMK_DIR until Arduino.mk.
- Define names of compiler tools earlier to use for path checking.
Duplicating show_config_variable is unfortunate because the code is duplicated,
but I don't see a good way around it since we need to dupliacate the check
for ARDMK_DIR before we can find Common.mk.
Fix#98
When a Leonardo based board is reset, the port disappears and we need to
wait till it comes back.
Earlier this logic was handled by a separate shell script. Now the logic
is moved inside the ard-reset-arduino perl script. This is done to
reduce the number of binaries that are needed by the makefile.
Fix#95
Earlier bin/ard-verify-size shell script was used to validate that the
binary hex file size is less than the flash memory of the target
microcontroller.
This commit removes the dependency on the external shell script, by
moving the binary size verification logic inside the makefile itself.
Fix#54
In Arduino Linux distribution, avrdude and avrdude.conf files are placed
in different path. This commit improves the autodetection of avrdude
and avrdude.conf paths by considering this fact.
Fix#48
In 25a31afbd9 a bug was introduced which
prevented the config info for AVR_TOOLS_DIR to be printed when
AVRDUDE_CONF was defined.
This commit moves the config printing statement for AVR_TOOLS_DIR
outside the condition which checks whether AVRDUDE_CONF is defined.
If editing and saving Arduino.mk with emacs, emacs complains about
"Suspicious line 1050". This line is empty but contains an extra tab.
Signed-off-by: Ralf Doering <ralf@rdoering.net>
Micro can be reset using Leonardo reset functions itself. So call
Leonardo reset functions for Micro as well.
The reset function seems to have some issues for Micro and is not
100% reliable, like Leonardo. See comments in #30.
Fix#80Fix#83