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 Re: How to set the board of a project? (Read 3341 times)
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: How to set the board of a project?
May 17th, 2018 at 3:00pm
Print Post  
Tim,

What am I missing here? I am using the latest VS2017 and VMicro and after creating 3 projects in a single solution, VM does not switch between the devices/COM Ports for the projects when I change my Startup Project.

Note: I did not create the projects separately then add them to a solution, I created the projects within the solution.

Thanks,
Khalil
« Last Edit: May 17th, 2018 at 3:54pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Solution using multiple (different) boards
Reply #1 - May 17th, 2018 at 3:05pm
Print Post  
Hi khalilm, Please create new threads with your questions to avoid confusion. Thanks

The board selection and all visual micro controls are not related to the startup project, but are related to the project associated to the active code editor.

It's only the VS "Start" functions that use the Startup Project
« Last Edit: May 17th, 2018 at 3:06pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Solution using multiple (different) boards
Reply #2 - May 17th, 2018 at 3:17pm
Print Post  
Sorry, I thought my issue was directly related to the question being asked which is why I added it here.

So just so I understand it is not possible to have different boards in a single solution and switch between them without manually having to change the board selection/COM?

Thanks,
Khalil
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Solution using multiple (different) boards
Reply #3 - May 17th, 2018 at 3:24pm
Print Post  
Quote:
So just so I understand it is not possible to have different boards in a single solution and switch between them without manually having to change the board selection/COM?

Sorry I am not clear what you are asking. I just explained how to set the board for each project. A solution can contain multiple projects. The board setting is saved to whatever code/project you are editing at any time.

I will shortly split your questions into a new thread and the forum will auto insert a "off-topic moved" link in the original thread so don't be offended, it's just standard forum feature/message.
« Last Edit: May 17th, 2018 at 3:27pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: Solution using multiple (different) boards
Reply #4 - May 17th, 2018 at 3:46pm
Print Post  
Ok maybe it is a terminology issue. Here's an example.

I create an Arduino project (say Project A) using the VM addin in VS. Once the project is created, I change the board type and COM port using the dropdown menu in the VM toolbar. Say I create one for the ESP8266 on COM5.

Then I add another new project to the solution (Project B) and using the same procedure above create one for the WiFi-Lora 32 on COM7. 

What I would expect is as I switch between the projects, the board type and the COM port would switch automatically. So when on Project A - dropdown shows ESP8266 and COM5. Project B - WiFi-Lora 32 and COM7

I guess I am not seeing where VM saves the board for each project. Because as I switch between the projects they don't compile if the toolbar options are not set accordingly.

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to set the board of a project
Reply #5 - May 17th, 2018 at 3:53pm
Print Post  
Create a solution with two projects. Project1 and Project2

1)

Open Project1.ino so it is the active code in the code editor. Set the board by selecting it from the drop down. Make sure you select the board even if the correct board is set. (visual micro remembers the last selected board but does not store it for a project until you specifically select it)

Open Project2.ino so it is the active code in the code editor. Select a different board from the board list.

2)

Click into Project1.ino and the board will change to whatever you previously selected for Project1.

Click into Project2.ino and the board will change to whatever you previously selected for Project2.


Agree?

« Last Edit: May 17th, 2018 at 3:58pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
khalilm
Junior Member
**
Offline


Posts: 17
Joined: Jan 6th, 2015
Re: How to set the board of a project?
Reply #6 - May 17th, 2018 at 4:26pm
Print Post  
Ok yes that was the issue.

What I did was create the first project that already had the device I wanted and did not actively choose it.

So when I switched back and forth it would not switch.

Sorry about that. Thanks for the help.

Khalil
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to set the board of a project?
Reply #7 - May 18th, 2018 at 2:02pm
Print Post  
Great thanks. Yes it tries to walk the line for all users. When you change board in arduino it changes for all projects but that is only useful for some people.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint