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 Intellisense not including required paths with Teensy 4.0 (Read 1218 times)
ShortCircuit
Newbies
*
Offline


Posts: 8
Joined: Nov 13th, 2022
Intellisense not including required paths with Teensy 4.0
Nov 18th, 2022 at 11:02pm
Print Post  
Using VM22 and visual studio 22 with a Teensy 4.0, intellisense cannot find specific functions or keywords, and underlines them with red squiggles. It appears to not be including some additional paths in the intellisense include directory. This code compiles, links, and runs properly. I have attached the build.txt

Here is the code snippet:
Code (C++)
Select All
#include <functional>

struct Event {
	std::function<void()> callback; //RED SQUIGGLES HERE
	void Fire() { callback(); } //RED SQUIGGLES HERE
};

Event action;

void setup() {
	Serial.begin(115200);
	action.callback = print;
}

void loop() {
	Serial.println("commanding fire");
	action.Fire();
}

void print() {
	Serial.println(" callback fired");
	delay(1000);
} 

  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense not including required paths with Teensy 4.0
Reply #1 - Nov 19th, 2022 at 2:49pm
Print Post  
I suspect this is related to the VC++ intellisense system the current version of Visual Micro uses. Microsoft C++ intellisense doesn't understand some gcc code.

If you download Visual Micro 2.0 and create a new project you should find that things work much better. The 2.0 version of Visual Micro uses the newer Microsoft Linux Workload for intellisense that understand gcc. We have also been able to take full advantage of that by implementing a new core discovery for the intellisense. This gives 99.9% accurate intellisense, a big difference.

You won't see any difference after you install Visual Micro 2.0 unless you delete or move the .vcxproj file from your code folder and then use "File>Open>Arduino Project" so that a new .vcxproj is created for you.

Going forward we won't use the Visual Studio desktop c++ workload. Instead we will only use the Linux Workload.

As you correctly point out, the build system uses the arduino specification and is unlrelated to the intellisense engine.

I hope this makes sense. 

Visual Micro 2.0 RC3 is available from the new releases board of this forum. It will be released to the gallery during the next week. We are currently completing some improvements for Teensy COM port discovery when you have installed the Arduino 2.0 version of Teensy. The version of Teensy you are using with 1x Arduino IDE is the same as the Arduino 2.0 but with com port discovery working. Therefore, don't change your Teensy config for this excercise just update Visual Micro and allow a new project (.vcxproj) to be created for your code. (We will be auto updating older projects in future releases)

  
Back to top
WWW  
IP Logged
 
ShortCircuit
Newbies
*
Offline


Posts: 8
Joined: Nov 13th, 2022
Re: Intellisense not including required paths with Teensy 4.0
Reply #2 - Nov 19th, 2022 at 4:32pm
Print Post  
Thanks for the detailed response! Unfortunately, there still appear to be a few issues though. 

I downloaded and installed Visual Micro 2.0 RC3, and created a new project from scratch. It appears to not find the ARM and ARM64 references in the .vcxproj.

Quote:
error : Designtime build failed for project 'C:\Users\Mike\Documents\Git\Arduino\TestProject\TestProject.vcxproj' configuration 'Debug|ARM'. IntelliSense might be unavailable.
     Set environment variable TRACEDESIGNTIME = true and restart Visual Studio to investigate.


Thank you for the help!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense not including required paths with Teensy 4.0
Reply #3 - Nov 22nd, 2022 at 12:18am
Print Post  
Hi, did it prompt you to install the Linux Workload? If not then it can be install via "Tools>Get Tools"
  
Back to top
WWW  
IP Logged
 
ShortCircuit
Newbies
*
Offline


Posts: 8
Joined: Nov 13th, 2022
Re: Intellisense not including required paths with Teensy 4.0
Reply #4 - Nov 22nd, 2022 at 12:31am
Print Post  
Thanks for the reply. It did not, I will go ahead and try that and report back!
  
Back to top
 
IP Logged
 
ShortCircuit
Newbies
*
Offline


Posts: 8
Joined: Nov 13th, 2022
Re: Intellisense not including required paths with Teensy 4.0
Reply #5 - Nov 22nd, 2022 at 1:52am
Print Post  
That appears to have solved my problems! Thank you very much, I appreciate the help!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint