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


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Definitions not found
Mar 14th, 2019 at 12:22pm
Print Post  
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++)
Select All
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++)
Select All
E0020	identifier "REG_PORT_DIRCLR1" is undefined	Sentry180	C:\Arduino_Workspace\arduino\Sentry180\Sentry180.ino	64
 



Any suggestions please?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Definitions not found
Reply #1 - Mar 16th, 2019 at 12:05pm
Print Post  
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
« Last Edit: Mar 16th, 2019 at 12:07pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Definitions not found
Reply #2 - Mar 16th, 2019 at 2:42pm
Print Post  
Hi Tim
I see now that the errors are all intellisense errors and not build errors. I attached the output anyway.
  

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: Definitions not found
Reply #3 - Mar 16th, 2019 at 3:01pm
Print Post  
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: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Definitions not found
Reply #4 - Mar 17th, 2019 at 6:45am
Print Post  
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
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Definitions not found
Reply #5 - Mar 17th, 2019 at 8:44am
Print Post  
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
  

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: Definitions not found
Reply #6 - Mar 18th, 2019 at 1:49am
Print Post  
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
Select All
"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"
        }
      ], 

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