Commit graph

673 commits

Author SHA1 Message Date
Pieter du Preez
e44540043e Added the TOOL_PREFIX variable for setting up the executable tools.
Currently three different tool chains seem to be used:
   * avr-*
   * pic32-*
   * arm-none-eabi-*

These all get set up independently. This patch centralizes the
definitions of the executable tools and does it generically, by means
of the newly introduced TOOL_PREFIX variable. Setting up a
tool chain is now simply a matter of defining the TOOL_PREFIX
variable. For the currently supported tool chains it gets set to avr,
pic32 or arm-none-eabi. Arbitrary tool chains can now easily be set up,
by the TOOL_PREFIX variable.

Although the use of the OVERRIDE_EXECUTABLES variable is now almost
not justifiable, it was left as-is, in order to assure backwards
compatibility.
2018-09-14 16:14:14 +02:00
Pieter du Preez
2442dafb4f Moved the PARSE_BOARD macro from Arduino.mk to Common.mk.
There seems to be 3 different macros to parse the boards.txt file.
This patch moves the PARSE_BOARD macro from Arduino.mk to Common.mk.
The PARSE_OPENCM and PARSE_TEENSY macros in Teensy.mk and OpenCM.mk
were removed and the common PARSE_BOARD is now being called from
everywhere.

Advantages of this fix are:
  1. Less code, i.e. no redundant parse macros.
  2. A single standardized algorithm to parse the boards.txt file.
2018-09-13 23:44:12 +02:00
Simon John
22ca63614d
Merge pull request #578 from TE-HiroakiYamazoe/fix_typo_of_avrdude_isp_opt
Fix typo of AVRDUDE_ISP_OPT
2018-08-10 19:41:18 +01:00
Hiroaki Yamazoe
300ec05328 Fix typo of AVRDUDE_ISP_OPT 2018-08-09 18:48:50 +09:00
Sudar Muthu
b2d1ff23a2
Merge pull request #567 from tuna-f1sh/due
Support for Arduino Due added
2018-06-22 09:45:03 +05:30
John Whittington
3f32563683 Support for Arduino Due added
Update HISTORY.md

Add avr core emulation to C sources
2018-06-14 07:29:06 +01:00
Sudar Muthu
0809b54606
Merge pull request #556 from wingunder/master
Added the DIAGNOSTICS_COLOR_WHEN var for controlling diagnostics-color.
2018-03-18 22:36:23 +05:30
Pieter du Preez
36b6b233eb Added the DIAGNOSTICS_COLOR_WHEN var for controlling diagnostics-color.
Some IDEs do not work nicely with the recently added diagnostics-color
compiler switch. This patch adds the DIAGNOSTICS_COLOR_WHEN variable,
for controlling diagnostics-color switch. The default was chosen to be
'always', which makes the Arduino.mk file backwards compatible with
everything up to commit fa82c3a9db (Sat Sep 2 15:32:52 2017 +0100).

The supported values for DIAGNOSTICS_COLOR_WHEN are: `always`, `never`
and `auto`, and as with all Arduino.mk variables, it can easily be
overridden. For more details on the diagnostics-color compiler switch,
see: https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Language-Independent-Options.html#Language-Independent-Options
2018-03-18 16:54:39 +01:00
Simon John
a7b8084ac6
Merge pull request #546 from kierdavis/disable-prog-types-compat
Allow compatibility with old pgmspace API to be disabled by the user
2018-02-24 16:06:09 +00:00
Simon John
139b5dbc49
Merge branch 'master' into disable-prog-types-compat 2018-02-24 16:03:37 +00:00
Simon John
c10eaa4f48
Merge pull request #533 from doronbehar/detect-archlinux
Set `ARDMK_VENDOR` differently if OS is Arch Linux.
2018-02-24 16:02:18 +00:00
Simon John
80b8167206
Merge pull request #543 from tuna-f1sh/sam
Arduino Atmel SAM family Support (ARM architecture)

Thanks @tuna-f1sh !
2018-02-24 16:01:00 +00:00
John Whittington
f804866095 SAMD Cortex M0 device support (Zero, MKR1000, etc)
Compilation improvements by adding variant as other obj but not working on device

Arduino Zero devices with OpenOCD working

Created ARM_TOOLS_DIR and define arm toolchain executables in Sam.mk

Check avr-gcc on last AVR_TOOLS_DIR detect and indenting formatting

GDB debugging and programming added

Documentation updates and define ARDMK_VENDOR rather than include Sam.mk

Expand all parse_boards when defined rather than when used

Trim extra defines regex working on both macOS and Linux but need better fix

Print USB ids and added debug usage to readme

Add note on Arduino package dir and made board.txt work

