Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Unable to compile with debugger set to SoftwareSerial (Read 455 times)
PBY
Newbies
*
Offline



Posts: 8
Unable to compile with debugger set to SoftwareSerial
May 28th, 2019 at 2:59pm
 
Hi,

As I'm using the standard serial/Usb port of the Uno to communicate via CmdMessenger with the PC, I need to use a softwareSerial for debugging.

But, when I set the Remote Transport property to SoftwareSerial, I get the following errors:

VM_DBG_Transport was not declared in this scope
   VM_DEBUGGER_SOFT_TRANSPORT.print("VMDPE_")

   VM_DBG_Transport was not declared in this scope
   VM_DEBUGGER_SOFT_TRANSPORT.println("_VMDPE")

   VM_DBG_Transport was not declared in this scope
   b = VM_DEBUGGER_SOFT_TRANSPORT.read()

   VM_DBG_Transport was not declared in this scope
   b = VM_DEBUGGER_SOFT_TRANSPORT.peek()

   VM_DBG_Transport was not declared in this scope
   b = VM_DEBUGGER_SOFT_TRANSPORT.available()

   VM_DBG_Transport was not declared in this scope
   VM_DEBUGGER_SOFT_TRANSPORT.print("VMDPC_")

   VM_DBG_Transport was not declared in this scope
   VM_DEBUGGER_SOFT_TRANSPORT.print(debugger_message)

   VM_DBG_Transport was not declared in this scope
   VM_DEBUGGER_SOFT_TRANSPORT.print(pByte)

   VM_DBG_Transport was not declared in this scope

   Attempt to set a read-only variable or data type not supported\r\n")
Error compiling libraries
   Debug Build Error: This hardware might not support the default Visual Micro Debugger.
     If this project is using OTA/WiFi upload then please use the vMicro>Debugger menu to set the Serial COM and Remote port for the debugger.
     Otherwise switch the toolbar from 'Debug' to 'Release' and build again.
           or switch off Automatic Debugging
           or configure the SoftwareSerial debugger option.


In the .cpp generated from the .ino, VM added this:

#include <SoftwareSerial.h>
VM_DBG_Transport = SoftwareSerial(10,11);

#include <VM_DBG.h>



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



Posts: 10478
United Kingdom
Re: Unable to compile with debugger set to SoftwareSerial
Reply #1 - May 28th, 2019 at 3:16pm
 
Thanks, this will be fixed in a release over the next few days. You can step back to a previous version is urgently needed. Use tools>extensions and updates to remove visual micro then install any from the releases section of this forum.

A version from march or early april should be fine.
Back to top
 
WWW  
IP Logged
 
PBY
Newbies
*
Offline



Posts: 8
Re: Unable to compile with debugger set to SoftwareSerial
Reply #2 - May 28th, 2019 at 3:38pm
 
Thanks for the quick reply.
I tried the 1903.24, and indeed it works fine.

It seems also that the VM debugger, even when disconnected, troubled the commands transfert via CmdMessenger. I report a status on interrupt of pin 2, and with the latest VM version, I had several bounces and command lost. With the SoftwareSerial debugger working, the issue seems resolved.

But I liked more the dark and sleek look of the newest version for the digital pins display!
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Unable to compile with debugger set to SoftwareSerial
Reply #3 - May 28th, 2019 at 3:42pm
 
Which board are you using? It is possible the board uses interrupt 2 for Serial?

Back to top
 
WWW  
IP Logged
 
PBY
Newbies
*
Offline



Posts: 8
Re: Unable to compile with debugger set to SoftwareSerial
Reply #4 - May 28th, 2019 at 3:45pm
 
It's an Uno. But I don't use the interrupt for serial.
In the ISR function, I send a CmdMessenger command over serial with the value of the pin. The serial is still on pins 0 and 1.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Unable to compile with debugger set to SoftwareSerial
Reply #5 - May 28th, 2019 at 4:00pm
 
I see, does the CmdMessanger include \r\n at the end of whatever it sends or use println()?
Back to top
« Last Edit: May 28th, 2019 at 4:00pm by Visual Micro »  
WWW  
IP Logged
 
PBY
Newbies
*
Offline



Posts: 8
Re: Unable to compile with debugger set to SoftwareSerial
Reply #6 - May 28th, 2019 at 4:02pm
 
Yes, I configured so:
// Adds newline to every command
cmdMessenger->printLfCr();
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Unable to compile with debugger set to SoftwareSerial
Reply #7 - May 28th, 2019 at 4:04pm
 
Is that LfCR or CrLf?
Back to top
 
WWW  
IP Logged
 
PBY
Newbies
*
Offline



Posts: 8
Re: Unable to compile with debugger set to SoftwareSerial
Reply #8 - May 29th, 2019 at 6:34am
 
I didn't check the output, but that's in the code of CmdMessenger:

comms->println(); // should append BOTH \r\n
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Unable to compile with debugger set to SoftwareSerial
Reply #9 - May 29th, 2019 at 10:55am
 
Yes that's fine. The serial debugger is being re-test over the next day or so.

Thanks
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10478
United Kingdom
Re: Unable to compile with debugger set to SoftwareSerial
Reply #10 - May 29th, 2019 at 6:20pm
 
This is resolved in 1905.29, there are also some fixes for standard serial debug which failed to show inbound data in the last release

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print