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
Hot Topic (More than 8 Replies) unable to start debugging - raspberry pi pico (Read 7530 times)
approxdec
Junior Member
**
Offline


Posts: 12
Joined: Mar 10th, 2023
unable to start debugging - raspberry pi pico
Mar 10th, 2023 at 11:48pm
Print Post  
hello.

with rpi pico debugging using hardware/picoprobe
i get 'unable to start debugging' after build and load
  

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


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #1 - Mar 10th, 2023 at 11:57pm
Print Post  
unable to start dialog box
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #2 - Mar 11th, 2023 at 11:51am
Print Post  
Thanks for the report.

Can you enable the vMicro > Uploader > Verbose, and try attaching the debugger again from Debug > Attach to Process, and attach the additional output shown in the Output > Micro Build Window, and anything shown in the Output > Debug window.

Please also attach the below log file from the build folder:
Blink_DebugOpenOCD.log
« Last Edit: Mar 11th, 2023 at 11:52am by Simon@Visual Micro »  
Back to top
IP Logged
 
approxdec
Junior Member
**
Offline


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #3 - Mar 11th, 2023 at 10:31pm
Print Post  
micro build + debug

can't find Blink_DebugOpenOCD.log
« Last Edit: Mar 11th, 2023 at 11:24pm by approxdec »  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #4 - Mar 13th, 2023 at 9:43am
Print Post  
Thanks for the logs, the OpenOCD Log should be in the location shown in the attached file.

Can you confirm you have installed the WinUSB Driver using Zadig, for the PicoProbe > Interface 2?

Are all wires connected between the PicoProbe and the target rp2040 as shown on this page?
https://www.visualmicro.com/page/RasPiPico-Debugging.aspx

« Last Edit: Mar 13th, 2023 at 9:47am by Simon@Visual Micro »  

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


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #5 - Mar 13th, 2023 at 11:59am
Print Post  
Blink.ino_DebugOpenOCD

Info : only one transport option; autoselect 'swd'
Warn : Transport "swd" was already selected
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Error: Failed to open or find the device
Error: Can't find a picoprobe device! Please check device connections and permissions.

the WinUSB driver is installed for CMSIS-DAP v2 Interface (Interface 0)

i am using the new Raspberry Pi Debug Probe

and there is the problem.

thank you for your trouble.

i can confirm that the Debug Probe works in the latest
OpenOCD and arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi.exe

will Visual Micro support the Debug Probe?

regards

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


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #6 - Mar 13th, 2023 at 6:25pm
Print Post  
Thanks for the detail.

The WinUSB Driver needs to be installed on (Interface 2) of the PicoProbe, as shown in the below image:


https://www.visualmicro.com/page/Zadig-Driver-Installation-Guide.aspx

We will be reviewing the newer version of OpenOCD in the near future, however this is not required to use the PicoProbe in Visual Micro, its supported on the current versions integrated.
« Last Edit: Mar 13th, 2023 at 6:30pm by Simon@Visual Micro »  
Back to top
IP Logged
 
approxdec
Junior Member
**
Offline


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #7 - Mar 13th, 2023 at 11:46pm
Print Post  
thanks for you help.
i'm sorry for giving you trouble.

i do not want to change to using the Picoprobe. 
i am using the Debug Probe on command line and in
VSCode and it would mean changing configuration in Zadig
to enable using Picoprobe in VSMicro.

if i have a larger project on the Pico in the Arduino IDE
it would be worthwhile making the config changes so
that debugging is available

thanks again for you help.

regards
joe
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #8 - Mar 14th, 2023 at 9:30am
Print Post  
Thanks for clarifying.

Can you send over the commands you are using to debug your project via cmd (for both OpenOCD and GDB) ?

We should be able to show how to get this running in Visual Micro without changing the driver in theory.
  
Back to top
IP Logged
 
approxdec
Junior Member
**
Offline


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #9 - Mar 14th, 2023 at 10:31am
Print Post  
okay ...
so 2 command prompt windows

open 1 for openocd in

Code
Select All
F:\openocd-v0.12.0-i686-w64-mingw32 


then

Code
Select All
.\bin\openocd -f interface\cmsis-dap.cfg -f target\rp2040.cfg -c "adapter speed 5000" -s share 



and the second in the project build folder
which contains the cmake build including the
.elf  .hex  .uf2 files

Code
Select All
arm-none-eabi-gdb “hello_gpio_irq.elf”  


[or whatever the project .elf file is]

just for your information
the \build folder is a result of the toolchain set up
for command line and VSCode programming in C
described at
https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf

this seems like a lot of trouble on your part but i
certainly look forward to it's outcome.

regards
joe

« Last Edit: Mar 14th, 2023 at 10:38am by approxdec »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #10 - Mar 15th, 2023 at 10:32am
Print Post  
Thanks for the information, from what I understand the only change required is to use the cmsis-dap.cfg file instead of the picoprobe.cfg.

If you add a Local board.txt file to your project (vMicro > Add Code > Add Local Board.txt), and paste in the contents from the attached file.

Then rebuild the project, and try attaching the debugger again with the vMicro > Debugger > Hardware Debugger set to "PicoProbe".

We can add further overrides for the OpenOCD version if required, however I don't believe these will be needed.
  

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


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #11 - Mar 15th, 2023 at 11:43am
Print Post  
g'day.

thanks for the local board file text.

you may realise that we are 12 hours apart
[i am in Australia, Sydney time, UTC+11]
and i'm ready for sleep.

so i will check it in the morning.

regards

joe
  
Back to top
 
IP Logged
 
approxdec
Junior Member
**
Offline


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #12 - Mar 15th, 2023 at 10:21pm
Print Post  
board.txt 

# Blink build property overrides
#
params.verbose=-d2
path=C:\ProgramData\VMicro\tools\openocd-rpi-0.10.0.20210623
openocdscript=target/rp2040.cfg
initCmd=-c "init" 
#
# Override the picoprobe.cfg with the cmsis-dap.cfg
# Ensure vMicro > Debugger > Hardware Debugger is set to "PicoProbe"
tools.vmpicoprobe.vmserver.build.openocddebugger=cmsis-dap.cfg


Blink.ino_DebugOpenOCD.log

Error: The specified debug interface was not found (cmsis-dap)
The following debug adapters are available:
1: ftdi
2: usb_blaster
3: ft232r
4: jlink
5: vsllink
6: ulink
7: hla
8: osbdm
9: opendous
10: aice
11: picoprobe
12: xds110
13: st-link


Output [Visual Micro -> Output]

Starting: "C:\\ProgramData\\vmicro\\tools\\openocd-rpi-0.10.0.20210623\bin/openocd.exe" -d2 -l DebugOpenOCD.log}" -s "C:\ProgramData\vmicro\tools\openocd-rpi-0.10.0.20210623/scripts/" -f -dap.cfg" -f fg" -c "init"
Starting: b52\bin\arm-none-eabi-gdb.exe" --interpreter=mi
"C:\\ProgramData\\vmicro\\tools\\openocd-rpi-0.10.0.20210623\bin/openocd.exe" exited with code 1 (0x1).

=====================
the board override has not entirley worked.
Blink.ino_DebugOpenOCD.log shows that openocd cannot find
cmsis-dap
now, that is understandable because it was not in openocd until the new version of OpenOCD 0.12.0

i have looked for a way to change paths for openocd and gdb
in Visual Micro but have not found it

so i am stuck again

thanks

joe

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


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #13 - Mar 16th, 2023 at 8:42am
Print Post  
Thanks for the update.

If you add the overrides from the attached file to the board.txt it will change the OpenOCD Path in use.

Currently we use the Raspberry Pi fork of OpenOCD, and we will investigate this probe further to understand if it can be used with this fork with a different config file, or if it is only available in 0.12 main branch of OpenOCD. Once understood and impelemented we can add the probe to the drop down list so no additional configuration is required.
  

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


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #14 - Mar 16th, 2023 at 9:20am
Print Post  
thank youfor your help.

i will wait for the probe to be available in the drop down list.

in the meantime i can use the command line to openocd
and run arm-none-eabi-gdb from the VSMicro output folder.

regards

joe
« Last Edit: Mar 16th, 2023 at 9:39am by approxdec »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #15 - Mar 16th, 2023 at 9:31am
Print Post  
Would you be able to try the previous posts' overrides file to see if this gets your probe up and running?

For clarity, are you using the official Raspberry Pi Debug Probe, or a Raspberry Pi Pico flashed with the official firmware?
  
Back to top
IP Logged
 
approxdec
Junior Member
**
Offline


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #16 - Mar 16th, 2023 at 9:54am
Print Post  

i have tried the first board override file and
then the second file received just a while ago.

i am using the official Raspberry Pi Debug Probe.

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


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #17 - Mar 16th, 2023 at 10:13am
Print Post  
Thanks for the update and the information, we will integrate the 0.12 OpenOCD version for this probe and update this thread when it is available on the drop down list.

Can you confirm that your probe is showing as using the WINUSB (v10.0.22621.608) Driver for Interface 0?
  
Back to top
IP Logged
 
approxdec
Junior Member
**
Offline


Posts: 12
Joined: Mar 10th, 2023
Re: unable to start debugging - raspberry pi pico
Reply #18 - Mar 16th, 2023 at 10:29am
Print Post  
i look forward to the changes.

CMSIS-DAP v2 Interface (Interface 0)

WINUSB (v6.1.7600.16385)
  

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


Posts: 2697
Joined: Feb 13th, 2019
Re: unable to start debugging - raspberry pi pico
Reply #19 - Mar 16th, 2023 at 10:38am
Print Post  
Thanks for confirming and all of the detail around this, and for bringing this to our attention.

We will update this thread when a release is available with all of this integrated.
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint