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 Visual micro compile error with Visual Studio Community 2015 (Read 4401 times)
Mario Mottula
Junior Member
**
Offline


Posts: 47
Location: Italy
Joined: Jul 19th, 2015
Visual micro compile error with Visual Studio Community 2015
Mar 18th, 2016 at 7:35pm
Print Post  
Hi! 
I recently installed Visual Studio Visual Micro 7.
I have a small problem: in my use sketch the SerialUsb.begin function (9600), but while compiling I get the following error '' SerialUSB 'was not declared in this scope "
You could indicate how to solve it?
Thank you
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual micro compile error with Visual Studio Community 2015
Reply #1 - Mar 18th, 2016 at 8:05pm
Print Post  
Which board are you using?
  
Back to top
IP Logged
 
Mario Mottula
Junior Member
**
Offline


Posts: 47
Location: Italy
Joined: Jul 19th, 2015
Re: Visual micro compile error with Visual Studio Community 2015
Reply #2 - Mar 18th, 2016 at 9:10pm
Print Post  
Arduino M0 pro
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual micro compile error with Visual Studio Community 2015
Reply #3 - Mar 18th, 2016 at 9:52pm
Print Post  
SerialUsb is not a valid object or class in the M0 core. 

Why do you think it should work? 
Does it work in the arduino.org ide?
  
Back to top
IP Logged
 
Mario Mottula
Junior Member
**
Offline


Posts: 47
Location: Italy
Joined: Jul 19th, 2015
Re: Visual micro compile error with Visual Studio Community 2015
Reply #4 - Mar 19th, 2016 at 7:40am
Print Post  
Sure that it works with the IDE arduino.org! It allows me to display data in the serial monitor ...
also it continues to give me errors in servo.h library. For esemmpio if I insert into my project library servo.h, while compiling tells me he does not find servo.h.
If I manually insert the library servo.h then he tells me that servo.h already exists but it keeps giving me the error in compilation.
I do not know what to do...
It 's almost a year since I purchased Visual Studio, but despite your updates do not fail to use it.
I hope you can help me
Thank you Cry Cry Cry
« Last Edit: Mar 19th, 2016 at 4:24pm by Mario Mottula »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual micro compile error with Visual Studio Community 2015
Reply #5 - Mar 20th, 2016 at 12:27pm
Print Post  
Well you will need to be clearer about the ide version you are using because I just tried it again in arduino.org 1.7.8 and this is the output/error

Code
Select All
one-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -mcpu=cortex-m0plus -DF_CPU=48000000L -DARDUINO=10708 -DARDUINO_SAM_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -mthumb -DUSB_VID=0x2a03 -DUSB_PID=0x804f -DUSBCON -DUSB_MANUFACTURER= -DUSB_PRODUCT="Arduino M0 Pro" -ID:\Arduino\arduino-1.7.8/hardware/tools/CMSIS/CMSIS/Include/ -ID:\Arduino\arduino-1.7.8/hardware/tools/CMSIS/Device/ATMEL/ -ID:\Arduino\arduino-1.7.8\hardware\arduino\samd\cores\arduino -ID:\Arduino\arduino-1.7.8\hardware\arduino\samd\variants\arduino_zero D:\System\WinTemp\build1523384294286092120.tmp\sketch_mar20a.cpp -o D:\System\WinTemp\build1523384294286092120.tmp\sketch_mar20a.cpp.o
sketch_mar20a.ino: In function 'void setup()':
sketch_mar20a.ino:3:2: error: 'SerialUsb' was not declared in this scope
Error compiling.
 



This is the code I used 

Code
Select All
void setup() {
  // put your setup code here, to run once:
 SerialUsb.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:

} 



....

When the SerialUsb confusion is cleared up you should also confirm the name of the Ide you have configured in Visual Micro otherwise there might be some confusion. Have you configured the "arduino.org" or "arduino 1.5" app name in Visual Micro to point at your arduino.org location?
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint