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 8191 times)
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #20 - Feb 18th, 2020 at 9:52pm
Print Post  
I've set some configurations to Serial, and to use HardwareSerial transport mode. I am trying to debug the STM through two pins PB7 and PB6, so i'm trying to setup the debugger to use those pins.
« Last Edit: Feb 18th, 2020 at 9:52pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #21 - Feb 18th, 2020 at 9:53pm
Print Post  
Okay great, it is possible you have switched off automatic debugging or manually changed the debug setting to Off. You have correctly selected the Debug configuration but the debugging is OFF.

All you need to do to switch on serial debug with all the default values is to set "vMicro>Debugger>Debug = Serial"



tip: The debug settings are remembered per configuration name. Therefore when you have "Debug" selected as a configuraton you can set what type of debugging to use, when you have Release selected, you can set the debug to Off. Then all you ever need to do it switch between Release and Debug.



« Last Edit: Feb 18th, 2020 at 9:56pm 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 #22 - Feb 18th, 2020 at 9:58pm
Print Post  
Ok now i'm trying again, all settings are reset to their default except the vMicro>Debugger>Debug = Serial setting.

But how will it know to use my specific PB7 and PB6 pins?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #23 - Feb 18th, 2020 at 9:58pm
Print Post  
Quote:
I am trying to debug the STM through two pins PB7 and PB6, so i'm trying to setup the debugger to use those pins.


This is a confusing statement for me. previously you said you were just trying to use the standard usb cable that plugs into your board? 

The debug settings we are discussing work with the same connection that your serial in your own code uses.

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


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #24 - Feb 18th, 2020 at 10:00pm
Print Post  
No the setup i'm using is USB -> Nucleo-64 -> Dev board. I'm trying to debug with an FTDI1232 connected to pins PB7 and PB6. 
i just think my problem is that it can't communicate p
roperly between the breakpoint hardwareserial code and the PC? I have set up the debugger to us Rx pin PB7 and Tx pin PB6, and also set the speeds to 9600 baud and also set the remote transport mode to HardwareSerial (which i hope goes HardwareSerial serial = HardwareSreial(PB7, PB6)). But the vmicro debugger still receives nothing?
« Last Edit: Feb 18th, 2020 at 10:04pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #25 - Feb 18th, 2020 at 10:02pm
Print Post  
Okay it is best to be clear when you make the initial posts. How does your serial work? Does you code use Serial, Serial1,Serial2 or SoftwareSerial?
  
Back to top
WWW  
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #26 - Feb 18th, 2020 at 10:04pm
Print Post  
The serial works like:

Code (C++)
Select All
HardwareSerial mySerial = HardwareSerial(PB7, PB6); 

  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #27 - Feb 18th, 2020 at 10:10pm
Print Post  
Oh i see what might be the issue, i use HardwareSerial here and manually define the Rx and Tx pins but the debugger only accepts the built in uart definitions. I can define the pins using SoftwareSerial but for some reason the stm32 l452re doesn't work using the software serial (i will double check this now).
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #28 - Feb 18th, 2020 at 10:17pm
Print Post  
Yes, when i try to use

Code (C++)
Select All
SoftwareSerial mySerial = SoftwareSerial(PB7, PB6);
 


The PC doesn't receive anything at all.


When i use:

Code (C++)
Select All
HardwareSerial mySerial = HardwareSerial(PB7, PB6); 



The PC receives messages.

Strange?

--

So i guess to make it work, i would need an option to provide HardwareSerial the remote Rx and Tx numbers?
« Last Edit: Feb 18th, 2020 at 10:18pm by Bambo »  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #29 - Feb 18th, 2020 at 10:21pm
Print Post  
Using this https://github.com/stm32duino/wiki/wiki/API#hardwareserial i am going to try to re-map the Serial3 to my custom pins, and then point the debugger at the Serial3? hopefully it works
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Serial debugging wont start?
Reply #30 - Feb 18th, 2020 at 10:26pm
Print Post  
it worked!!!!

https://i.imgur.com/R0jqERR.png

To fix you must allow us to reconfigure the hardware serial parameters, but for now, a hotfix its just to re-wire the built in Serial definition like this:

Code (C++)
Select All
HardwareSerial Serial3(PB7,PB6); 




and then configure the debugger like this:
« Last Edit: Feb 18th, 2020 at 10:29pm by Bambo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #31 - Feb 18th, 2020 at 11:08pm
Print Post  
Ah great. Thanks. We will try to extend the docs for that configuration.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #32 - May 10th, 2020 at 12:40pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Serial debugging wont start?
Reply #33 - May 23rd, 2020 at 5:59pm
Print Post  
Did we resolve this issue? There have been updates for both debug and stm32 in the latest releases(s) available here.

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

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