When I run Project inspect on my project, which includes the TinyGsm library.
When I sort the inspect symbol results on size, it shows a method from the TinyGSM library as the largest symbol, 4.1 K.
The method contains no more than this:
virtual void stop(uint32_t maxWaitMs) {
TINY_GSM_CLIENT_DUMP_MODEM_BUFFER()
at->sendAT(GF(“+CIPCLOSE=”), mux, GF(“,1”)); // Quick close
sock_connected = false;
at->waitResponse();
}
I can’t name the exact cause for sure, but there are a number of optimizations the compiler can use to increase code execution speed at the expense of code size. I don’t know if it’s possible to look into the generated assembly to verify this. @ivankravets?