Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !! (Read 1108 times)
Waleed El-Badry
Junior Member
**
Offline


Posts: 14
Location: Egypt
Joined: Jan 30th, 2016
Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Sep 13th, 2020 at 9:21pm
Print Post  
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
Select All
Global variables use 3208 bytes (125%) of dynamic memory, leaving -648 bytes for local variables. The maximum is 2560 bytes.
 



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

Code
Select All
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.
  
Back to top
 
IP Logged
 
Waleed El-Badry
Junior Member
**
Offline


Posts: 14
Location: Egypt
Joined: Jan 30th, 2016
Re: Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Reply #1 - Sep 13th, 2020 at 9:26pm
Print Post  
I attached the log
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Reply #2 - Sep 13th, 2020 at 9:49pm
Print Post  
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
Select All
Compiling debug version of 'smote_arduino' for 'Arduino Leonardo' 



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.
« Last Edit: Sep 13th, 2020 at 9:51pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: Code compiled although Global variables use 3208 bytes (125%) of dynamic memory !!
Reply #3 - Sep 18th, 2020 at 1:03pm
Print Post  
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
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint