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....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Problem with 'Startup Project' and size_t ambiguity (Read 641 times)
Todd Osborne
Newbies
*
Offline



Posts: 5
Problem with 'Startup Project' and size_t ambiguity
Feb 15th, 2019 at 4:27pm
 
I am evaluating Visual Micro now, and for the most part it works great. Being able to develop using a modern and capable IDE really speeds up the process. However, I am having 2 problems.

1) Visual Micro seems to ignore the Startup Project when building. I have a solution that has 1 Windows program and 2 Arduino projects. I have to unload one of the Arduino projects to build the other. Setting it as the Startup Project, like the manual says to do, has no impact, Visual Micro always builds the first Arduino project it finds. Loading and unloading projects is tiresome.

2) Visual Studio always complains about size_t be ambiguous. In my Arduino projects, I have cleared the Visual Studio include directory, and made sure that all include files are coming from the Teensy headers. There are no Windows or Visual C++ files being included, but the IDE still complains and underlines all size_t types. When I right click and choose "Peek" it finds 0 size_t to navigate to. If I right click and choose view the declaration, it jumps to the correct Teensy include file where size_t is defined.

Thanks!
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Problem with 'Startup Project' and size_t ambiguity
Reply #1 - Feb 15th, 2019 at 6:24pm
 
Thanks for the post and good to hear things are going well. Answer and question below

Quote:
1) Visual Micro seems to ignore the Startup Project when building. I have a solution that has 1 Windows program and 2 Arduino projects. I have to unload one of the Arduino projects to build the other. Setting it as the Startup Project, like the manual says to do, has no impact, Visual Micro always builds the first Arduino project it finds. Loading and unloading projects is tiresome.


This behavior is optional.

Why

The problem is that most arduino users do not understand the concept of a Visual Studio Start-up project. In fact they find it confusing.

Default way of working

Therefore Visual Micro builds the project of the code that is active in the code editor. This means that is you are editing/viewing "Project1.ino" it will build when you click build. If you are editing/viewing "Project2.ino" then Project2 will build.

Using the Startup Project

If I recall you can enable use of Startup project by switching OFF vMicro>General>Active Code Has Priority Over Solution Explorer

Documentation

Maybe this needs to be documented better. If you have seen a link on visualmicro.com that is incorrect then please provide otherwise I will add to the docs.


Quote:
2) Visual Studio always complains about size_t be ambiguous. In my Arduino projects, I have cleared the Visual Studio include directory, and made sure that all include files are coming from the Teensy headers. There are no Windows or Visual C++ files being included, but the IDE still complains and underlines all size_t types. When I right click and choose "Peek" it finds 0 size_t to navigate to. If I right click and choose view the declaration, it jumps to the correct Teensy include file where size_t is defined.


Visual Micro manages the build process to ensure it is accurate but we leave a lot of intellisense to Visual Studio.

Sometimes VS intellisense needs a little extra info for certain boards/platforms. Therefore, for intellisense reports please always state the board/mcu you are using and if not standard arduino then provide a link to the board support package or git repository. Failing that at least say the name of the board and hardware package.


Thanks
Back to top
« Last Edit: Feb 15th, 2019 at 6:26pm by Visual Micro »  
WWW  
IP Logged
 
Todd Osborne
Newbies
*
Offline



Posts: 5
Re: Problem with 'Startup Project' and size_t ambiguity
Reply #2 - Feb 15th, 2019 at 6:31pm
 
Thank you for your very quick response. I disabled the option you mentioned and Visual Micro does indeed build the startup project, so that issue is resolved. Thanks! As for the size_t issue, my build target is Teensy 3.2 and I have Visual Micro set to target Teensy 3.1/3.2.
Back to top
 
 
IP Logged
 
Todd Osborne
Newbies
*
Offline



Posts: 5
Re: Problem with 'Startup Project' and size_t ambiguity
Reply #3 - Feb 15th, 2019 at 6:34pm
 
Where I found the bad information about how the Startup Project defines which project to build came from https://www.visualmicro.com/page/User-Guide.aspx?doc=Projects-and-Solutions.html

which states...

The Startup Project
From all projects within a solution, exactly one project is the startup project. This is the project whose executable code will be uploaded to the board if you activate the Build & Upload command. If you have debugging enabled, this will also be the Arduino board and project that you are debugging. Building with multiple projects: VM does noit work this way anymore
You can change the startup project by right clicking on the project in Solution Explorer (indicated by the 2 and 3 above) and choosing "Set as Startup Project".
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Problem with 'Startup Project' and size_t ambiguity
Reply #4 - Mar 18th, 2019 at 2:21am
 
Sorry I missed this response.

Thanks, yes the docs were currently being updated and we found that old reference.

Which version of visual studio or atmel are you using for teensy dev?

Back to top
« Last Edit: Mar 18th, 2019 at 2:22am by Visual Micro »  
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Problem with 'Startup Project' and size_t ambiguity
Reply #5 - Mar 23rd, 2019 at 6:33pm
 
Debug question moved to here
Back to top
« Last Edit: Mar 23rd, 2019 at 6:38pm by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print