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) Intellisense fails to locate Teensy core libraries (Read 6284 times)
polwel
Newbies
*
Offline


Posts: 7
Joined: Jan 28th, 2018
Intellisense fails to locate Teensy core libraries
Jan 28th, 2018 at 2:40pm
Print Post  
Intellisense fails to locate the Teensy core header files.

For example, the following sketch builds fine, but Intellisense cannot resolve "Arduino.h".

Code (C++)
Select All
#include "Arduino.h"

void setup() {
}

// the loop function runs over and over again until power down or reset
void loop() {
}
 



I am aware that in the above case including Arduino.h is redundant, but consider additional header files which do need to import it.

I'd really like to use Intellisense to navigate the core libraries quickly.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #1 - Jan 28th, 2018 at 3:14pm
Print Post  
I can look into it but please always say which board you are using because the cores change a lot.
  
Back to top
WWW  
IP Logged
 
polwel
Newbies
*
Offline


Posts: 7
Joined: Jan 28th, 2018
Re: Intellisense fails to locate Teensy core libraries
Reply #2 - Jan 28th, 2018 at 3:17pm
Print Post  
Wow, that's what I call a speedy response!

Teensy 3.2.

I guess it should be the same for any board with the teensy3 core.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #3 - Jan 28th, 2018 at 3:21pm
Print Post  
It's working okay for me so let's investigate some things

If this is a new project have you clicked build yet? That always refreshes the intellisesne if it has changed.

Switching to a different board and back again or clicking save on the main .ino file or adding a library etc also refreshes intellisense.

If you type Serial. into the code and then click it and press F12. Does that take you to the teensy usb code?

  
Back to top
WWW  
IP Logged
 
polwel
Newbies
*
Offline


Posts: 7
Joined: Jan 28th, 2018
Re: Intellisense fails to locate Teensy core libraries
Reply #4 - Jan 28th, 2018 at 3:31pm
Print Post  
I had built the project before.

Refreshing Intellisense by changing the board and back, and then rebuilding, does not help.

For your example, yes, that is working, though rather than directly jumping to the source file, it opens the 'Find Symbol' tool box. I guess that's what you are referring to, right?

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #5 - Jan 28th, 2018 at 4:20pm
Print Post  
That's not right and you should not need the arduino.h #include. 

Can you please zip and email your .vcxproj file to info[at]visualmicro.com

Which version of arduino ide?
Which version of teensy?
Which vs ide?

« Last Edit: Jan 28th, 2018 at 4:21pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
polwel
Newbies
*
Offline


Posts: 7
Joined: Jan 28th, 2018
Re: Intellisense fails to locate Teensy core libraries
Reply #6 - Jan 28th, 2018 at 4:46pm
Print Post  
I sent you the project.

I am using the newest version of Arduino, Teensyduino, VS and Visual Micro.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #7 - Jan 28th, 2018 at 6:08pm
Print Post  
Thanks, yes it has found the core Serial library

What libraries are you unable to see?

The arduino.h is not needed however you can add it #include <Arduino.h> if you really want to.

I assume that resolves okay?
  
Back to top
WWW  
IP Logged
 
polwel
Newbies
*
Offline


Posts: 7
Joined: Jan 28th, 2018
Re: Intellisense fails to locate Teensy core libraries
Reply #8 - Jan 28th, 2018 at 9:35pm
Print Post  
Sorry, I realize I must have been unclear about my problem.  Let me try to state it more clearly.

I do see symbols from the header files, but I cannot follow the includes themselves. I would like to right-click an #include, click 'Goto definition' (or hit F12), but instead I just get an error message, that the corresponding symbol's definition cannot be located.

This seemed odd to me, since Intellisense does suggest the header files' names when typing #include, and it is able to see the contents. It just fails to open the corresponding file when I try to follow an include statement.

AFAICT, all the libraries are affected.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #9 - Jan 28th, 2018 at 11:37pm
Print Post  
Okay its possible some deep toolchain path needs to be updated for intellisense.

Can you give examples of some symbols you are clicking and from where

Thanks

ps: core shows more easily if you click vmicro>toggle hidden files but that is the arduino core not the architecture core.
« Last Edit: Jan 28th, 2018 at 11:39pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
polwel
Newbies
*
Offline


Posts: 7
Joined: Jan 28th, 2018
Re: Intellisense fails to locate Teensy core libraries
Reply #10 - Jan 29th, 2018 at 6:03am
Print Post  
For instance #include <Arduino.h>. Ctrl+click on Arduino.h, I get the error message, instead of being taken to the file. It seems to be the same with any core header file.

EDIT: I am doing this from the main *.ino file. IIRC, I tested it from other headers, and it did not work either.

Also, 'Toggle hidden files' does show me the Teensy source files.
« Last Edit: Jan 29th, 2018 at 6:05am by polwel »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #11 - Jan 29th, 2018 at 1:26pm
Print Post  
please switch on "vmicro>compiler>verbose" and also "vmicro>compiler>show build properties". Then build and copy the output into a .txt file. 

Then email the .txt along with a link to this post to info[at]visualmicro.com

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #12 - Jan 29th, 2018 at 1:41pm
Print Post  
Please switch on vmicro>compiler>verbose and also "show build properties"

Then build and email the output as .txt to info[at]visualmicro.com.

+ Put a link to this post in the email

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #13 - Jan 29th, 2018 at 2:48pm
Print Post  
The arduino.h should be resolved, I only suggested removing it because it is not required

I am struggling to reproduce this issue. Please give screen shot showing the arduino.h failing to be resolved and also zip and email the following

1) switch on vmicro>compiler>verbose and also "show build properties". Build and then copy the output to a .txt file then email along with zip of a simple project that has had a build.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense fails to locate Teensy core libraries
Reply #14 - Jan 29th, 2018 at 6:59pm
Print Post  
I think you are confused about what you are trying to do.

You have highlighted the word "Arduino" and pressed F12 or GoTo Definition. The message you see if correct because a symbol called "Arduino" does not exist.

It is incorrect to attempt to GoTo the definition of a header file. It does make make sense. 

Instead you must right click header file includes and select "Open Document"

You can only use GoTo Definition for symbols, methods etc. that have a definition.

These features are the standard operation of Visual Studio.

  

Please Register or Login to the Forum to see File Attachments
Back to top
WWW  
IP Logged
 
polwel
Newbies
*
Offline


Posts: 7
Joined: Jan 28th, 2018
Re: Intellisense fails to locate Teensy core libraries
Reply #15 - Jan 30th, 2018 at 7:31am
Print Post  
Argh, no.

Sorry, I was not remembering that VS does actually have different commands for this... QtCreator and CLion just use the same shortcut (Ctrl+Click) for following symbols, including filenames.

Anyway, my mistake, sorry for bothering you. And thanks for your great work.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint