Commit graph

46 commits

Author SHA1 Message Date
Tokita Hiroshi
e482e6fbc7 Add -DARDUINO_{build.board} for compile options 2020-09-15 12:57:05 +09:00
Sudar Muthu
c7eb909b84
Merge pull request #614 from co-dan/ctags_docs_fix
Rename `CTAGS_CMD` to `CTAGS_EXEC` (in the documentation).
2020-09-03 07:30:28 +05:30
John Whittington
185a1e9e35 document GREP_CMD 2020-08-06 12:42:47 +02:00
John Whittington
517fe4a632 Merge remote-tracking branch 'sej7278/python3' 2020-08-05 18:22:29 +02:00
Simon John
207253abc6 Rebased python3 branch with some changes from tuna-f1sh@87d5241 2020-08-04 23:19:49 +01:00
John Whittington
93b251a4e1 Merge branch 'master' of https://github.com/sudar/Arduino-Makefile into HEAD 2020-02-24 09:57:13 +01:00
Dan Frumin
d0f192e983 Rename CTAGS_CMD to CTAGS_EXEC.
The former is not actually tweakable.
2019-07-31 19:42:56 +02:00
Taylor Zowtuk
54c941fa88 Syntax fix and documentation of MONITOR_PARAMS 2019-07-19 11:00:25 -06:00
John Whittington
62caf00a15 Add new *_VER variables to documentation 2019-07-18 11:10:42 +02:00
Sudar Muthu
3f1ef10d40
Merge pull request #586 from SearchAThing-forks/master
allow to enable AVRDUDE_AUTOERASE_FLASH
2019-06-19 09:05:02 +05:30
Donna Whisnant
35fece8b9c Change BOARD_SPEED to BOARD_CLOCK setting and extend to menu.clock and menu.speed.
This is needed to specify CPU speed and fuses for boards.txt files that use this format:
"{board_tag}.menu.clock.{board_clock}.build.f_cpu"
"{board_tag}.menu.clock.{board_clock}.bootloader.low_fuses"
"{board_tag}.menu.clock.{board_clock}.bootloader.high_fuses"
"{board_tag}.menu.clock.{board_clock}.bootloader.extended_fuses"
For example ATtiny processors.

It also works for speed-only settings like the Watterott ATmega328PB library: https://github.com/watterott/ATmega328PB-Testing
"{board_tag}.menu.speed.{board_clock}.build.f_cpu"
2018-11-11 17:14:11 -06:00
Donna Whisnant
66e0211878 Update documentation for BOARD_SPEED. 2018-11-11 13:27:11 -06:00
Lorenzo Delana
b351ab375d
Update arduino-mk-vars.md 2018-10-13 02:21:47 +02:00
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
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
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
John Whittington
73426bc233 Merge branch 'master' of https://github.com/sudar/Arduino-Makefile 2017-09-03 21:37:03 +01:00
Simon John
fa82c3a9db Moved the LTO etc. flags from CXXFLAGS_STD to CXXFLAGS 2017-09-02 15:32:52 +01:00
John Whittington
81673d4666 Support for generation of project tags file
Considering the number of project files spread in different locations
when developing an Arduino project, proper use of tags can be difficult;
resolving beyond local functions.

I've added automatic generation of a tags file, which includes:

* Standard ctags source in project dir (.c, .cpp, .h)
* Arduino source in project dir (.ide, .pde)
* Arduino core based on detected project core from Arduino install.
* Included Arduino libraries from user library folder.

As a Vim user I find this hugely useful and think it would be a useful
addtion for others. Target has been added as `make tags`.
2017-06-04 10:47:04 +01:00
Simon John
d1363592f2 Fix autodetection of USB_PID on SparkFun's new ProMicro core
Remove use of tilde in documentation as ~ doesn't work, use $(HOME) instead
2017-06-01 19:22:28 +01:00
George Harker
3830299491 add comment on additional vars 2016-11-04 15:32:57 -07:00
Simon John
fe020380b6 Changed LTO support check to avr-gcc > 4.9.0 as the 4.8.1 bundled with the IDE prior to 1.6.10
doesn't support LTO or plugins. Fixes Issue #456

So essentially LTO support will only be enabled with avr-gcc 4.9.2 which comes with 1.6.10 or later
and Debian, Ubuntu etc; not 4.8.1 which comes with IDE 1.6.9 and a few earlier versions.

Tested with:

 * 1.6.8 (avr-gcc 4.8.1 which doesn't support LTO so uses avr-ar and doesn't set LTO flags)
 * 1.6.12 (avr-gcc 4.9.2 which supports LTO so uses avr-gcc-ar and sets LTO flags)
 * 1.0.5 with Debian avr-gcc 4.9.2 (supports LTO so uses avr-gcc-ar and sets LTO flags)
2016-10-11 15:23:36 +01:00
Simon John
0b9ba23520 Updated docs regarding CXXFLAGS etc. for LTO support 2016-09-08 15:48:04 +01:00
Simon John
e4b30603d8 Added -std=gnu++11 -fno-threadsafe-statics to CXXFLAGS_STD if we're using Arduino 1.6 to match
upstream (without it compilation seems to fail on OSX). Updated docs.

Also made ARDUINO_LIB_PATH overloadable (as implied by arduino-mk-vars.md) although this is a
pretty niche use-case.
2016-07-25 13:13:02 +01:00
andrew hutchison
4219444417 updated BOARD_TAG to indicate show_submenu target 2016-02-19 15:05:26 -07:00
Simon John
af17878bc4 Replace $VENDOR with $ARDMK_VENDOR as $VENDOR is a tcsh environment variable.
$ARCHITECTURE is probably safe as that's usually called $ARCH.

Fixes issue #386.

Need to decide if this is going to upset too many user's who have already
started using $VENDOR - and who uses tcsh? ;-)
2015-09-15 00:00:30 +01:00
Sven Dahlstrand
81d0669869 Add documentation for the TARGET variable. 2015-09-07 11:23:18 +02:00
Simon John
eaa8f1fe44 Updated some documentation to clarify 1.5+ settings.
Fixes #352
2015-05-15 18:09:00 +01:00
Simon John
f42a7e6508 Added support for VARIANT in submenu's
Also added a note that in certain 1.6 cores (attiny) F_CPU is
a submenu item e.g. attiny.menu.clock.internal1.build.f_cpu=1000000L
2015-03-28 16:10:06 +00:00
poofjunior
d535bf5fde Ability to modify USB_TYPE in Teensy.md
See #313
2015-01-23 15:42:13 +05:30
Gabrielius Mickevicius
6d549c89aa Tidy new arduino mk vars
Add CORE and FORCE_MONITOR_PORT to arduino-mk-vars.md and FORCE_MONITOR_PORT
to config print.
2014-12-30 17:45:36 +02:00
Thomas Hebb
05b57c3cc3 Allow avrdude to erase the chip before programming during ispload
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.
2014-11-07 22:47:08 -05:00
Lukasz Engel
7b74e100ce Arduino 1.5.x - support new library layout and plaform specific system libs
- 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.
2014-10-11 23:56:02 +02:00
Christopher Peplin
9a297758e1 Document CFLAGS, CXXFLAGS, ASFLAGS and CPPFLAGS.
After understanding the difference between CXXFLAGS and CPPFLAGS, this
is a revised commit for https://github.com/sudar/Arduino-Makefile/pull/257
2014-09-10 11:13:44 -04:00
Simon John
aa879d8db8 Allow libraries/sketches to have the same name as system libs,
e.g. main or Wire

Doesn't seem to work with main.cpp but main.ino works.

Fixes issue #229 and #244
2014-08-29 09:56:52 +02:00
ladislas
51e65b0a08 add CFLAGS_STD and CXXFLAGS_STD defaults 2014-08-13 17:52:32 +02:00
Sudar
209446c944 Revert "Using CFLAGS_STD and CPPFLAGS_STD" 2014-08-13 10:13:16 +05:30
ladislas
a5b84b1722 create CPPFLAGS_STD and make both CFLAGS_STD and CPPFLAGS_STD avalaible for CFLAGS and CXXFLAGS 2014-08-12 18:11:24 +02:00
Simon John
331aea254e Add some documentation regarding overloading system libs and reporting bugs 2014-08-08 10:15:08 +02:00
Simon John
8cdae73deb Made all the changes into one commit that could be a patch for master 2014-07-12 19:05:35 +02:00
Simon John
fc6ff0f041 fixed typo - should be ARDUINO_SKETCHBOOK not ARDUINO_VERSION 2014-04-21 19:42:23 +02:00
Simon John
5599d2ab1e Add BOOTLOADER_PARENT which has to be set if the user sets either of the other two BOOTLOADER variables
Fix #178
2014-03-23 18:30:37 -07:00
Julien Ridoux
ffde764ada Add phony target to run pre-build hook script
Fix #176
2014-03-20 11:17:14 -07:00
tinyladi
a06136aafc Beautify arduino-mk-vars.md
Clean up markdown and add code blocks where needed

Fix #171
2014-03-06 22:50:05 +05:30
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
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