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) Unable to compile with debugger set to SoftwareSerial (Read 3859 times)
PBY
Newbies
*
Offline


Posts: 8
Joined: May 22nd, 2019
Unable to compile with debugger set to SoftwareSerial
May 28th, 2019 at 1:59pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile with debugger set to SoftwareSerial
Reply #1 - May 28th, 2019 at 2:16pm
Print Post  
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
Joined: May 22nd, 2019
Re: Unable to compile with debugger set to SoftwareSerial
Reply #2 - May 28th, 2019 at 2:38pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile with debugger set to SoftwareSerial
Reply #3 - May 28th, 2019 at 2:42pm
Print Post  
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
Joined: May 22nd, 2019
Re: Unable to compile with debugger set to SoftwareSerial
Reply #4 - May 28th, 2019 at 2:45pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


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


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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile with debugger set to SoftwareSerial
Reply #7 - May 28th, 2019 at 3:04pm
Print Post  
Is that LfCR or CrLf?
  
Back to top
WWW  
IP Logged
 
PBY
Newbies
*
Offline


Posts: 8
Joined: May 22nd, 2019
Re: Unable to compile with debugger set to SoftwareSerial
Reply #8 - May 29th, 2019 at 5:34am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


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

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to compile with debugger set to SoftwareSerial
Reply #10 - May 29th, 2019 at 5:20pm
Print Post  
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 TopicPrint