Commit graph

21 commits

Author SHA1 Message Date
John Whittington
4d7a10c774 no echo required 2021-07-19 11:15:37 +02:00
John Whittington
bf319c49b7 platform neutral examples and manual cherry-pick merge of https://github.com/alissa-huskey/Arduino-Makefile/tree/test_fixes 2020-08-06 20:01:05 +02:00
John Whittington
185a1e9e35 document GREP_CMD 2020-08-06 12:42:47 +02:00
John Whittington
264f8f604a Arduino IDE upto support version and SAMD builds
process uses direct downloads. Might be better to move to distribution
Arduino install + arduino-cli to install board support in future.
2020-08-06 12:32:17 +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
26e34cd6f2 detect and use GNU grep on macOS 2020-08-04 11:51:35 +02:00
Steffen Vogel
6cf275f0e7 fix regression: PARSE_BOARD chops off flags which contain '=' signs (closes #601) 2019-05-03 20:07:13 +02:00
Pieter du Preez
62d23d66a2 Moved the BOARDS_TXT section and stop if BOARDS_TXT is not a file.
The section of Arduino.mk that calculates BOARDS_TXT was moved to just
before the point where it gets used for the first time (a call to
PARSE_BOARD). An error gets generated if BOARDS_TXT is not pointing to a
valid file, directly after the BOARDS_TXT calculation.

In addition, the PARSE_BOARD macro will now be bypassed if the
BOARDS_TXT variable points to a non-existing file. If a user makefile
uses PARSE_BOARD before including Arduino.mk, and the BOARDS_TXT is
wrong, the error will only be caught in the Arduino.mk file, which is
probably acceptable.
2018-09-15 14:31:39 +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
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
42b5d2dbd8 Auto detect Windows sketchbook path using USERPROFILE not HOME and spelling 2017-09-06 10:34:07 +01:00
John Whittington
11e2059009 Documentation changes for Windows usage 2017-09-05 17:12:22 +01:00
SZEDER Gábor
a80518e308 Quote the prefix tag in the space_pad_to function
POSIX shells treat an unquoted [abcd] as a pattern bracket expression
and apply it for filename expansion.  This kicks in and causes
troubles in the space_pad_to function when it's called to pad prefix
tags like '[AUTODETECT]', because the argument holding such a tag is
passed to a shell unquoted.  The result is funny output when the
directory containing the Makefile also contains any files or
directories, whose name is a single upper-case character that can be
found in any prefix tags:

  $ touch A B C D
  $ make
  -------------------------
  Arduino.mk Configuration:
  - A C D                CURRENT_OS = LINUX
  - [USER]               ARDUINO_DIR = /home/szeder/src/arduino/arduino-1.8.1
  - [USER]               ARDMK_DIR = /home/szeder/src/arduino/Arduino-Makefile
  - A C D                ARDUINO_VERSION = 181
  - A D                  ARCHITECTURE = avr
  - A D                  ARDMK_VENDOR = arduino
  - A D                  ARDUINO_SKETCHBOOK =
  <snip>

Prevent this by quoting space_pad_to's parameter when passing it to a
shell.
2017-08-08 23:41:28 +02:00
Simon John
c67f07fab8 Better autodetection of ARDUINO_SKETCHBOOK and ARDUINO_DIR on OSX 2015-04-04 00:58:30 +01:00
stepcut
f162d8fee3 put ARDUINO_DIR block after Travis-CI block else travis will fail. 2014-10-22 15:43:01 -05:00
stepcut
6534cf8f15 move ARDUINO_DIR auto-detection into Common.mk. This allows Teensy.mk to use auto-detected location. 2014-10-22 15:27:59 -05:00
Simon John
5c50797471 Update Travis-CI scripts to test against Arduino v1.0.6 2014-09-22 22:50:27 +01:00
Simon John
6be2614c30 Removed Travis-CI references from all examples. Regular users
are not affected by test scripts/makefiles.

Added makefile and gcc version info to config output.

Tested on Arduino 1.0.6
2014-09-21 19:36:50 +01:00
Julien Ridoux
ffde764ada Add phony target to run pre-build hook script
Fix #176
2014-03-20 11:17:14 -07:00
Simon John
fa6b9215c8 Move files out of arduino-mk subdirectory
fix #152
2014-01-14 14:23:25 +05:30
Renamed from arduino-mk/Common.mk (Browse further)