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



Posts: 10344
United Kingdom
Re: How to configure new debugging
Reply #20 - May 4th, 2019 at 8:38pm
 
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:
tools.BlackMagic.args= -nh -b 115200 -ex "target extended-remote \\.\{ComPort}" 



or

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



or

Code:
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.
Back to top
« Last Edit: May 4th, 2019 at 8:40pm by Visual Micro »  
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10344
United Kingdom
Re: How to configure new debugging
Reply #21 - May 4th, 2019 at 8:50pm
 
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: 17
Re: How to configure new debugging
Reply #22 - May 6th, 2019 at 7:51am
 
-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: 17
Re: How to configure new debugging
Reply #23 - May 7th, 2019 at 7:43pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10344
United Kingdom
Re: How to configure new debugging
Reply #24 - May 7th, 2019 at 7:51pm
 
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: 17
Re: How to configure new debugging
Reply #25 - May 7th, 2019 at 7:56pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10344
United Kingdom
Re: How to configure new debugging
Reply #26 - May 7th, 2019 at 8:19pm
 
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
 
Pages: 1 2 
Send Topic Print