I am testing my installation of IDE v2.1.1 with both the Arduino Zero [with the EDBG built in] and the Arduino Nano 33 IOT. Both boards are new and a fresh install of Arduino IDE v2.1.1. Arduino claims that both boards are set up for debugging in this IDE, however, in both cases I experience error message "failed to launch OpenOCD GDB server". In the case of the Arduino Zero, due to so many tries, now won't even allow upload of a sketch. As to the Arduino Nano 33, I can upload but not debug. The serial monitor functions OK so board connection is not lost. I have checked the directly paths and all is as should be.
If you have experienced this problem and solved it, please advise, thank you.
Waiting for gdb server to start...[2023-07-31T16:38:28.121Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\openOCD\OpenOCD-20230712-0.12.0\bin" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\Arduino_v2\Sketchbooks\RandomGlove2" -f "C:/Program Files/Arduino IDE/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f "C:\Users\post2\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13/variants/nano_33_iot/openocd_scripts/arduino_zero.cfg"
Make your post via the web browser instead of an email reply. This will allow you to carefully review the preview of how your post will be rendered by the forum software before posting it. Your previous reply is an unreadable mess. You will see the preview in the right hand panel of the post composer interface (you might need to click the X icon on the overlay if the forum software is also using that panel to display a message for you.
An update on status, the Arduino IDE v2.1.1 still fails to launch OpenOCD GDB server as explained in my initial post. However, I was successful in recovering the Zero device. Please see below:
Arduino Zero:
I took the following steps to recover the Zero:
I refreshed the EDGB firmware as per instructions found here using Microchip/Atmel Studio 7: Microchip Lightning Support
The Arduino IDE v2 now recognized the Zero on USB attachment. Selecting the EDGB tool, I reburned the bootloader.
It was possible now [using usb/programming port] to compile and upload sketch code into the Zero and run it.
however, the debug feature failed as per my first post, no change here.
As to the NANO, I am using Atmel ICE as the debug tool and have yet to do more testing here.
I also have added the folder path for the openocd.exe to the windows system and user environment path variables. [ C:\openOCD\OpenOCD-20230712-0.12.0\bin].
I do use the following IDEs also installed on this computer but of course only one in use at one time:
Visual Studio 2022
Visual Studio Code
Microchip Studio
Microchip MPLAB X v5.25
STM32 IDE and related tools
Keil uVision5
IAR EW v8.4
Hopefully there is no conflict with Arduino IDE.
Regards, Paul.
The location it is attempting to use for OpenOCD is unexpected:
When you install the "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" platform of the Zero via the Arduino IDE Boards Manager, it also installs OpenOCD, and the platform is configured to automatically use that installation. There is never any need to manually install a separate copy of OpenOCD, and even if you did that the debugger should not attempt to use it.
Do you have any idea why it is attempting to use OpenOCD from C:\openOCD\OpenOCD-20230712-0.12.0\bin? Did you make any manual configuration of the debugger?
It's possible that in my attempts to fix the problem that I modified the debugger settings, but not after initial install. I had no expectation that I needed to install open OCD separately. In any event the problem was resolved by uninstalling all Arduino IDEs (v1 and v2) and Open OCD installations, removing any residual files and then following a clean reboot of Windows, reinstalling IDEv2 only... and all works fine. Still unanswered question is why the IDEv2 debugger couldn't load or attach to the Open OCD process first time around.
I'm glad it is working now. Thanks for taking the time to post an update!
I don't have an answer to that. It won't be possible to investigate the problem further now that you are no longer able to produce the fault. I hope we can at least be satisfied that your system is now in a functional state even if we can't know why it was in a non-functional state before.