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.
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.
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
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.