Commit graph

232 commits

Author SHA1 Message Date
tinyladi
5c4328dd29 Add OBJDIR reference to arduino-mk-vars.md
Signed-off-by: tinyladi <ladislas@weareleka.com>
2014-03-06 22:50:01 +05:30
tinyladi
668a447054 Add a reference makefile, with real-world example 2014-03-06 22:48:25 +05:30
Simon John
f62b5838df Add -D__PROG_TYPES_COMPAT__ to the avr-g++ compiler flags
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.html

Fix #169
2014-02-15 16:57:16 +05:30
Simon John
ff103b244c Add "gpio" to the list of isp's that don't have a port
The gpio programmer type is used on the raspberry pi to upload using
the gpio spi pins via a sysfs interface, with a modified avrdude

Fix #165
Fix #166
2014-02-08 09:59:50 +05:30
Simon John
920c74024e now includes avr-libc/*.c files malloc.c and realloc.c
if bug-reporter confirms this fixes issue #163 then should be ok to merge.
2014-02-05 23:31:12 +00:00
Simon John
5a521361a0 Added the arduino-mk-vars.md file to the Fedora SPECfile.
Added some notes to the SPECfile regarding overriding the paths
to the avr tools - most are in /usr/bin, but gcc/g++ are in an
architecture-dependant ccache directory

Upped version to 1.3.2 devel
2014-02-04 17:41:51 +00:00
Sudar
e48ae82fbd Bump up version to 1.3.1 for release 2014-02-04 18:29:18 +05:30
Sudar
cff1dec365 Add a new target help_vars
This target can display all variables that can be overridden
2014-02-04 18:27:46 +05:30
Sudar
e8634fb642 Document all the variables that can be overridden in child makefile
Huge thanks to @sej7278 for doing this

Fix #75
2014-02-04 18:26:43 +05:30
Simon John
1893199dad BUNDLED_AVR_TOOLS_DIR is now set correctly using := instead of ?=,
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.
2014-02-01 00:41:00 +00:00
Sudar
f549f9c401 Fix some typos and errors in changelog 2014-01-29 11:38:05 +05:30
Sudar
0526855340 Update README.md about compatibility with Windows
Fix #94
2014-01-29 11:32:16 +05:30
Sudar
967d47c7bd Update changelog about the recent changes 2014-01-29 10:58:25 +05:30
Sudar
418109c11b Document that ARDUINO_DIR must be a relative path in Windows
Fix #156
2014-01-29 10:44:12 +05:30
Sudar
ac0b7d46c3 Freezing up code for v1.2.0 release 2014-01-14 14:38:44 +05:30
Sudar
ce9c54848f Remove arduino-mk folder from all examples
Fix #154
2014-01-14 14:36:24 +05:30
Simon John
d4e0a383ae Simplify package vs git checkout detection
Fix #147
Fix #151
Fix #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
2014-01-14 14:23:25 +05:30
Sudar
320fec7981 Add information about package folder to changelog 2014-01-14 14:23:00 +05:30
Sudar
6e2708a446 Bump up version number to v1.1.0 for release 2013-12-26 16:07:58 +05:30
Sudar
7af27ae494 Use ARDUINO_HEADER variable instead of hardcoded file names
Fix #131
2013-12-26 16:00:08 +05:30
mahoy
d3e7eedd5f Allow target specific optimization levels/debug flags
Changing the optimization level from -Os to something else breaks the
SoftwareSerial library. This patch allow optimization flags to be set on a
per target basis.
2013-12-20 17:25:18 +01:00
Sudar
e721a249cd Add CONTRIBUTING.md explaining how to contribute to this project 2013-12-17 17:28:59 +05:30
Sudar
672d6f40cf Update changelog about the last pull request #142 2013-12-17 15:38:26 +05:30
Sudar
38255ed0f0 Update changelog about usbtiny fix 2013-12-16 23:36:50 +05:30
Simon John
7ea19ce322 Add option to set fuses without burning a bootloader
When using ICSP programmers e.g. usbasp, you can burn sketches directly
to the chip without having to burn a bootloader, however you do need to
set fuses e.g. if you're changing speed/BOD.

Updated help text to include "make set_fuses" and also changed
"make burn_bootloader" help text which wasn't entirely accurate.

Fix #141
2013-12-16 23:14:32 +05:30
anthony cantor
24128a1819 Use MAKEFILE_LIST to get the name of the make file
This way we don't assume the make file is 'Makefile' and it will
work even if it is named as 'makefile' or 'makefile-uno'

Fix #130
2013-12-05 12:25:53 +05:30
Ladislas
e04bb4d7d4 Auto detect and include libraries specified in USER_LIB_PATH
Fix #135
2013-12-05 12:12:15 +05:30
Sudar
7bacc727a8 Update HISTORY.md about ChipKIT 2013 support 2013-12-05 11:51:03 +05:30
Thomas Sigurdsen
d32d612a4b Change echo for printf
rationale:
http://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo

fix #129
2013-11-27 17:07:47 +05:30
Sudar
51f1271b32 Show correct path to arduino.mk file in help message
Fix #120
2013-10-06 19:20:52 +05:30
Sudar
4fb3e089bb Add burn_bootloader target
Code to burn fuses is moved from ispload target to this new target, so
that fuses are burned only once when needed.

Fix #85
2013-10-06 19:14:50 +05:30
Sudar
7961a86286 In ISP mode, read baudrate and programmer from boards.txt
Arduino IDE also reads this from boards.txt file

Fix #125
2013-10-06 18:14:58 +05:30
Sudar
a17cf2af96 Ignore commented lines while parsing boards.txt file
Fix #124
2013-10-06 18:13:32 +05:30
Sudar
9ff2b2e4d6 Don't append port details to avrdude for usbasp
When usbasp is used as programmer, there is no need to specify the port
to avrdude.

Fix #123
2013-10-06 17:43:03 +05:30
Sudar
85d2d2ec6e Fix whitespace and line spacing
No change in functionality
2013-09-25 15:21:21 +05:30
Sudar
0f68487501 Unconditionally add -D in avrdude options.
This is needed in Mega boards, because of a bug in Mega bootloader. See
https://github.com/sudar/Arduino-Makefile/issues/114#issuecomment-25011005
for detailed explanation.

Fix #114
2013-09-25 15:18:14 +05:30
Sudar
8cf353d551 Bump up version to v1.0.0 for release 2013-09-22 18:31:44 +05:30
Sudar
6300679343 Revert "Make all executables overridable"
If these executables are not overridden in the child makefile, then the
default values are not set properly in the master makefile.

This complicates the solution for #119 :(

This reverts commit 66eec82a3a.
2013-09-19 16:22:28 +05:30
Sudar
9004efd944 Change the next version to 1.0.0, instead of 0.13.0
Lot of changes went it for this release and the code is stable enough
for 1.0.0
2013-09-18 16:46:12 +05:30
Sudar
66eec82a3a Make all executables overridable
This is helpful for #119 which will add support for colorgcc
2013-09-18 16:44:24 +05:30
Sudar
3f4e2bf2ff Added detailed instructions for using alternative cores
Should close Issue #60
2013-09-15 12:53:19 +05:30
Sudar
d719847a8a Allow building with Arduino core, without a .ino/.pde file
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
2013-08-09 22:04:36 +05:30
Sudar
c92d6724d7 Autodetect baudrate only if either a .ino/.pde is present
Because of the way the autodetect code works, if no .ino/.pde file is
present, then the makefile hangs
2013-08-09 21:39:15 +05:30
Sudar
6936a1dcfd Replace Leonardo detection with Caterina detection
Checks bootloader.path for "caterina", instead of checking only for
leonardo

Fix #96
Fix #97
Fix #102
2013-07-09 22:18:46 +05:30
Christopher Peplin
1bc31c814b Compile with debugging symbols only when DEBUG=1.
Fix #101
2013-07-09 21:48:31 +05:30
Christopher Peplin
87e29ea806 Implement ard-parse-boards with shell scripting instead of Perl.
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
2013-07-09 21:45:17 +05:30
Christopher Peplin
df88db2cfb Add support for the Digilent chipKIT platform
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
2013-07-09 21:42:05 +05:30
Sudar
5abf12bdb2 Move wait-for-reconnection logic inside ard-reset-arduino
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
2013-07-02 21:48:33 +05:30
Sudar
8a2e251e95 Move binary sketch size verification logic inside makefile
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
2013-07-01 21:54:56 +05:30
Sudar
45f230c5c8 Improve avrdude and avrdude_conf path auto detection
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
2013-06-29 21:40:36 +05:30
Sudar
700f82b3f1 Remove redundant checks for ARDUINO_DIR 2013-06-23 13:16:37 +05:30
Sudar
7e66672a6c Auto detect alternate core path from sketchbook folder
Fix #86
2013-06-23 13:08:06 +05:30
Sudar
e0856e51d9 Remove "utility" from example makefiles
From commit fc968b9191 files inside
utility are automatically build.

Fix #84
2013-06-22 11:48:26 +05:30
Simon John
c284ec93dd Add support for reseting "Micro" Arduino.
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 #80
Fix #83
2013-06-21 08:37:11 +05:30
Sudar
4e22abe0de Add support for specifying optimization level
Fix #81
2013-06-20 21:56:54 +05:30
Sudar
6cdad1d621 Add $OBJDIR to the list of configuration that gets printed
Fix #77
2013-06-20 21:32:35 +05:30
Sudar
3b35453564 Release v0.12.0 2013-06-20 12:58:57 +05:30
Sudar
8f4bbe114e Deprecate "generated_assembly" target in favour of "generate_assembly"
The deprecated target will be removed in v1.0.0.
Fix #79
2013-06-20 12:51:56 +05:30
Sudar
109693ad68 Release v0.11.0 2013-06-15 19:48:47 +05:30
Sudar
0149f34daf Add an example to show how to compile AVR C files 2013-06-15 19:42:13 +05:30
Sudar
0028fabc64 Add support for compiling plain AVR C files
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-15 19:30:39 +05:30
Sudar
78f2363dd5 Handle cases where certain fuse bits are not present
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-15 19:23:26 +05:30
Sudar
ac5a087982 Add the ability to configure avrdude options
A new environmental variable AVRDUDE_OPTS is added, which can be used to
configure the options passed to avrdude.

Fix #53
2013-06-15 19:21:48 +05:30
Sudar
93eaaec5ba Add a warning when HEX_MAXIMUM_SIZE is not specified 2013-06-15 19:14:16 +05:30
Sudar
ad417dbf70 Fix whitespace issues 2013-06-15 17:16:47 +05:30
Sudar
b29a0bed2a Replace hardcoded executables with variable 2013-06-15 17:16:27 +05:30
Sudar
cf0b6371c2 Remove traces of time travel ;)
Ref 1012f765fe
2013-06-14 17:57:24 +05:30
Sudar
1012f765fe Tag v0.10.6 for release 2013-06-14 17:49:02 +05:30
Sudar
60ca7d2852 Move reseting Leonardo logic to ard-reset-arduino
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 a63366980f
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 c798eb26ea
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-14 16:09:38 +05:30
Simon John
4118af0c42 Make serial baudrate detection work in Mac
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-13 21:02:00 +05:30
Simon John
d8c357f6d6 Change the way AUTO_ARDUINO_VERSION is computed
adds another pass to sed to remove the '1:' from debian version numbers
2013-06-13 17:02:15 +05:30
Sudar
c81cc332f5 Add changelog and start development of v0.10.6 2013-06-13 15:06:58 +05:30
Sudar
2ff244eeaf Release v0.10.5 2013-06-11 16:16:05 +05:30
Sudar
f26a134418 Add support for leonardo.
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-11 15:46:22 +05:30
Sudar
6759270537 Added example to show how to program using Arduino as ISP. Fixes #55 2013-06-09 17:20:05 +05:30
Sudar
365118e6a5 Enhanced support for programming using Arduino as ISP. Fixes #56 2013-06-09 17:18:12 +05:30
Sudar
70986c14f6 Strip extra whitespace from the variable. Fixes #57 2013-06-09 13:12:19 +05:30
Sudar
05b15fe67e Added ifndef ARDUINO_VAR_PATH for compiling for the attiny 2013-05-31 19:13:17 +05:30
Sudar
3bce1d88d7 Allow adding extra common dependencies 2013-05-31 18:34:44 +05:30
Sudar
47b2dca1ef Add USB_VID and USB_PID to CPPFLAGS only if the board is Leonardo. Fixes #43 and fixes #51 2013-05-31 17:10:49 +05:30
Sudar
dc3ec57330 Added information about the changes that went in v0.10.4 2013-05-31 09:42:44 +05:30
Sudar
d8bac0fb14 Moved all version information and change log into HISTORY.md file 2013-05-31 09:29:36 +05:30