No Flashing Magenta, No Error but then "File Was Too Big!" when flashing using CLI

I get the “Blinking LED” sample working fine via the Spark IDE. But when I try my sample app which has many .h and .cpp files, it just does flash via the Spark IDE. It compiles fine and verifies ok.

arm-size output is
text data bss dec hex
107488 1512 12216 121216 1

In a nutshell:
Flash used 109000 / 110592 98.6 %
RAM used 13728 / 20480 67.0 %

When I tried do use Spark CLI and flash the downloaded “firmaware.bin”, I get

attempting to flash firmware to your core 55ffXXXX7231787
flash core said {“ok”:false,“errors”:[{“id”:“55ffXXXX7231787”,“status”:“Update failed - File was too big!”}]}

Not sure what “dec” is above here. Can anybody help?


1 Like

From some previous testing and input from the elite’s we worked out that the core has 128k total, less 20k reserved for bootloader that leaves 108k for text + data only (not sure what the others are)

Maybe @Dave could have a look at the 110592 on the web IDE and let us know why the difference?

Thanks @Hootie81 for the response. If that is the case, 108K is for text and data, I am over that limit since I have 109K. But not sure why I am not getting any error, Panic flashes. The Web IDE just goes from “Flash sucessful” to “Ready” message.

I see a warning “Defaulting to Release Build” so assuming that “Debug symbols” are not in the compiled code. Are there any pointers you can point me to reduce the size?


One of the biggest changes i made was to reduce the amount of text i had in my code that i was outputting to the serial port. in stead of doing 4 println in a row to print 4 lines, i did one println and put /r/n where i wanted the new lines. that got mu code from 110k down to 105k.

But it totally depends on what code you have…

Thats great advice. Thanks a lot. For some reason, I cannot see the usbmodem when I use screen or coolterm or serialtools on my mac. but thats a different issue. Thanks!

@jinman: I had similar issues when reaching 97.7% code usage in the IDE. No warning, no error: just the message “flash successful” without actually flashing.

For my project the biggest gain was to use conditional debug statements and defines to select the area I want to debug. Serial output still works, but having all the debug strings in the code was just too much.

Good luck!