Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
>> >> code compile in Arduino IDE but failed to compile in vMicro
https://www.visualmicro.com/forums/YaBB.pl?num=1565008586

Message started by ram on Aug 5th, 2019 at 1:36pm

Title: code compile in Arduino IDE but failed to compile in vMicro
Post by ram on Aug 5th, 2019 at 1:36pm
Hello,

i'm using VS Microsoft Visual Studio Community 2019 VisualStudio.16.Release/16.1.6+29102.190 and vMicro 1.1906.30.

my project compiled with no errors when using Arduino IDE but when trying to use the same code in vMicro i get the following error:

[code]Compiling 'JoyPro_BlueTooth_Mic_Two_Speakers' for 'Adafruit Feather M0 Express'
     Preprocess: "{runtime.tools.arm-none-eabi-gcc.path}\bin\arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions   -D__SKETCH_NAME__="""JoyPro_BlueTooth_Mic_Two_Speakers.ino""" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10809 -DARDUINO_SAMD_FEATHER_M0_EXPRESS -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -DARDUINO_SAMD_FEATHER_M0 -DARM_MATH_CM0PLUS -DADAFRUIT_FEATHER_M0_EXPRESS -D__SAMD21G18A__ -DUSB_VID=0x239A -DUSB_PID=0x801B -DUSBCON -DUSB_MANUFACTURER="\"Adafruit\"" -DUSB_PRODUCT="\"Feather M0 Express\"" "-IC:\Users\ios_ram\AppData\Local\arduino15\packages\adafruit\hardware\samd\1.5.2\cores\arduino/Adafruit_TinyUSB_Core" "-IC:\Users\ios_ram\AppData\Local\arduino15\packages\adafruit\hardware\samd\1.5.2\cores\arduino/Adafruit_TinyUSB_Core/tinyusb/src" "-I/CMSIS/Include/" "-I/CMSIS/Device/ATMEL/" -I"C:\Users\ios_ram\AppData\Local\arduino15\packages\adafruit\hardware\samd\1.5.2\cores\arduino" -I"C:\Users\ios_ram\AppData\Local\arduino15\packages\adafruit\hardware\samd\1.5.2\variants\feather_m0_express" "C:\Users\ios_ram\AppData\Local\Temp\VMBuilds\JoyPro_BlueTooth_Mic_Two_Speakers\adafruit_adafruit_feather_m0_express\Release\JoyPro_BlueTooth_Mic_Two_Speakers.cpp" -o "nul"
   Object reference not set to an instance of an object
Build failed for project 'JoyPro_BlueTooth_Mic_Two_Speakers'[/code]

I made sure that the board is updated using the "Micro Explorer" but it doesn't seem to be problem, any help will be highly appreciated  :)

Best to all,
Ram


Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by Simon Hopkinson on Aug 5th, 2019 at 2:28pm
Could you supply the full build log in release mode as in the instructions in yellow at the top?

Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by ram on Aug 5th, 2019 at 2:38pm
log attach, thanks much!
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=full_log.txt (30 KB | 5 )

Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by Visual Micro on Aug 5th, 2019 at 3:35pm
The SAMD tools are not being found. Normally you have to make a seperate install of the arduino zero tools for adafruit boards of this type.

Please switch on "File>preferences>compile verbose" in the arduino ide, then build in the arduino ide and post its output as txt.

This will show us where arduino thinks the tools are and why there is a difference..

Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by ram on Aug 6th, 2019 at 9:28am
thank you for your reply, I don't see that option in the Arduino IDE preferences 1.8.9



I guess I'm missing something here. I've also attached the full Preference txt file.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=preferences_001.txt (3 KB | 4 )

Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by Visual Micro on Aug 6th, 2019 at 12:09pm
It is the "show verbose output during > Compile" which is ON already

Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by ram on Aug 6th, 2019 at 12:18pm
attached, thx much.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=IDE_Log.txt (173 KB | 7 )

Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by Visual Micro on Aug 6th, 2019 at 12:51pm
Thanks. we need to add some more verbose loading info. I think visual micro is hitting an error with a board support package then failing to continue to load.

Can you please confirm that you do not have any json index urls in visual micro > ide locations > board support urls?

If you do have some please clear then and press rescan or restart the ide. Then we will have the same config as the arduino ide.

Can you also please state which urls you have added to the arduino ide file>preferences>board support urls?

Thanks


Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by ram on Aug 6th, 2019 at 1:48pm
I do not have any json index urls in VS > visual micro > ide locations > board support url

in the Arduino IDE i have the following json url: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json


Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by Visual Micro on Aug 6th, 2019 at 1:56pm
Okay as a test please add the json url to visual micro. Then in visual micro board manager install the adafruit samd package then click rescan. If the package shows as being installed then click it to uninstall then click again to install.

Thanks


Title: Re: code compile in Arduino IDE but failed to compile in vMicro
Post by ram on Aug 7th, 2019 at 9:45am
that fixed the problem!!

many thanks!!

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