Skip to content

Arduino IDE 2.x Debug feature support #1896

Closed
@N0rbert

Description

@N0rbert

Is your feature request/improvement related to a problem? Please describe.

Yes, it is related to debugging problem. I'm unable to debug simple Blink.ino program on Nucleo F446RE board. Arduino IDE 2.0.3 says "Debugging is not supported by 'Nucleo-64'".

Steps to reproduce:

  1. Download latest Arduino IDE 2.0.3, extract and launch it.
  2. In Arduino IDE go to FilePreferences and set https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json as additional board URL for stm32duino.
  3. In Boards Manager add STM32 MCU based boards by STMicroelectronics.
  4. Select Nucleo-64 board and set Tools → Board part number to Nucleo F446RE.
  5. Set Tools → Debug symbols and core logs to Symbols Enabled (-g).
  6. Set Tools → Optimize to Debug (-Og).
  7. Try to debug the program.

blink-debug

Pressing Debug → Start Debugging open empty template for launch.json instead of normally preconfigured and reproducible file.

debug-start_debugging

It is unclear what user should write in the fields on launch.json file

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  "version": "0.2.0",
  "configurations": [
  {
    "cwd": "${workspaceRoot}",
    "executable": "./bin/executable.elf",
    "name": "Debug with OpenOCD",
    "request": "launch",
    "type": "cortex-debug",
    "servertype": "openocd",
    "configFiles": [],
    "searchDir": [],
    "runToEntryPoint": "main",
    "showDevDebugOutput": "none"
  }
  ]
}

to get OpenOCD working with STM32.

Describe the solution you'd like

Arduino IDE 2.x detects preconfigured launch.json for well known and mature stm32duino framework.
Debugging is possible using OpenOCD software and embedded ST-Link hardware.

Describe alternatives you've considered

The debugging of STM32F446RE on Nucleo-64 F446RE is actually possible using VSCode with vscode-arduino, cortex-debug and marus25.cortex-debug-dp-stm32f4 extensions by openocd from Debian repository and STM32F446x.svd file from marus25.cortex-debug-dp-stm32f4 extension.

Additional context

The current behavior was observed using latest Arduino IDE
(Version: 2.0.3 ; Date: 2022-12-05T09:27:52.215Z ; CLI Version: 0.29.0 [76251df9] ) and stm32duino 2.3.0.

This issue was originally filed at arduino/arduino-ide#1760 .

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions