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....
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Pages: 1 2 
Send Topic Print
Serial debugging wont start? (Read 2182 times)
Bambo
Member
***
Offline



Posts: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #20 - Feb 18th, 2020 at 9:52pm
 
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.
Back to top
« Last Edit: Feb 18th, 2020 at 9:52pm by Bambo »  
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10865
United Kingdom
Re: Serial debugging wont start?
Reply #21 - Feb 18th, 2020 at 9:53pm
 
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.



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



Posts: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #22 - Feb 18th, 2020 at 9:58pm
 
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
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10865
United Kingdom
Re: Serial debugging wont start?
Reply #23 - Feb 18th, 2020 at 9:58pm
 
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: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #24 - Feb 18th, 2020 at 10:00pm
 
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?
Back to top
« Last Edit: Feb 18th, 2020 at 10:04pm by Bambo »  
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10865
United Kingdom
Re: Serial debugging wont start?
Reply #25 - Feb 18th, 2020 at 10:02pm
 
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: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #26 - Feb 18th, 2020 at 10:04pm
 
The serial works like:

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

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



Posts: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #27 - Feb 18th, 2020 at 10:10pm
 
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
 
WWW  
IP Logged
 
Bambo
Member
***
Offline



Posts: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #28 - Feb 18th, 2020 at 10:17pm
 
Yes, when i try to use

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


The PC doesn't receive anything at all.


When i use:

Code (C++):
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?
Back to top
« Last Edit: Feb 18th, 2020 at 10:18pm by Bambo »  
WWW  
IP Logged
 
Bambo
Member
***
Offline



Posts: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #29 - Feb 18th, 2020 at 10:21pm
 
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
 
WWW  
IP Logged
 
Bambo
Member
***
Offline



Posts: 100
Liverpool, UK
Re: Serial debugging wont start?
Reply #30 - Feb 18th, 2020 at 10:26pm
 
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++):
HardwareSerial Serial3(PB7,PB6); 




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



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



Posts: 10865
United Kingdom
Re: Serial debugging wont start?
Reply #32 - May 10th, 2020 at 1:40pm
 
Off-Topic replies have been moved to this Topic.
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10865
United Kingdom
Re: Serial debugging wont start?
Reply #33 - May 23rd, 2020 at 6:59pm
 
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
 
Pages: 1 2 
Send Topic Print