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) Installation procedure for Visual Studio 2019 (Read 2910 times)
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Installation procedure for Visual Studio 2019
Apr 20th, 2019 at 7:10am
Print Post  
I have installed Visual Studio 2019 version 16.0.2 with Visual Micro 1903.24.2 and the Arduino IDE 1.8.9 but I am having a few problems. 
But before going into details I would like to clarify a few points, as the instructions on your site look a bit dated and conflicting.

1: Is the latest Atmel Studio 7 IDE as universal as the Visual Studio IDE now.
2: What is the latest download procedure for Visual Studio 2019 community edition. Is it still necessary to manually add C++ support. I forgot to, but if I run the Visual Studio Installer from windows start menu and select "Modify" it shows "C++ core features" and "Arduino IDE for Visual Studio" are installed. Is this enough C++ or should I select either "Universal Windows Platform development" and/or "Desktop development with C++ " and then which of the many options in those selections.

Jim
« Last Edit: Apr 20th, 2019 at 11:34am by Trek19 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installation procedure for Visual Studio 2019
Reply #1 - Apr 21st, 2019 at 2:55pm
Print Post  
Hi,

Microsoft have been busy a lot has changed. In theory since vs2017 the installer knows that we need c++ and should auto install. However you only need the desktop c++ and you can install it anytime.

Visual Micro is simply. The best way is to use "Extensions>Extension Manager" (formerly tools>extensions and updates) > Online then search for Arduino IDE for Visual Studio (aka Visual Micro).

Since vs2017 the install of visual studio extensions is a bit strange. After you click to download visual micro from the extension manager you will see a note telling you to restart the ide. Close the IDE and wait a few seconds at which time the Microsoft extensions installer should appear and subsequently install visual micro for you. Lovely, thanks Microsoft! Smiley

If you decide to install visual micro from the visual studio gallery the only difference is that (if you have multiple versions of vs installed) you will be prompted which IDE you want to install into.

I don't understand you question about atmel studio. Atmel is not as mature as visual studio but also has a few strengths of its own. These strengths are only for certain types of users of certain hardware so please give more info.
  
Back to top
WWW  
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: Installation procedure for Visual Studio 2019
Reply #2 - Apr 21st, 2019 at 4:03pm
Print Post  
My question about Atmel Studio (which I have recently installed for pure C++ programming of Atmel Devices) was is it now unnecessary to also install Visual Studio or will Atmel suffice for Arduino as well, from your answer its a no.

The reason I asked about the installation procedure was that I have just installed the latest Visual Studio, Visual Micro and Arduino IDE and I have problems with a project which worked perfectly before the updates so I wanted to make sure I had installed everything correctly before proceeding with the investigation of the problems.
Your forum home page has a banner saying:
News:
New user? Unable to create or open a project? C++ is required for Visual Studio.


But no mention of the exact details of how to do that.

So just to make it clear then, for others as well, the "C++ core features" which were automatically installed with Visual Studio or Visual Micro, (I am not sure which now) is not enough and I should also install the "Desktop development with C++ " using the Visual Studio Installer.


Jim
« Last Edit: Apr 21st, 2019 at 4:27pm by Trek19 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installation procedure for Visual Studio 2019
Reply #3 - Apr 21st, 2019 at 4:27pm
Print Post  
Using atmel studio is fine for atmel hardware.

It might be easier to say what problem you are having. If a compile issue please post the info described at the top of the forum.

I will remove the c++ note which only affects intellisense and the ability to actually edit the code.

Thanks
  
Back to top
WWW  
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: Installation procedure for Visual Studio 2019
Reply #4 - Apr 22nd, 2019 at 8:02am
Print Post  
Maybe this should be in another thread.

I have been using visual Micro with Visual Studio 2015 for some time but saw there was an update so I have installed Visual Studio 2019 version 16.0.2 with Visual Micro 1904.20.1 and the Arduino IDE 1.8.9 but now I am having a few problems with a project which built OK in the old setup.

I am experimenting with an ATTiny841 using the library from  SpenceKonde/ATTinyCore. https://github.com/SpenceKonde/ATTinyCore. ;
I downloaded the zipped library file and un-zipped it to C:\Users\james\Documents\Arduino\Hardware\ATTinyCore.

The problem I have is when I now open the  project in the new installation, and start typing in say DDR for DDRA I dont get intellisense  suggestions, also Intellisense highlights a number of errors in the code but the project seems to Builds OK and runs when downloaded to my board.

What you cant see in the attached code is that PIN_B0,  PINB0 etc and all references to the processors registers like DDRB, UBRR0H etc have the red squigly intellisense warning under them with  "Potential fixes". If I look at the "potential fixes" I get a huge list of #include suggestions.

Code (C++)
Select All

//Red Green Indicator
const byte IndicatorLedRed = PIN_B0;
const byte IndicatorLedRedRegPos = PINB0;
const byte IndicatorLedGreen = PIN_B1;
const byte IndicatorLedGreenRegPos = PINB1;

byte MainLoopCount;

void setup()
{
	DDRB = DDRB |  (1 << IndicatorLedRedRegPos) | (1 << IndicatorLedGreenRegPos);// initialize the indicator pins
	USART0_Init(25);// Set the baudrate to 2400 bps using a 1 MHz
}

void loop(void)
{
	MainLoopCount = 1;
	while (MainLoopCount)	//flash indicator green/red 5 times to show startup
	{
		digitalWrite(IndicatorLedGreen, HIGH);
		delay(2000);
		digitalWrite(IndicatorLedGreen, LOW);
		delay(200);
		digitalWrite(IndicatorLedRed, HIGH);
		delay(2000);
		digitalWrite(IndicatorLedRed, LOW);
		delay(200);
		--MainLoopCount;
	}
	USART0_Transmit(char('5'));//send unsigned character
}

void USART0_Init(unsigned int baud)// Initialize UART
{ 
	UBRR0H = (unsigned char)(baud >> 8);// Set baud rate
	UBRR0L = (unsigned char)baud;
	//UCSR0B = (1 << RXEN0) | (1 << TXEN0);//Enable receiver and transmitter
	UCSR0B = (1 << TXEN0);//Enable transmitter
	UCSR0C = (1 << USBS0) | (3 << UCSZ00);// Set frame format: 8data, 2stop bit
}

void USART0_Transmit(unsigned char data)//send serial
{
	while (!(UCSR0A & (1 << UDRE0)));// Wait for empty transmit buffer
	UDR0 = (data);// send a single byte
} 





Any ideas, probably something silly I have done.

Jim



  

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: Installation procedure for Visual Studio 2019
Reply #5 - Apr 22nd, 2019 at 12:44pm
Print Post  
I will take a look at the intellisense for the ATTinyCore

btw: There is a new extensions for vs20212->2015 in the tools>extensions and updates. Microsoft forced a split of the code for older ide's
  
Back to top
WWW  
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: Installation procedure for Visual Studio 2019
Reply #6 - Apr 28th, 2019 at 8:05am
Print Post  
Any progress on this?

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installation procedure for Visual Studio 2019
Reply #7 - Apr 28th, 2019 at 2:28pm
Print Post  
Ah really sorry. I was looking for the post but couldn't find it. Thanks for the nudge.

There will be an update over the few days with this fix. You can make a temp fix bu adding a .h to the project with the following in it. This then only applies to intellisense and not build.

Code (C++)
Select All
#if defined(_VMICRO_INTELLISENSE)
  #define __AVR_ATtiny84__
#endif
 


We will shortly move to a more intelligent way to find the required #defined for intellisense. You will see in the _vm\vsarduino.h the #define for __AVR_ATtiny84__ has two attempts at the correct case but sadly neither are correct. Note the uppercase "AT" and lowercase "tiny".

I think this has happened since the mcu setting moved to the board options menu. This is the definition that comes with the board. Notice that the name (user displayed alias) of the ATtiny84 menu is correct but the actual mcu name the menu passes to the build process is now attiny84 when the code in the core expects ATtiny84. I suspect the  the attiny84 is resolved by the toolchain to ATtiny84. WE have recently tried to improve this shuffling of case but obviously failed!

Code
Select All
menu.chip.84=ATtiny84
menu.chip.84.build.mcu=attiny84
 



« Last Edit: Apr 28th, 2019 at 2:30pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installation procedure for Visual Studio 2019
Reply #8 - Apr 28th, 2019 at 3:20pm
Print Post  
This is now resolved. There is a download 1904.27.0 in the work in progress post

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
WWW  
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: Installation procedure for Visual Studio 2019
Reply #9 - Apr 28th, 2019 at 4:09pm
Print Post  
OK Tim that update worked.
Thanks for the effort.


Jim
« Last Edit: Apr 28th, 2019 at 4:22pm by Trek19 »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint