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
Hot Topic (More than 8 Replies) Multiple IDE Locations for sa Arduino Version (Read 4217 times)
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Multiple IDE Locations for sa Arduino Version
May 31st, 2018 at 10:47am
Print Post  
Hi,
I have to develop some code using same Arduino IDE 1.6/1.8 but different Libraries and Board version.
Is it possible to add an additional item to IDE list in order to use same Arduino IDE and different libraries?

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple IDE Locations for sa Arduino Version
Reply #1 - May 31st, 2018 at 10:56am
Print Post  
Hi,

There are various solutions for this.

One solution is to use the new Arduino 1.9 entry in the Visual Micro apps list. It currently works the same as 1.6-1.8.

You can also copy the IDE libraries below each hardware/platform folder so that different board architectures have their own libraries. Libraries in this location take priority. Both Visual Micro and the Arduino IDE support this option.

Visual Micro projects also support shared libraries which can exist in any location and are not bound by the usual folder location rules.

You can also copy libraries into "[project]/_micro-api/libraries" and then include them in your project like normal code. Visual Micro will detect these libraries in this special location and build them as libraries not project code. This option means that your project has its own libraries.

Does this make sense? What boards are you using?
  
Back to top
WWW  
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #2 - May 31st, 2018 at 12:01pm
Print Post  
Tim@Visual Micro wrote on May 31st, 2018 at 10:56am:
Hi,

There are various solutions for this.

One solution is to use the new Arduino 1.9 entry in the Visual Micro apps list. It currently works the same as 1.6-1.8.

You can also copy the IDE libraries below each hardware/platform folder so that different board architectures have their own libraries. Libraries in this location take priority. Both Visual Micro and the Arduino IDE support this option.

Visual Micro projects also support shared libraries which can exist in any location and are not bound by the usual folder location rules.

You can also copy libraries into "[project]/_micro-api/libraries" and then include them in your project like normal code. Visual Micro will detect these libraries in this special location and build them as libraries not project code. This option means that your project has its own libraries.

Does this make sense? What boards are you using?


Hi,
all your solutions make sense. I try to detail better what I need.
I use ESP boards with Arduino ESP Core.
I need to develop some code with  ESP Core 2.3.0 and a library in version 1.1, and i need to develop some other code with ESP Core 2.4.0 and a library in version 2.0

How can I achieve this?

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple IDE Locations for sa Arduino Version
Reply #3 - May 31st, 2018 at 12:03pm
Print Post  
Do you have two different projects, one for each board? Are both boards you have the same name in the boards list?
« Last Edit: May 31st, 2018 at 12:05pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #4 - May 31st, 2018 at 12:29pm
Print Post  
Tim@Visual Micro wrote on May 31st, 2018 at 12:03pm:
Do you have two different projects, one for each board? Are both boards you have the same name in the boards list?


Hi,
I can split the project, and yes, boardname is the same in the list.

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple IDE Locations for sa Arduino Version
Reply #5 - May 31st, 2018 at 12:35pm
Print Post  
Okay this is not a question of libraries but a question of using two different tool chains for exact same board.

Visual Micro does not currently support that. It would mean saving a specific toolchain version to the project but most users expect the toolchain of projects to auto upgrade/change when a new toolchain is installed. Therefore this would be very confusing for most less experienced users.

Esp is the only one that needs this because it is in a state of flux.

I expect we will provide a facility over the next few months where you will have the option to clearly define how you want to work.

  
Back to top
WWW  
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #6 - May 31st, 2018 at 12:59pm
Print Post  
Hi,
many thanks for clarification and quick support.

Marco
  
Back to top
 
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #7 - May 31st, 2018 at 2:48pm
Print Post  
Hi,
I created in my Project a folder called

/_micro-api/libraries 

inside I copied my library's folder so full path is 

[progect]/_micro-api/libraries/souliss

I also have a /souliss folder in default libraries in arduino sketch path.
As I understood libraries in [progect]/_micro-api/libraries/ should ovveride the one in arduino sketch's folder.

I open the project and using Library manager provided with visual micro I checked that souliss library is loaded from Arduino sketch's folder and not from [progect]/_micro-api/libraries/

Can you help me?

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple IDE Locations for sa Arduino Version
Reply #8 - May 31st, 2018 at 3:13pm
Print Post  
Hi,

Have you actually included the _micro-api folder in the project? This is different to physically copying the library in window explorer.

In the IDE solution explorer > Right click "Include in project"
  
Back to top
WWW  
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #9 - May 31st, 2018 at 3:23pm
Print Post  
Tim@Visual Micro wrote on May 31st, 2018 at 3:13pm:
Hi,

Have you actually included the _micro-api folder in the project? This is different to physically copying the library in window explorer.

In the IDE solution explorer > Right click "Include in project"


Hi, I have VS 2015, if I right click in Solution Explorer I do not have "Include in project" but I have a Add Option with some intems inside, but not Include option.
Do you have a screenshoot where I can find this?
And what I have to include /_micro-api or /_micro-api\libraries ??

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple IDE Locations for sa Arduino Version
Reply #10 - May 31st, 2018 at 3:26pm
Print Post  
Under _micro-api\libraries you put  Arduino libraries. It works the same as documents\arduino\libraries or arduinoide/libraries. each sub folder below \libraries is a library.

You have to right click a file or folder to see the menu option. Show screen shot of the right mouse menu. Leave mouse over whatever you clicked so we can know what you clicked as well as see the menu

  
Back to top
WWW  
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #11 - May 31st, 2018 at 3:30pm
Print Post  
Hi attached a screenshoot of my Solution Explorer view.
I Cannot see the folder I created in file explorer.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #12 - May 31st, 2018 at 3:34pm
Print Post  
Here is the menu I see
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple IDE Locations for sa Arduino Version
Reply #13 - May 31st, 2018 at 3:36pm
Print Post  
Ah. 

There are two views of the solution explorer. You are viewing only the "File includes in the project". This is why you can not see the _micro-api folder.

Click the small icon above the solution explorer called "Show all files". Then things will make more sense.

If you added the _micro-api folder and have not reopened the project then click the little Refresh button above the solution explorer to make it re-read the files on disk.

  
Back to top
WWW  
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #14 - May 31st, 2018 at 3:52pm
Print Post  
Hi,
now _micro-api is included in project, but souliss library is always loaded from Arduino Sketch's folder
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple IDE Locations for sa Arduino Version
Reply #15 - May 31st, 2018 at 4:17pm
Print Post  
Please close the Micro Explorer it does not have any bearing on this discussion

Have you tried a build?

Do you have _micro-api\libaries\libName in your project and on disk?
« Last Edit: May 31st, 2018 at 4:18pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marco2
Junior Member
**
Offline


Posts: 48
Joined: Feb 1st, 2013
Re: Multiple IDE Locations for sa Arduino Version
Reply #16 - May 31st, 2018 at 7:59pm
Print Post  
Hi,
I enabled Compiler's Verbose Debug ah it seems souliss librare are loaded from /_micro-api forlder

Code
Select All
Library Include Paths (5)
Include Path 6\2.3.0-rc2\libraries\ArduinoOTA'
Include Path 6\2.3.0-rc2\libraries\EEPROM'
Include Path 6\2.3.0-rc2\libraries\ESP8266mDNS'
Include Path 6\2.3.0-rc2\libraries\ESP8266WiFi\src'
Include Path 03_SMD\_micro-api\libraries\souliss'

Building variant ... 



Many thanks for help and your availability

Kindly Regards
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint