Commit Graph

1427 Commits

Author SHA1 Message Date
Federico Fissore ea5155656a Starting 1.6.3
Updated toolchains: linux statically compiled, added gcc lto plugin (disabled)
2015-03-30 15:06:59 +02:00
Federico Fissore 6e498ee5b9 LibraryManager: better type filtering 2015-03-27 14:51:19 +01:00
Federico Fissore e884789322 Not using gcc version, hard to maintain 2015-03-27 14:51:15 +01:00
Federico Fissore 3be821dfcf avr platform: fixed avrdude path 2015-03-27 14:51:12 +01:00
Federico Fissore 7d6729ab93 Fixed platforms(.txt) 2015-03-27 14:51:12 +01:00
Martino Facchin ab5aea40a6 Stream: set findMulti function as protected
let's not expose it until the API is not accepted
widely by the dev mailing list
2015-03-24 17:13:14 +01:00
Martino Facchin c25dc61bd6 Merge pull request #2814 from facchinm/test_pr2696
Fix findUntil in Stream library
2015-03-24 15:24:42 +00:00
Jim Leonard (Xuth) f43a7a698e Fix findUntil in Stream library
PR #2696 without timeout-related changes
2015-03-24 12:31:50 +01:00
Martino Facchin 046f335d5f Merge pull request #2812 from facchinm/test_pr2794
EEPROM library V2
2015-03-24 09:24:00 +00:00
Martino Facchin 54da627789 EEPROM: examples: fix Serial for board Leonardo 2015-03-24 10:20:00 +01:00
Chris--A bd2b9d1afd Fixed EEPROM examples and added readme 2015-03-24 13:58:01 +10:00
Chris--A ab14475248 Updated EEPROM examples.
Removed hard coded lengths, which were incorrect for standard Arduino's
now.
2015-03-20 12:06:20 +10:00
Chris--A 28cff64b80 Small tweaks to EEPROM lib and examples. 2015-03-19 17:13:32 +10:00
Victor Aprea 0e898d5e03 Do not influence state of SS if it's already been set to an output previously, e.g. by user sketch
squashes and closes PR #2659
2015-03-18 10:37:40 +01:00
Chris--A d6637e7f08 Updated EEPROM storage class
To avoid having a .cpp just for an extern variable definition, `static`
has been chosen over `extern`.

As the `EEPROMClass` class simply wraps functionality located elsewhere,
it is completely compiled away. Even though each translation unit which
includes the header will get a copy with internal linkage, there is no
associated overhead.

