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 errors with namespaces (Read 2241 times)
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Intellisense errors with namespaces
Mar 16th, 2021 at 10:05am
Print Post  
Hi, when using visual micro on my STM32 project the intellisense comes up with lots of red underlines when using namespaces. I'm using the latest vsmicro version. See image attached.

The attached image is of some namespaced references, the error shown is 
"name must be followed by :: must be a class or namespace name" when hovering over
"Maintenance_State::filesystem == nullptr" at line 32.

The error below the Serial3. reads as "Identifier Serial3 is undefined"

Cheers,
Richard
  

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


Posts: 2177
Joined: Feb 13th, 2019
Re: Intellisense errors with namespaces
Reply #1 - Mar 16th, 2021 at 10:07am
Print Post  
Thanks for the report.

Please attach the build log with the verbose and show build properties set as shown at the top of this page so we use the correct environment.
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Intellisense errors with namespaces
Reply #2 - Mar 16th, 2021 at 10:19am
Print Post  
Ok i have sent the Micro Build log to the email address at the top.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2177
Joined: Feb 13th, 2019
Re: Intellisense errors with namespaces
Reply #3 - Mar 16th, 2021 at 4:01pm
Print Post  
Thanks, would it be possible to ZIP and send the project over so we can investigate more easily?

A simple test example for the same configuration worked when I tried, and we will of course remove the project once the issue is resolved.
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Intellisense errors with namespaces
Reply #4 - Mar 17th, 2021 at 10:46am
Print Post  
Simon@Visual Micro wrote on Mar 16th, 2021 at 4:01pm:
Thanks, would it be possible to ZIP and send the project over so we can investigate more easily?

A simple test example for the same configuration worked when I tried, and we will of course remove the project once the issue is resolved.


Hi, i have created an example sketch that breaks the intellisense and sent it to the email address. Thanks!
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2177
Joined: Feb 13th, 2019
Re: Intellisense errors with namespaces
Reply #5 - Mar 18th, 2021 at 8:22am
Print Post  
Thanks for the detail and the files.

To help us investigate further, would it be possible to follow the below steps:  files after each process has been completed?

Pre Build Capture:
Create a new project, add the settings/code as normal, then press Save All.
(This should have the indicated working intellisense at this point)
Copy the sketchname.vcxproj File, and the __vm\.sketchname.vsarduino.h to another folder and ZIP

Post Build Capture:
Build the project, and when complete, press Save All.
(This should now have the broken intellisense)
Copy the sketchname.vcxproj File, and the __vm\.sketchname.vsarduino.h to another folder and ZIP

This will let us see in more detail what is going wrong with the intellisense after the build process.
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Intellisense errors with namespaces
Reply #6 - Mar 19th, 2021 at 9:39am
Print Post  
Simon@Visual Micro wrote on Mar 18th, 2021 at 8:22am:
Thanks for the detail and the files.

To help us investigate further, would it be possible to follow the below steps:  files after each process has been completed?

Pre Build Capture:
Create a new project, add the settings/code as normal, then press Save All.
(This should have the indicated working intellisense at this point)
Copy the sketchname.vcxproj File, and the __vm\.sketchname.vsarduino.h to another folder and ZIP

Post Build Capture:
Build the project, and when complete, press Save All.
(This should now have the broken intellisense)
Copy the sketchname.vcxproj File, and the __vm\.sketchname.vsarduino.h to another folder and ZIP

This will let us see in more detail what is going wrong with the intellisense after the build process.


Ok i've have sent the zip files to the email. Thanks!
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2177
Joined: Feb 13th, 2019
Re: Intellisense errors with namespaces
Reply #7 - Mar 19th, 2021 at 11:27am
Print Post  
Thanks again for the detail and we can now replicate this reliably as well.

If you change the board.txt entries as shown below does the issue improve?   
I believe we only override the {runtime.tools.arm-none-eabi-gcc.path} to get the GDB Debugging working, and this can be overridden for the specific debugger as shown below

Code
Select All
# Remove the below entry as it overrides too much of the toolchain, creating the intellisense issues
# }

# Add this: Override Just the Hardware Debugging tool to the XPack Version for the STLinkv2 (External) Debugger
tools.stlinkv2.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin 

  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Intellisense errors with namespaces
Reply #8 - Mar 21st, 2021 at 9:59am
Print Post  
Hi, thank you for solving the issue i think that board.txt edit fixed it.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint