Description
Perhaps related and a follow up to Issue #17 . This is for the MT-D11 board / SAMD11.
Main issue: Using Wire on MT-D11/SAMD11 is basically impossible.
So I wonder if you have any tips on reducing compile size of I2C/Wire code to something that is usable, and leaves space for actual application code.
Details of what I'm doing:
I'm trying to compile this simple example that reads from an I2C sensor. I followed all the optimizations in #17 to reduce the compiled size to a minimum. Still the size overflows by 3K (19K in total) and that's without bootloader, no USB and hence no way to do simple serial debugging.
The same example compiled for a UNO/328p is less than 10K!
I tried it on a SAMD21 and there the 10-15K compile size of the Wire is negligible given the huge 256k memory. So it's never noticeable. On the SAMD11 however, as soon as 1 call to anything that calls Wire is made, the compiled sketch size blows up.
FWIW - going from bare minimum sketch to adding Serial, delay increases size from around 1K to over 4K (can't remember exact numbers).
I realize this may be because of bulky dependencies inherited from arduino/atmel, which this core probably relies upon. I haven't spent too much time tracking down what actually could be done.