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 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) link error in vs2019 of a project that builds ok in vs2017 (Read 5347 times)
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2144
Joined: Feb 13th, 2019
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #20 - Jun 7th, 2021 at 8:13am
Print Post  
The latest release is available in the Marketplace from within VS (21.06.06.0) which should resolve these issues around optimization.

The very latest fixes are also available from the top of the forum board below:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
 
IP Logged
 
Anders Eriksson
Junior Member
**
Offline


Posts: 30
Location: Gothenburg, Sweden
Joined: May 31st, 2021
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #21 - Jun 7th, 2021 at 9:21am
Print Post  
I have updated to the 6 June release.

But I still don't get the same prog size as with vs2017, still about 30Kbyte more, what setting is still missing?

See attached outputs, one with default optimization and one with NO optimization
  

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


Posts: 2144
Joined: Feb 13th, 2019
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #22 - Jun 7th, 2021 at 9:35am
Print Post  
Thanks for the detail, the -Og flag is still present so it is expecting this to be default optimization with a Hardware debugger selected.

Just for clarity can you confirm there are no project properties set which change the optimization?

Is the result the same if you re-select the Optimization Setting "Default" from the Debug toolbar/menu?
  
Back to top
 
IP Logged
 
Anders Eriksson
Junior Member
**
Offline


Posts: 30
Location: Gothenburg, Sweden
Joined: May 31st, 2021
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #23 - Jun 7th, 2021 at 11:06am
Print Post  
Yes it is consistent doesn't get better after more trials switching between Default and NO opt, see the attached screen dump showing where I change the "Default" and "No optimization"

From my point of view it is strange that this behavior change and I need to change some setting just because I change from vs2017 to vs2019 to get the same generated code?

I have also added a dump of the project settings.

I tested again to open vs2017 with exactly the same MotorController.sln and rebuild it with output: about 30KBytes less than with vs2019

Program MotorController size: 132 444 bytes (used 25% of a 524 288 byte maximum) (10,83 secs)
  

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


Posts: 2144
Joined: Feb 13th, 2019
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #24 - Jun 7th, 2021 at 11:11am
Print Post  
Thanks for the detail, there is a project setting in the properties image "Disable Optimization Project" which is set to True currently.

If you set that back to False they should yield the same result.

This setting isn't noted by VS2017 as the vMicro version installed there is much older (which is why these properties did not show in the earlier screenshots).
  
Back to top
 
IP Logged
 
Anders Eriksson
Junior Member
**
Offline


Posts: 30
Location: Gothenburg, Sweden
Joined: May 31st, 2021
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #25 - Jun 7th, 2021 at 11:17am
Print Post  
Sorry now I saw that the project setting for opt in proj was disabled, I set it to false.

And now it builds with exactly same output size:
Program MotorController size: 132 444 bytes (used 25% of a 524 288 byte maximum) (9,75 secs)

Thanks!!!

Now I will start to use the Atmel Ice!
  
Back to top
 
IP Logged
 
Anders Eriksson
Junior Member
**
Offline


Posts: 30
Location: Gothenburg, Sweden
Joined: May 31st, 2021
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #26 - Jun 7th, 2021 at 11:18am
Print Post  
Just to be clear what these 3 new properties have as default values? Are they all False? if I open a vs2017 project with vs2019?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2144
Joined: Feb 13th, 2019
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #27 - Jun 7th, 2021 at 11:21am
Print Post  
Yes they should all be False by default, and if you upgrade the VS2017 vMicro version as well they will be visible in both setups.

Glad the issue is resolved, and thanks again for the assistance and persistence in resolving this problem.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint