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 Another newbie w/debug not compiling error (Read 6119 times)
Tien Doan
Newbies
*
Offline


Posts: 6
Joined: Jan 15th, 2014
Another newbie w/debug not compiling error
Jan 15th, 2014 at 6:36pm
Print Post  
Setup:

Arduino Yun
Arduino 1.5.4
Atmel Studio 6.1
Visual Micro 1.401.15

running on 64-bit vista ultimate

The code compiles, download and run fine if I use the Arduino IDE.  Using Atmel Studio, I get these errors:

VM_DBG.h:217: error: ISO C++ forbids declaration of 'ConsoleClass' with no type
VM_DBG.h:217: error: expected ';' before '*' token
VM_DBG.h:218: error: 'ConsoleClass' has not been declared
VM_DBG.h:In member function 'void VisualMicroDebug::setVariable(T&, int, int)'
VM_DBG.h:371: error: 'transport' was not declared in this scope

I googled the web and searched the forum and did not see this problem.   

Help !!!

Using the suggestion from the other "debug not compiling" posting, I turned on the verbose mode and will send the compile error to info [at] visualmicro.com.  I hope that is ok.

Thank you in advance.
Sad

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Another newbie w/debug not compiling error
Reply #1 - Jan 15th, 2014 at 7:36pm
Print Post  
Hi,

Thanks for emailing the files, it is nice to have them without having to ask  Smiley

You need to include either the "Bridge" or the "Console" library in your sketch. 

In the background, the debugger uses Console.print() which is provided by Arduino.

These two libraries are how the Yun communicates with the on-board network processor.

In future versions of Visual Micro we might try to automatically include the Console or Bridge library if they are not already imported into the sketch code. However, all of the network and cloud services of the Arduino Yun are not available without the Bridge library, so we currently expect it to already be included in your sketch.

You might also find the Bridge example to give you a good start with the Yun. Click the yellow ? on the tool bar and take a look at the code in the example.

Thanks, hope this help.

ps: Once you prove it works then I recommend using normal Serial upload and debug in early testing simply because it is much faster. The Yun network upload is slow.
  
Back to top
IP Logged
 
Tien Doan
Newbies
*
Offline


Posts: 6
Joined: Jan 15th, 2014
Re: Another newbie w/debug not compiling error
Reply #2 - Jan 16th, 2014 at 2:37pm
Print Post  
Thank you Tim for such a quick response.

I have added the "bridge.h" include file and now everything compiles and upload correctly.

Questions:

1.  When do I use the console.h instead of the bridge?  is it for output to console?

2.  When I am done w/debugging, can I take out the bridge include file?  I should be able to since it runs under the Arduino IDE.  The bridge example "confuses" me b/c to use this setup (atmel, visual micro), I have to include the bridge file and code a little differently than I would if I just code via the Arduino IDE.  Is this true?

3.  The Temboo example seems to empty.  Is that correct?

I have other questions regarding the debugging tool/process but I will ask them over the debug tool area as others might have the same questions.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Another newbie w/debug not compiling error
Reply #3 - Jan 16th, 2014 at 3:22pm
Print Post  
Hi,

Good to hear things are working. Visual Micro is identical to Arduino in how the code works. The Bridge library is produced by Arduino and required by the Yun to use its network services.

I can't give you help with Console or Bridge on this site because we just support the plugin. However the arduino.cc site is a wealth of information and their playground and forum are also useful.

I think the confusion you have is that your sketch doesn't use the network side of the Yun so in Visual Micro use the serial port to upload and debug your programs. 

Only because you have selected the Ip address of the Yun have you encountered difficulties. I suggest you step back and use the serial which is more normal for Arduino and faster for upload. You should see the Yun listed as a serial port, if not then run the Arduino installer so that it registers the usb driver. Then you do not need the bridge or console libs in your sketch.

There are lots of documents on the visualmicro.com wiki and the debugger page explains a lot. If you have any questions that are undocumented or unclear I look forward to answering them.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Another newbie w/debug not compiling error
Reply #4 - Jan 17th, 2014 at 5:14pm
Print Post  
With more thought of your project ...

The Yun page has been updated to warn people not to bother with network debug unless the sketch is already using the network code. This is because the Arduino network code takes all but 4k of the small chip on the Yun (Uggh, not something we can affect directly). 

We will see if we can make a stripped down version of the Arduino network code for users who want to debug over network with a project that does not use the network interface.

One point to make. If you try to use the usb debugger with a sketch sketch that does not use Usb/Serial then the debugger will appear to use much more memory than you will see when clicking "debug>start without debugging" or when compiling in the Arduino Ide. If your sketch code already uses the usb (Serial.print()) then the debugger will appear to use less memory.

In your example emailed to us, your sketch had little code so the impact of the debugger will seem larger.

In all cases, if you "start without debugging" in Atmel or Visual Studio the compile will produce an identical output to the Arduino Ide.

Sorry for the confusion.
  
Back to top
IP Logged
 
Tien Doan
Newbies
*
Offline


Posts: 6
Joined: Jan 15th, 2014
Re: Another newbie w/debug not compiling error
Reply #5 - Jan 17th, 2014 at 6:09pm
Print Post  
Thank you Tim for your most thorough answer.  Unfortunately for me, I plan to use the network for the final code so it was a good thing that I hit these bumps in advanced.

You saved me a lot of guessing and searching.

Hail Time Leek  Grin

Have a nice weekend.   

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