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 Solution using multiple (different) boards (Read 3360 times)
Bas
Junior Member
**
Offline


Posts: 50
Joined: Feb 20th, 2017
Solution using multiple (different) boards
May 9th, 2017 at 8:58pm
Print Post  
as it turns out we will not be able to fit all functionality we want into one Arduino Mega, and are looking for a setup where we split functionality across multiple boards, i.e. one Mega for sensor reading and actuator control, and one ESP to master the overall functinality and Nextion communication. These boards will be communicating through the I2C bus where the ESP is master that will get the wanted sensor values from or send actuator command to the Mega.

The projects for both boards will rely heavily on the framework we have already created in our own library.

Can I create ONE solution in VisualStudio where both board projects and the library are included or do I need to create TWO solution files, forcing me to switch regularly between the solutions?
  
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 9th, 2017 at 9:08pm
Print Post  
Under normal circumstances a single solution is fine. Two or more projects, each using their own boards and therefore their own libraries. 

Visual Micro will retain the board for each project when it sees you want to use different boards. So you can add multiple projects, click each one and set the board. Then when you switch between the code the board will automatically change.

Slightly related information

If you are using "shared source code projects" they are cross-platform and do not have a board. The board for intellisense is taken from the current "Startup Project".

If you have a library project it also will be cross-platform and the board for intellisense is taken from the "Startup  project". You can follow the Arduino library design rules to implement cross-platform architecture in custom library (s).

All shared and library projects automatically change platform during compilation.

Consideration

Debugging both boards at the same time will require separate solutions. Keep in mind the solution doesn't retain any build info so you can have as many as you want all containing the same projects.
  
Back to top
WWW  
IP Logged
 
Bas
Junior Member
**
Offline


Posts: 50
Joined: Feb 20th, 2017
Re: Solution using multiple (different) boards
Reply #2 - May 9th, 2017 at 9:15pm
Print Post  
Good to hear that the board selection is project related and not solution related.
It will of course be a challenge in terms of selecting the right startup project before compiling and uploading Wink

Would it be possible to attach both boards to different usb ports (com ports) and have the selection of startup project determine which sketch to upload via the set com-port?

Is it possible to have multiple instances of Visual Studio running, debugging on different ports?
  
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 9th, 2017 at 9:20pm
Print Post  
The answer to all questions is yes.

You only need to switch the startup project if you need the intellisense to change in shared project code (not normal projects) or if you want to use the standard visual studio start commands to compile and upload or short cut keys such as F5.

The visual micro project tool bar and vMicro menu work independently of the startup project, they treat the active code as the project you want to compile and or upload. That's the only difference between the two sets of commands.
« Last Edit: May 9th, 2017 at 9:23pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Solution using multiple (different) boards
Reply #4 - May 17th, 2018 at 3:54pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint