I’m running into problems with my app which seems to be too big when compiled. When trying to flash it via the web IDE, just nothing happens, when using the Spark CLI it says “too big”.
This brought me to trying to figure out what the actual space is I have on the device, but I couldn’t really find that information. Somewhere it says “128kb”, but I’m pretty sure my app is under that ( I’ve compiled it directly for Arduino and there it comes out around 32kb size. Is there a way to check how big my sketch actually is, and how much space is left on the Core?
You should have about 100K for your app (about 20K is reserved for the bootloader). Sometimes including certain libraries can bump your app size way up, are you including system libraries that you could do without?
Regarding the libraries I don’t think I can leave anything out ( I’m using SPI, UART and Print and would need to use Wire/I2C in the future as well ). Is there something like “PROGMEM” on Spark ? From what I understand “static const” is enough on Spark.
As of today’s deployment of firmware to the web IDE, you don’t need to worry about PANIC_ONLY. That’s now the default and an empty user app (so only the Spark code) compiles to a 67k binary. The total available flash space is 108k.
Another issue fixed today was that hitting the flash button in the web IDE used to not show errors—you had to hit the verify button to see compile errors. As of today, however, errors are shown on flash as well.
And the core-firmware README will get you started with local builds.
I don’t know if this has been posted somewhere already…
When I verified my code today, it showed how much of program/RAM was used on my Core, and how much was left. So yeah, you can now see the space left inside the web IDE, without having to make a local build. YEEY, go !