Arduino IDE: "Maintainers of Arduino cores for third-party boards can add support for debugging by adding the relevant configuration parameters; a technical guide for this is coming. You’ll need to connect a debugging probe such as the Segger J-link to the JTAG pins on the board and you’ll be ready to go." ubidefeo: "not every board is supported, in fact only ARM Cortex based boards can work"
Based on photos attached, personally I have tested the current Arduino IDE 2.0 beta using Seeeduino Xiao Expansion Board with SAMD21G18 chip but the live debug is not supported.
I understand there is no USB programmer port ( EDBG ) such as the Arduino Zero, but it is still the SAMD21G18 Cortex M0+ chip with SWD interface, I can burn bootloader using Segger J-Link programmer on it under Microchip Studio but under Arduino IDE 2.0 beta, the live debugging is not working.
In fact, I also tested using ST-LINK V2 with SWD interface to STM32F103C8T6 clone board and the result is the same as mentioned above, not sure what is missing here, anyone has any idea ?
Hi @rickygai. For the Xiao, you should only need to make the equivalent changes to what was done in the Arduino SAMD Boards platform of the Zero, MKR, etc:
After reading the info you shared, it seems there is still much work to be done under Arduino IDE 2.0 beta to make the live debugger user friendly, still new.
I cannot find a site with proper documentation on how to configure live debugger for custom boards like Seeeduino Xiao, Raspberry Pi Pico or STM32F103C8T6 under Arduino IDE 2.0 beta.
I applied the above configuration to Seeeduino XIAO but the result still the same, nothing to select under the Configurations combo box, if you clicks the debug button, it cleared the content of launch.json.
Yeah, it is an unfortunate situation that the debugger configuration system is currently undocumented. The truth is that, even though I'm in the team developing the Arduino CLI and Arduino IDE 2.x projects, I don't even know how it works (I was not involved in the work on the debugger). I figured out the first version of the system and wrote what I thought was some fairly decent documentation targeted at Arduino boards platform developers:
But quite a bit (though not all) of that information is now obsolete due to a reworking of the system and I haven't taken the time to decipher how it works now. Everything is open source, so the information is definitely all there for the learning, but of course it's essential to have proper documentation to make it easier for the 3rd party boards platform authors to take advantage of this new capability.
Thanks again pert, I just received some info from Seeedstudio forum where live debugging can be done via PlatformIO at HERE. This also means Arduino IDE 2.0 beta surely possible, just need to wait.