Skip to content

Debugging is not supported by "Nucleo-64' while selected Nucleo F446RE #1760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
N0rbert opened this issue Dec 10, 2022 · 1 comment
Closed
3 tasks done
Assignees
Labels
conclusion: off topic Off topic for this repository type: imperfection Perceived defect in any part of project

Comments

@N0rbert
Copy link

N0rbert commented Dec 10, 2022

Describe the problem

Unable to debug simple Blink.ino program on Nucleo F446RE board.

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.

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.

Expected behavior

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

Arduino IDE version

Version: 2.0.3
Date: 2022-12-05T09:27:52.215Z
CLI Version: 0.29.0 [76251df9]

Operating system

Linux

Operating system version

Debian 11 bullseye (stable)

Additional context

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.

I hope someone will post fully-reproducible instruction to setup Arduino IDE 2.x for STM32 debugging.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@N0rbert N0rbert added the type: imperfection Perceived defect in any part of project label Dec 10, 2022
@per1234 per1234 self-assigned this Dec 10, 2022
@per1234
Copy link
Contributor

per1234 commented Dec 10, 2022

Hi @N0rbert. The reason debugging is not supported is because the STM32duino boards platform is not configured for debugging support. If the necessary configuration is done in the boards platform, then you will see that Arduino IDE allows you to debug.

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

Nothing. Arduino IDE automatically generates a launch.json file based on the configuration from the boards platform if the platform contains such a configuration.

Since your report is actually about the STM32duino boards platform codebase and nothing can be done here in the Arduino IDE 2.x codebase repository, I'll close this as off topic.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2022
@per1234 per1234 added the conclusion: off topic Off topic for this repository label Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: off topic Off topic for this repository type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants