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 Problem with Teensy debugging via alternate serial port (Read 5560 times)
cfeied
Junior Member
**
Offline


Posts: 49
Joined: May 18th, 2016
Problem with Teensy debugging via alternate serial port
May 18th, 2016 at 7:06am
Print Post  
Problem with alternate serial port: 
error: no matching function for call to 'VisualMicroDebug::begin(HardwareSerial3*, int)

I am running a teensy 3.2 board. VisMicro compiling and uploading via the USB virtual serial port (which appears in my PC as Com14) works fine. 

My board is already using the USB virtual serial port for communications with another device, so I have connected an FTDI USB cable to the teensy hardware UART port Serial3. This appears on the PC as Com9.

Serial3 / Com9 works fine: the teensy can print output to this port and if debugging is not enabled, VS/VM can open a terminal window and communicate with the Teensy over this port. However, when I attempt to turn on debugging, I get these error messages:

"error: no matching function for call to 'VisualMicroDebug::begin(HardwareSerial3*, int)"

and 

"No known conversion for argument 1 from 'HardwareSerial3*' to 'usb_serial_class*"

I have set remote transport to HardwareSerial (none of the others work, but I didn't expect them to because there is no bridge and this device doesn't use FastSerial and I'm not using a software serial port).

I have chosen Serial3 from the list of ports on offer in the VisualMicro properties list. I also tried the others, to no avail.

I have set the baud rates to match.

I have tried initializing the Serial3 port on the teensy, and I've also tried not initializing it. 

Of course the Teensy does not have anything called "HardwareSerial3" -- it's just "Serial3." Is this just a naming mismatch? If so, is there a workaround?

I anxiously await hints or guidance from anybody who can assist!!

Thanks!!

-- Craig
  

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


Posts: 49
Joined: May 18th, 2016
Re: Problem with Teensy debugging via alternate serial port
Reply #1 - May 18th, 2016 at 7:22am
Print Post  
Followup:

In my sketch I changed the Teensy default:

Code
Select All
#define HWSERIAL3  Serial3 



to

Code
Select All
#define HardwareSerial3 Serial3 



And the error messages changed:

Code
Select All
WhisperSom_01s.ino:In function 'void setup()
WhisperSom_01s.ino:189:71: error: no matching function for call to 'VisualMicroDebug::begin(Serial3*, int)
:void setup() {
    debugger: The error shown above might be caused by invalid breakpoint syntax or the board is not yet supported for debugging (pls let us know!)
WhisperSom_01s.ino:candidates are
WhisperSom_01s.ino:In file included from
VM_DBG.h:begin(usb_serial_class*)
:void begin(usb_serial_class *theSerial)
VM_DBG.h:note    candidate expects 1 argument, 2 provided
VM_DBG.h:begin(usb_serial_class*, long unsigned int)
:void begin(usb_serial_class *theSerial, unsigned long baud)
VM_DBG.h:note    no known conversion for argument 1 from 'Serial3*' to 'usb_serial_class*
Error compiling project sources
 



So it's more than just a naming problem. The error message seems to suggest that the number of parameters is wrong and the serial port object is of the wrong class. 

???

thanks,

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Teensy debugging via alternate serial port
Reply #2 - May 18th, 2016 at 4:16pm
Print Post  
Hi,

Thanks, yes visual micro has to know which type of port it is using. It probably expects serial3 to be hardwareserial but it might be something else. You can't add code to change that.

I will look into it but in the meantime maybe try the softwareSerial option

Thanks
  
Back to top
WWW  
IP Logged
 
cfeied
Junior Member
**
Offline


Posts: 49
Joined: May 18th, 2016
Re: Problem with Teensy debugging via alternate serial port
Reply #3 - May 18th, 2016 at 7:42pm
Print Post  
I move more than 1Mbps over the USB hardware virtual port (so can't move those comms to UART or SoftSerial) -- for some projects it might be possible for me to use SoftSerial for the debugging port, but resource issues preclude that for my current project. 

However, while testing this I ran into additional behaviors (using only the Upload Port) that confused me about what is happening in VisualMicro. I made a minimal sketch for testing, and here's what I found.   
  1. The concept of monitor windows seems to be very strongly coupled to the concept of the upload / debug port. 

    If I use the toolbar to open a serial monitor window on any port, VisualMicro attempts to start debugging on that port. 

    The documentation says that I can open multiple monitor windows, but if I do open a new monitor window during a debug session, the Upload Port is automatically changed to that window and the current debugging session stops in visual studio (but continues to run in the device). 

    If I then reconnect the original serial monitor window and type 'c', the debug session functions and the highlight changes on the VisualStudio screen, BUT the step button remains grayed out and F5 does not function. Also, 'c' causes the program to advance through two loops instead of one.
  2. If I set Upload port to an existing hardware or software serial port (Com9), VisMicro thinks it is using that port for upload and for debugging, and it opens a monitor window for that port. However, the *actual* upload is still happening on the original USB port (virtual Com14) and subsequent debug communications are also still happening on Com14. 

    When this happens, the step button is grayed out and F5 does not work.  However, if there was a preexisting monitor window for Com14 and I connect that window, pressing 'c' in that window does cause the debug session to cycle twice.

    I believe the Teensy uploader will *always* use the direct USB port for uploading. 
  3. During debugging, disconnecting any serial port monitor (not just the one over which debug commands are passing) stops the debugging session in Visual Studio. 

The upshot of this seems to be that I cannot have more than one monitor window open, and I cannot open any window without starting or restarting debugging on a new port.

I can work around this by using another terminal program, but I cannot work around the fact that visualMicro won't build when any UART port is selected for debugging. 

Any help getting this working would be much appreciated.

thanks,

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Teensy debugging via alternate serial port
Reply #4 - May 18th, 2016 at 7:47pm
Print Post  
Hi,

Not sure I fully understand (except for the fact that serial3 debug won't work)

You can't use the debug at the moment because it isn't supporting serial3 on the teensy which I will look into.

If you simply want to open a terminal for normal use without changing the projects upload port (and not for vm debug) then you can do that via "View>Other Windows>Arduino Port/Monitor"

edit: I just has a look at the teensy system. It's changed a lot so will take a week or so to add debug support. maybe earlier if some other things clear out the way.
« Last Edit: May 18th, 2016 at 8:01pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
cfeied
Junior Member
**
Offline


Posts: 49
Joined: May 18th, 2016
Re: Problem with Teensy debugging via alternate serial port
Reply #5 - May 19th, 2016 at 12:17am
Print Post  
Thank you.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Teensy debugging via alternate serial port
Reply #6 - May 28th, 2016 at 12:51am
Print Post  
Sorry about the delay. 

The latest Visual Micro release will hopefully also now work with Teensy Serial1,2,3

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