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) Hardware debug error with Picoprobe, No drive to Deploy? (Read 1422 times)
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Hardware debug error with Picoprobe, No drive to Deploy?
Aug 8th, 2024 at 6:57pm
Print Post  
I purchased Visual Micro on 8/3/2024 and running it on VS2022.  I was able to get it to work properly with an Arduino board but get an error when uploading to a Pico W board and Pico Probe Debugger.  The error is “No drive to deploy. The uploader returned an error.”  I am unable to resolve this issue and need assistance.   

VM Configuration:
•      Attached is my output with verbose logging and Show Build Properties enabled. 
•      The setup was performed according to instructions from your website, How to debug a Raspberry Pi Pico with an Arduino project and GDB? (visualmicro.com).  The only differences between the instructions and my installation is that my PicoProbe is a smaller square board than the one shown in the VM instructions, and also Zadig V2.9 does not display an option Picoprobe (Interface 2). The driver that becomes available to me when I plug in the Pico Probe USB is CMSIS-DAP v2 Interface (Interface 0). WINUSB v10.0.
•      I have included C:\Program Files\Git\mingw64\bin as a path in my environment variables.

IDE: Arduino 2
Installed Platform: Raspberry Pi Pico/rp2040 v3.9.4

How can I isolate the cause for the error and resolve it?
  

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


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #1 - Aug 8th, 2024 at 9:14pm
Print Post  
We will produce a version that writes a log. We tested with the same config as yourself and still struggle to reproduce. The log will give greater detail.

It should be available shortly and will update this thread when it is.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12166
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #2 - Aug 8th, 2024 at 10:16pm
Print Post  
The build has been updated. Please redownload it from here

Add the properties shown in bold to the command line and then email the log out of the  "[vmbuild.exe path]\logs" folder.

-builder.project_path="[project path and name].vcxproj" -builder.build=true -builder.verbose=true -builder.log=true -builder.dump_props=true

Thanks
« Last Edit: Aug 8th, 2024 at 10:16pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #3 - Aug 9th, 2024 at 1:06pm
Print Post  
Tim,
Attached is the log file created by VMBuilder. I appreciate your help and look forward to hearing from you.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #4 - Aug 9th, 2024 at 1:24pm
Print Post  
I apologize Tim, I used VMBuilder on the larger project file I had developed and tested on the Arduino. When I ran it on the simple Pico test program, VM Builder threw an exception message saying libdep.a is either not designed to run on Windows or contains an error. I had to hit OK multiple times with a reoccuring exception until the compilation completed. Attached is the log file. I can send a screen shot of the exception message if that would help you.
  

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


Posts: 2499
Joined: Feb 13th, 2019
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #5 - Aug 9th, 2024 at 2:39pm
Print Post  
Thanks for the detail, and if you could attach the screenshot of the error mentioned it would be useful.

From your description of Zadig it sounds like you have the "Rpi Debug Probe" which is slightly different to the PicoProbe.  The below shows the same driver setup, and one can be created from another RPi Pico Board:
https://www.visualmicro.com/page/Creating-a-Raspberry-Pi-Debug-Probe-(CMSIS-DAP)...

Before performing the upload via Serial, if you unplug your Rpi Pico board, and hold the BOOTSEL button as you connect it, does a drive appear in Windows Explorer?

If so does the upload then work again afterwards?
  
Back to top
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #6 - Aug 9th, 2024 at 8:08pm
Print Post  
You are correct, I am using the Raspberry Pi Debug Probe hardware.  I thought they were functionally the same! 

Placing the board in boot select mode allowed the download to complete.  However, a second exception occurs when it attempts to start debugging.  Attached is a screenshot with two exceptions. I first is my original exception associated with the rp2040 library when I ran VMBuilder this morning.  The second is the most recent exception associated with the debugger.
  
Back to top
 
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #7 - Aug 9th, 2024 at 8:10pm
Print Post  
And the file screenshot!
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #8 - Aug 11th, 2024 at 2:47pm
Print Post  
UPDATE: I made some progress over the weekend and resolved the second error message.  The Hello World example code now flashes and the Debug Probe yellow and green UART LEDs are on. However, the serial monitor opens and then immediately closes when I start the program, and the break point I set on the printf statement has an exclamation warning. It says, "The breakpoint will not currently be hit. Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained." I tried reopening the monitor and it remains open but there is no activity.  I also tried manually attaching the debug to the OpenOCD process. No Luck.

I don't know if it's relevant, but I read a post that OpenOCD v 0.11 or 0.12 is required for the RPi Debug Probe to work properly. I notice that the Visual Mirco OpenOCD installed at C:\ProgramData\VMicro\tools\openocd-rpi-0.10.0.20210623\bin  is v0.10.   

