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
Very Hot Topic (More than 25 Replies) Intellisense issues with Arduino DUE and VS2013 (Read 33149 times)
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Intellisense issues with Arduino DUE and VS2013
Jun 2nd, 2016 at 2:02pm
Print Post  
Is there any way to fix intellisense in VS 2013? I am working with Arduino DUE, and it appears none of the PORT/Register names are known, for example, PIOA/PIOC etc PMC also, I am new to Visual Micro but it is not inspiring to have a screen full of red blobs for a project that compiles and works fine in the Arduino IDE!  Sad

Regards,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #1 - Jun 2nd, 2016 at 2:51pm
Print Post  
I'll take a look thanks.

Microsoft have been changing the intellisense system so tend to test more with vs2015 these days. Having said that it's never been 100% perfect because we rely on vs c++ for intellisense. 

Good news is that Microsoft have released support for clang (as opposed to windows c++) which means intellisense will just work without my having to massage it every few months Smiley
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #2 - Jun 2nd, 2016 at 3:06pm
Print Post  
I am in the process of downloading VS2015, but I guess that will bring it's own problems too.

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #3 - Jun 2nd, 2016 at 5:25pm
Print Post  
I can't promise it will be any different but might well be
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #4 - Jun 2nd, 2016 at 8:30pm
Print Post  
So after gloriously wasting 2 hours installing 2015, nothing changes....

Enclosed is a zip with a sketch, compiler output, and screen shot of intellisense errors.  

Hope you can do something because I have a project that will require the debug features, but not looking good so far...  Cry

Regards,

Graham
« Last Edit: Jun 2nd, 2016 at 8:31pm by ghlawrence2000 »  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #5 - Jun 2nd, 2016 at 8:48pm
Print Post  
Thanks for the info. 

I have replicated with the latest arduino sam core (1.6.9) and will look into it.

Hopefully there will be an update during the next week or so.

In the meantime you can right click the "error list" and switch off show intellisense errors which will at least let you see clear and accurate errors after a build. You will still see the annoying squiggles.

In the meantime if you are inclined to fool the intellisense system there is a post here that explains how to make dummy values by using the #define(MSC_VER) condition in a dummy .h

http://www.visualmicro.com/page/Extending-Visual-Studio-Intellisense.aspx

Thanks for the report.
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #6 - Jun 2nd, 2016 at 8:52pm
Print Post  
Thanks, I shall look forward to it.

Regards,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #7 - Jun 2nd, 2016 at 10:03pm
Print Post  
I looked at your code again and found that F12 and shft+f12 were working fairly well. The main issue seemed to be that you have #defined values that are also macros making use of other code files. 

The compiler finds the code okay but the intellisense doesn't. Adding an #include doesn't hurt. You can also enclose it in VSIntellisense only #if conditions so that the real arduino comple ignores but it kinda makes sense doesn't it?

Adding this resolved all the errors you mentioned.

Code
Select All
#if defined(_MSC_VER)
  #include "sam3xa.h"
#endif
 



I also found that 2 more errors can be resolved by adding the __arm__ def which has been added to the next release.

Code
Select All
#if defined(_MSC_VER)
  #include "sam3xa.h"
  #define __arm__
#endif
 



I have removed a rogue define for __ICCARM__ from the next release for the sam boards. It reduces the errors by 3 and is a more accurate representation for sam.

Hope that helps
« Last Edit: Jun 2nd, 2016 at 10:05pm by Tim@Visual Micro »  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #8 - Jun 2nd, 2016 at 10:23pm
Print Post  
Awesome!!

That makes huge inroads into the problems, but you will appreciate that I only gave you a small sample of the sketch causing the problems..... I still have problems.

Would like the full sketch?

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #9 - Jun 2nd, 2016 at 10:26pm
Print Post  
Yes please and also say where to download any libraries or include them in the zip

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #10 - Jun 2nd, 2016 at 11:06pm
Print Post  
Here you go.

Regards,

Graham
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #11 - Jun 2nd, 2016 at 11:09pm
Print Post  
You will also need this library.

250KB maximum attachment size??? That's a little tight..

Regards,

Graham
  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #12 - Jun 2nd, 2016 at 11:52pm
Print Post  
Thanks, by the way you should switch off debugging until you have a working compile.

I don't have the sdfat library

Vs with the current c++ is not able to understand some gcc syntax which is why intellisense will move to using a ctags based engine in VS. 

You can add dummy methods  to kick the intellisense into shape. You can probably just add to a .h and include in the project without need to #include in the actual code.

Code
Select All
#if defined(_MSC_VER)
#include "sam3xa.h"
#define __arm__
int isdigit(char __c) {}
int strlen(char[]) {}
int strcpy(char[], char[]) {}
void sprintf(char[], char[], int) {}
void sprintf(char[], char[], char[], char[]) {}
#endif
 


  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #13 - Jun 2nd, 2016 at 11:59pm
Print Post  
Yep, you are definitely on the right track!!

Only one error now, but it compiles too!!

Thank you so much!!

Regards,

Graham

Edit

#if defined(_MSC_VER)
#include "sam3xa.h"
#define __arm__
int isdigit(char __c) {}
int strlen(char[]) {}
int strcpy(char[], char[]) {}
void sprintf(char[], char[], int) {}
void sprintf(char[], char[], char[], char[]) {}
void sprintf(char[], const char[], char[]) {}

#endif

fixes the last error
« Last Edit: Jun 3rd, 2016 at 12:01am by ghlawrence2000 »  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #14 - Jun 3rd, 2016 at 12:16am
Print Post  
Would it be worthwhile creating a central repository for these intellisense fixes?

I appreciate I am only a newbie, and without your help would not have got to the bottom of this, so with that in mind, I think it would be beneficial....

Thanks again for your excellent support!

Regards,

Graham
  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #15 - Jun 3rd, 2016 at 10:21am
Print Post  
Hi Tim,

I realise now how impractical the central repository for intellisense fixes is  Grin. I have had chance to play some more, and had to add several more to the list, which made me realise there will never be a one size fits all solution, ah well...

Now, I have another problem.