Do ARM ARDUINO_ARCH define in Arduino.mk]

Add MZeroBlink to non-testable examples for now

Remove \B from extra defines grep

Add ARDUINO_PACKAGE_DIR for board support files

Fix a typo in the README

Fix typo in arduino-mk-vars.md

Prevent re-including Arduino.mk from Sam.mk when make restarts for upload

Add catrina to ARD_REST_OPTS if/else

Remove realpath in Sam.mk for cygwin compatability

SAMD bootloader support in ard-reset using --zero

Enters bootloader using open/close of port at 1200 BAUD, then polls the
attached devices for new port enumerating (bootloader). This is how the
Arduino IDE operates

Bossa support for Zero, MKR1000 etc

Re-word Arm README section after Native USB development

Reset for zero refactored like IDE

Zero bootloader reset tested on macOS and comments added

Re-word ARM bootloader and remove imports from testing

Patch changes ARDMK_VENDOR->ARCHITECHTURE, show_config_vars, ignore CORE_VER if emtpy

Common.mk header guard, openocd/bossac avoid separator, typos

Documentation update for patch changes

Move ARM tools to Sam.mk and auto-detect include

Correct accidental commit of Blink Makefile change

Lib fix with alternative core and documentation

Append zero to ARD_RESET_OPTS rather than set

Prioritise package ARM upload tools over path installed

Add note in README on ARM tools versions

Move openocd variant config script flag to OPTS
2018-02-24 11:15:53 +00:00
Sudar Muthu
8480373477
Merge pull request #548 from kierdavis/fix-typo
Fix typo in arduino-mk-vars.md
2018-01-25 09:38:47 +05:30
Kier Davis
b4c381c4b7
Fix typo in arduino-mk-vars.md 2018-01-24 22:12:01 +00:00
Kier Davis
b3c5127be2
Allow compatibility with old pgmspace API to be disabled by the user
When this compatibility mode is enabled, code that is entirely
compliant with the new pgmspace API can still raise deprecation
warnings when symbols present in both the old and new APIs (for
example, PGM_P) are used. Clearly, these warnings are false
positives. They can be avoided by disabling the compatibility mode.

This functionality is achieved by prepending the flag that enables
the compatibility mode to CPPFLAGS instead of appending it, thus
allowing the user to override the default behaviour and disable the
compatibility mode by putting the negation of the flag in the
CPPFLAGS variable in their top-level Makefile.
2018-01-24 21:52:22 +00:00
Sudar Muthu
5869c98344
Merge pull request #545 from kierdavis/fix-readme-typo
Fix a typo in the README
2018-01-22 15:00:28 +05:30
Kier Davis
5229b075cb
Fix a typo in the README 2018-01-21 23:06:05 +00:00
Simon John
74e1ef00fd
Merge pull request #530 from tuna-f1sh/master
ardmk-init - Makefile initialisation and template project utility
2018-01-12 19:27:14 +00:00
John Whittington
a6d979ef90 Merge remote-tracking branch 'upstream/master' 2018-01-03 08:14:39 +00:00
Simon John
c3fe5dcc2f
Merge pull request #541 from sej7278/master
Moved ATtiny examples from Blink to ATtinyBlink

Probably the last merge of 2017? ;-)
2017-12-28 18:05:18 +00:00
Simon John
6d3d973cd4 Moved ATtiny examples from Blink to ATtinyBlink and updated the instructions (issue #537).
Updated the alternate core instructions for e.g. ATmega644p for IDE 1.8
2017-12-28 17:55:01 +00:00
Simon John
7a26a86c78
Merge pull request #540 from sej7278/master
Moved -e flag for avrdude from set_fuses to ispload
2017-12-22 14:13:23 +00:00
Simon John
246e568011 Moved -e flag for avrdude from set_fuses to ispload as you wouldn't want a chip erase operation when only setting the fuses.
ispload probably should erase the flash+eeprom+lockbits as that's when you upload the sketch.

setting fuses should be just that, not deleting anything.
2017-12-22 10:14:06 +00:00
John Whittington
d874c59103 ardmk-init runs without prompt by default, cli arg added to avoid clint dependency 2017-11-07 16:54:34 +00:00
John Whittington
78d11c6678 Update Fedora spec file 2017-10-13 15:41:56 +01:00
John Whittington
625861009a Merge remote-tracking branch 'upstream/master' 2017-10-12 10:41:56 +01:00
John Whittington
2a4c2660be Run ardmk-init without dependancy if running quiet 2017-10-12 09:25:56 +01:00
John Whittington
55c149fb03 Add ardmk-init manpage and correct typos 2017-10-06 10:32:17 +01:00
Doron Behar
c18ad9fba5 Set ARDMK_VENDOR differently if OS is Arch Linux. 2017-10-06 11:35:47 +03:00
SZEDER Gábor
b8f5eaa816 Recognize serial monitors with full path in MONITOR_CMD
When assembling the command line for the various supported serial
monitors, MONITOR_CMD must match the name of one of the supported
commands to be recognized.  Serial monitors given with leading path
components are not recognized, and a command like

  make MONITOR_CMD=~/src/picocom/picocom monitor

errors out as the fallback monitor command is executed instead of the
picocom-specific one.  However, sometimes it's necessary to specify a
supported serial monitor with its full path, because e.g. the user
wants to tests a freshly compiled version before installing it.  Sure,
the user could just run the serial monitor directly, but that's
cumbersome because he has to pay attention to use the right baud rate
and USB port.

So strip all leading path components, if present, from MONITOR_CMD
using the 'nondir' make function before checking whether it's one of
the supported serial monitors.  This way commands like the above would
just work.

While at it, remove the single quotes around 'putty': they are both
unnecessary and inconsistent with similar constructs throughout
Arduino.mk.
2017-10-03 12:54:13 +01:00
John Whittington
c2d17c825a ardmk-init linted using pylint 2017-10-02 15:26:02 +01:00
Sudar Muthu
bc5092f25b Merge pull request #529 from szeder/monitor-cmd-with-path
Recognize serial monitors with full path in MONITOR_CMD
2017-09-29 09:59:16 +05:30
John Whittington
a165a3bf26 ardmk-init usage added to README and HISTORY update 2017-09-28 13:51:08 +01:00
John Whittington
f3bb8249c1 ardmk-init arg parse options and made V1.0 2017-09-28 13:51:04 +01:00
John Whittington
8819e761fb WIP: ardmk-init more verbose about directory operating in 2017-09-28 13:50:51 +01:00
John Whittington
91604be7cc WIP: CLI project makefile generator 2017-09-28 13:45:27 +01:00
John Whittington
5245606f64 Add support for ISP_PROG Atmel Ice 2017-09-28 13:42:49 +01:00
John Whittington
1882a8024e Fix:Add to langmap not set ino,pde using ctags 2017-09-28 13:42:49 +01:00
SZEDER Gábor
c49af21700 Recognize serial monitors with full path in MONITOR_CMD
When assembling the command line for the various supported serial
monitors, MONITOR_CMD must match the name of one of the supported
commands to be recognized.  Serial monitors given with leading path
components are not recognized, and a command like

  make MONITOR_CMD=~/src/picocom/picocom monitor

errors out as the fallback monitor command is executed instead of the
picocom-specific one.  However, sometimes it's necessary to specify a
supported serial monitor with its full path, because e.g. the user
wants to tests a freshly compiled version before installing it.  Sure,
the user could just run the serial monitor directly, but that's
cumbersome because he has to pay attention to use the right baud rate
and USB port.

So strip all leading path components, if present, from MONITOR_CMD
using the 'nondir' make function before checking whether it's one of
the supported serial monitors.  This way commands like the above would
just work.

While at it, remove the single quotes around 'putty': they are both
unnecessary and inconsistent with similar constructs throughout
Arduino.mk.
2017-09-27 00:14:57 +02:00
Sudar Muthu
9708e8265d Merge pull request #525 from tuna-f1sh/master
Update Windows documentation to allow non-relative paths
2017-09-10 18:48:55 -04:00
John Whittington
770d3a7080 Fix indenting 2017-09-06 09:48:04 +00:00
John Whittington
42b5d2dbd8 Auto detect Windows sketchbook path using USERPROFILE not HOME and spelling 2017-09-06 10:34:07 +01:00
John Whittington
e413feedbb Update HISTORY.md 2017-09-05 17:39:42 +01:00
John Whittington
11e2059009 Documentation changes for Windows usage 2017-09-05 17:12:22 +01:00
John Whittington
4519be5bac Detect Cygwin Python or user installed Windows Python and use according device port 2017-09-05 14:18:03 +01:00
Sudar Muthu
360db6f27c Merge pull request #502 from tuna-f1sh/master
Support for generation of project tags file
2017-09-04 22:21:56 -04:00
John Whittington
73426bc233 Merge branch 'master' of https://github.com/sudar/Arduino-Makefile 2017-09-03 21:37:03 +01:00
Simon John
983db51764 Merge pull request #524 from sej7278/master
Moved the LTO etc. flags from CXXFLAGS_STD to CXXFLAGS
2017-09-03 16:02:21 +01:00
John Whittington
04f0ee0728 rm old tags file made safer and only if it exists 2017-09-03 13:19:36 +01:00