Commit graph

109 commits

Author SHA1 Message Date
Simon John
d1156e8fdf Add -fno-devirtualize to CXXFLAGS_STD to workaround a g++ bug. As this could impact performance we should track when the issue is fixed upstream to remove the flag again (see links from Issue #486)
Enabled colourised diagnostics from avr-gcc

We forgot to increase ARDMK_VERSION for the 1.6.0 release
2017-07-21 21:26:11 +01:00
Karl Semich
5bcb64ade9 Add makefile for Robotis OpenCM & update version to 1.6.0 2017-07-12 23:55:05 +00: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
Simon John
18c6474d50 Add support for cu as MONITOR_CMD, use ~. to exit, be mindful when using over ssh 2017-04-01 23:06:28 +01:00
Cédric Bosdonnat
928a642265 show_submenu: fix sed expression
The matching parentheses and | in sed expresssions need to be escaped
or sed will consider like normal characters.

Without this fix, make show_submenu was showing lines like this one:

  pro.menu.cpu.8MHzatmega328    ATmega328 (3.3V, 8 MHz)

It now properly outputs lines like this:

  pro        8MHzatmega328   ATmega328 (3.3V, 8 MHz)

This output is much less misleading to users especially newcomers.
2017-03-13 14:38:52 +01:00
Eric Dand
2674885bf0 Correct spelling mistake in PuTTY section
MONITOR_PARMS should be MONITOR_PARAMS.
2017-03-12 14:30:29 -07:00
batchy
697c95e26f Arduino.mk: Fix generating assembly for cpp files.
Do not include the Arduino header when generating assembly for .cpp
files with generate_assembly.  This was likely a copy-paste error.
2017-01-21 12:32:25 +01:00
Sudar Muthu
7a14d670eb Bump up version to 1.5.2 for release 2017-01-11 16:48:33 +05:30
George Harker
1d7773938c make it work with modern arduino and teensyduino scripts 2016-11-04 11:21:02 -07:00
Simon John
a6a9928859 Changed the PARSE_BOARD function to handle colons found in things like build.core and
build.variant

Fixes Issue #461
2016-10-11 19:59:35 +01: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
ab261ddd6e Added LTO flags etc. to provide smaller/faster AVR code.
Works with 1.6.10 or later; or 1.0.x with avr-gcc toolchain 4.8+
2016-09-08 14:49:36 +01:00
Simon John
737a3f14cd Fix for 1.6.10 version detection
Updated HISTORY.md with latest commits
2016-07-29 16:13:36 +01:00
Sudar Muthu
5a83288e6a Merge pull request #437 from straccio/master
Search in submenu chip or cpu for vars
2016-07-25 19:45:11 +05:30
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
az-z
77d1d9c4ea Update README
Updated to reflect the Linux changes for Arduino 1.6.5
Updated to reflect the information (Linux portion) from the guide. Removed the URL to the blog.
2016-07-02 08:08:11 +05:30
straccio
8addd6c469 Search in BOARDS_TXT for chip or cpu submenu
Using new Arduino IDE and ATTinyCore board module he need to search var
various vars not in cpu submenu but in chip. Changed the makefile in
order to search chip or cpu using regular expression.
2016-06-22 10:55:43 +02:00
Sudar Muthu
c0fea5ccd9 Bump up version to v1.5.1 for release 2016-02-22 17:21:46 +05:30
andrew hutchison
37debe9d70 added show_submenu target 2016-02-19 15:01:15 -07:00
Simon John
c67f505a71 Removed the check for BOOTLOADER_PATH being empty as its merged into
BOOTLOADER_FILE in 1.5+

Now we just check for BOOTLOADER_FILE being non-empty on both versions.

Fixes issue #402
2015-12-28 10:05:53 +00:00
Simon John
9115d9e030 Fixed "make show_boards" regex to allow for hyphens in BOARD_TAG
e.g. attiny44-20, thanks to Atmel for the sample chip!
2015-12-16 18:27:31 +00:00
Albert Pretorius
edcaa8557b Better parsing of boards.txt file which allows Adafruit Trinket to be used 2015-10-26 19:22:33 +00:00
Thomas Kilian
ba24a6ff4d Add path examples for both Mac IDE versions 2015-09-21 20:41:44 +02: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
Simon John
44fe2270a2 Ensure AVRDUDE_CONF is set when AVR_TOOLS_DIR is manually set by user,
not just on Windows - fixes issue #381

Code around this area probably needs a tidy up at some point.
2015-09-13 09:49:53 +01:00
Sven Dahlstrand
8e787ca161 Make sure TARGET is set correctly when CURDIR contains spaces.
With this fix the `TARGET` variable is set correctly when the project directory
(or its path) contains spaces. So in this case:

    /Users/Joe/Dropbox (Personal)/example project

`TARGET` will be set to `example_project` instead of `Dropbox example project`
(like it was before this fix).
2015-09-07 11:22:00 +02:00
Paul Russo
98f91e65cf Added support for AVR Dragon in both ISP and DebugWire mode 2015-07-14 00:19:52 -06:00
Simon John
28210c85a9 Took another couple of changes from @peplin's PR #256 for chipKIT 2015-07-09 22:26:02 +02:00
Simon John
abbd020bf4 Preserve source extension for object files.
Needed to fix the new wiring_pulse.S in IDE 1.6.5 which
also has a wiring_pulse.c source file.

Mostly rebased @peplin's PR #266, so should allow us
to support newer chipKIT builds too.
2015-07-09 18:05:28 +02:00
Grzegorz Biesiadecki
decdf73f7c Add /dev/tty.wchusbserial* to the list of serial ports (CH341, CH34O chip comes with cheap arduino clones - DCCduino) 2015-06-11 10:58:49 -07:00
Grzegorz Biesiadecki
92f82e3329 Add support for picocom as a monitor 2015-06-11 10:56:06 -07:00
hhgarnes
1dce271b53 Add option to split avrdude MCU from avr-gcc MCU
Fix #359
2015-06-02 12:18:12 +05:30
Simon John
a066e86019 Looks for submenu items first when parsing BOARDS_TXT
as suggested by @michaelbaisch in issue #346

Might want to update HISTORY.md with an "in development" version number.
2015-04-12 19:46:58 +01:00
Sudar
66ff5ce94e Bump version to v1.5 for release 2015-04-07 21:37:12 +05:30
Simon John
c67f07fab8 Better autodetection of ARDUINO_SKETCHBOOK and ARDUINO_DIR on OSX 2015-04-04 00:58:30 +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
Simon John
c5e0f5c1ab Fixed typo - bracket should be backslash to continue the call to firstword() 2015-03-28 12:18:38 +00:00
Sudar
16924fe60e Locate 1.5+ preferences.txt file on Mac 2015-03-28 17:26:30 +05:30
Simon John
8d52840eb8 Now we know that arduino 1.6.1 uses the ~/.arduino15 directory
we can find preferences.txt

Still need to find out where it looks on OSX/Cygwin
2015-03-27 16:57:45 +00:00
Simon John
ce235b6bb3 Add = to PARSE_BOARD regex to make it less greedy.
For instance in the Sparkfun 1.6 core, we have:

  promicro16.build.vid.0=0x1B4F
  promicro16.build.vid.1=0x1B4F
  promicro16.build.vid=0x1B4F

So we end up matching all 3 instead of just the last one.

Adding the = means we're looking for promicro16.build.vid= so
not catching the .0 or .1 version.
2015-03-27 16:11:27 +00:00
Simon John
8606592063 Added BOARD_SUB to OBJDIR so that when changing sub boards we don't accidentally overwrite
existing builds.

E.g. mega1280 and mega2560 previously *both* created a "build-mega" directory,
now they'll create build-mega-mega2560 and build-mega-mega1280

Only applies to 1.5+ of course, and only when BOARD_SUB is used. 1.0 will still
create build-mega2560 and build-mega1280 directories (just BOARD_TAG)
2015-03-26 23:17:05 +00:00
Simon John
356f5b3e04 Added ARCHITECTURE to ALTERNATE_CORE_PATH to support 1.5+ cores like arduino-tiny.
arduino-tiny and damellis' attiny85 cores don't use a vendor, but they
do use the avr architecture (subdirectory) in their 1.5/1.6 branches.

arduino-tiny builds and is auto-detected now, still needs some
work to support sub-cpu's and clocks.

damellis doesn't compile, but that's not our makefile it seems.
2015-03-25 19:29:21 +00:00
Simon John
f6c69c9155 Added search of PLATFORM_LIB_NAMES to ARDUINO_LIBS so that Wire.h is found on 1.6.1 and its output separately to SYS_LIB_NAMES
Added "sort" to the USER/SYS/PLATFORM _LIBS so we don't get duplicates
2015-03-25 11:58:19 +00:00
onandoffables
79ea7e222f Add "linuxgpio" to the list of ISP's that don't have a port 2015-02-26 21:17:53 +01:00
Gabrielius Mickevicius
e639f81b6c Fix build.core parsing
Disregard anything before first colon.
E.g. build.core = arduino:arduino results in CORE = arduino
Print CORE.
2014-12-30 17:45:36 +02:00
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
Gabrielius Mickevicius
3442ef8e6d Let 'build.core' from boards.txt change ARDUINO_CORE_PATH
This is support for https://code.google.com/p/arduino-tiny
The arduino-tiny project provides a boards.txt file and a whole
separate Arduino core modified to work with attinies.
Arduino.mk will now switch to that core if it finds a
'build.core' parameter in boards.txt and a folder in
$(ALTERNATE_CORE_PATH)/cores by that name.
2014-12-30 17:45:36 +02:00
Gabrielius Mickevicius
3754e5c012 Let user skip MONITOR_PORT existance check
Define FORCE_MONITOR_PORT to enable.
Useful if one uses 'ssh root@remotemachine avrdude' instead of the
usual AVRDUDE command.
2014-12-28 23:26:35 +02:00
Phil Hord
d998de8d84 Do not add '.' to gcc includes search path
Include files are searched for in the include search path made up
from, among other places, the -I switches given to the gcc compiler.
The . (dot) used for the current directory is not in the search
path when the IDE builds the project and does not seem to be needed
in any reasonable case.  Maybe it was included because someone thought
it meant to "search in the same directory as the file being compiled",
but I cannot tell because the switch was already included in the first
commit in this repo.  In any case, the current file directory is already
searched by gcc before the search path is consulted, in any case, so
this switch is not needed to cause this behavior.

Including the "-I."  switch causes compiles to fail when libraries
include a header which is coincidentally named the same as one of the
user headers.  For example, if the user has a Udp.h file in his sketch
folder, the compile will fail if it includes the EthernetUdp.h file.

A simple example is the examples/WebServer code. It fails if you do
this:

   touch examples/WebServer/Udp.h
   make -C examples/WebServer

But it builds ok from the IDE which does not include "." in the
search path.

Similarly, HelloWorld fails for the same reason if you do this:

   touch examples/HelloWorld/Print.h
   make -C examples/HelloWorld

Remove the -I. switch from the CPPFLAGS directive altogether to
prevent this include filename confusion and to more closely model
the behavior of the IDE.  Fixes #303.

It may also work to move the -I. to the end of the search path,
but this still would compile differently from the IDE and so it
is considered not to be a useful feature to retain in any case.

--

I did not add a test case here because it's not clear to me how it
should be added.  Should I modify HelloWorld as described above,
or should I add examples/TestSearchPath/ with the same files
explicitly for this test?  It would be clearer for me if there
was an explicit "tests" directory independent from "examples".
2014-12-07 18:53:03 -05:00
Simon John
9c9491d1cc Moved location of avrdude and avrdude.conf for 1.5.8 on Linux (only!)
Subject to change during the beta phase, as its already different
than 1.5.6, also may change when packaged for Debian (usually symlinked)

Fixes issue #301
2014-12-03 22:38:50 +00:00