# Debug GIGA using IDE2 Debugger?

**URL:** <https://forum.arduino.cc/t/debug-giga-using-ide2-debugger/1193013>\
**Category:** GIGA R1 WiFi\
**Created:** [November 24, 2023, 1:54pm UTC](https://forum.arduino.cc/t/debug-giga-using-ide2-debugger/1193013 "2023-11-24T13:54:11Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [March 12, 2024, 2:48am UTC](https://forum.arduino.cc/t/debug-giga-using-ide2-debugger/1193013/11 "2024-03-12T02:48:03Z")

</div>

> [@KurtE](#):
>
> J-Link Mini EDU - Which sometimes connects and could debug using the Seger software.

I saw you already got it working by installing the proprietary SEGGER software and adjusting the debugger configuration via a `debug_custom.json` file added to the sketch. In case you find that inconvenient, you might be glad to hear that, since Arduino IDE 2.3.0, it is now possible to use a J-Link debug probe without installing the SEGGER software or adding a `debug_custom.json` file to the sketch. The platform has been configured to configure the free open source **OpenOCD** tool that is installed along with the "Arduino Mbed OS Giga Boards" platform appropriately for use with a J-Link debug probe.

1. Select **Tools \> Programmer \> JLink** from the Arduino IDE menus.
2. Click the "Start Debugging" button on the Arduino IDE toolbar.

If you are using Windows, the debugger initialization might fail with the following error message shown in the " **gdb-server**" panel at the bottom of the Arduino IDE window:

```plaintext
Warn : Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED.
Error: No J-Link device found.

```

The reason is that the drivers provided by SEGGER are incompatible with **OpenOCD** it is necessary to replace them with the WinUSB drivers.

I'll provide instructions you can follow to install the **WinUSB** driver:

1. Download the " **Zadig**" driver installation tool from this website:  
[http://zadig.akeo.ie/](http://zadig.akeo.ie/)  
**ⓘ** Note that the use of **Zadig** is [officially recommended by the **OpenOCD** developers](https://openocd.org/doc-release/README.Windows#:~:text=use%20the%20latest%20Zadig%20installer).
2. Plug your USBasp into your computer.
3. Start " **Zadig**".
4. From the dropdown menu in the " **Zadig**" window, select " **J-Link**".  
❗ If it doesn't show up on the menu, then select **Options \> List all devices** from the Zadig menus and check again.
5. Click the up or down arrows next to the Driver selection box on the right side until you see " **WinUSB**".
6. Click the " **Replace Driver**" button.
7. Wait for the driver replacement process to finish.
8. Close the " **Zadig**" window.

Now click the "Start Debugging" button on the Arduino IDE toolbar again. Hopefully this time it will start up and work as expected.

* * *

In case you wish to continue using the `debug_custom.json` approach, you should be aware of this:

> [@Starting 2.3.0 debugger with J-Link fails: "unable to find CMSIS-DAP device"](https://forum.arduino.cc/t/starting-2-3-0-debugger-with-j-link-fails-unable-to-find-cmsis-dap-device/1230756/6):
>
> Hi @HarrySatt. A significant rework of the debugger configuration system was released in Arduino IDE 2.3.0. This was necessary because as more and more Arduino boards platforms started taking advantage of the debugger feature, some advanced requirements emerged that were not properly accommodated by the original the initial experimental system. The new system is more powerful and flexible, so this change will greatly benefit the platform developers and users in the years to come, but unfortunat…

---

_[View the full topic](https://forum.arduino.cc/t/debug-giga-using-ide2-debugger/1193013)._
