Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Visual Micro >> General Board >> Definitions not found
https://www.visualmicro.com/forums/YaBB.pl?num=1552566160

Message started by Marius on Mar 14th, 2019 at 12:22pm

Title: Definitions not found
Post by Marius on 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?

Title: Re: Definitions not found
Post by Visual Micro on 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

Title: Re: Definitions not found
Post by Marius on 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.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=output_032.txt (25 KB | 5 )

Title: Re: Definitions not found
Post by Visual Micro on 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).


Title: Re: Definitions not found
Post by Marius on 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?

Title: Re: Definitions not found
Post by Marius on 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
VM_Library_Error.PNG (19 KB | 4 )

Title: Re: Definitions not found
Post by Visual Micro on 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"
        }
      ],

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.