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 How to configure the Arduino IDE? (Read 1710 times)
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
How to configure the Arduino IDE?
Jan 21st, 2023 at 11:54pm
Print Post  
Hi,

I have upgraded to windows to 11, because windows 7 was not working very well anymore. I have created a D drive where I want to place my project folder. These are the default paths...

Arduino project folder
C:\Users\User\Documents\Arduino

Visual Studio project folder
C:\Users\User\source\repos

Now how do I setup the project folder location to the data drive? In the past I did it like this...

Visual Studio project folder
D:\Documents\Software\Code\VisualStudio\2022

Arduino project folder
D:\Documents\Software\Code\VisualStudio\2022\Arduino

Arduino libraries folder
D:\Documents\Software\Code\VisualStudio\2022\Arduino\libraries

Esp framework folder (github extension download)
D:\Documents\Software\Code\VisualStudio\2022\Arduino\hardware\espressif\esp32

And it worked, only I had the annoying messages when I opened Arduino IDE "Lib can not be used by Arduino IDE", because they where manually installed or downloaded  But at least it worked.

Advantages
- Arduino IDE could download libs in the folder that can be used by Visual Micro.
- Arduino IDE could find the Github downloaded ESP framework, So it did work in Visual Micro too.

Q1. Now My question is how would you organize all those folders to get rid of the those messages when starting Arduino IDE and have all other things working?

I want to install esp framework manually according to this documentation.

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html

Q2. Do I need to set in the IDE config of Visual Micro the "Optional physical folder for downloaded boards packages to" D:\Documents\Software\Code\VisualStudio\2022\Arduino\hardware\ ?
« Last Edit: Jan 22nd, 2023 at 1:28pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to configure the Arduino IDE?
Reply #1 - Jan 22nd, 2023 at 1:38pm
Print Post  
In the arduino ide, file>preferences. Set the sketch book folder to "D:\Documents\Software\Code\VisualStudio\2022\Arduino"

Make sure that you have NOT set a sketch book folder in the Visual Micro IDE locations windows.

Settings the Arduino sketch book folder path means the following:-

  • Opening a project will show projects from the sketch book folder.
  • Downloading or using a custom library will use "[sketch book foler]/libraries"
  • Manually installed hardware would be found in "[sketch book foler]/hardware"


Visual Micro works the same as the Arduino IDE and uses the same settings. 

The doc in your link shows the [ARDUINO_SKETCHBOOK_DIR] in the paths. That means the sketch book book folder.

If you decide to change any paths in visual studio options they will only relate to which folder is shown when you add or open a project using the visual studio file>open commands. The visual micro "file open" commands use the sketch book folder to show a list of projects.

It doesn't matter where you open a project from. The important point is that the libraries and manually installed custom hardware will be found below the sketch book folder.

If using arduino 1x, then only enter the arduino ide 1x path when configuring visual micro IDE locations.

If using arduino 2x don't enter any paths, always configure the sketch book path in the arduino IDE. This means that both arduino and visual micro will use same configuration.


NOTE: It is not recommended to use manually installed board packages unless you are very clear about the libraries you will be using and the board package versions the libraries are designed for. Pulling the sources from github moves away from the "known" board package versions potentially causing difficult to solve compiler errors.
« Last Edit: Jan 22nd, 2023 at 4:50pm by Tim@Visual Micro »  
Back to top
IP Logged
 
The_Specialist
Full Member
***
Offline


Posts: 228
Joined: Jul 1st, 2020
Re: How to configure the Arduino IDE?
Reply #2 - Jan 25th, 2023 at 3:25pm
Print Post  
Currently I am using one Arduino IDE 2.0.6.

So I set the path in the IDE to the folder of the path on my D:\ partition.

Later on, if I install Arduino IDE 1.8.6... then I don't need to set the path anymore. Did I understand It right?

In visual micro I don't set the path.

Now, I don't use Arduino IDE, so what is the best way to download hardware or libraries quickly. Download in Visual Micro Explorer?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to configure the Arduino IDE?
Reply #3 - Jan 25th, 2023 at 3:29pm
Print Post  
If you use arduino 1 then you also need to set the sketchbook folder in the file>prefs

The only reason for using the arduino ide file>prefs is to avoid confusion. It means that both arduino and visual micro are using the same paths.

You can then use board manager and library manager in visual micro or the arduino ide.  The result will be the same.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint