Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger starts only once on Windows #141

Open
Slion opened this issue Jun 12, 2024 · 2 comments
Open

Debugger starts only once on Windows #141

Slion opened this issue Jun 12, 2024 · 2 comments

Comments

@Slion
Copy link

Slion commented Jun 12, 2024

Pico W + Debug Probe + Windows 11 + Pico Visual Studio from Pico Setup
The probe is updated to the latest firmware.
Looks like that issue is specific to tinyusb_dev_hid_composite example.
The Pico W blink example works just fine.

I can start the debugger once and it seems to work fine. Then when I stop it the probe's yellow LED stays on.
Trying to restart it gives me OpenOCD timeout:
image

The only way to get it to work again is to reboot both Pico W and Probe.

Logs:

Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from arm-none-eabi-objdump --syms -C -h -w S:/Dev/GitHub/raspberrypi/pico-examples/build/usb/device/tinyusb_device_examples/hid_composite/tinyusb_dev_hid_composite.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p S:/Dev/GitHub/raspberrypi/pico-examples/build/usb/device/tinyusb_device_examples/hid_composite/tinyusb_dev_hid_composite.elf
Launching GDB: arm-none-eabi-gdb -q --interpreter=mi2
    IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems
Launching gdb-server: openocd.exe -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "S:\\Dev\\GitHub\\raspberrypi\\pico-examples" -f "c:/Users/micro/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
    Please check TERMINAL tab (gdb-server) for output from openocd.exe
Finished reading symbols from objdump: Time: 56 ms
Finished reading symbols from nm: Time: 78 ms
Output radix now set to decimal 10, hex a, octal 12.
Input radix now set to decimal 10, hex a, octal 12.
Failed to launch OpenOCD GDB Server: Timeout.
Waiting for gdb server to start...[2024-06-12T19:37:52.124Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd.exe -c "gdb_port 50007" -c "tcl_port 50008" -c "telnet_port 50009" -s "S:\\Dev\\GitHub\\raspberrypi\\pico-examples" -f "c:/Users/micro/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
Open On-Chip Debugger 0.12.0-g4257276 (2023-01-27-10:19)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
CDLiveWatchSetup
Info : Hardware thread awareness created
Info : Hardware thread awareness created
adapter speed: 5000 kHz

Info : Listening on port 50008 for tcl connections
Info : Listening on port 50009 for telnet connections
Error: unable to find a matching CMSIS-DAP device

[2024-06-12T19:37:52.397Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
@lurch
Copy link
Contributor

lurch commented Jun 13, 2024

pinging @ndabas in case he has any suggestions

@ndabas
Copy link

ndabas commented Jun 13, 2024

I'll have to try this out and see if I can replicate it. From the looks of it, it doesn't seem to be a Windows-specific issue ("probe's yellow LED stays on" and "Error: unable to find a matching CMSIS-DAP device".)

It's possible that something we're doing on Windows isn't closing the debugger connection cleanly though, so I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants