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
grbl_controller_esp32 No Compiling (Read 334 times)
Simon Hopkinson
Administrator
*****
Offline



Posts: 43
grbl_controller_esp32 No Compiling
Sep 24th, 2019 at 4:33pm
 
Project: https://github.com/mstrens/grbl_controller_esp32
Arduino: 1.8.10
Additional Libraries: SdFat (SdFat_-_Adafruit_Fork version 1.2.1)
All other libraries  in the project, in the TFT_eSPI_ms folder.


Currently we are trying to replicate this but cannot get as far in the compilation process.

Can you attach the output from the Arduino IDE with the verbose compilation enabled so we can investigate further?

If you can confirm any other alterations made to this project or libraries (or supply as a ZIP) it would be help us recreate this issue.
Back to top
 
 
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #1 - Sep 24th, 2019 at 7:00pm
 
Ok did not make changes to the project.
Two files result of compilation Arduino ide (1.8.9 and 1.8.10)
With respect
Back to top
 

ArduinoIDE_1_8_9.txt (1152 KB | 3 )
 
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #2 - Sep 24th, 2019 at 7:07pm
 
Arduino 1.8.10
Back to top
 

ArduinoIDE_1_8_10.txt (1154 KB | 3 )
 
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #3 - Sep 25th, 2019 at 5:07am
 
And this is the result of compiling Vsmicro
The project is the same, without changes.
Back to top
« Last Edit: Sep 25th, 2019 at 7:41am by gelius59 »  

Vs_micro__002.txt (599 KB | 2 )
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #4 - Sep 26th, 2019 at 11:44pm
 
Thanks for the report. This is resolved in Visual Micro 1909.26 and is due to the fact that Arduino IDE 1.8.10 no longer provides Ide\Hardware\Platform.txt for default deep library search settings.

The latest version of Visual Micro is available here but will shortly be published to the Microsoft Gallery
Back to top
« Last Edit: Sep 26th, 2019 at 11:45pm by Visual Micro »  
WWW  
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #5 - Sep 27th, 2019 at 4:39am
 
Checked the new version of Vs_micro 1909.26.1
Compilation error, remained
Button.cpp: 5: 1: error: 'TFT_eSPI_Button' does not name a type
  TFT_eSPI_Button *: TFT_eSPI_Button (void) {
 
Button.cpp: 10: 6: error: 'TFT_eSPI_Button' has not been declared
  void TFT_eSPI_Button *: initButton (
 
Button.cpp: 11: 2: error: variable or field 'initButton' declared void
    TFT_eSPI * gfx, int16_t x, int16_t y, uint16_t w, uint16_t h
 
Button.cpp: 11: 2: error: 'TFT_eSPI' was not declared in this scope
 
Button.cpp: 11:12: error: 'gfx' was not declared in this scope
    TFT_eSPI * gfx, int16_t x, int16_t y, uint16_t w, uint16_t h

Arduino ide 1.8.10 compiles Ok

Vs micro 1909.26.1 error

Compilation results, attached
With respect
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #6 - Sep 27th, 2019 at 7:35am
 
Your project has a lot of source code that is not for arduino. When you opened the project for the first time visual micro added the sources to the project in visual studio by mistake.

An arduino project should have source code only in main project folder and in folders below a folder called \src.

The compile errors are in NON arduino sources. This project has only a handful of arduino source code in the project folder.

Please right click and remove/exclude all folders from below the project leaving just the project sources.

The it will build ok. Arduino is ignoring all the sources in the sub folders but because they have veen included in the VS project Visual Micro is trying to compile them.

To easily see the folders to remove click the small icon above the solution explorer called "Show all files". Then right click "Exclude" all folders.

This image shows the VALID files from the project folder only.

Visual Micro will be updated to ignore all invalid sources when opening a project. For example, the TFT_eSPI_Button sources should NOT be compiled, they are not for Arduino.
Back to top
 

gbrl.png (18 KB | 0 )
gbrl.png
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #7 - Sep 27th, 2019 at 7:35am
 
Your project has a lot of source code that is not for arduino. When you opened the project for the first time visual micro added the sources to the project in visual studio by mistake.

An arduino project should have source code only in main project folder and in folders below a folder called \src.

The compile errors are in NON arduino sources. This project has only a handful of arduino source code in the project folder.

Please right click and remove/exclude all folders from below the project leaving just the project sources.

The it will build ok. Arduino is ignoring all the sources in the sub folders but because they have veen included in the VS project Visual Micro is trying to compile them.

To easily see the folders to remove click the small icon above the solution explorer called "Show all files". Then right click "Exclude" all folders.

This image shows the VALID files from the project folder only.

Visual Micro will be updated to ignore all invalid sources when opening a project. For example, the TFT_eSPI_Button sources should NOT be compiled, they are not for Arduino.
Back to top
 

gbrl_001.png (18 KB | 0 )
gbrl_001.png
WWW  
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #8 - Sep 27th, 2019 at 11:07am
 
Hello
Tim
I understood you.
Such a decision is inconvenient for work.
I will wait when you fix it in Visual micro.
Please let me know how this will be done.
Maybe you can add in the settings the ability to compile strictly, exactly according to the rules
Arduino ide.
That would be a good decision.
If of course, it is possible.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #9 - Sep 27th, 2019 at 11:54am
 
Hi

I do not think I explained well. You do not understand.

When create project Visual Micro accidentally added files that should not be in the project.

You need to EXCLUDE them. See picture.

Back to top
« Last Edit: Sep 27th, 2019 at 11:54am by Visual Micro »  
WWW  
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #10 - Sep 27th, 2019 at 12:35pm
 
Tim
I understood.
But you can fix it so that files are not added by accident.
Like this, does the native Arduino Ide?
According to her rules!
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #11 - Sep 27th, 2019 at 12:40pm
 
Yes agree, for new projects Visual Micro should not add the unwanted files to the project. That will be  fix in Visual Micro.

Please confirm this project is now building correctly for you after you have right click "Exclude" the TFT_eSPI_ms folder?
Back to top
 
WWW  
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #12 - Sep 27th, 2019 at 12:43pm
 
Tim
Sorry, I'm at work.
The project is located at home.
Result later
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #13 - Sep 27th, 2019 at 1:56pm
 
Great thanks, it builds okay for me now but you do need Visual Micro 1909.26.3 for Arduino 1.8.10.

There were two issues with this project 1) TFT_eSPI_ms folder should not be in project 2) Arduino 1.8.10 changed the way deep search for libraries work.

