VS Arduino
>> >> Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
https://www.visualmicro.com/forums/YaBB.pl?num=1600032094

Message started by Waleed El-Badry on Sep 13th, 2020 at 9:21pm

Title: Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Post by Waleed El-Badry on Sep 13th, 2020 at 9:21pm
Hello,
Visual Micro compiles a code that the Arduino compiler can not compile!

When I compile the code from Arduino IDE, it gives me the following error:


Code (]
Global variables use 3208 bytes (125%) of dynamic memory, leaving -648 bytes for local variables. The maximum is 2560 bytes.
[/code):



When I compile the same code on the same target, the hex file is generated!

[code]
Program smote_arduino size: 12,312 bytes (used 43% of a 28,672 byte maximum) (1.66 secs)
Minimum Memory Usage: 3208 bytes (125% of a 2560 byte maximum)


I used Arduino Leonardo.

Title: Re: Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Post by Waleed El-Badry on Sep 13th, 2020 at 9:26pm
I attached the log
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=log_011.txt ( 106 KB | 4 Downloads )

Title: Re: Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Post by Visual Micro on Sep 13th, 2020 at 9:49pm
Thanks for the log. When Usb/Wifi debugging is enabled the debug commands are injected into the temp version of the code prior to compile.

You can see if debug is enabled because the "Compiling" message include the word "debug"
[code]Compiling debug version of 'smote_arduino' for 'Arduino Leonardo'[/code]

If Automatic Debugging is enabled (the default) then please switch the tool bar from Debug to Release.

Does this solve the issue?

Thanks

ps: We will inspect your output during th next few days to see why debug mode has consumed so much memory. That can depend on the number of breakpoints and the use of Serial can also consume global memory. Therefore for smaller cpu's such as the lenorado there can be a fine balance depending on what your own code is (or is not already) doing.

Title: Re: Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Post by Simon@Visual Micro on Sep 18th, 2020 at 1:03pm
We have a new release (20.09.10.2) which will fail the compilation if > 100% of the memory is used at build time as expected.

This is available from the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.