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 Send TopicPrint
Hot Topic (More than 8 Replies) raspberry pi debug probe (Read 2695 times)
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
raspberry pi debug probe
Sep 19th, 2023 at 2:28pm
Print Post  
Hi i was wondering if the videos are still relevant for setting up the debug for a pico.
https://www.youtube.com/watch?v=5bX0G1oyV00
https://www.youtube.com/watch?v=hlQKwrlioHc&t=53s

All my options seem to be different. i am using the arduiono 2 and have earle pi lib 3.5 installed. i did find the debug options in vmicro->debug but all but 2 options ar grayed out see atachment.

when debugging i get the message "Unable to start debugging. Unable to establish a connection to GDB. Debug output may contain more information."

I found a similar error message here but to me it is not quite clear what the fix is
https://www.visualmicro.com/page/Troubleshooting-Debugging.aspx

the program compiles just fine and is also uploaded to the pi correctly.

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
Re: raspberry pi debug probe
Reply #1 - Sep 19th, 2023 at 2:37pm
Print Post  
also zadig says i am using driver version of winusb v10
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: raspberry pi debug probe
Reply #2 - Sep 19th, 2023 at 3:19pm
Print Post  
The videos are relevant to our knowledge, and they demonstrate building and using the PicoProbe firmware specifically, though the official RpiDebug Probe device (or firmware) should work very similarly.

Can you enable the options shown at the top of the page in the yellow box, and then perform the Build and then try Debug > Attach to Process, and attach all output from the Output > Micro Build, and Output > Debug windows, as text files?
  
Back to top
IP Logged
 
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
Re: raspberry pi debug probe
Reply #3 - Sep 19th, 2023 at 4:08pm
Print Post  
yes i can, here it is.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: raspberry pi debug probe
Reply #4 - Sep 19th, 2023 at 4:14pm
Print Post  
Thanks, can you also attach the PicoProbeTest.ino_DebugOpenOCD.log file from the Build Folder.

« Last Edit: Sep 19th, 2023 at 4:16pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
Re: raspberry pi debug probe
Reply #5 - Sep 19th, 2023 at 5:20pm
Print Post  
here you go
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: raspberry pi debug probe
Reply #6 - Sep 20th, 2023 at 2:53pm
Print Post  
Thanks for the logs.

This looks to be an issue in the board package, as the GDB.exe has been packaged without its' dependant DLL files (See GitHub Issue Here for same issue on PIO).

This seems to have been the case in all board packages since v3.3.2, so if you change to that version of the board package, the debugging should work again without having to manually add in the DLL files.
  
Back to top
IP Logged
 
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
Re: raspberry pi debug probe
Reply #7 - Sep 20th, 2023 at 6:28pm
Print Post  
oh awsome it worked like a charm. i installed 3.3.1 and i have no issues, other than VS hanging and waiting for a timeout or something when stopping or starting a debug. but it is usable at least. thanks!
  
Back to top
 
IP Logged
 
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
Re: raspberry pi debug probe
Reply #8 - Sep 20th, 2023 at 7:18pm
Print Post  
well it certainly does not debug perfectly. when stopping the debug vs hangs until i restart the pico. and sometimes i get driver not recognized, i need to unplug it for 5-10 seconds and then plug it in again and it will work again.

the reset button does not seem to help anything. now i am using a sparkfun rp2040 micromod with a custom pcb but everything seems to work just stopping the debug seems to generate the issue.

what are your thoughts.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: raspberry pi debug probe
Reply #9 - Sep 21st, 2023 at 11:11am
Print Post  
If you stop the debugging session when you are on a breakpoint it may behave correctly?

We will investigate however it sounds like an issue we have open with Microsoft for the same issue on the ESP32 Toolchain, where Pause or Stop while the debugging session is running causes VS to hang.
  
Back to top
IP Logged
 
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
Re: raspberry pi debug probe
Reply #10 - Sep 21st, 2023 at 1:38pm
Print Post  
https://youtu.be/HOH3EFWrwIU
I made a video of me testing the debugging. its a bit long but its me testing a couple of different ways/order i connect things.

At around 11 min I find out that if the the pico probe serial port is open and I want to debug the upload fails and the driver is not recognized. if port is closed it works fine. but then when the debug is stopped the pico microcontroller seems to stop running. and a reset will start it up again.
« Last Edit: Sep 21st, 2023 at 1:39pm by Precious Roy »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: raspberry pi debug probe
Reply #11 - Sep 21st, 2023 at 4:12pm
Print Post  
Thanks for the video and detail around this.

Can you confirm you have COM4 directly from the target Pico, and COM5 is from the Serial Passthrough on the RPi Debug Probe?

If the setup is different please let us know, just so we can replicate this correctly and resolve the issue there.

Also it's worth noting that the Debug > Start option will build, then upload the code, then attach the debugger.  If no code changes are made, or if you want to jump into the running code (e.g. after Serial Ports are open) then you can use Debug > Attach to Process to do this.
« Last Edit: Sep 21st, 2023 at 4:37pm by Simon@Visual Micro »  
Back to top
IP Logged
 
Precious Roy
Junior Member
**
Offline


Posts: 19
Joined: Dec 6th, 2016
Re: raspberry pi debug probe
Reply #12 - Sep 21st, 2023 at 5:37pm
Print Post  
although I am using virtualhere as usb passthrough in my dev environment. in the case of the video i had it directly hooked up to my dev machine to make sure it was not that.

i have similar issues with a standard pico hooked up.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: raspberry pi debug probe
Reply #13 - Sep 22nd, 2023 at 3:55pm
Print Post  
Thanks for the detail and photo.

Issue 1: Board is non-responsive after debugging Session Ends
We have not found a solution to this currently, but will keep investigating as having to replug the board after each session is frustrating.

Issue 2: Opening Serial Ports During Debug Session
This is best done while the code is running (no active breaks), which allows the board to negotiate the port with the PC.  Once they are open the breaks can be set as normal and this avoids the hangs.

Issue 3: USB Device Not Recognised
It may be due to the UF2 Upload not being given chance to complete before the debugging begins, if you add the entry in the attached file to a local board.txt in your project (vMicro > Add Code > Add Local Board.txt) it will add a delay between the upload completing and the debugging session starting.

It is also worth trying the Debug Probe as a programmer for uploads instead of UF2, which can be selected on the board options menu, Upload Method: Picoprobe (CMSIS-DAP)

Let us know if any of this helps at all, and we will keep investigating....
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint