Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
Other >> Arduino for Visual Studio 2010 >> Debug Compile Error
https://www.visualmicro.com/forums/YaBB.pl?num=1437002885

Message started by HansBear on Jul 16th, 2015 at 12:28am

Title: Debug Compile Error
Post by HansBear on Jul 16th, 2015 at 12:28am
I'm attempting to set up a second serial port for debugging, I believe all the parameters a set correctly.  However when I select "Remote Transport" as SoftwareSerial the following error occurs:


Compiling debug version of 'MiniBot' for 'Arduino Mega w/ ATmega2560 (Mega 2560)'
Build folder: file:///F:/Visual%20Studio%202013/Temp/MiniBot/mega_atmega2560
MiniBot.ino:In function 'void setup()'
MiniBot.ino:26:60: error: no matching function for call to 'VisualMicroDebug::begin(HardwareSerial*, long int)'
MiniBot.ino:candidates are
VM_DBG.h:begin(SoftwareSerial*)
VM_DBG.h:candidate expects 1 argument, 2 provided
VM_DBG.h:begin(SoftwareSerial*, long unsigned int)
VM_DBG.h:no known conversion for argument 1 from 'HardwareSerial*' to 'SoftwareSerial*'
SoftwareSerial.cpp:375:6: warning: always_inline function might not be inlinable [-Wattributes]
void SoftwareSerial*:setRxIntMsk(bool enable)
SoftwareSerial.cpp:121:6: warning: always_inline function might not be inlinable [-Wattributes]
void SoftwareSerial*:recv()
VM_DBG.cpp:968:22: warning: 'long unsigned int mystrtoul(const char*, char**, int)' declared 'static' but never defined [-Wunused-function]
Error compiling

It seems to indicate that VM_DBG does not correctly handle the SoftwareSerial option.  Selecting HardwareSerial will compile but it's not what I want.  Any one with an ideas.
:-/

Title: Re: Debug Compile Error
Post by HansBear on Jul 16th, 2015 at 12:50am
Problem resolved.  Instead of selecting "SoftwareSerial" from the drop down list typed in 'SOFTWARESERIAL" program then compiles and second comm port can be used for debugging. :)

Title: Re: Debug Compile Error
Post by Visual Micro on Jul 16th, 2015 at 6:35pm
Hi,

I re-looked at your report and you are configuring the wrong settings.

Please see the documentation here http://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-With-Different-Ports.html

You have to selected SoftwareSerial in the RemoteTransport property then enter rx/tx pins. Leave RemotePort empty

Title: Re: Debug Compile Error
Post by HansBear on Jul 16th, 2015 at 10:11pm
I had configured it as per the manual and had no joy.  I've tried numerous combinations and none worked.  The problem is that the transport type must be in upper case for it to be recognized.  As per my second post I needed to type in SOFTWARESERIAL (all upper case) the port now successfully works and I'm happily debugging my code.

Title: Re: Debug Compile Error
Post by Visual Micro on Jul 17th, 2015 at 1:17pm
Okay thanks. I misread your initial post. RemoteTransport should work.

The fact that SOFTWARESERIAL works in the RemotePort suggests your code is creating an object called SOFTWARESERIAL but the object is based on HardareSerial.

I am keen to understand this. Can you scan your code (Edit>Find in files) to see where SOFTWARESERIAL is defined. Or click SOFTWARESERIAL and press F12. How has it been defined and to which port/pins?

Thanks

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