What might be causing the breakpoint not to function? I've attached a VMBuilder log to this message in case that might be helpful in isolating the cause. Thank you!
  

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


Posts: 2499
Joined: Feb 13th, 2019
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #9 - Aug 12th, 2024 at 9:15am
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2499
Joined: Feb 13th, 2019
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #10 - Aug 12th, 2024 at 10:16am
Print Post  
It could be that we need to update our internal OpenOCD version which we will look at in the coming days.

Can you try selecting the "Debug: Arduino" option instead of "Debug: Hardware", and then try attaching the debugger again?

(This will use the same configuration as the Arduino2 IDE for debugging and will run the OpenOCD version packaged with the boards' tools)
  
Back to top
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #11 - Aug 12th, 2024 at 1:17pm
Print Post  
I am getting the same warning message and serial monitor behavior with Arduino debugging.  See attached screenshot.
  

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


Posts: 2499
Joined: Feb 13th, 2019
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #12 - Aug 12th, 2024 at 1:39pm
Print Post  
Thanks for the update.

Are you running the Serial via the PicoProbe, or directly from the USB lead between the target RP2040 and the PC?

Are you calling the main() in your hello_serial.c from the INO or is it possible to share the code for your project (either here or via email)?
  
Back to top
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #13 - Aug 12th, 2024 at 2:24pm
Print Post  
My wiring configuration is as follows:

UART Wiring from RPi Debug Probe to Pico W:
•      Yellow (RX) to Pin 1 (RX on the Pico)
•      Orange (TX) to Pin 2 (TX on the Pico)
•      Black (GND) to Pin 3 (GND on the Pico)
•      
Debug Wiring from RPi Debug Probe to Pico W:
•      Orange (TX)  to the pin in the center of the board.
•      Yellow (RX)  to the pin closest to the edge of the board.
•      Black (GND)  to the center pin.

Both the RPi Debug Probe and Pico W board USBs are connected to the PC   

Here is the example code I am using to test the VM functionality.

/**
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include <stdio.h>
#include "pico/stdlib.h"

int counter = 0;

int main() {
    stdio_init_all();
    while (true) {
        printf("Hello, world!\n");
        counter++;
        sleep_ms(1000);
    }
}

  
Back to top
 
IP Logged
 
Stratocaster
Newbies
*
Offline


Posts: 9
Joined: Aug 8th, 2024
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #14 - Aug 12th, 2024 at 6:27pm
Print Post  
Simon,

Attached is the Test project as a Zip file.  Your reply asking about the ino file may be the problem. 

I am not well versed on the interactions between VM, VS and Arduino IDE; nor how the debug, UART and USB channels are applied for hardware debugging.  Therefore, I have not applied an INO file to my test. The C programming information I’ve read (Programming the Raspberry Pi Pico/W in C, second edition) all is pure C with a main(), no ino file.  So are you suggesting that I need to create a INO file, establish the Serial port in setup() and then call main in loop()?  If so, does it get deployed that way to the release version? If so, it would be helpful if you could point me to some educational resources that would help me come up to speed to fill in my blind spots. 

Thank you.

John
  

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


Posts: 2499
Joined: Feb 13th, 2019
Re: Hardware debug error with Picoprobe, No drive to Deploy?
Reply #15 - Aug 13th, 2024 at 9:22am
Print Post  
Thanks for the project, and it makes sense now why the breakpoint cannot be bound.

The Arduino INO file is essentially just a CPP file (C++) which is further simplified by the Arduino build process (which generates prototypes and includes the Arduino core automatically).  The Arduino core for the RP2040 boards provides a wrapper around the PicoSDK, which should make it simpler to use, as it provides objects for all common features (Serial, GPIO etc).

You don't need to use the CMake build system in any way when working with the Arduino ecosystem as they provide all build tools (gcc) which are automatically used by Visual Micro / Arduino IDE, when you click the build button.

We demonstrate a simple first project in the below video, with more resources on our website, YouTube Channel, and of course the Arduino Website:
https://www.youtube.com/watch?v=asYqoqbRE_I

For your sketch the INO would simply be as below as the PicoSDK and Stdio are automatically available:

Code (C++)
Select All
void setup() {
    Serial.begin(115200);
}

int counter = 0;

void loop(){
    Serial.println("Hello World!");
    counter++;
    delay(1000);
} 



The PicoSDK has a wealth of documentation at https://arduino-pico.readthedocs.io/en/latest/

In the Micro Explorer > Examples Tab > rp2040\3.9.4\libraries there are a number of examples for specific features of the board.
Documentation: https://visualmicro.com/page/User-Guide.aspx?doc=Micro-Explorer.html
Video: https://www.youtube.com/watch?v=JZDQz2kfjsM

Let us know if this helps?
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint