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) I'm getting errors in Visual Micro when trying to compile the Example Blink Program. (Read 9814 times)
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Oct 13th, 2016 at 4:15am
Print Post  
I'm getting errors in Visual Micro when trying to compile (in Debug Mode) the Example Blink Program.

Within the last few days I have installed the following software on my Windows-7 64-bit computer:

Arduino IDE release 1.6.12.
Teensyduino 1.31 (currently in beta for the latest Arduino 1.6.12).
Visual Studio Community 2015 Version 14.0.2543101.01 Update 3. 
Visual Micro Version 1610.4.2

My target board is a Teensy LC.

In the Arduio IDE environment the "Basic Blink Program" compiles and loads into the Teensy LC board with no issues.
I've tried the compile and upload with all the USB options: "No USB", "Serial", "Keyboard", "Keyboard+Mouse+Joystick", "Serial+Keyboard+Mouse+Joystick", "Keyboard+Touchscreen", "MIDI", "Serial+MIDI", "Raw HID", and "Flight Sim Controls". 
I've tested all the USB option settings, and they compile and successfully upload into the Teensy, LC and blink at the various rates I set in the sketch code.

Building the same program in the Visual Micro IDE is giving varing results.
Some USB Board Settings compile (in debug) and load correctly...and some don't.

The configurations that work are: "No USB", "Serial", "MIDI", "Serial+MIDI".
They compile, upload, and run correctly in Teensy LC board,

But the "Keyboard", "Keyboard+Mouse+Joystick", "Serial+Keyboard+Mouse+Joystick", "Keyboard+Touchscreen", "Raw HID", and "Flight Sim Controls" USB configurations give me the following compile errors in the Output Window:

Compiling debug version of 'Blinky' for 'Teensy LC'

VM_DBG.cpp:33: In file included from
Error compiling libraries


That particular line points to a VM_DBG.h file (maybe missing)???

When I compile in "Release Mode" everything works for all USB configurations. To be quite honest, I don't know what the difference is between debug and release mode. I really never set break points while designing and testing my code. I turn LEDs on and off in various spots to locate and fix bugs in my code. Just curious on why "debug mode" is generating errors.

Also, what are the differences of "Build Solution", "Rebuild Solution", "Build Blinky", "Rebuild Blinky", "Clean Blinky", and the "Project Only" options.
It seems like the various build and rebuild commands do the same thing...they recompile and link.

I never put more than one project into a solution directory, and don't make an extra project subdirectory when defining a New Project. So maybe all those different compile options are for more complex solution setups.




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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #1 - Oct 13th, 2016 at 11:19am
Print Post  
Thanks for the info. I will try the Teensy LC debug build.

You are right, many of the build options are the same if you only have single project solutions. Except Rebuild ignores compiler cache and does full rebuild and clean clears the compiler cache. They are all standard VS options which Visual Micro makes do something relevant to Arduino.
  
Back to top
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #2 - Oct 13th, 2016 at 2:56pm
Print Post  
Thanks for the info Smiley
I think I'll stick to the "Rebuild" command.
That way I'm compiling with a clean slate.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #3 - Oct 13th, 2016 at 3:25pm
Print Post  
You should need to use Rebuild. The cache is quite intelligent and if you find it failing you then please let me know.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #4 - Oct 15th, 2016 at 1:29pm
Print Post  
Hi,

I just tested Teensy LC debug and it worked okay for me.

Please switch on vMicro>Compiler>Verbose and also the "Show build properties" command and then click Rebuild.

Please attach the output as a text file (.txt) to a post here or email to info[at]visualmicro.com

Thanks
  
Back to top
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #5 - Oct 19th, 2016 at 4:43pm
Print Post  
Sorry I haven't responded.
I decided to check this thread again today and read your latest post to request some info.

Today, as a sanity check, I set the "USB Type" as "Raw HID" and compiled in Debug mode...and the error is still there as originally reported...

This is what is in the output window.
VM_DBG.cpp:33: In file included from
Error compiling libraries

Then I turned on "Verbose" and "Show Build Properties".
I'll also mention, there is an option "Deep Search Includes" that has a check mark(enabled), it's always been enabled.

I compiled using Rebuild.
The error is there.

I'll attach as a separate output.txt file.

Again...sorry for the delay.
I've put a check mark on "Check this if you wish to be notified of replies to this topic".

Let me know if you need any more tests on my end.



  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #6 - Oct 19th, 2016 at 4:46pm
Print Post  
I'm also going to email the output.txt file.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #7 - Oct 19th, 2016 at 5:02pm
Print Post  
Hi,

Sorry I just reread your first post.

