Page 1 of 1

Real size of flash memory

Posted: 06 Dec 2017 12:56
by aleconakad
Dear all,

according to specifications the Z-uno module possess 28K (28672 bytes) of flash memory for sketches. In Arduino IDE, it allows code up to 32K. How can this be?
Furthermore, my program reached about 98% of the 32K. When I try to flash it, the flash procedure completes successfully, but on the Z-uno still runs the old sketch (a simple blink-blink sketch). I managed to downsize my program to about 91% of the allowed 32K in Arduino IDE (29376 bytes), now it flashes and run successfully.

So somehow, something is not right regarding the flash size. For sure it is not 32K but also it is larger than 28K. Could you please elaborate more on this?

Thanks

Re: Real size of flash memory

Posted: 07 Dec 2017 12:38
by knst08
I can confirm this behavior, lost lots of time before understood that if binary size exceeds 30K upload procedure passes but does not change the binary on z-uno.

Re: Real size of flash memory

Posted: 08 Dec 2017 08:52
by PoltoS
We will check that.

Indeed the correct is 28k.

In next S2 release it will be 6k only (S0 release will still be 28k). This is because S2 uses a lot of space. But the 2.1.1 compiler is much note efficient and produces 5 times smaller code.

So help us to understand how have you filled the fill 28k!

Re: Real size of flash memory

Posted: 08 Dec 2017 12:33
by knst08
Sent you the link to code as private message

Re: Real size of flash memory

Posted: 10 Dec 2017 00:33
by PoltoS
Wow. It is huge! A bit overengineered with C++ classes, this is why it is so big