More info
[here](http://stackoverflow.com/questions/29098518/extern-variable-only-in-header-unexpectedly-working-why)
2015-03-18 18:56:08 +10:00
Chris--A 80f01fbab1 Added additional examples to EEPROM lib 2015-03-17 17:17:08 +10:00
Chris--A bed78fd144 Added new version of EEPROM library. 2015-03-17 17:13:47 +10:00
Federico Fissore c46e667e7a Started working on 1.6.2 2015-03-11 11:42:55 +01:00
Federico Fissore 39d1dfc999 Added warning for uncertified boards 2015-03-10 08:52:41 +01:00
Martino Facchin 6a86cbc793 Merge branch 'ide-1.5.x' into SoftwareSerial 2015-03-05 12:33:35 +01:00
Martino Facchin b95533ffd0 SoftwareSerial: match bool API with HardwareSerial 2015-03-05 12:30:01 +01:00
Cristian Maglie 606604d7d6 Update revision log. Version set to 1.6.1. 2015-02-19 18:22:43 +01:00
Cristian Maglie a39364193f "objcopy" recipes are no more tied to "hex" extension
This allow to define specific recipes for every platform
but keeps backward compatibility.

See #2614
2015-02-16 14:39:55 +01:00
Arnav Gupta 79a74aa667 rename hex -> output
using generic term 'output', because for samx32,
output is .bin format and not .hex

Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2015-02-10 04:31:51 +05:30
Cristian Maglie e93be4855f Corrected some email contacts. 2015-02-05 16:47:22 +01:00
Matthijs Kooijman 90ca3934f2 Prevent low pulse on TX initialization in SoftwareSerial
Previously, the TX pin would be set to output first and then written
high (assuming non-inverted logic). When the pin was previously
configured for input without pullup (which is normal reset state), this
results in driving the pin low for a short when initializing. This could
accidenttally be seen as a stop bit by the receiving side.

By first writing HIGH and then setting the mode to OUTPUT, the pin will
have its pullup enabled for a short while, which is harmless.
2015-01-26 17:04:26 +01:00
Matthijs Kooijman 9cf3740a03 Remove unneeded #ifdef in SoftwareSerial
The debugPulse function definition already checks for _DEBUG, resulting
in an empty function definiton and the function call being optimized
away.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman ead2881b1c Fix SoftwareSerial timings
Instead of using a lookup table with (wrong) timings, this calculates
the timings in SoftwareSerial::begin. This is probably a bit slower, but
since it typically happens once, this shouldn't be a problem.
Additionally, since the lookup tables can be removed, this is also a lot
smaller, as well as supporting arbitrary CPU speeds and baudrates,
instead of the limited set that was defined before.

Furthermore, this switches to use the _delay_loop_2 function from
avr-libc instead of a handcoded delay function. The avr-libc function
only takes two instructions, as opposed to four instructions for the old
one. The compiler also inlines the avr-libc function, which makes the
timings more reliable.

The calculated timings directly rely on the instructions generated by
the compiler, since a significant amount of time is spent processing
(compared to the delays, especially at higher speeds). This means that
if the code is changed, or a different compiler is used, the
calculations might need changing (though a few cycles more or less
shouldn't cause immediate breakage).

The timings in the code have been calculated from the assembly generated
by gcc 4.8.2 and gcc 4.3.2.

The RX baudrates supported by SoftwareSerial are still not unlimited. At
16Mhz, using gcc 4.8.2, everything up to 115200 works. At 8Mhz, it works
up to 57600. Using gcc 4.3.2, it also works up to 57600 at 16Mhz and up
to 38400 at 8Mhz. Note that at these highest speeds, communication
works, but is still quite sensitive to other interrupts (like the
millis() interrupts) when bytes are sent back-to-back, so there still
are corrupted bytes in RX.

TX works up to 115200 for all combinations of compiler and clock rates.

This fixes #2019
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 08fa593916 Disable the RX PCINT inside SoftwareSerial::recv
Before, the interrupt would remain enabled during reception, which would
re-set the PCINT flag because of the level changes inside the received
byte. Because interrupts are globally disabled, this would not
immediately trigger an interrupt, but the flag would be remembered to
trigger another PCINT interrupt immediately after the first one is
processed.

Typically this was not a problem, because the second interrupt would see
the stop bit, or an idle line, and decide that the interrupt triggered
for someone else. However, at high baud rates, this could cause the
next interrupt for the real start bit to be delayed so much that the
byte got corrupted.

By clearing the interrupt mask bit for just the RX pin (as opposed to
the PCINT mask bit for the entire port), any PCINT events on other bits
can still set the PCINT flag and be processed as normal. In this case,
it's likely that there will be corruption, but that's inevitable when
(other) interrupts happen during SoftwareSerial reception.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman ce6b0f89e3 Optimize SoftwareSerial::setRxIntMsk()
This precalculates the mask register and value, making setRxIntMask
considerably less complicated. Right now, this is not a big deal, but
simplifying it allows using it inside the ISR next.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman ddbe3174f0 In SoftwareSerial::recv, only calculate the new tail once
This shortens the generated code a bit more.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 9d8f350ffe Mark SoftwareSerial::recv and handle_interrupt as always_inline
Since those functions are only called once now, it makes sense to inline
them. This saves a few bytes of program space, but also saves a few
cycles in the critical RX path.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 5af847d3a4 In SoftwareSerial, use ISR_ALIASOF to prevent duplication
Previously, up to four separate but identical ISR routines were defined,
for PCINT0, PCINT1, PCINT2 and PCINT3. Each of these would generate
their own function, with a lot of push-popping because another function
was called.

Now, the ISR_ALIASOF macro from avr-libc is used to declare just the
PCINT0 version and make all other ISRs point to that one, saving a lot
of program space, as well as some speed because of improved inlining.

On an Arduino Uno with gcc 4.3, this saves 168 bytes. With gcc 4.8, this
saves 150 bytes.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 87f89f6100 Optimize SoftwareSerial::recv
Similar to SoftwareSerial::write, this rewrites the loop to only touch
the MSB and then shift those bits up, allowing the compiler to generate
more efficient code. Unlike the write function however, it is not needed
to put all instance variables used into local variables, for some reason
the compiler already does this (and doing it manually even makes the
code bigger).

On the Arduino Uno using gcc 4.3 this saves 26 bytes. Using gcc 4.8 this
saves 30 bytes.

Note that this removes the else clause in the code, making the C code
unbalanced, which looks like it breaks timing balance. However, looking
at the code generated by the compiler, it turns out that the old code
was actually unbalanced, while the new code is properly balanced.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 764f24266e Further optimize SoftwareSerial::write
This change restructures the loop, to help the compiler generate shorter
code (because now only the LSB of the data byte is checked and
subsequent bytes are shifted down one by one, it can use th "skip if bit
set" instruction).

Furthermore, it puts most attributes in local variables, which causes
the compiler to put them into registers. This makes the timing-critical
part of the code smaller, making it easier to provide accurate timings.

On an Arduino uno using gcc 4.3, this saves 58 bytes. On gcc 4.8, this
saves 14 bytes.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 80ea38b1dc Mark SoftwareSerial::tx_pin_write as "always_inline"
Somehow gcc 4.8 doesn't inline this function, even though it is always
called with constant arguments and can be reduced to just a few
instructions when inlined. Adding the always_inline attribute makes gcc
inline it, saving 46 bytes on the Arduino uno.

gcc 4.3 already inlined this function, so there are no space
savings there.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 416198a03b Simplify SoftwareSerial::write
Before, there was nearly identical code for the inverted and regular
cases. However, simply inverting the byte in the inverted case allows
using the regular code twice, reducing the generated code size by 100
bytes (on an Arduino Uno and gcc 4.3, on gcc 4.8 the reduction is 50
bytes).
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 6685aa999c Use stopListening() in SoftwareSerial::end()
stopListening also disabled the interrupt, if needed, so calling that
function makes more sense. Since stopListening only disables the
interrupt when the current SoftwareSerial is the active object, and that
can only be the case when _rx_delay_stopbit is non-zero, there is no
need to separately check _rx_delay_stopbit anymore.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman f3aa5f23c4 Fix race condition in SoftwareSerial::overflow()
If an interrupt causing overflow would occur between reading
_buffer_overflow and clearing it, this overflow condition would be
immediately cleared and never be returned by overflow().

By only clearing the overflow flag if an overflow actually occurred,
this problem goes away (worst case overflow() returns false even though
an overflow _just_ occurred, but then the next call to overflow() will
return true).
2015-01-26 17:03:25 +01:00
Matthijs Kooijman b1de3e6621 Toggle SoftwareSerial interrupts when starting / stopping to listen
This prevents interrupts from triggering when the SoftwareSerial
instance is not even listening.

Additionally, this removes the need to disable interrupts in
SoftwareSerial::listen, since no interrupts are active while it touches
the variables.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 934393398b Add SoftwareSerial::stopListening()
This allows one to explicitly stop a SoftwareSerial instance from
listening, without having to make another one listening.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman db1a4ad139 Add SoftwareSerial::setRxIntMsk()
This moves the interrupt mask enabling / disabling code into a separate
method, so we can call it from multiple spots next.
2015-01-26 17:03:25 +01:00
Matthijs Kooijman 1704e7e820 Let SoftwareSerial::end also check against _rx_delay_stopbit
The current check is still always false when the old check was, but
additionally it will not disable the interrupts when they were never
enabled (which shouldn't matter much, but this is more consistent).
2015-01-26 17:03:24 +01:00
Matthijs Kooijman b1c7a3d05f Let SoftwareSerial::listen() fail on invalid rx baud rates
In this case, SoftwareSerial::begin will not have enabled the
interrupts, so better not allow the SoftwareSerial instance to enter the
listening state either.
2015-01-26 17:03:24 +01:00
Matthijs Kooijman 937cc51c69 Clear SoftwareSerial rx delay if no interrupt register is found
Before enabling interupts, begin would see if the given receive pin
actually has an associated PCINT register. If not, the interrupts would
not be enabled.

Now, the same check is done, but when no register is available, the rx
parameters are not loaded at all (which in turn prevents the interrupt
from being enabled). This allows all code to use the same "is rx
enabled" (which will be added next).
2015-01-26 17:03:24 +01:00
Cristian Maglie 0e013406bc Merge branch 'sam-usart-mode-fix' into ide-1.5.x 2015-01-19 13:43:42 +01:00
Cristian Maglie 8ddc5198f6 Temporary fix for pulseIn() regression.
Fixes #2538
2015-01-18 17:34:40 +01:00
Cristian Maglie 00f23d3aad sam: Fixed initialization of UART/USART mode register 2015-01-14 00:08:59 +01:00
Chris 7e9cf6d612 sam: updated UART/USART modes 2015-01-09 20:25:09 +00:00
Cristian Maglie 20ac20f629 Arduino custom type boolean is now mapped to bool type
Fixes #2151
Fixes #2147
2015-01-07 14:56:19 +01:00
Cristian Maglie 5e97168fbc sam: USART modes now fails if used on UART 2015-01-06 15:47:44 +01:00
Cristian Maglie 37ea166e19 sam: refined UART/USART class inheritance
Let Usart inherit all methods from Uart.
2015-01-05 15:35:32 +01:00
Cristian Maglie 16d836108f sam: fix code format and indent in UART/USART class 2015-01-05 15:34:09 +01:00
Collin Kidder cabfd8ed21 Fixed flush so that it actually is sure to flush all outstanding data. 2015-01-04 13:37:28 -05:00
Collin Kidder 76280e8778 Correct an issue where write could send data out of order. 2014-12-31 08:42:26 -05:00
Collin Kidder eff20deb27 Add ability to set interrupt priority for UART/USARTs. 2014-12-24 10:36:40 -05:00
Collin Kidder 2fedb00552 Switch all of the transmit interrupt code to UARTClass. Also, turn USARTClass into a stub because it did nothing differently from the UART code anyway. Now all serial ports use transmit interrupts. 2014-12-24 10:20:37 -05:00
Collin Kidder bb341c6d92 Modifications to make serial transmit interrupt work more reliably. Also, added the availableForWrite function. 2014-12-23 22:37:58 -05:00
Collin Kidder 4eb05c303b Change RingBuffer to have buffer size of 128 and also set its members volatile since they are all accessed and modified in interrupt handlers. 2014-12-23 22:36:35 -05:00
Collin Kidder 065459c18f Implement transmit buffering with interrupts for USART devices 2014-12-21 20:57:08 -05:00
Cristian Maglie a9735bf91f Fix atomicity issues in SPI::beginTransaction and SPI::endTransaction (Andrew Kroll)
Previously, it could happen that SPI::beginTransaction was
interrupted by an ISR, while it is changing the SPI_AVR_EIMSK
register or interruptSave variable (it seems that there is
a small window after changing SPI_AVR_EIMSK where an interrupt
might still occur). If this happens, interruptSave is overwritten
with an invalid value, permanently disabling the pin interrupts.

To prevent this, disable interrupts globally while changing
these values.
2014-11-25 15:56:11 +01:00
Cristian Maglie 84b6cc27a5 [avr] Made SPI.usingInterrupt() synchronized (Andrew Kroll) 2014-11-25 15:56:11 +01:00
Cristian Maglie d9537cb7da [avr] Added SPI.notUsingInterrupt() (Andrew Kroll) 2014-11-25 15:56:11 +01:00
Cristian Maglie 8344812ce8 [avr] Made SPI.begin() and SPI.end() synchronized (Andrew Kroll) 2014-11-25 15:49:17 +01:00
Cristian Maglie 53e25d8b55 [avr] Improved SPI speed on 16bit transfer.
From https://github.com/arduino/Arduino/pull/2376#issuecomment-59671152

Quoting Andrew Kroll:

   [..this commit..] introduces a small delay that can prevent the wait
   loop form iterating when running at the maximum speed. This gives
   you a little more speed, even if it seems counter-intuitive. At
   lower speeds, it is unnoticed. Watch the output on an oscilloscope
   when running full SPI speed, and you should see closer back-to-back
   writes.

Quoting Paul Stoffregen:

   I did quite a bit of experimenting with the NOP addition. The one
   that's in my copy gives about a 10% speedup on AVR.
2014-11-25 15:49:17 +01:00
Cristian Maglie b9e186e45a Upped version to 1.6.0 2014-11-18 14:48:01 +01:00
Cristian Maglie 34c40b224f [avr] SPI: removed redundant include 2014-11-14 00:23:11 +01:00
Cristian Maglie 993cc9bbb4 [avr] Small comments and headers fixes in SPI 2014-11-14 00:23:11 +01:00
Matthijs Kooijman cd9a9e3fd7 Reduce avrdude verbosity
Previously, when verbose uploads were enabled, avrdude was run with four
-v options, causing it to dump all raw bytes exchanged with the
bootloader. This floods the console so much that meaningful output
mostly disappears.

Most users probably want to enable verbose mode just to see what avrdude
command is ran. Furthermore, users that benefit from the raw bytes
dumped are perfectly capable of either running avrdude manually, or
modifying platform.txt. Given that, running avrdude with just one  -v
should be plenty.

This fixes #891.
2014-10-30 12:36:06 +01:00
Cristian Maglie d1714a9fb8 [sam] Added -MMD flag to tell compiler to produce dependencies files
Now a full rebuild of the sketch is triggered only if needed.
2014-10-22 13:36:14 +02:00
Cristian Maglie 0824abfee5 Merge branch 'master' into ide-1.5.x
Conflicts:
	hardware/arduino/cores/arduino/HardwareSerial.cpp
	hardware/arduino/cores/robot/Arduino.h
2014-10-21 17:47:59 +02:00
Cristian Maglie 62cf4b6b55 Revert "Match return value to type in available()"
This reverts commit f40e471354.
Added an hint for the buffer sizes.

See #2057
Fixes #2367
2014-10-21 17:18:26 +02:00
Cristian Maglie 58b6fd4789 Fixed missing NOT_AN_INTERRUPT constant in digitalPinToInterrupt()
Fixes #2379
2014-10-21 16:55:37 +02:00
Cristian Maglie 3687289727 Merge pull request #2330 from spiritinlife/ide-1.5.x
Add #include "Print.h" in Server.h    Ide 1.5.x
2014-10-01 13:29:29 +02:00
Cristian Maglie 21939e6f89 [sam] Fixed compile error when using math functions
Fixes #2338
2014-09-30 17:34:25 +02:00
George Chailazopoulos 2c289ace73 Add #include "Print.h" in Server.h 2014-09-26 22:59:02 +03:00
George Chailazopoulos f5fe16bf2a Add #include "Print.h" in Server.h 2014-09-26 22:58:19 +03:00
Cristian Maglie 974613a0a2 [sam] Fixed architecture specific macro digitalPinToTimer, added comment to uninplemented portModeRegister
Fix #1833
2014-09-22 00:38:02 +02:00
Arnav Gupta 4dd931a99a set correct max size for mega2560 (to address issue #2277)
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2014-09-21 17:10:06 +05:30
Arnav Gupta 15064ad96a set correct max size for mega2560
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2014-09-20 03:09:54 +05:30
Cristian Maglie 84518e442c Fixed attribution rights for SAM delayMicroseconds function 2014-09-16 12:31:16 +02:00
Cristian Maglie 44bcd2040b Merge branch 'master' into ide-1.5.x
Conflicts:
	app/src/processing/app/Base.java
	build/build.xml
	todo.txt
2014-09-16 12:19:39 +02:00
Cristian Maglie 5f67650b80 Fixed trivial include error introduced in previous commit 2e3e539b... oops... 2014-09-12 16:58:05 +02:00
Cristian Maglie 8018a26e3d Merge pull request #2299 from cmaglie/ide-1.5.x-spi-updates
Missing SPI Transaction API methods on Due (SAM3X)
2014-09-12 14:07:03 +02:00
Cristian Maglie 2e3e539b71 Added license to USBAPI.h
Close #1847
2014-09-12 12:27:39 +02:00
Cristian Maglie 69e37647a6 Ported #1397 to SAM. 2014-09-12 12:06:00 +02:00
Cristian Maglie 3d222cc372 Merge pull request #1937 from matthijskooijman/stringindex
String index fixes and cleanups
2014-09-12 11:56:12 +02:00
Cristian Maglie 6a5b82f062 [sam] Implementation of SPI multibyte transfer 2014-09-11 17:50:00 +02:00
Cristian Maglie 5f88564b2b [sam] Simplified formula for SPI speed 2014-09-11 13:57:08 +02:00
Cristian Maglie 848dd39313 [sam] SPI library: added SPI_HAS_EXTENDED_CS_PIN_HANDLING flag
This allows to check if SPI provides extended API to allow automatic
CS pin handling.
2014-09-11 13:57:07 +02:00
Cristian Maglie 11cf45d6d6 Fix indent and small cosmetic changes 2014-09-10 18:22:02 +02:00
Matthijs Kooijman 04dba1e46f Fix off-by-one in String::substring
When checking the `left` argument, it previously allowed having
left == len. However, this means the substring starts one past the last
character in the string and should return the empty string. In practice,
this already worked correctly, because buffer[len] contains the trailing
nul, so it would (re)assign the empty string to `out`.

However, fixing this check makes it a bit more logical, and prevents a
fairly unlikely out-of-buffer write (to address 0x0) when calling
substring on an invalidated String:

	String bar = (char*)NULL;
	bar.substring(0, 0);
2014-09-10 13:42:06 +02:00
Cristian Maglie 6f9674288b Merge pull request #2279 from cmaglie/fix-leo-upload-osx10.9.4
Fix for upload problems on Arduino Leonardo (and derivatives) on OSX 10.9
2014-09-10 12:58:10 +02:00
Matthijs Kooijman 86015f441e Simplify String::remove(unsigned int)
Previously, this method calculated the length of the string from the
given index onwards. However, the other remove() method called already
contains code for this calculation, which is used when the count passed
in is too big. This means we can just pass in a very big count that is
guaranteed to point past the end of the string, shrinking the remove
method by a few bytes.
2014-09-10 12:33:25 +02:00
Matthijs Kooijman 2068f88a21 Fix bounds check in String::remove()
Previously, if you passed in a very big index and/or count, the
`index + count` could overflow, making the count be used as-is instead
of being truncated (causing the string to be updated wrongly and
potentially writing to arbitrary memory locations).

We can rewrite the comparison to use `len - index` instead. Since we
know that index < len, we are sure this subtraction does not overflow,
regardless of what values of index and count we pass in.

As an added bonus, the `len - index` value already needed be calculated
inside the if, so this saves a few instructions in the generated code.

To illustrate this problem, consider this code:

String foo = "foo";
Serial.println(foo.length()); // Prints 3
foo.remove(1, 65535); // Should remove all but first character
Serial.println(foo.length()); // Prints 4 without this patch

Not shown in this is example is that some arbitrary memory is written
as well.
2014-09-10 12:33:25 +02:00
Matthijs Kooijman 2b90124e3d Remove unneeded check in String::remove(unsigned int)
This check already happens in the remove(unsigned int, unsigned int)
method that is caled, so there is no need to also check this here.
2014-09-10 12:33:24 +02:00
Cristian Maglie 9a8b9c5c58 Fixed license for new.cpp and small cosmetic changes 2014-09-06 12:44:53 +02:00
Cristian Maglie 37ee800abd Correct implementation of gcc specific internal functions
The following empty stubs has been replaced by the gcc
flag -fno-threadsafe-static:

  int __cxa_guard_acquire(__guard *);
  void __cxa_guard_release (__guard *);
  void __cxa_guard_abort (__guard *);

The following empty stubs has been moved into their specific
module abi.cpp:

  void __cxa_pure_virtual(void) __attribute ((noreturn));
  void __cxa_deleted_virtual(void) __attribute ((noreturn));

Fix #107
2014-09-06 12:42:25 +02:00
Cristian Maglie b0b83625c1 Printable.h doesn't need new.h but only stdlib.h for size_t.
Probalby new.h may be removed completely.
2014-09-06 12:37:57 +02:00
Cristian Maglie 07e3e83424 Added new/delete stubs for Arduino Due
Fix #1485
A better implementation may be desirable as discussed in #108
2014-09-06 10:26:59 +02:00
Cristian Maglie b7b9da7710 Updated version to 1.5.8 2014-09-05 10:11:47 +02:00
Cristian Maglie aa776b30ba Fix for upload problems on Arduino Leonardo (and derivatives) with OSX 10.9.4 2014-09-01 12:16:41 +02:00
qperez42@gmail.com 70bc56275d fix Descriptor.c 2014-08-25 09:52:10 +02:00
Cristian Maglie 7f2350f714 Merge branch 'master' into ide-1.5.x 2014-08-08 15:44:41 +02:00
Christopher Andrews 1bbcb2f9d4 Added replacement stub for cstdlib atexit() funciton.
This is an empty stub to simply allow use of complex types with a
non global static lifetime. For more complex handling the function
'atexit' can be redefined in user code.

For more information see:

https://github.com/arduino/Arduino/pull/2229
https://github.com/arduino/Arduino/issues/1919
2014-08-08 15:38:57 +02:00
PaulStoffregen daa7e7dcc9 Fix interrupt masking on Arduino Due 2014-08-01 16:44:47 -07:00
PaulStoffregen ef06410d16 Add SPI_HAS_TRANSACTION symbol for Arduino Due 2014-08-01 13:00:29 -07:00
PaulStoffregen abb37e202f SPI Transactions for Arduino Due 2014-08-01 05:57:13 -07:00
PaulStoffregen 3d5ef6d5d9 SPI Transactions for AVR 2014-08-01 05:38:27 -07:00
Cristian Maglie fd94e184a5 Merge remote-tracking branch 'arduino/master' into ide-1.5.x 2014-07-24 14:46:05 +02:00
Cristian Maglie 163b60ee29 Merge pull request #2206 from amulya349/master
Fix of a bug #2199
2014-07-24 14:40:52 +02:00
Amulya Kumar Sahoo 865594d132 Fix of a bug 2014-07-23 01:03:44 +05:30
Cristian Maglie 6200ec2039 Merge pull request #2194 from Fede85/ide-1.5.x_lib-description
Ide 1.5.x lib description
2014-07-21 12:16:20 +02:00
Cristian Maglie dbd9b77b49 Merge pull request #2190 from ribbons/compiler-warnings
Fix two compiler warnings generated by updated toolchain
2014-07-19 09:35:58 +02:00
Fede85 dd77375fe9 missing paragraph field in library.properties 2014-07-18 20:08:01 +02:00
Fede85 b02e85ceb2 modified sentences in library.properties files 2014-07-18 19:41:34 +02:00
PaulStoffregen 33cec73f26 Add availableForWrite() to HardwareSerial 2014-07-18 07:01:26 -07:00
Matt Robinson 61a3558946 Cast empty string to char* to fix compiler warning
Stream::find(char *target) passes an empty terminator string to
Stream::findUntil(char *target, char *terminator) which caused a compiler
warning with the updated toolchain, so cast it to a char*.
2014-07-17 16:51:35 +01:00
Cristian Maglie 75ec6a1b31 Due: Wire.setClock can be called at any time
See #2157
2014-07-06 00:36:22 +02:00
Kristian Lauszus 9d20959b6a Implemented setClock for the Due as well
This allows users to change the I2C clock frequency
2014-07-02 19:47:23 +02:00
Cristian Maglie 49ec540204 Merge pull request #1912 from Lauszus/issues440
Enable user to change the I2C clock frequency by calling setClock in the Wire library
2014-07-02 15:37:30 +02:00
Cristian Maglie 396278598c Merge pull request #2148 from Lauszus/promini
Arduino Pro and Pro Mini should use eightanaloginputs variant
2014-07-02 15:29:31 +02:00
Fede85 8e48cef584 added support for the ArduinoISP 2014-07-02 15:03:12 +02:00
Cristian Maglie d07eb8866a Update ArduinoWifiShield_upgrade_mac.sh 2014-07-01 19:11:19 +02:00
Ankit Daftery b0ab27c47e Update ArduinoWifiShield_upgrade.sh
File path should be updated, is wrong currently, will throw an error saying files missing.
2014-07-01 19:09:49 +02:00
Cristian Maglie 81a5352811 Merge branch 'master' into ide-1.5.x 2014-07-01 19:07:55 +02:00
Cristian Maglie 494d3de97d Fixed permission on wifishield upgrade script. 2014-07-01 19:05:03 +02:00
Cristian Maglie fe78ffe429 Merge pull request #2118 from benoit-artefactlabs/wifishield-upgrade-firmware-mac-path
corrected wrong path to firmware binaries in wifishield upgrade script f...
2014-07-01 18:52:41 +02:00
Cristian Maglie c2c122b079 Merge branch 'master' into matthijskooijman-ide-1.5.x-timer-variant
Conflicts:
	app/src/processing/app/debug/Compiler.java
	hardware/arduino/sam/cores/arduino/main.cpp
2014-07-01 18:34:46 +02:00
Cristian Maglie e5f34e5a83 Merge branch 'ide-1.5.x-timer-variant' of github.com:matthijskooijman/Arduino into matthijskooijman-ide-1.5.x-timer-variant 2014-07-01 18:29:07 +02:00
Cristian Maglie 29f9dd9f1f Merge pull request #2139 from cmaglie/init-variant
Allow variants to define an initVariant() function that is called at startup
2014-07-01 17:28:45 +02:00
Cristian Maglie 00087c11f4 Reverting -flto flag from AVR core until all compatibility problems are worked out.
For more info:
https://groups.google.com/a/arduino.cc/d/msg/developers/21G5w2HbUOg/NRMW6c9OIFUJ
2014-07-01 17:18:04 +02:00
Cristian Maglie e0f83a3617 Backported digitalPinToInterrupt macro from IDE 1.5.x 2014-06-30 18:24:08 +02:00
Kristian Lauszus 4e38e595eb Arduino Pro and Pro Mini should use eightanaloginputs variant, so all 8 analog pins can be used 2014-06-28 22:37:26 +02:00
Cristian Maglie bb095a2a59 initVariant() is now declared as external "C" function.
See #2080 for more details.
2014-06-27 14:26:32 +02:00
Cristian Maglie 370648a532 Merge branch 'ide-1.5.7' into ide-1.5.x 2014-06-27 13:44:18 +02:00
Matthijs Kooijman 10a89a1d8d Support Atmega8 (and similar that define PE instead of UPE) again
These chips were previously supported, but since parity error checking
was added, this support has broken. Most chips define UPE0 (etc.) for
the parity error bit. Some chips don't have numbered UARTS so only
define UPE and even fewer define PE instead of UPE. This adds support
for those chips again.

Closes: #2137
2014-06-25 17:20:07 +02:00
Matthijs Kooijman 4014dd6070 Allow variants to define an initVariant() function that is called at startup.
See #2080 and #2139.
2014-06-25 16:56:19 +02:00
Cristian Maglie c2e5f67ea6 Updated arm gcc to version 4.8.3-2014q1 2014-06-25 11:59:47 +02:00
Cristian Maglie 4df2c8982a Updated arm gcc to 4.8.3 2014-06-25 11:57:49 +02:00
Cristian Maglie 3a4381955e Updated arm gcc to 4.7.4 2014-06-25 11:56:50 +02:00
Cristian Maglie 59767b4c03 Removed patch for old malloc bug (no more useful with updated toolchain) 2014-06-25 10:14:35 +02:00
Federico Fissore b72f461b4c Fixed compilation error when targetting Mega. Error is caused by #2039 and this fix is just a workaround 2014-06-25 10:14:35 +02:00
Federico Fissore 6f74581bba gcc: Adding -w flag to compiler.c.elf.flags in order to avoid printing ISR warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396 2014-06-25 10:14:35 +02:00
Federico Fissore 44a6cbf2de Enabling link-time optimization. See #660 2014-06-25 10:14:34 +02:00
Federico Fissore 5a015b3eec New common AVR toolchain 2014-06-25 10:12:39 +02:00
Cristian Maglie 40270306e0 Allow variants to define an initVariant() function that is called at startup.
See #2080
2014-06-19 19:49:47 +02:00
Cristian Maglie 1a305cdc45 Merge branch 'master' into ide-1.5.x 2014-06-19 17:01:53 +02:00
Cristian Maglie 11e02db954 Fixed regression in USBAPI and CDC (xaljox)
See:
9ac7e30252 (commitcomment-6718676)
2014-06-19 16:52:48 +02:00
Cristian Maglie 7f9e9b1cc2 Merge branch 'master' into HEAD 2014-06-13 10:29:12 +02:00