aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk/Arduino.mk
AgeCommit message (Collapse)Author
2013-06-20Release v0.12.00.12.0Sudar
2013-06-20Deprecate "generated_assembly" target in favour of "generate_assembly"Sudar
The deprecated target will be removed in v1.0.0. Fix #79
2013-06-19Fix make generated_assemblyMatthijs Kooijman
Before, .ino and .pde files would be converted to .cpp files and there is a rule to convert those .cpp files to .s files for make generated_assembly. However, since 1f043bb (Compile .ino and .pde files directly) these intermediate .cpp files are no longer generated, breaking the rule to generate .s files. This fixes this by also generating .s files from .ino and .pde files directly. Closes #76
2013-06-19Let the .pde and .ino rules also depend on $(COMMON_DEPS)Matthijs Kooijman
In 1f043bb (Compile .ino and .pde files directly), this dependency was accidentally dropped from these rules. This fixes this by adding it again.
2013-06-15Release v0.11.00.11.0Sudar
2013-06-15Add support for compiling plain AVR C filesSudar
To compile plain AVR C files, the variable NO_CORE should be initialized to a non-empty value. When NO_CORE is set, the following changes happen - boards.txt file is not parsed. The user should explicitly set MCU, F_CPU, fuse bits etc. - MONITOR_BAUDRATE is not calculated Fix #63
2013-06-15Handle cases where certain fuse bits are not presentSudar
Introduce two new variables AVRDUDE_ISP_FUSES_PRE and AVRDUDE_ISP_FUSES_POST which are set based on whether the fuse bits are present or not. avrdude is invoked to set fuse bits only if these new variables are not empty. Fix #61
2013-06-15Add the ability to configure avrdude optionsSudar
A new environmental variable AVRDUDE_OPTS is added, which can be used to configure the options passed to avrdude. Fix #53
2013-06-15Add a warning when HEX_MAXIMUM_SIZE is not specifiedSudar
2013-06-15Fix whitespace issuesSudar
2013-06-15Replace hardcoded executables with variableSudar
2013-06-14Tag v0.10.6 for release0.10.6Sudar
2013-06-14Merge pull request #72 from matthijskooijman/indent-fixSudar
Don't indent variable assignments with tabs
2013-06-14Don't indent variable assignments with tabsMatthijs Kooijman
This causes make to consider the line part of the preceding recipe, causing the variable to remain unset and the preceding recipe to break. In this case, this was the recipe for user libraries with .c files, which is uncommon enough for this to go unnoticed. This was broken in 3bce1d88 (Allow adding extra common dependencies).
2013-06-14Move reseting Leonardo logic to ard-reset-arduinoSudar
ard-reset-leonardo which was used for reseting Leonardo was written in Python. Now the logic is added inside the ard-reset-arduino perl script itself. Fix #62 Squashed commit of the following: commit a63366980f452780f9f7894a8c7b77ca9cd9dcdd Author: Simon John <git@the-jedi.co.uk> Date: Fri Jun 14 11:36:00 2013 +0200 who put a space in the shebangs?! commit c798eb26ea12351186b8f64266d98f44ed791270 Author: Simon John <git@the-jedi.co.uk> Date: Fri Jun 14 11:10:12 2013 +0200 replaced ard-reset-leonardo with an update to ard-reset-arduino which is now called from Arduino.mk with the --leonardo flag removed some trailing whitespace upped version string in Arduino.mk
2013-06-13Merge pull request #70 from matthijskooijman/libs-fixSudar
Fix directory creation for library source files
2013-06-13Fix directory creation for library source filesMatthijs Kooijman
In commit 3bce1d88 (Allow adding extra common dependencies), the way $(OBJDIR) was created changed. Instead of having some ad-hoc mkdir calls around, all relevant rules were made to depend on the directory instead. However, this change didn't take into account that the object files for libraries live instead a subdirectory of $(OBJDIR), which was no longer automatically created. This made compilation of all libraries fail, on a clean build directory. Fixing the rules to depend on $(dir $@) or $(dir %) doesn't work, since those function calls are expanded by making upon reading the file, not later when the rule is actually matched. Therefore, this commit restores the previous explicit mkdir calls for library object files. The non-library objects files, which do not live in a subdirectory, still use the dependency approach as before. Fixes: #58
2013-06-13Make serial baudrate detection work in MacSimon John
Replace regex used for detecting serial baudrate. New regex is tested in both debian and mountain lion. fix #52 - serial monitor baudrate detection
2013-06-13Change the way AUTO_ARDUINO_VERSION is computedSimon John
adds another pass to sed to remove the '1:' from debian version numbers
2013-06-13fixed whitespace and /dev/null redirectionSimon John
2013-06-12Correct the build directory name in commentsSudar
2013-06-11Release v0.10.50.10.5Sudar
2013-06-11Add support for leonardo.Sudar
Leonardo board requires a new way of handling board reset. There is a new script which does the reset differently for leonardo boards. close #30 and close #44
2013-06-09Enhanced support for programming using Arduino as ISP. Fixes #56Sudar
2013-06-09Enhanced config detection messagesSudar
2013-06-09Strip extra whitespace from the variable. Fixes #57Sudar
2013-06-08Added leonardo support. Took Code from @guicho271828Sudar
2013-06-08Moved comments outside the rule. Otherwise the comments were getting printedSudar
2013-06-06Fixed some typos in commentsSudar
2013-06-02Reformatted file and changed some wrong tabs into spacesSudar
2013-05-31Added ifndef ARDUINO_VAR_PATH for compiling for the attinySudar
2013-05-31Allow adding extra common dependenciesSudar
2013-05-31Formatting and typo fixesSudar
2013-05-31Add USB_VID and USB_PID to CPPFLAGS only if the board is Leonardo. Fixes #43 ↵Sudar
and fixes #51
2013-05-31Added information about the changes that went in v0.10.40.10.4Sudar
2013-05-31Moved all version information and change log into HISTORY.md fileSudar
2013-05-30Enable dependency tracking for libraries and coreMatthijs Kooijman
This makes sure a library or core file gets rebuild when a header file it depends on is changed, preventing weird surprises when the application is recompiled with the new header values but the library isn't. For most users, this won't be strictly needed, but anyone working on a library or even the Arduino core, this is must to prevent surprises or needing a make clean between every build attempt.
2013-05-30Fix creating of $(OBJDIR) in a proper wayMatthijs Kooijman
This adds a dependency on $(OBJDIR) for every rule that creates a file inside $(OBJDIR) but does not already depend on any file within $(OBJDIR). All other dependencies on $(OBJDIR) are removed. These dependencies are added after a | to tell make that this is a "order-only prerequisite". This means that the file inside $(OBJDIR) needs $(OBJDIR) to be present but if $(OBJDIR) changes (which happens whenever a file _inside_ the directory is touched!), there is no need to recompile the file within $(OBJDIR). Implementing this using a generic implicit rule like: $(OBJDIR)/%: | $(OBJDIR) doesn't work, since make doesn't merge the prerequisites of multiple implicit rules like it does for explicit rules. We could use $(LOCAL_OBJS) and friends to create explicit rules to do something like the above, but just adding the dependencies on all rules seems more explicit and future-proof.
2013-05-30Rewrite dependency codePaul Brook
Commit originally by: Paul Brook <paul@codesourcery.com> Port to newer version and commit message by: Matthijs Kooijman <matthijs@stdin.nl> Instead of generating a big list of dependencies at the start, now dependency files are generated whenever a .o file is compiled. This works, since if the .o file does not exist, it should be compiled and make does not need to know about its dependencies. If the .o (and thus the .d) file does exist, the .d file contains all the dependencies used to compile the .o file. If none of those changed, the .o file does not need a recompile, but also the .d file is still accurate (in particular, the dependency list cannot change without one of the dependent .h files or the .cpp file itself changing). This helps to remove a lot of duplication in the code, since now only a single commandline is needed for both compilation and dependency generation. It will probably also run a bit faster now. Note that this commit breaks the creation of $(OBJDIR) since this "accidentally" always worked before because $(DEPFILE) was created before anything else. That will be fixed next.
2013-05-30Compile .ino and .pde files directlyMatthijs Kooijman
Before, they were copied to a .cpp file to add the Arduino.h/WProgram.h include. However, this would cause the compiler error messages to not refer to the right filename, making it hard to use the compiler output in an editor like vim to point out errors. By using gcc's -include option, there is no need to modify the ino/pde file before compiling. However, we will need to explicitely tell gcc that the source file is c++, because of the non-standard extensions.
2013-05-30Let the Makefile decide which include to use for .pde filesMatthijs Kooijman
Previously, the C preprocessor would pick either Arduino.h or WProgram.h based on a define. Now, the Makefile makes the decision earlier. This prevents having to duplicate the #if line in the next commit.
2013-05-30Don't try to read version.txt when it does not existMatthijs Kooijman
This can happen for example when the arduino directory is a checkout from git instead of a released version. Before, cat would show an error which is now prevented. The version still defaults to 100 just like before.
2013-05-30Output configuration info only onceMatthijs Kooijman
Before, the configuration info would be shown again when running a recursive make call, or when make restarted after regenerating the dependencies file. Now, it only shows the info the first time. Closes: #46
2013-05-30Fix raw_upload and reset for normal uploadsMatthijs Kooijman
In commit 90e3c9ad (Fix upload in case of parallelized make), some dependencies were shuffled to (I assume) prevent the reset from happening before or at the same time as the upload when running a parallel make. However, this introduced two problems: - The upload and raw_upload became effectively the same, and both of them did a reset (even though raw_upload should do the upload without a reset). - The reset target does not depend on $(TARGET_HEX) or verify_size, so in a parallel make the reset is executed before / at the same time as the actual compilation (since the reset doesn't seem to be needed for at least the Arduino Uno, apparently avrdude handles this, this probably wasn't noticed by anyone). Because we can't force a specific ordering of dependencies in parallel make and because adding dependencies to the reset target doesn't seem appropriate (you should be able to do a "make reset" without needing to compile everything first), this commit changes the uploading to call $(MAKE) again to do the actual upload. The current approach ensures that: - raw_upload does a compile, size check and upload and upload does the same plus a reset. - A reset is not done if the compilation fails or the size check fails. - verify_size is called only once.
2013-05-30Check that there is exactly one .pde or .ino fileMatthijs Kooijman
When there are none (and no .cpp files either), the build would stall trying to cat all the .d files together (which would result in cat getting no arguments and thus waiting for input on stdin). When there are multiple .ino and/or .pde files, the build could technically work out, the Arduino IDE concatenates all .ino / .pde files together and compiles them as a single compile unit, so unless we implement that as well, it's better to just error out.
2013-05-30Let MONITOR_BAUDRATE detection also look in .pde filesMatthijs Kooijman
Before, it would only look in .ino files. If you had no .ino file but only a .pde file, this would cause the build to hang, since grep would be waiting for input on its stdin.
2013-05-30When detecting MONITOR_BAUDRATE, use $(LOCAL_INO_SRCS)Matthijs Kooijman
Now that this detection code is moved down a bit, it can use the same .ino list as all the other code.
2013-05-30Move MONITOR_BAUDRATE detection further downMatthijs Kooijman
No changes are made to the code, it is only moved. This allows it to use LOCAL_INO_SRCS and LOCAL_INO_PDE_SRCS in the next commit.
2013-02-10Added ifndef ARDUINO_VAR_PATH for compiling for the attinyDaniel Esteban Nombela
2013-01-31Allow adding extra common dependenciesgabriel