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 Compile File Size Different ver 2020.708.7 Vs 1909.15.1 (Read 2196 times)
Bunzino69
Newbies
*
Offline


Posts: 9
Joined: Apr 24th, 2018
Compile File Size Different ver 2020.708.7 Vs 1909.15.1
Aug 10th, 2020 at 4:27pm
Print Post  
I have come across an issue with one application whereby I’m using a genuine Arduino Nano (32K flash) and my code is at the near limit (30,702 of 30,720). The issue I have is the same source code compiled in the same way on two Visual Studio w/Visual Micro installs on different computers result in the compile sizes are different. All library files used, compile set-up are the same with debug off except, the Visual Micro extension on one computer uses 1909.15.1 and the other uses 2020.708.7. The later complies the same source code at over 31,546 bytes which is over the flash size limit of the Nano.  I have reverted back to 1909.15.1 Visual Micro extension and can confirm the compile sizes are now equal.
 
Can you please advise what might be the cause of this variance and if I there is a workaround?
  

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


Posts: 2175
Joined: Feb 13th, 2019
Re: Compile File Size Different ver 2020.708.7 Vs 1909.15.1
Reply #1 - Aug 11th, 2020 at 10:35am
Print Post  
Thanks for the report, and the logs.

Just to ensure we are on the right track with our investigation:
1) Can you confirm if this works as expected in the Arduino IDE?
2) Is it possible to roll Visual Micro back on the same machine to try it (just to ensure all same cores/IDE etc are in use)?
3) Would it be possible to attach or email us the combined ProjectName.CPP from the Build folder for both scenario?


  
Back to top
 
IP Logged
 
Bunzino69
Newbies
*
Offline


Posts: 9
Joined: Apr 24th, 2018
Re: Compile File Size Different ver 2020.708.7 Vs 1909.15.1
Reply #2 - Aug 19th, 2020 at 1:56am
Print Post  
After compiling the code using the Arduino IDE I got the same over memory error. That led me to look at what library files were being included when compile. I then found the problem.

For some reason, I have two versions of the EEPROMex library. One is located in the Arduino-EEPROMex-master directory (I believe I downloaded the ZIP from GITHUB and manually installed using Visual Micro ext). The other is located in the EEPROMEx (I believe this version was installed from the list of available libraries included with the Visual Micro ext.).

When comparing the two library files, I found that the EEPROMex.cpp document found in the EEPROMEx-1.0.0 folder contains the following un-commented line:

#define _EEPROMEX_DEBUG         // Enables logging of maximum of writes and out-of-memory

The EEPROMex.cpp file in the Arduino-EEPROMex-master folder has this statement commented out.

This statement causes the compiler to add debug code to the complied results.

Why did this effect Visual Micro new version Vs older? I think it's because I was compiling the older build using the original EEPROMex-master directory the newer Visual Micro build uses the EEPROMEx-1.0.0 directory. By default, the Visual Micro library installer, uses the EEPROMEx-1.0.0 folder. Once uncommented the statement in both .ccp files, and "cleaned" the solution to rebuilt, both versions of Visual Micro resulted in "code exceeding flash memory" error.

After I commented out the #define EEPROMEX_DEBUG line in both versions of the library my code now compiles equally in older and newer Visual Micro ext.

My conclusion is, nothing wrong with the Visual Micro extension. Thank you for steering me toward find a solution!

b Cheesy
« Last Edit: Aug 19th, 2020 at 1:59am by Bunzino69 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compile File Size Different ver 2020.708.7 Vs 1909.15.1
Reply #3 - Aug 20th, 2020 at 11:43am
Print Post  
Excellent, thanks for the update.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint