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

**URL:** <https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328>\
**Category:** Troubleshooting\
**Created:** [October 5, 2014, 9:34pm UTC](https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328 "2014-10-05T21:34:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinman](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jinman/32/3277_2.png) [@jinman](https://community.particle.io/u/jinman)\
**Post date:** [October 5, 2014, 9:34pm UTC](https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328/1 "2014-10-05T21:34:35Z")

</div>

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?

Jin

---

<div class="post-metadata">

**Author:** ![Hootie81](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hootie81/32/2879_2.png) [@Hootie81](https://community.particle.io/u/Hootie81)\
**Post date:** [October 5, 2014, 10:09pm UTC](https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328/2 "2014-10-05T22:09:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jinman](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jinman/32/3277_2.png) [@jinman](https://community.particle.io/u/jinman)\
**Post date:** [October 5, 2014, 11:05pm UTC](https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328/3 "2014-10-05T23:05:38Z")

</div>

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?

Jin

---

<div class="post-metadata">

**Author:** ![Hootie81](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hootie81/32/2879_2.png) [@Hootie81](https://community.particle.io/u/Hootie81)\
**Post date:** [October 5, 2014, 11:17pm UTC](https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328/4 "2014-10-05T23:17:43Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jinman](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jinman/32/3277_2.png) [@jinman](https://community.particle.io/u/jinman)\
**Post date:** [October 6, 2014, 1:13am UTC](https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328/5 "2014-10-06T01:13:53Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![maxint](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@maxint](https://community.particle.io/u/maxint)\
**Post date:** [October 6, 2014, 1:08pm UTC](https://community.particle.io/t/no-flashing-magenta-no-error-but-then-file-was-too-big-when-flashing-using-cli/7328/6 "2014-10-06T13:08:16Z")

</div>

@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!
