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
Intellisense ignores boundaries (Read 2689 times)
Arecon
Junior Member
**
Offline



Posts: 39
Intellisense ignores boundaries
Jul 4th, 2017 at 10:57am
 
Hi
I have a solution with 5 projects which are to be compiled for different microcontrollers. Unfortunately the intellisense function always offers me variables and macros from all of these projects regardless of their availability in the current project. Is it possible to improve this?

I just saw that intellisense even offers defines for controller types not even used in the whole solution.

I'm in a project compiled for ATtiny828.
When I type "POR" intellisense offers "PORTB0". I accept this and select "Goto implementation" from the context menu. Then the file "iom328p.h" ist opened. This file is only relevant for ATmega328p which is not used anywhere in my solution.


Best Regards
Arecon
Back to top
« Last Edit: Jul 4th, 2017 at 9:04pm by Arecon »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10560
United Kingdom
Re: Intellisense ignores boundaries
Reply #1 - Jul 5th, 2017 at 12:03am
 
Yes I agree that the Atmel Studio intellisense isn't very accurate. Vs handles this much better and also shows disabled code better.
Back to top
 
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline



Posts: 39
Re: Intellisense ignores boundaries
Reply #2 - Aug 20th, 2017 at 1:30am
 
Does that mean that Visual Micro in conjunction with Visual Studio Community Edition provides a better Intellisense functionality than Visual Micro and Atmel Studio?

Would you recommend using Visual Studio Community Edition instead of Atmel Studio in general?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10560
United Kingdom
Re: Intellisense ignores boundaries
Reply #3 - Aug 20th, 2017 at 1:07pm
 
It depends. They both have good and bad points.

You haven't said which board you are using maybe we just have an issue with the wrong type of project for your board. Atmel has two different project types, one for 8 bit and one for 32 bit.

So which board are you using? I can be more specific about the issue with this info.
Back to top
« Last Edit: Aug 20th, 2017 at 1:08pm by Visual Micro »  
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline



Posts: 39
Re: Intellisense ignores boundaries
Reply #4 - Aug 20th, 2017 at 4:02pm
 
I'm using Arduino Due and barebone ATTiny828 without bootloader in my project.

When I'm in a file belonging to an Arduino Due project Intellisense offers me "PORTB" which comes from the file:
C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\avr\iomxx0_
1.h

For now Intellisense has stopped offering me keywords from completely unrelated libraries.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10560
United Kingdom
Re: Intellisense ignores boundaries
Reply #5 - Sep 1st, 2017 at 10:57pm
 
1) fyi
Is the Due project open in the same solution as an arduino 328/avr project? Atmel certainly won't handle that properly you just see a list of everything it might possibly know about. That's what atmel studio does.

2) question
If you right click project > properties you should see the standard atmel studio properties pages. Which device shows as being selected in that window?
Back to top
 
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline



Posts: 39
Re: Intellisense ignores boundaries
Reply #6 - Sep 2nd, 2017 at 11:22pm
 
Visual Micro wrote on Sep 1st, 2017 at 10:57pm:
1) fyi
Is the Due project open in the same solution as an arduino 328/avr project? Atmel certainly won't handle that properly you just see a list of everything it might possibly know about. That's what atmel studio does.

Would this behavior be better with Visual Micro and Visual Studio instead of Atmel Studio?

Quote:
2) question
If you right click project > properties you should see the standard atmel studio properties pages. Which device shows as being selected in that window?

For the Arduino Due project "ATSAM3X8E" is selected, for the ATTiny828 Project "Atmega2560" is selected. I know that this selection is wrong but when I corrected it some time ago it seemed to change back several times. Later I started ignoring that because you wrote in the documentation that this settings page is not used by Visual Micro.

Arecon
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10560
United Kingdom
Re: Intellisense ignores boundaries
Reply #7 - Sep 2nd, 2017 at 11:36pm
 
Okay well that shows the correct project types are being used for each architecture.

For avr, the mega will show in the native atmel project properties if visual micro thinks that it can't match the selected board to a known atmel processor. Atmel shows some annoying error dialogs if we don't be careful in this area. I will try to add better resolution because I think we can't match the tiny better.

As for the difference between the ide's.... You can run vs 2017 side by side with atmel studio so can try it out.

Personally I find visual studio much better in this area although I haven't spent much time testing vs2017 yet. Vs2013 and vs2015 were certainly good. 2017 seems okay to me so far. The different vs versions are slightly different.

Atmel studio handles assembler and gcc code better than visual studio so depending on the depth of your coding you might find atmel better.

Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print