When I ran out of flash (and how avr-nm saved the day) | Details | Hackaday.io
<p>I wanted to have a convenient debug port that I could use to see what was going on when my ATTiny talked to the GSM module.<br></p><p>I went with TinySerialDebug, a transmit-only library and everything was working great.. until I added the SoftwareSerial library:</p><p><img data-src="https://cdn.hackaday.io/images/8685831477236087913.png" class="lazy"></p><p>I was out of flash on my ATTiny85. </p><p>Meaning my firmware's code was taking too much space on the constrained ATTiny85. </p><p>A flag that disabled all the debug port related code, brought me back under the space limit, but I definitely needed a way to talk to the GSM module (the ATTiny doesn't have hardware UART). And I <em>really</em> wanted a debug port because talking to the GSM module was going to be hard enough to debug without some way to tell what the ATTiny was saying. So I set about solving the space issue without cutting either library.</p><p><span></span></p><p>My first instinct was that SoftwareSerial was too large, since it implements the entire Stream interface that Arduino provides, which has a ton of convenience functions. </p><p>I looked up ways to optimize sketch size, but realized, while I <em></em>did<em> suspect </em>SoftwareSerial was the culprit here, I hadn't actually <em>proven</em> it was what was eating up all my flash
hackaday.io