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] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Serial debugging wont start? (Read 8282 times)
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Serial debugging wont start?
Feb 18th, 2020 at 1:59pm
Print Post  
Hi,

I'm trying to run the SoftwareSerial debugger however i get this message when i try to debug:

Quote:
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.


For the software serial i have attached an FTD1232 to pins RX 21 and TX 10 on my board (they do not correlate to any hardware UART). 

To upload the code i am using the SWD pins on the STM32 (TCK/TMS), which are on different pins to the serial debug port.

Here are my settings for the debugging:






I'm confused as to setting this up, i think i've configured it correctly but how can i define a Remote Port if the Remote Transport mode is SoftwareSerial? I'm not sure if this is the issue, please help!


Thanks!
Richard
« Last Edit: Feb 18th, 2020 at 2:00pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #1 - Feb 18th, 2020 at 2:16pm
Print Post  
Currently you have to set the software serial option in the visual micro project properties tool window.

You will see in the debugger section of the properties are the same properties you see on the vMico menu + some more.

Please see this documentation:-

https://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-With-Different-Po...
  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #2 - Feb 18th, 2020 at 4:03pm
Print Post  
Ok thanks Tim, what do i use as the remote port when using the software serial mode? i've defined the Rx and Tx pins so shouldn't it be independant from any hardware/serial port?


But at the moment when i compile in debugging enabled mode i get this error?

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


I'm using an STM32 Nucleo-64 L452RE
« Last Edit: Feb 18th, 2020 at 4:18pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #3 - Feb 18th, 2020 at 4:26pm
Print Post  
You are correct, you do not need to specify the remote port for software serial.

Software serial doesn't like 115200 speed, use 56k or below. Set the Remote speed and the local speed should automatically change to same.

« Last Edit: Feb 18th, 2020 at 4:27pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #4 - Feb 18th, 2020 at 4:28pm
Print Post  
Ok, does the -g flag affect anything?
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #5 - Feb 18th, 2020 at 4:34pm
Print Post  
I've got some more errors from VM_DBG.h

Quote:
VM_DBG.h:396: note    candidate expects 1 argument, 2 provided
VM_DBG.h:397: note  candidate  void VisualMicroDebug  begin(SoftwareSerial*, long unsigned int)
   |                                                ^~~~~~~~~~~~~~~~
   397 |  void begin(SoftwareSerial *theSerial, unsigned long baud)
   |       ^~~~~
VM_DBG.h:397: note    no known conversion for argument 1 from HardwareSerial* to SoftwareSerial*
   397 |  void begin(SoftwareSerial *theSerial, unsigned long baud)
   |             ~~~~~~~~~~~~~~~~^~~~~~~~~


and also this too:

Quote:
sketch.ino: 112:68: error: no matching function for call to 'VisualMicroDebug::begin(HardwareSerial*, int)
« Last Edit: Feb 18th, 2020 at 4:50pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #6 - Feb 18th, 2020 at 4:54pm
Print Post  
Looks like software serial is broken in the last few versions. we will try to fix over the coming day or so.
  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #7 - Feb 18th, 2020 at 5:11pm
Print Post  
Tim@Visual Micro wrote on Feb 18th, 2020 at 4:54pm:
Looks like software serial is broken in the last few versions. we will try to fix over the coming day or so.


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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #8 - Feb 18th, 2020 at 6:54pm
Print Post  
In recent builds the software serial debug failed for breakpoints outside of the project_name.ino however the error was different.

There is an updated build (20.02.16 sp1) but I suspect you settings are wrong and the current error you haveis probably unrelated.

Please confirm that you have not added a RemotePort=? Look at the vMicro>debugger properties and click the "Reset" option, then use the F4 project properties to set the RemoteTransport, LocalPort and tx/RxPins.


  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #9 - Feb 18th, 2020 at 8:55pm
Print Post  
Ok i have reset my debugger options and setup the RemoteTransport, LocalPort and Tx/Rx pins, and it all sets up correctly.

Problem is that its not printing anything to the port monitor if i set a breakpoint action or breaking the program at all if i hit the breakpoint?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #10 - Feb 18th, 2020 at 9:00pm
Print Post  
I might need to see your zipped project but let's first make sure you are doing what you want to do.

Did you pick the softwareSerial debugger because you want to keep your code uses serial.read() on the main usb port?



  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #11 - Feb 18th, 2020 at 9:02pm
Print Post  
No, i'd like to use the nucleo-64 for the entire thing, the code does no serial reading.

I'm just checking if the program i'm running is running OK.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #12 - Feb 18th, 2020 at 9:07pm
Print Post  
Clear/reset all the debug settings. Ensure the tool bar is set to "Debug". Add a breakpoint and click upload.

If the debug does not start then follow the guide in yellow above so we can see your settings.

There is nothing to configure for usb debug. The software serial option is something different.

  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #13 - Feb 18th, 2020 at 9:13pm
Print Post  
What do i set the Debug: Off/Serial/Hardware option to?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #14 - Feb 18th, 2020 at 9:13pm
Print Post  
Please follow my previous request. I suspect there might be or or maybe two confusions

1) Debug is not enabled. Either automatic debugging has been switched off or the debugger type set to off. The guide in yellow above will show us what we need to know.

2) Debug is off and the serial monitor speed has been altered to be different from the speed set in the sketch code.

Let's see the output from the yellow box before continuing.

Thanks
  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #15 - Feb 18th, 2020 at 9:22pm
Print Post  
Ok i can get the sketch to compile and then run, it enters the debug view, but nothing happens when it passes a breakpoint?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #16 - Feb 18th, 2020 at 9:27pm
Print Post  
Normally you just switch the configuration name on the tool bar between Release and Debug. Visual Micro automatically switches the Serial debug off/on.

However you can override the automatic setting in which case you would need to ensure that "Serial" is the selected debugger type.

When the build happens it says "compiling project x" or in debug mode it says "compiling debug version of project x"

If you have been changing settings I recommend starting a new project with a simple test so that you can see a breakpoint work and also see that you need not change any settings other than switching between Release and Debug.

It is impossible to assist further without the information request in yellow above. Otherwise I have to guess at what settings you have changed.


See the docs
« Last Edit: Feb 18th, 2020 at 9:28pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #17 - Feb 18th, 2020 at 9:29pm
Print Post  
Ok no problem, sorry i'm just trying different configurations, it takes so long to build! I think that because its not printing to the Serial Monitor within vsmicro it must be that the port is setup wrong in the configuration.

Am i ok putting "PB7" "PB6" for example in the Rx and Tx pin boxes? what input do they expect?

The build log is as follows:
https://pastebin.com/T8ySUXZU

The micro debug trace output prints:
Launching Debugger...

The serial monitor prints:
Port closed
Opening port
Port open

--

Strange but the internal Serial window isn't printing anything i sent to it at all?
« Last Edit: Feb 18th, 2020 at 9:37pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #18 - Feb 18th, 2020 at 9:40pm
Print Post  
You have still got the softwareSerial configured which as I said is NOT what you want. You do not need to add a tx/rx pin you do not need to set any debug properties.

Please click the Reset on the vMicro>debugger menu then clear the value you have assigned to RemoteTransport in the project properties. 

I can also see that you have switched off deep search for libraries. That is not causing an issue but will do in the future.

I think your big problem is the compile time. That is way too long and most certainly caused by your virus checker.

You could try exclusing this path from your virus checker or try with it off to see the speed difference.
C:/Users/Richa/AppData/Local/arduino15/packages/STM32
  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #19 - Feb 18th, 2020 at 9:46pm
Print Post  
I've completely reset all the debugging settings so everything is empty. I pressed the debug button, but now it compiles and runs but no debugging happens at all?

This is the complete build log:
https://pastebin.com/KngCizj2
« Last Edit: Feb 18th, 2020 at 9:49pm by Bambo »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint