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) Unable to Start with Pico Using Pi Debug Probe (Read 2948 times)
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Unable to Start with Pico Using Pi Debug Probe
May 16th, 2023 at 10:16pm
Print Post  
Hi,
I am trying to debug a Pi Pico using an actual Raspberry Pi Debug Probe (the one housed in a tiny plastic enclosure).  I read the three other messages in the forum with similar Pico issues, but have not arrived at a solution.  My Debugger settings are: “Debug Hardware”, “PicoProbe”, “No Project+Libr Optim”.

Can you take a look at the attached screenshots?

Thanks for your help.
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #1 - May 17th, 2023 at 1:50am
Print Post  
Please enable the below options:
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties
  • vMicro > Uploader > Verbose


Then run the build and upload to the board, and try the Debug > Attach to Process.

If you can attach the complete output as a text file from the Output Window > Micro Build it will help us to understand the issue in more detail.

If there is any output in the Output Window > Debug please also attach this as well as a text file.
  
Back to top
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #2 - May 17th, 2023 at 3:45am
Print Post  
Thanks for the reply.

Attached is from the Output window for BUILD and UPLOAD.

The error message when "Attach to Process" is the same as in the first message.

As previously pointed out, I’m using a “Raspberry Pi Debug Probe”.  While the selection choices under Hardware Debugger has only “PicoProbe” (selected).  Although the Debug Probe is very similar in concept, I believe it’s not identical to the PicoProbe.

Do you know whether vMicro specifically support the “Debug Probe”?
Thanks!
  

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


Posts: 47
Joined: Jan 11th, 2017
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #3 - May 17th, 2023 at 7:44am
Print Post  
You need to set the HOME environment variable to %USERPROFILE%
That will fix the error
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #4 - May 17th, 2023 at 8:28am
Print Post  
In addition to setting the HOME environment variable, you will also need to download the latest version of Visual Micro from the Extension Manager in VS (VS2022) or our Downloads page (VS2017/VS2019), which will add the "Rpi Debug Probe" Option to the debugger listing.
https://www.visualmicro.com/page/Arduino-Visual-Studio-Downloads.aspx

The "Rpi Debug Probe" is the correct selection for the firmware on the probe you have, which can also be flashed onto another RP2040 board to make a probe.
  
Back to top
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #5 - May 17th, 2023 at 5:19pm
Print Post  
Thanks for the replies, Simon and herman.  I’m one step forward…

First, do you mean the Windows’ HOME variable?  I.e., SET HOME=%USREPROFILE%.

With the updated vMicro, I got passed “Attach to Process”!  Now when I “Stop” and “Start Debug”, I encountered an Uploader error (see attached).  COM20 is the port to the target RP2040, which I normally used for uploading.   

What is the correct upload channel given the Pi Debug Probe?   

Thanks.
  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #6 - May 18th, 2023 at 9:07am
Print Post  
Yes it is the Windows Environment Variable for HOME which needs setting to %USERPROFILE%.  Using SET will only work for the lifetime of the command prompt it is done in, use SETX to set it permanently.

You should be able to upload using the UF2 Method via the COM port when using the debug probe.

If you want to upload using the debug probe itself then this should work by setting the Board Option "Upload Method" to "pico-probe (CMSIS-DAP)".

  
Back to top
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #7 - May 18th, 2023 at 4:57pm
Print Post  
Simon,
I really appreciate your help.  I am getting close… 

With the board setting, uploading is now successful.  But when I run with breakpoint(s), it never breaks after Starting.  I set a breakpoint at the start of setup(), and it is confirmed set in the Breakpoints window.

From other indication (via Serial monitoring), my sketch actually has not been reached at all.  The process is running—i.e. “Continue” button greyed-out, “Stop” button active.

Can you see if there’s any clue from the attached RUN output?

Thanks much.  Almost there!
  

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


Posts: 27
Joined: Apr 13th, 2023
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #8 - May 22nd, 2023 at 12:12am
Print Post  
Simon,
Can you please see if you can tell me what is going on: When running with the DebugProbe, the execution never reached setup().  It did pass main(), then apparently tied up in the screenshot, when I manually Break.  So close!

Thanks.
  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #9 - May 22nd, 2023 at 11:49am
Print Post  
If you set a breakpoint in your sketch in loop() does the debugger land on that as expected?

There are sometimes timing issues when trying to debug in setup() however using Debug > Start Debugging should allow you to stop on a breakpoint in setup.
  
Back to top
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #10 - May 22nd, 2023 at 7:55pm
Print Post  
Thanks for the reply, Simon.

The problem isn’t that breakpoints don’t work, they do break when reached upon.  The problem is the execution never has the chance to reach setup().  After starting debug with vMicro, it always stuck at the screenshot previously shown.  The code runs normally without the Debug Probe.

I know my Debug Probe can work, it actually performs as expected with the Arduino IDE 2.1.  But of course, I’d much prefer having the power of vMicro, if possible.

I noticed I do not have a board.txt in my code folder.  What board.txt do I need?
  
Back to top
 
IP Logged
 
discman
Junior Member
**
Offline


Posts: 27
Joined: Apr 13th, 2023
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #11 - May 25th, 2023 at 3:49am
Print Post  
Does anyone know the contents of board.txt needed to operate a Pi Debug Probe (CMSIS-DAP)?

Thanks.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Unable to Start with Pico Using Pi Debug Probe
Reply #12 - May 25th, 2023 at 9:07am
Print Post  
You should not need any overrides in board.txt to use the Pi Debug Probe (CMSIS-DAP) in the latest versions, it should be as simple as selecting the Debugger > Hardware Debugger > RPi Debug Probe.  This will set all options to use that probe (or one created from a Pico and the same firmware). 

Can you try the debugger with a simple blink sketch to see if this behaves differently from your full project?
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint