Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Pages: 1 2 
Send Topic Print
link error in vs2019 of a project that builds ok in vs2017 (Read 376 times)
Simon@Visual Micro
Administrator
*****
Offline



Posts: 892
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #20 - Jun 7th, 2021 at 9:13am
 
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
Gothenburg, Sweden
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #21 - Jun 7th, 2021 at 10:21am
 
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
Back to top
 

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



Posts: 892
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #22 - Jun 7th, 2021 at 10:35am
 
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
Gothenburg, Sweden
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #23 - Jun 7th, 2021 at 12:06pm
 
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)
Back to top
 

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



Posts: 892
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #24 - Jun 7th, 2021 at 12:11pm
 
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
Gothenburg, Sweden
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #25 - Jun 7th, 2021 at 12:17pm
 
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
Gothenburg, Sweden
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #26 - Jun 7th, 2021 at 12:18pm
 
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: 892
Re: link error in vs2019 of a project that builds ok in vs2017
Reply #27 - Jun 7th, 2021 at 12:21pm
 
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
 
Pages: 1 2 
Send Topic Print