Go to file
Matthijs Kooijman 1848db3d66 Put each HardwareSerial instance in its own .cpp file
By putting the ISRs and HardwareSerial instance for each instance in a
separate compilation unit, the compile will only consider them for
linking when the instance is actually used. The ISR is always referenced
by the compiler runtime and the Serialx_available() function is always
referenced by SerialEventRun(), but both references are weak and thus do
not cause the compilation to be included in the link by themselves.

The effect of this is that when multiple HardwareSerial ports are
available, but not all are used, buffers are only allocated and ISRs are
only included for the serial ports that are used. On the mega, this
lowers memory usage from 653 bytes to just 182 when only using the first
serial port.

On boards with just a single port, there is no change, since the code
and memory was already left out when no serial port was used at all.

This fixes #1425 and fixes #1259.
2014-01-22 09:39:19 +01:00
bootloaders merge 2013-10-14 12:42:42 +02:00
cores/arduino Put each HardwareSerial instance in its own .cpp file 2014-01-22 09:39:19 +01:00
firmwares Merged 1.0.5 2013-04-03 13:51:04 +02:00
libraries Revert "SPI library to new format" 2013-11-21 15:05:36 +01:00
variants Merge branch 'pins-define' into ide-1.5.x 2013-12-13 15:09:40 +01:00
boards.txt In boards.txt, rename atmega328diecimila to diecimila 2013-12-08 18:16:31 +01:00
platform.txt Fixed "runtime.hardware.path" and "runtime.platform.path" values 2014-01-05 12:42:27 +01:00
programmers.txt Set correct speed of Arduino ISP programmer 2013-04-06 01:59:25 +02:00