Will the UNO R4 Minima & WiFi going to support debug?

I read that only SAMD boards support currently the debug feature of the 2.X IDE, but also i heard that the UNO R4 now can be used for debugging.
Is there a plan for it to support this feature in the future? And if so, when?

Debug hardware is already there:

On the R4 WiFi, I think debug is via the ESP32?

To be clear, the information on that UNO R4 Minima documentation page is about an SWD header to which you can connect an external debug probe to the board, rather than about an on-board debug probe. That is still important because the SWD header makes it very convenient to connect a debug probe to the board simply by plugging in a cable. The situation is different with the UNO R4 WiFi due to the presence of a separate ESP32 microcontroller in addition to the primary RA4M1 microcontroller.

This is similar to the difference between the MKR 1000 WiFi board, which has an SWD header, but no on-board debug probe (and thus requires an external debug probe to be connected to the board to use it with the Arduino IDE 2.x integrated sketch debugger) and the Zero, which has an on-board EDBG debug probe (and thus can be used without the need to connect any external hardware to the board).

1 Like

If I select the Uno R4 Wifi board in the 2.2.1 IDE the debug button is disabled.
image

Am I missing something?

Hi @domingsb. The Arduino IDE 2.x integrated sketch debugger can only be used with boards for which the appropriate configuration has been set up in their Arduino platform. That has not been done in the "Arduino UNO R4 Boards" platform of the UNO R4 WiFi board.

This is the reason why the debug button is disabled even if the hardware of the UNO R4 WiFi board does theoretically support debugging.

If you are interested in using the Arduino IDE 2.x integrated sketch debugger, I can recommend a couple of boards which are fully supported:

The Zero has an on-board debugger. This tutorial provides instructions for using it:

The Nano ESP32 has a built-in debugging capability. This tutorial provides instructions for using it:

The MKR boards and Nano 33 IoT require you to connect an external debug probe. This tutorial provides instructions for doing that:

The developers of several 3rd party boards platforms have also added the necessary configuration for using their boards with the IDE 2.x integrated sketch debugger. Some of these don't have any documentation and others require some complex configuration so using the debugger with these boards will likely be a more challenging endeavor more appropriate for advanced users:

Hi @ptillisch , Thanks for the "instant" reply! I needed the capabilities of the R4 Wifi for my project. Do you know if debug support for the Uno R4 Wifi is planned for the Arduino IDE or is this board never to be considered debuggable via the Arduino IDE? After all, the IDE already supports OpenOCD which is what this module needs to use (via the ESP S3).

From looking at the commit history in the platform, it does appear there are (or were) at least some tentative plans to add support:

That configuration is still in place, but it was later commented out:

So if you are feeling up to a challenge (and are willing to risk possibly "bricking" your board), you could make some experiments with enabling it once more in your installation of the platform.

Hi @ptillisch, thanks for lookng those commits up. I guess I wasn't using a good search query to find them.
The commented-out lines are all debug configuration (as I would have expected). These seem fairly benign to me but my knowledge level is zero on what settings would brick a board.
What do you think the risk level is?
Do you think debug configuration platform settings could possibly brick a board?

I don't have any idea about what the risks might be. Unfortunately I don't have any experience or special knowledge about the subject of debugging the UNO R4 WiFi. Maybe one of the more knowledgeable forum users will comment.

It is quite easy to "soft brick" many Arduino boards, even through a bug or even expected behavior of sketch code uploaded normally. In most cases it is also quite simple to recover the board from that "soft bricked" if you know the necessary procedure. But even in these cases where a simple recovery is possible, the experience can be quite frustrating for a user who doesn't know that procedure and doesn't have skills necessary to learn it by searching the web.

Understood. Thank you for your honesty and all your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.