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) code compile in Arduino IDE but failed to compile in vMicro (Read 2788 times)
ram
Junior Member
**
Offline


Posts: 37
Joined: Aug 6th, 2016
code compile in Arduino IDE but failed to compile in vMicro
Aug 5th, 2019 at 12:36pm
Print Post  
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
Select All
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\"" 2\cores\arduino/Adafruit_TinyUSB_Core" 2\cores\arduino/Adafruit_TinyUSB_Core/tinyusb/src" "-I/CMSIS/Include/" "-I/CMSIS/Device/ATMEL/" 2\cores\arduino" 2\variants\feather_m0_express" pp" -o "nul"
   Object reference not set to an instance of an object
Build failed for project 'JoyPro_BlueTooth_Mic_Two_Speakers' 



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  Smiley

Best to all,
Ram

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #1 - Aug 5th, 2019 at 1:28pm
Print Post  
Could you supply the full build log in release mode as in the instructions in yellow at the top?
« Last Edit: Aug 5th, 2019 at 1:53pm by Tim@Visual Micro »  
Back to top
IP Logged
 
ram
Junior Member
**
Offline


Posts: 37
Joined: Aug 6th, 2016
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #2 - Aug 5th, 2019 at 1:38pm
Print Post  
log attach, thanks much!
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #3 - Aug 5th, 2019 at 2:35pm
Print Post  
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..
  
Back to top
IP Logged
 
ram
Junior Member
**
Offline


Posts: 37
Joined: Aug 6th, 2016
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #4 - Aug 6th, 2019 at 8:28am
Print Post  
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.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #5 - Aug 6th, 2019 at 11:09am
Print Post  
It is the "show verbose output during > Compile" which is ON already
  
Back to top
IP Logged
 
ram
Junior Member
**
Offline


Posts: 37
Joined: Aug 6th, 2016
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #6 - Aug 6th, 2019 at 11:18am
Print Post  
attached, thx much.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #7 - Aug 6th, 2019 at 11:51am
Print Post  
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

  
Back to top
IP Logged
 
ram
Junior Member
**
Offline


Posts: 37
Joined: Aug 6th, 2016
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #8 - Aug 6th, 2019 at 12:48pm
Print Post  
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

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #9 - Aug 6th, 2019 at 12:56pm
Print Post  
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

  
Back to top
IP Logged
 
ram
Junior Member
**
Offline


Posts: 37
Joined: Aug 6th, 2016
Re: code compile in Arduino IDE but failed to compile in vMicro
Reply #10 - Aug 7th, 2019 at 8:45am
Print Post  
that fixed the problem!!

many thanks!!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint