Hi all,
same sketch compiled on standalone editor and web editor, but different storage space and memory used after compilation. Why? :o Same board Arduino Nano Atmega328
Standoalone ide 1.8
Sketch uses 18.736 byte (60%) of program storage space. Maximum is 30.720 bytes.
Global variables use 1.088 byte (53%) of dynamic memory, leaving 960 bytes for local variables. Maximum is 2048 bytes.
Web editor:
Sketch uses 15966 bytes (51%) of program storage space. Maximum is 30720 bytes.
Global variables use 1371 bytes (66%) of dynamic memory, leaving 677 bytes for local variables. Maximum is 2048 bytes.
Hi, that's interesting. Could you share the source of the sketch?
It's general. Try to compile some sketches from the examples. Examples > communication > dimmer
Standalone
2.184 byte (7%) program storage space. Maximum is 30.720 byte.
Global variables use 182 byte (8%) of dynamic memory, leaving 1.866 byte for local variables. Maximum is 2048 bytes.
Web editor
Sketch uses 1862 bytes (6%) of program storage space. Maximum is 30720 bytes.
Global variables use 182 bytes (8%) of dynamic memory, leaving 1866 bytes for local variables. Maximum is 2048 bytes.
Hi maurober,
it looks like your Desktop IDE is picking up an incorrect avr platform (and it probably compiles without LTO extensions).
If you enable the verbose compilation flag under "Preferences", the 3rd and 4th line should read something like
Using board 'nano' from platform in folder: .../hardware/arduino/avr
Using core 'arduino' from platform in folder: .../hardware/arduino/avr
If the path is not a subfolder of your installation path (eg. C:\Programs\Arduino\hardware\arduino\avr) you are using an old version of AVR platform. To solve this issue, oper the Board Manager, click on AVR Boards and update the package. It should then use the bundled core.
Hi Matteo,
I have updated the avr platform on my standalone ide but it's the same. Generally all sketches compiled on web ide are bigger size than same compiled on the standalone ide. For example please try to compile this skecth for arduino nano on both ide
web ide:
Sketch uses 15998 bytes (52%) of program storage space. Maximum is 30720 bytes.
Global variables use 1372 bytes (66%) of dynamic memory, leaving 676 bytes for local variables. Maximum is 2048 bytes.
standalone ide ver. 1.6.11 avr platform ver. 1.6.17
Lo sketch usa 15.014 byte (48%) dello spazio disponibile per i programmi. Il massimo è 30.720 byte.
Le variabili globali usano 1.115 byte (54%) di memoria dinamica, lasciando altri 933 byte liberi per le variabili locali. Il massimo è 2.048 byte.