Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Hologram Dash Intellisense support (Read 318 times)
Visual Micro
Administrator
*****
Offline



Posts: 7915
United Kingdom
Re: Hologram Dash Intellisense support
Reply #2 - Jul 5th, 2017 at 12:09am
 
Off-Topic replies have been moved to this Topic.
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 7915
United Kingdom
Re: Hologram Dash Intellisense support
Reply #1 - May 26th, 2017 at 8:40pm
 
Thanks for the useful info.

The vsarduino is generated by visual micro both from installed files and can be customized.

However the best solution is to tell me how to install your hardware so I can take a look and add automatic support for that type of board.
Back to top
 
WWW  
IP Logged
 
maxolydian
Newbies
*
Offline



Posts: 1
Hologram Dash Intellisense support
May 26th, 2017 at 8:17pm
 
I have a Hologram Dash processor (ARM) that I'm trying to program within VS2015/VM 1705.8.0, Arduino IDE 1.8.2.

Although I can get projects to compile in both the Arduino IDE and VS, the Intellisense in VS is messed up when I select the Dash in my boards dropdown.

In particular, when using uint32_t, Intellisense properly recognizes it for "Arduino Uno" boards, but not for "Dash".
As far as I can tell, I seem to be missing a #define in .<project>.vsarduino.h- maybe!

The following code snippets follow the definitions of int32_t and uint32_t from .intelli.vsarduino.h through _default_types.h, stdint.h, and finally into my main intelli.ino file:
Code (C++):
//From .intelli.vsarduino.h:
#define __INTPTR_TYPE__ long
#define __INT32_TYPE__ long
#define _Pragma(x) pragma

//from _default_types.h:
#ifdef __INT32_TYPE__
typedef __INT32_TYPE__ __int32_t;
typedef __UINT32_TYPE__ __uint32_t;
#define ___int32_t_defined 1


//from stdint.h:
#ifdef ___int32_t_defined
typedef __int32_t int32_t ;
typedef __uint32_t uint32_t ;
#define __int32_t_defined 1
#endif


//from intelli.ino:
uint32_t ux;
int32_t x;

void setup()
{
  /* add setup code here */
	Serial.begin(9600);
}
 



The __UINT32_TYPE__ in _default_types.h shows as undefined, which causes the rest of the following definitions to fail- but again, only in IntelliSense, not during actual compile.

If I add the line
Code (C++):
#define __UINT32_TYPE__ unsigned long		//MISSING IN AUTOGENERATED FILE
 


to .intelli.vsarduino.h, the typedefs in _default_types.h and stdint.h now show correct IntelliSense information, but my uint32_t variable declaration in intelli.ino is still not showing correctly in IntelliSense.  It compiles correctly, but I think the vsarduino file gets regenerated before the compile, so I can't tell whether that would break the build or not.

I have many questions LOL but I guess two two biggest are:
  • How does vsarduino.h get generated?  Is there a "template" that I can modify?
  • How is it that the uint32_t declaration in my ino file still doesn't recognize the definition via IntelliSense, whereas the int32_t declaration works just fine?  Is this a bug in VS IntelliSense?  Bad configuration on my part? 


Sorry for the long-winded post, but I figure it's best to present as much (hopefully relevant!) information as I can up front.

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