I loaded another sketch, shuffled around the order of functions to remove not defined errors, (which didn't trouble the Arduino IDE?) and I have a fully compilable sketch in 'Release' mode. However when I select 'Debug' mode I get this :-

Flash_MultiFunction-hispeedUSB-extended-oc.ino:572:16: error: 'MicroDebug' was not declared in this scope
:void setup() { 
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
Error compiling project sources

I have no break-points set yet, and I REALLY hope the DUE is supported for debugging?

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #16 - Jun 3rd, 2016 at 6:01pm
Print Post  
Hi,

Quote:
I realise now how impractical the central repository for intellisense fixes is  Grin. I have had chance to play some more, and had to add several more to the list, which made me realise there will never be a one size fits all solution, ah well...


Agreed, that's why I mentioned and gave link to discussion about trying the new clang system for users who have time to test and try it. It will solve all the intellisense issues and be easier to configure within the next few months.

Quote:
I loaded another sketch, shuffled around the order of functions to remove not defined errors, (which didn't trouble the Arduino IDE?) and I have a fully compilable sketch in 'Release' mode


The Arduino Ide doesn't have intellisense or report code errors until compile so it won't be "troubled" Smiley 

You can switch off intellisense error reporting in Visual Studio "tools>options" if you want to compare apples with apples and the Arduino Ide.

Quote:
I have a fully compilable sketch in 'Release' mode


So Visual Micro is compiling the same as the Arduino Ide in Release mode and not having any troubles?

Quote:
However when I select 'Debug' mode I get this :-

Flash_MultiFunction-hispeedUSB-extended-oc.ino:572:16: error: 'MicroDebug' was not declared in this scope
:void setup() { 
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
Error compiling project sources


Yes the Due is supported however you have to keep in mind that it can only debug by injecting serial statements into the temp code during compile. It's probably an issue determining where to insert code.

If you can email the MultiFunction-hispeedUSB-extended-oc.cpp file from temp build folder I will be able to see what is happening.

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #17 - Jun 3rd, 2016 at 6:47pm
Print Post  
I am in demand this evening, and didn't even get beer yet, I will get back to you....  Grin

Thanks,

Graham
  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #18 - Jun 3rd, 2016 at 9:25pm
Print Post  
Hi Tim,

Sorry for the delay, please find enclosed the file requested.

Regards,

Graham

Edit: Or did you want that file after th debug compile failed?
« Last Edit: Jun 3rd, 2016 at 9:29pm by ghlawrence2000 »  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #19 - Jun 4th, 2016 at 12:14am
Print Post  
Thanks. I need to see the file after an upload attempt with debug. Doesn't look like there is any debugging in the file.

I also suggest moving the if define(msc_ver) to a .h file. That might fix the debug anyway.

The .h file doesn't need to be #included in your code, vs will see it and use it as long as it is included in the project.

Out of interest is all your code in a single .ino?
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #20 - Jun 4th, 2016 at 12:34am
Print Post  
You sir are frigging awesome!!

Removing all those statements to a.h fixed the issue!!

Cheesy Grin

Thanks!!

Graham
  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #21 - Jun 4th, 2016 at 12:41am
Print Post  
mmmmm 

Initial enthusiasm was premature..

Now how do I get it to upload?

Program size: 74,836 bytes (used 14% of a 524,288 byte maximum) (36.28 secs)
 
Uploading 'Flash_MultiFunction-hispeedUSB-extended-oc' to 'Arduino Due (Programming Port)' using 'COM3'
Uploader started for board Arduino Due (Programming Port)
Upload method will be: bootloader
Uploading via Bootloader 
{runtime.tools.bossac.path}\bossac.exe -i -d --port=COM3 -U false -e -w -b C:\Users\Graham\AppData\Local\Temp\VMICRO~1\FLASH_~2\ARDUIN~1/FLASH_~1.BIN -R
The system cannot find the file specified

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #22 - Jun 4th, 2016 at 12:43am
Print Post  
Which version of the arduino ide are you using with Visual Micro?

{runtime.tools.bossac.path} this means a config issue.
« Last Edit: Jun 4th, 2016 at 12:47am by Tim@Visual Micro »  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #23 - Jun 4th, 2016 at 12:51am
Print Post  
Real Arduino 1.6.5 

I also have portable 1.6.8.

Both work... 

Sorry to be a nuisance like!!!

Graham

PS... WOW I have gone from Newbies to Junior to Full member in 14 posts...
« Last Edit: Jun 4th, 2016 at 12:53am by ghlawrence2000 »  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #24 - Jun 4th, 2016 at 1:09am
Print Post  
Should there be ANYTHING in the Programmers list?

Because there isn't for me...

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #25 - Jun 4th, 2016 at 1:10am
Print Post  
After 1.6.5 arduino changed the local storage location. 

When you start 1.6.6 and above it attempts to move the location and your installed hardware but leaves part of the older structure behind.  It's a bit of a mess.

Now you have also configured 1.6.8 as portable so now anything you download goes below the ide folder.

Is visual micro pointing at 1.6.5 or 1.6.8?

No programmers for sam 32 bit boards. The arduino ide is confused
« Last Edit: Jun 4th, 2016 at 1:11am by Tim@Visual Micro »  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #26 - Jun 4th, 2016 at 1:15am
Print Post  
VM is pointing at the installed IDE which is 1.6.5

« Last Edit: Jun 4th, 2016 at 1:16am by ghlawrence2000 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #27 - Jun 4th, 2016 at 1:16am
Print Post  
Where are your two arduino apps installed? 

Switch vm to 1.6.8
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #28 - Jun 4th, 2016 at 1:19am
Print Post  
Made zip difference......

Same error

1.6.5 is "C:\Program Files (x86)\Arduino\arduino.exe"

1.6.8 is X:\MyDocuments\Arduino_Electronics\arduino-1.6.8\arduino.exe
« Last Edit: Jun 4th, 2016 at 1:22am by ghlawrence2000 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #29 - Jun 4th, 2016 at 1:20am
Print Post  
Okay switch on "tools>options>visual micro>compiler>show build properties" and verbose.

Then build and email or attach the output

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #30 - Jun 4th, 2016 at 1:30am
Print Post  
It is the same..........

And yes I did quit VS and re-open


Uploading 'Flash_MultiFunction-hispeedUSB-extended-oc' to 'Arduino Due (Programming Port)' using 'COM3'
Uploader started for board Arduino Due (Programming Port)
Upload method will be: bootloader
Uploading via Bootloader 
{runtime.tools.bossac.path}\bossac.exe -i -d --port=COM3 -U false -e -w -b C:\Users\Graham\AppData\Local\Temp\VMICRO~1\FLASH_~2\ARDUIN~1/FLASH_~1.BIN -R
The system cannot find the file specified

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #31 - Jun 4th, 2016 at 1:31am
Print Post  
Okay switch on "tools>options>visual micro>compiler>show build properties" and verbose.

Then build and email or attach the output

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #32 - Jun 4th, 2016 at 1:35am
Print Post  
You mean like this?? 

Which made zero difference..........
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #33 - Jun 4th, 2016 at 1:43am
Print Post  
I know how disheartening and frustrating it is to have issues like this! Trust me... 

I want you to know how impressed I am with your speed of response, and level of support offered so far!!

And know that it is appreciated!!

Graham

PS.. However, I am not the most patient person on the planet and I am getting frustrated  Cry
« Last Edit: Jun 4th, 2016 at 1:46am by ghlawrence2000 »  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #34 - Jun 4th, 2016 at 1:50am
Print Post  
Here you go :-

Thanks

  

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #35 - Jun 4th, 2016 at 3:50am
Print Post  
Thanks very much for the file.

In the arduino ide 1.6.8 please switch on file>preferences>verbose upload the upload and post the verbose output.

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #36 - Jun 4th, 2016 at 11:22am
Print Post  
Hi Tim,

Here you go...

Thanks,

Graham
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #37 - Jun 4th, 2016 at 3:14pm
Print Post  
Tim,

I have good news and not so good news Cheesy

After un-installing VS2015, cleaning registry, and restarting, all works properly now, in terms of uploading.

Just have a slight gremlin now.

When opening Serial monitor, it automatically chooses 115200, but when I set 250000, close and reopen, it goes back to 115200.

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #38 - Jun 4th, 2016 at 4:53pm
Print Post  
1)
The upload error was that the bossac.exe uploader was missing. Installing Visual Studio doesn't affect that so I will assume that you also re-installed the SAM core via the Arduino Ide board manager?

2)

Quote:
When opening Serial monitor, it automatically chooses 115200, but when I set 250000, close and reopen, it goes back to 115200.


This is correct when in debug mode. Please see the debug docs about how to tell the debugger to use a different port speed
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #39 - Jun 4th, 2016 at 5:08pm
Print Post  
Tim,

Thank you so much for your patience and support with these matters!!

Kindest regards,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #40 - Jun 4th, 2016 at 7:08pm
Print Post  
I found that if you add this following #define then you don't need to redefine all the methods such as isdigit(x)

Code
Select All
#define _HAVE_STDC 



It's in the next release along with the sam3x #include. So hopefully you can remove your .h intellisense file after the next update. 

If you find yourself putting other things in the .h then please let me know so that the system works as much as possible with standard config.

Thanks a lot.
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #41 - Jun 4th, 2016 at 7:46pm
Print Post  
Hi Tim,

my a.h is now :-

#include "sam3xa.h"
#define __arm__
#define _HAVE_STDC

Lots of red blobs again, have I put it in the wrong place?

Regards,

Graham
  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #42 - Jun 4th, 2016 at 7:50pm
Print Post  
Suddenly can't edit messages...

My previous a.h was :-

#include "sam3xa.h"
#define __arm__
//#define _HAVE_STDC

int isdigit(char __c) {}
int strlen(char[]) {}
int strcpy(char[], char[]) {}
void sprintf(char[], char[], int) {}
void sprintf(char[], char[], char[], char[]) {}
void sprintf(char[], const char[], char[]) {}
char* strtok(char*, char*) {}
int atoi(char*) {}
int strncmp(char*, char*, int) {}
void sscanf(char*, const char[], char[], uint32_t*) {}
int strcmp(char*, char*) {}
void sprintf(char[], const char[], uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t) {}


No red blobs  Wink

Regards,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #43 - Jun 4th, 2016 at 7:51pm
Print Post  
No that's interesting. 

In the next release the sam3x is included before the arduino.h which you can't do. When I move the sam3x to after the arduino.h I get 500 errors, above the arduino.h I get 5 errors mainly in the usb core.

So lets please see how the next release works should be alter today or tomorrow.

ps: the forum is playing up
« Last Edit: Jun 4th, 2016 at 7:53pm by Tim@Visual Micro »  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #44 - Jun 4th, 2016 at 7:54pm
Print Post  
You should get a beer and have the night off, it is the weekend! Wink Tongue

Thanks for everything!

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #45 - Jun 4th, 2016 at 7:55pm
Print Post  
Thanks but I only do this at the weekend. It's been a busy few months because Arduino changed everything Smiley
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #46 - Jun 4th, 2016 at 7:58pm
Print Post  
Well, muchas gracias from Nottinghamshire!!

Grin

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #47 - Jun 6th, 2016 at 8:29pm
Print Post  
The new release is up. Interested to know if better or worse.

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #48 - Jun 6th, 2016 at 8:40pm
Print Post  
Tim,

I downloaded and installed the update moments after it was released. I am not sure I am the best person to be commenting. I don't understand enough about VM to be saying if it made things better since I am not sure what I can or cannot remove from my a.h

I tried to remove the #define __arm__ it made things worse, I tried to remove the #include 'sam3xa.h' it made things worse, #define _HAVE_STDC, doesn't appear to make any difference, so I refrained from commenting.

But thank you for all your hard work!! It is very much appreciated.

Regards,

Graham

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #49 - Jun 6th, 2016 at 8:47pm
Print Post  
Ok

Do you get more or less errros if you remove your intellisense .h?

How many errors show in the Errors List window when the selector on the window is set to "Entire Solution"?

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #50 - Jun 6th, 2016 at 9:05pm
Print Post  
When I don't define __arm__ I get not defined erros because I have #if defined(__arm___) macros, but most people probably would not.

I still have to specify exactly my syntax for intellisense. I don't see any change to be honest, which is why I didn't say anything within an hour of release.

I am sorry Sad. I wish I could report better news!

Thanks,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #51 - Jun 6th, 2016 at 9:14pm
Print Post  
__arm__ should already be declared for you so we have some confusion somewhere

Can you please post or email the project_name.vsarduino.h from the _vm folder below the sketch.

Also try switching to a different board in the list such as Uno then back to Due again.

Thanks
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #52 - Jun 6th, 2016 at 9:27pm
Print Post  
HA!!!

That did it...........

I now have no intellisense define, and no errors!!  Cheesy

You star!!!

I think that deserves a beer and an early night Wink Tongue

Tim, my heartfelt thanks!!

Regards,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #53 - Jun 6th, 2016 at 9:30pm
Print Post  
Great, when you save the project, add methods to .ino files, add libs etc. that also refreshes the intellisense. Switching board was just a way to force it. I think after a build or a few edits it would have sorted itself out.

Thanks for the testing. I'll take you up on the beer sometime Smiley
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #54 - Jun 6th, 2016 at 9:35pm
Print Post  
Now let me go looking for ways to break it  Roll Eyes  Grin

No, seriously, thank you so much for everything!!! It is VERY MUCH appreciated!!

Best regards,

Graham
  
Back to top
 
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #55 - Jun 6th, 2016 at 9:40pm
Print Post  
Will become a PRO licence owner when the trial expires...

I can't thank you more than that..

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #56 - Jun 6th, 2016 at 9:42pm
Print Post  
Thanks but helping to get the intellisense right was more than enough. 

There are a lot of different platforms so always useful to have someone who provides clear and timely info.
  
Back to top
IP Logged
 
ghlawrence2000
Junior Member
**
Offline


Posts: 35
Joined: Jun 2nd, 2016
Re: Intellisense issues with Arduino DUE and VS2013
Reply #57 - Jun 6th, 2016 at 9:48pm
Print Post  
Well a bit of mutual loving then.... awwww  Grin

You have an awesome product. I for one appreciate it!

Any further help I may be, let me know, but I don't appeciate Arduino.org Tongue

Regards,

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Intellisense issues with Arduino DUE and VS2013
Reply #58 - Jun 6th, 2016 at 9:56pm
Print Post  
Quote:
but I don't appreciate Arduino.org


I had a lot of support issues with users of the 1.7.x arduino.org software thinking it;s newer than Arduino.cc 1.6.x. It is actually Arduino.cc 1.5.x with a 1.7.x label. 

So it was very confusing until I added it to the apps list in Visual Micro. Good that it comes with the sam core. So I am in two minds about it.
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 
Send TopicPrint