Commit Graph

1147 Commits

Author SHA1 Message Date
Cristian Maglie 5cbfcfbf07 Update revision log. Version set to 1.6.1. 2015-02-19 18:22:43 +01:00
Cristian Maglie 2aef2cb108 "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 772b40df74 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 17ad4fe5ef Corrected some email contacts. 2015-02-05 16:47:22 +01:00
Cristian Maglie 073ff135ce Merge branch 'sam-usart-mode-fix' into ide-1.5.x 2015-01-19 13:43:42 +01:00
Cristian Maglie 61c82a1937 Temporary fix for pulseIn() regression.
Fixes #2538
2015-01-18 17:34:40 +01:00
Cristian Maglie 17db7a7843 Arduino custom type boolean is now mapped to bool type
Fixes #2151
Fixes #2147
2015-01-07 14:56:19 +01:00
Cristian Maglie 3ba0d76024 Merge branch 'master' into ide-1.5.x
Conflicts:
	hardware/arduino/cores/arduino/wiring.c
	libraries/Ethernet/src/utility/util.h
	libraries/Ethernet/src/utility/w5100.cpp
	libraries/Ethernet/src/utility/w5100.h
	libraries/Ethernet/util.h
	libraries/Ethernet/utility/util.h
	libraries/SPI/SPI.cpp
	libraries/SPI/SPI.h
2014-12-02 22:35:17 +01:00
Cristian Maglie a05d1d4851 Backported 'yield()' hook from 1.5.x 2014-12-02 22:15:57 +01:00
Cristian Maglie 1e699c3600 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 00f5ed6b45 [avr] Made SPI.usingInterrupt() synchronized (Andrew Kroll) 2014-11-25 15:56:11 +01:00
Cristian Maglie 4948bf5650 [avr] Added SPI.notUsingInterrupt() (Andrew Kroll) 2014-11-25 15:56:11 +01:00
Cristian Maglie 6cfc5c23cc [avr] Made SPI.begin() and SPI.end() synchronized (Andrew Kroll) 2014-11-25 15:49:17 +01:00
Cristian Maglie d4edece7e6 [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 7ee84bdb1e Upped version to 1.6.0 2014-11-18 14:48:01 +01:00
Cristian Maglie 1daa5ea931 [avr] SPI: removed redundant include 2014-11-14 00:23:11 +01:00
Cristian Maglie 39b2b39234 [avr] Small comments and headers fixes in SPI 2014-11-14 00:23:11 +01:00
Matthijs Kooijman f61b5ee5de 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 0f7a0ec4ed 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 02f5b99958 Revert "Match return value to type in available()"
This reverts commit f40e4713542fa862d5b99b256a642e001a796988.
Added an hint for the buffer sizes.

See #2057
Fixes #2367
2014-10-21 17:18:26 +02:00
Cristian Maglie d62d063082 Fixed missing NOT_AN_INTERRUPT constant in digitalPinToInterrupt()
Fixes #2379
2014-10-21 16:55:37 +02:00
Cristian Maglie 5e2b7aa876 Merge branch 'master' into ide-1.5.x. Updated revision log.
Conflicts:
	build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino
	hardware/arduino/boards.txt
2014-10-01 13:59:32 +02:00
Cristian Maglie 03ed6cba91 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
George Chailazopoulos 62045646a1 Add #include "Print.h" in Server.h 2014-09-26 22:58:19 +03:00
Arnav Gupta bd4784f8a7 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 f1d5c050b0 set correct max size for mega2560
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
2014-09-20 03:09:54 +05:30
Cristian Maglie 99fa1b0cbb 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 60e6ec22f1 Fixed trivial include error introduced in previous commit 2e3e539b... oops... 2014-09-12 16:58:05 +02:00
Cristian Maglie 8440f53364 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 b70269a303 Added license to USBAPI.h
Close #1847
2014-09-12 12:27:39 +02:00
Cristian Maglie 3155eeeae9 Merge pull request #1937 from matthijskooijman/stringindex
String index fixes and cleanups
2014-09-12 11:56:12 +02:00
Matthijs Kooijman fde95cf5b5 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 0b094167de 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 35a84769d4 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 b2729a5156 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 dfb0dee773 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 f02d637a89 Fixed license for new.cpp and small cosmetic changes 2014-09-06 12:44:53 +02:00
Cristian Maglie a4496b927b 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 df778925a8 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 4801801ef9 Updated version to 1.5.8 2014-09-05 10:11:47 +02:00
Cristian Maglie 1d0f3510f6 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 4d5358d307 fix Descriptor.c 2014-08-25 09:52:10 +02:00
Cristian Maglie 5d87f9e8e2 Merge branch 'master' into ide-1.5.x 2014-08-08 15:44:41 +02:00
Christopher Andrews 28acfd7d9d 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 48f5256789 SPI Transactions for AVR 2014-08-01 05:38:27 -07:00
Cristian Maglie e057236dd6 Merge remote-tracking branch 'arduino/master' into ide-1.5.x 2014-07-24 14:46:05 +02:00
Cristian Maglie b06b62d2f7 Merge pull request #2206 from amulya349/master
Fix of a bug #2199
2014-07-24 14:40:52 +02:00
Amulya Kumar Sahoo 710bd1fa2e Fix of a bug 2014-07-23 01:03:44 +05:30
Cristian Maglie 82a130f833 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 38e9fa1a5f Merge pull request #2190 from ribbons/compiler-warnings
Fix two compiler warnings generated by updated toolchain
2014-07-19 09:35:58 +02:00