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) How to configure new debugging (Read 11037 times)
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to configure new debugging
Reply #20 - May 4th, 2019 at 7:38pm
Print Post  
Excellent that's a good start now. Any testing or feedback is great thanks.

We will be documenting and adding easier config menus over the coming few weeks. 

There will be quite a few options and also a difference in "launch" between "debug>start", "debug>step into" and "debug>attach"

I think many of your "args" are not needed and others will be handled differently depending on the type of launch that is being used.

I think first job would be to strip the args back as much as possible. The microsoft debugger already does a lot of it for us.  such as:-

Code
Select All
tools.BlackMagic.args= -nh -b 115200 -ex "target extended-remote \\.\{ComPort}" 



or

Code
Select All
tools.BlackMagic.args= -nh -b 115200 -ex "target extended-remote \\.\{ComPort}" -ex "monitor swdp_scan"  



or

Code
Select All
tools.BlackMagic.args= -nh -b 115200 -ex "target extended-remote \\.\{ComPort}" -ex "monitor swdp_scan" -ex "attach 1"
 



I don't know what the -nh switch is. Maybe not required.
« Last Edit: May 4th, 2019 at 7:40pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to configure new debugging
Reply #21 - May 4th, 2019 at 7:50pm
Print Post  
Also, for some boards you can try to add F4 Project Properties > extraflags=-O0

  
Back to top
WWW  
IP Logged
 
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Re: How to configure new debugging
Reply #22 - May 6th, 2019 at 6:51am
Print Post  
-nh switch is not really important I think. When searching it said this about the case "-nh Do not execute commands from ~/.gdbinit."

-ex "monitor swdp_scan" can be important. Some people might use JTAG instead of SWD
-ex "target extended-remote \\.\{ComPort}"  can be hard coded when using a blackmagic probe since it is required. 

I am not really sure about the baudrate. I think the upload script uses a higher one.

It could be usefull to set a different comport for the included UART of the blackmagic probe and that when you start debugging that it opens the serial monitor with configured serialport.
  
Back to top
 
IP Logged
 
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Re: How to configure new debugging
Reply #23 - May 7th, 2019 at 6:43pm
Print Post  
After using debugging for a while I am seeing some pitfalls. I am used to debugging Java or C# and that I can pause and set breakpoints when I want. That is not the case here. If I pause or stop debugging VS2019 just freezes and setting breakpoints renders them as not active.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to configure new debugging
Reply #24 - May 7th, 2019 at 6:51pm
Print Post  
This is not expected or what we have encountered. The tests we have made give 99% stable debug. However hardware debug does have limits on the number of break points.

I think it is best to wait for us to publish our release over the coming weeks that can handle the args and startup settings for you in a more flexible way and one that should give you a solid environment. I certainly don;t think the startup settings you used are correct for this type of environment. I am sure they are fine for manual debug but probably not for MI.

If you would like us to look into your particular issue then please always provide full build output with "compiler>verbose, compiler>show build properties  and uploader>verbose" otherwise we have to guess which doesn't help you Smiley
  
Back to top
WWW  
IP Logged
 
Natsuki-chan
Junior Member
**
Offline


Posts: 25
Joined: Jan 18th, 2017
Re: How to configure new debugging
Reply #25 - May 7th, 2019 at 6:56pm
Print Post  
I will wait then. For now it work well enough considering it is still sort of beta. Can't wait for this feature to be more fleshed out.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to configure new debugging
Reply #26 - May 7th, 2019 at 7:19pm
Print Post  
Great, yes we are looking forward to everyone enjoying it.

A few other points I am not sure if I made but you have not mentioned so I will mention them again because they might affect things.

1) set extraflags to -O0 in the Project Properties (F4 on project)
2) switch off vMicro>Compiler>Shared Cache for Cores
3) Ensure the tool bar is set to Debug and not Release
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint