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 No such file or directory. vMicro only, Arduino IDE compiles fine. (Read 1534 times)
Kristof
Newbies
*
Offline


Posts: 3
Joined: Dec 27th, 2019
No such file or directory. vMicro only, Arduino IDE compiles fine.
Dec 27th, 2019 at 1:53pm
Print Post  
Hello,

I used vMicro before with Arduino projects, with no issues.
Recently I installed ESP32 and I try to compile a pretty basic example (see code below).
The Arduino IDE is installed in 'c:\arduino', this is also configured correctly. 
The optional fields in the "IDE locations" are left blank.
The deep search is also enabled.


Bare minimum examples compile fine (i.e.blink).
The advanced blink that I found  (uses 'Ticker.h') does not compile, because it cannot resolve the header file.

Like the title indicates I have no problem compiling with Arduino IDE.

When I look at the gcc comand, the path where the libraries are located, is included as an argument (i.e. -I"[path to libraries]" ). 

Maybe you can see something that I overlooked?


Thanks.
Kristof

Code (C++)
Select All
#include <Arduino.h>
#include <Ticker.h>

// attach a LED to pPIO 21
#define LED_PIN 21

Ticker blinker;
Ticker toggler;
Ticker changer;
float blinkerPace = 0.1;  //seconds
const float togglePeriod = 5; //seconds

void change() {
	blinkerPace = 0.5;
}

void blink() {
	digitalWrite(LED_PIN, !digitalRead(LED_PIN));
}

void toggle() {
	static bool isBlinking = false;
	if (isBlinking) {
		blinker.detach();
		isBlinking = false;
	}
	else {
		blinker.attach(blinkerPace, blink);
		isBlinking = true;
	}
	digitalWrite(LED_PIN, LOW);  //make sure LED on on after toggling (pin LOW = led ON)
}

void setup() {
	pinMode(LED_PIN, OUTPUT);
	toggler.attach(togglePeriod, toggle);
	changer.once(30, change);
}

void loop() {

}


 


  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No such file or directory. vMicro only, Arduino IDE compiles fine.
Reply #1 - Dec 27th, 2019 at 2:00pm
Print Post  
Thanks for the info. I am unsure if the ticker.h is a library or core. To make life a bit easier please do the following.

Ensure that file>preferences "compiler verbose" is enabled in the arduino ide and then post the arduino ide output after building the project with ticker.h. 

Thanks
  
Back to top
IP Logged
 
Kristof
Newbies
*
Offline


Posts: 3
Joined: Dec 27th, 2019
Re: No such file or directory. vMicro only, Arduino IDE compiles fine.
Reply #2 - Dec 27th, 2019 at 2:21pm
Print Post  
Thank you for the quick response.
I compiled with verbose and attached the output.

Thanks
  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No such file or directory. vMicro only, Arduino IDE compiles fine.
Reply #3 - Dec 27th, 2019 at 5:02pm
Print Post  
Ah you have two copies of the esp32 core installed. The arduino ide is using the one you installed manually into documents\arduino\hardware and visual micro is using the board manager version. The board manager version does not have the Ticker library.

If you delete the board manager version then click Rescan tool chains or restart the ide that should resolve. The easiest way to delete the board manager version is to delete this folder:-

c:\Users\Kristof\AppData\Local\arduino15\packages\esp32
  
Back to top
IP Logged
 
Kristof
Newbies
*
Offline


Posts: 3
Joined: Dec 27th, 2019
Re: No such file or directory. vMicro only, Arduino IDE compiles fine.
Reply #4 - Dec 27th, 2019 at 6:14pm
Print Post  
Thanks for looking at this problem.
Both locations contained the Ticker.h file.

However, I followed the instructions and deleted the folder, but it still doesn't compile.
I continued to compile in VS and Arduino IDE and attach the logs here.

What I did (after deleting the folder):
- Rescan tool chains
- Restart IDE
- clean solution / rebuild
- switch between release/debug

When I switch to release and build, the IDE looses intellisense (for classes inside ticker.h).
When I go back to debug, intellisense returns. 
Build has no effect in debug on intellisense.

Do you have other ideas?
  

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


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: No such file or directory. vMicro only, Arduino IDE compiles fine.
Reply #5 - Dec 27th, 2019 at 6:36pm
Print Post  
Ah sorry I didn't realize that "Deep search" was missing from the output. Please switch on vMicro>Compiler>Deep search for libraries". The default should be on.
  
Back to top
IP Logged
 
Kristof
Newbies
*
Offline


Posts: 3
Joined: Dec 27th, 2019
Re: No such file or directory. vMicro only, Arduino IDE compiles fine.
Reply #6 - Dec 27th, 2019 at 9:43pm
Print Post  
I'm not sure how you can see that in the output, but Deep Search was on all the time.
I mention that in my first post.
On/off doesn't make a difference, it cannot resolve the library.

Do you see something what makes you think deep search is off?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint