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
Definitions not found (Read 456 times)
Marius
Developer
****
Offline



Posts: 187
Centurion RSA
Definitions not found
Mar 14th, 2019 at 12:22pm
 
Hi
I am using VS2017 and the project is for a SAMD21 / Arduino M0

I compiled the code in Arduino IDE no problem but in VS the definitions are not found and I get compiler errors

Code (C++):
void portSetup() {
	// Input pin for ADC Arduino A0/PA02
	REG_PORT_DIRCLR1 = PORT_PA02;

	// Enable multiplexing on PA02_AIN0 PA03/ADC_VREFA
	PORT->Group[0].PINCFG[2].bit.PMUXEN = 1;
	PORT->Group[0].PINCFG[3].bit.PMUXEN = 1;
	PORT->Group[0].PMUX[1].reg = PORT_PMUX_PMUXE_B | PORT_PMUX_PMUXO_B;
}
 



This is the code and this is the error

Code (C++):
E0020	identifier "REG_PORT_DIRCLR1" is undefined	Sentry180	C:\Arduino_Workspace\arduino\Sentry180\Sentry180.ino	64
 



Any suggestions please?
Back to top
 
marius_d.liebenberg  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10310
United Kingdom
Re: Definitions not found
Reply #1 - Mar 16th, 2019 at 12:05pm
 
you show intellisense errors not compile errors. I will look into the intellisense issue.

Questions ...

please switch on "vMicro>compiler>" "verbose" and also switch on "show build properties"

Then post the output after a build as .txt file

You have to click the reply button to be able to attach a file

Thanks
Back to top
« Last Edit: Mar 16th, 2019 at 12:07pm by Visual Micro »  
WWW  
IP Logged
 
Marius
Developer
****
Offline



Posts: 187
Centurion RSA
Re: Definitions not found
Reply #2 - Mar 16th, 2019 at 2:42pm
 
Hi Tim
I see now that the errors are all intellisense errors and not build errors. I attached the output anyway.
Back to top
 

output_032.txt (25 KB | 8 )
marius_d.liebenberg  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10310
United Kingdom
Re: Definitions not found
Reply #3 - Mar 16th, 2019 at 3:01pm
 
Thanks, I found that the toolchain paths have changed for samd but also i think I found a better set of supplimental #defines and #includes for samd intellisense. Your example works well for me now.

I think you asked about the benefits of vs2017 v's vs2015 in the past. Microsoft have now released a change that makes it more difficult to support vs2015 going forward. The change has been touted for a while but is now forced on us by Vs2019. VS2019 RC is out now and official release is early April.

This change means that visual micro has to be split into two installers and will require two gallery entries. There will be a new gallery entry for vs2012-2015 users with note that support will gradually be run down over the next 12-24 months for the older IDE's. Moving to the new system is better for Visual Micro and will allow us to provide tightly integrated GDB debug alongside some other benefits so it's a good move.

VS2019 seems much faster than vs2015 so it's okay to use. Currently the updates for visual micro are for the vs2017/2019 version and can be found here:- https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

There is an update due over the next 24 hours that will contain this fix (1903.16.x).

Back to top
 
WWW  
IP Logged
 
Marius
Developer
****
Offline



Posts: 187
Centurion RSA
Re: Definitions not found
Reply #4 - Mar 17th, 2019 at 6:45am
 
Thanks Tim, I was forced to go to VS2017 due to a laptop HD crash. I also find that the VS2017 seems to be a bit faster but it could be my imagination.

Will you announce the update?
Back to top
 
marius_d.liebenberg  
IP Logged
 
Marius
Developer
****
Offline



Posts: 187
Centurion RSA
Re: Definitions not found
Reply #5 - Mar 17th, 2019 at 8:44am
 
And then this error came up and I wondered if it is related in any way. I went into the library manager to install some new libraries then this came up and the list of libraries is empty. I then installed from zip and then this error came up at the end
Back to top
 

marius_d.liebenberg  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10310
United Kingdom
Re: Definitions not found
Reply #6 - Mar 18th, 2019 at 1:49am
 
This is fixed (along with other fixes) in the latest 1903.18 release. There is an install for vs2015 if required.

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Issue was ...

A library in the arduino.cc lib index file defines dependencies in a previously unexpected way. Visual micro treated it as a simple list but it's more than that. ToDo: Visual Micro should prompt to install decencies when installing a library.

extract from library_index.json

Code:
"name": "Arduino Low Power",
      "version": "1.2.1",
      "author": "Arduino",
      "maintainer": "Arduino LLC",
      "sentence": "Power save primitives features for SAMD and nRF52 32bit boards",
      "paragraph": "With this library you can manage the low power states of newer Arduino boards",
      "website": "http://arduino.cc/libraries/ArduinoLowPower",
      "category": "Device Control",
      "architectures": [
        "samd",        "nrf52"
      ],
      "types": [
        "Arduino"      ],
      "repository": "https://github.com/arduino-libraries/ArduinoLowPower.git",
      "dependencies": [
        {
          "name": "RTCZero"
        }
      ], 

Back to top
« Last Edit: Mar 18th, 2019 at 1:50am by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print