Suggested fix from Michael Smith:
Looking at the code at GitHub, the call to serialEventRun in main.cpp will
always pull in HardwareSerial.
If you change the prototype for serialEventRun in HardwareSerial.h to:
extern void serialEventRun(void) __attribute__((weak));
then Blink goes back to the expected size.
This will require a change in main.cpp as well;
for (;;) {
loop();
if (serialEventRun)
serialEventRun();
}
as the address of serialEventRun will be zero if it's not linked.
A more comprehensive solution would be to use a linker set for the loop
callouts; I actually composed a longer reply describing that approach before
realising that just weakref'ing serialEventRun should DTRT.
Original issue reported on code.google.com by dmel...@gmail.com on 5 Sep 2011 at 11:30
Original issue reported on code.google.com by
dmel...@gmail.com
on 5 Sep 2011 at 11:30