No 2) required the latest update

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #14 - Sep 27th, 2019 at 4:23pm
 
I found there is already an option to control if all folders are discovered or just the arduino compatible folders.

Tools>Options>Compile all folders

The default was true but should have been false. In the 1909.27 release the default has been changed to false. This means that creating a new project with the grbl code will now compile 1st attempt.
Back to top
« Last Edit: Sep 27th, 2019 at 4:23pm by Visual Micro »  
WWW  
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #15 - Sep 27th, 2019 at 5:16pm
 
Sorry
Tim
Link does not work
Download 1909.27
And for the version
Visual Micro 1909.26.3
Tools> Options> Compile all folders
I can not find where it is?
It is possible in more detail, I'm sorry I'm already starting to slow down. Embarrassed
Back to top
« Last Edit: Sep 27th, 2019 at 5:17pm by gelius59 »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #16 - Sep 27th, 2019 at 5:23pm
 
Sorry the link is repaired now.
Back to top
 
WWW  
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #17 - Sep 27th, 2019 at 5:48pm
 
Wow
Successfully with version 1909.27
But even so, where is Tim
Tools> Options> Compile all folders
I can not find, can I have a picture?
Back to top
« Last Edit: Sep 27th, 2019 at 6:02pm by gelius59 »  

2019-09-27__2_.png (63 KB | 0 )
2019-09-27__2_.png
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: grbl_controller_esp32 No Compiling
Reply #18 - Sep 27th, 2019 at 6:13pm
 
You are right the property was not exposed to the UI. 1909.27.1 is available in the forum releases that exposes the property

Tools>Options>Visual Micro>Allow Code in Any Subfolder

It is not recommended for use and might cause a lot of issues in the future. For example if Arduino add support for a local "Libraries" folder it is possible that some people will have created their own folder called Libraries and that would have to be ignored and compiled as real libraries (not part of the project code).

Highly recommend Arduino IDE compatibility using only the following folder structure:-

Project Folder
Project Folder\src
Project Folder\src\......
Back to top
 
WWW  
IP Logged
 
gelius59
Junior Member
**
Offline



Posts: 79
Ukraine
Re: grbl_controller_esp32 No Compiling
Reply #19 - Sep 27th, 2019 at 6:34pm
 
Thanks Tim
Now everything works, great
I tried
Vsmicro+Arduino Ide 1.8.10 Ok Compiling
Vsmicro+Arduino Ide 1.8.9 Ok Compiling
Thanks again
With respect
Back to top
« Last Edit: Sep 28th, 2019 at 1:27am by gelius59 »  
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print