If you don't compile teensy with access to Serial then the default debug settings won't work.

Please try to add serial.begin(115200) to the setup()

Then try serial.println("hello world"); in the loop()

See if that compiles okay without debug.

Thanks
  
Back to top
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #8 - Oct 19th, 2016 at 6:13pm
Print Post  
Nope...
The word "serial" is getting red lines under it as if it is undefined.
This happens in both Debug and Release compiles using "RAW HID" setting.

Code
Select All
// the setup function runs once when you press reset or power the board
void setup() {
    // initialize digital pin LED_BUILTIN as an output.
    pinMode(LED_BUILTIN, OUTPUT);
    serial.begin(115200);
}

// the loop function runs over and over again until power down or reset
void loop() {
    digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
    delay(1000);                       // wait for a second
    digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
    delay(1000);                       // wait for a second
    serial.println("hello world");
}The word serial is getting red lines under it as if it is undefined.
This happens in both Debug and Release.
 



The Debug Compile fails with the error:
VM_DBG.cpp:33: In file included from
...then a long line in the verbose messaging...
Error compiling libraries

The Release compile fails with the error: 
Blinky.ino: In function void loop()
Blinky.ino: 20:5: error: 'serial' was not declared in this scope
   serial.println("hello world")
Error compiling project sources


I tried configuring the board as "No USB" and "Serial".
In this case the two serial words are still in red.
But we are down to a single error message in both Debug and Release compiles:
Blinky.ino: In function void loop()
Blinky.ino: 20:5: error: 'serial' was not declared in this scope
   serial.println("hello world")
Error compiling project sources


I guess I need designate some sort of serial include file?



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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #9 - Oct 19th, 2016 at 6:17pm
Print Post  
Sorry it's Serial. not serial.
  
Back to top
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #10 - Oct 19th, 2016 at 6:20pm
Print Post  
Let me remove all the extraneous comments.
Here is the code.

Code
Select All
void setup() {
    pinMode(LED_BUILTIN, OUTPUT);
    serial.begin(115200);
}

void loop() {
    digitalWrite(LED_BUILTIN, HIGH);
	delay(1000);
    digitalWrite(LED_BUILTIN, LOW);
	delay(1000);
	serial.println("hello world");
} 

  
Back to top
 
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #11 - Oct 19th, 2016 at 6:21pm
Print Post  
Cool...I'll try again with a "S".
  
Back to top
 
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #12 - Oct 19th, 2016 at 7:23pm
Print Post  
Ok...the variable Serial. is now recognized.

But in Debug, we are still getting error in certain board types...
Here is the error
VM_DBG.cpp:33: In file included from
...long line....
Error compiling libraries


The board types where the error occurs are:
Keyboard
Keyboard-Mouse-Joystick
Keyboard-Touchscreen
RAW HID
Flight Sim Controls


The board types that compile without error are:
Serial
Serial-Keyboard-Mouse-Joystick
MIDI
Serial-MIDI
No USB


To reiterate, these are both very new Arduino and Teensyduino Releases.
It's Arduiono 1.6.12
It's a BETA Teensyduiono 1.31
Don't know if that makes any difference.

Let me know if I can do anything else.



« Last Edit: Oct 19th, 2016 at 7:24pm by Richard4562 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #13 - Oct 19th, 2016 at 7:45pm
Print Post  
Great thanks for the clear info.

All the types that fail are because they do not provide a Serial connection so the debugger fails to compile. 

I think a recent Teensy change has been to provide some Serial compilation in the code even if Serial has not been chosen as a capability of the usb port. It's possible Teensy provides something else in that event but it's not yet supported by Visual Micro.

The debugger can be configured to use an alternative Serial port if available, or SoftwareSerial on 1 ot 2 digital pins if no serial is available.

If I recall the Teensy boards do supported an alternative Serial port called Serial1.

Set vMicro>Debugger>RemotePort to Serial1 and connect an FTDI cable between the Serial1 pins and the PC usb then set the LocalPort to the COM port of the FTDI cable.



« Last Edit: Oct 19th, 2016 at 7:50pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Richard4562
Junior Member
**
Offline


Posts: 21
Joined: Oct 10th, 2016
Re: I'm getting errors in Visual Micro when trying to compile the Example Blink Program.
Reply #14 - Oct 20th, 2016 at 12:49am
Print Post  
I set the Remote Port to Serial 1.

Keyboard...Keyboard-Mouse-Joystick...Keyboard-Touchscreen...RAW HID...Flight-Sim-Controls
THEY ALL WORK!!!
Now everything is compiling in Debug without issue.

Thanks for your help.

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