Skip to content

Debugging on Nucleo H755ZI-Q doesn't work properly #87293

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
mthiede-acn2 opened this issue Mar 18, 2025 · 6 comments
Closed

Debugging on Nucleo H755ZI-Q doesn't work properly #87293

mthiede-acn2 opened this issue Mar 18, 2025 · 6 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: low Low impact/importance bug Stale Waiting for response Waiting for author's response

Comments

@mthiede-acn2
Copy link
Contributor

Describe the bug

Debugging using west debug does not work properly.
For example, single stepping is not possible.
si will not run the next instruction.
n and s also don't work as well as a c after hitting a breakpoint.

I updated the firmware of the STLink to the latest version.
I tried halting the M4 core using the BOOT_CM4 option without success.
I get the same behavior with Zephyr v4.1.0

To Reproduce

  1. west build -b nucleo_h755zi_q/stm32h755xx/m7 -p always samples/basic/blinky
  2. west debug
  3. b main
  4. c
  5. n

Expected behavior
Debugger single steps to next instruction

Impact
Debugging hardly possible. It is possible to set and break on a first breakpoint though (like on 'main' above)

Environment (please complete the following information):

  • OS: WSL/Ubuntu
  • Toolchain: Zephyr SDK 0.17.0
  • Zephyr: v4.0.0 (release tag), same with v4.1.0
  • Open On-Chip Debugger 0.11.0+dev-00728-gb6f95a16c-dirty (from SDK 0.17.0)
  • GNU gdb (Zephyr SDK 0.17.0) 12.1
@mthiede-acn2 mthiede-acn2 added the bug The issue is a bug, or the PR is fixing a bug label Mar 18, 2025
@kartben kartben added the platform: STM32 ST Micro STM32 label Mar 18, 2025
@erwango erwango added the priority: low Low impact/importance bug label Mar 18, 2025
@erwango
Copy link
Member

erwango commented Mar 18, 2025

I don't have this board, so I can't test, but I had a quick test on stm32h747i_disco/stm32h747xx/m7 and debug works reliabily.
Though, openocd config file for Nucleo H755ZI-Q isn't aligned on stm32h747i_disco, so it should be aligned.
Would you be able to import the configuration and have a try ?

About M4 debug, IIRC there were some attempts to have it functional with gdb, but from what I could test it doesn't work. The related note in the board documentation still stands:

Debugging a Zephyr application on Cortex M4 side with west is currently not
available. As a workaround, `STM32CubeIDE`_ can be used.

@erwango erwango added the Waiting for response Waiting for author's response label Mar 18, 2025
@lromeraj
Copy link

Did you build the application without size optimizations (default mode)? Try enabling CONFIG_DEBUG=y and ensuring CONFIG_DEBUG_OPTIMIZATIONS=y, then reflash the firmware and check if it improves the debugging process.

@mthiede-acn2
Copy link
Contributor Author

@erwango I modified zephyr/boards/st/nucleo_h755zi_q/support/openocd.cfg to contain line

source [find board/stm32h745i-disco.cfg]

instead of

source [find board/st_nucleo_h745zi.cfg]

and now single stepping and continue work.

@lromeraj thanks for the hint, this improves debug experience once debugging is working at all

@erwango
Copy link
Member

erwango commented Mar 20, 2025

@mthiede-acn2 Thanks for the feedback. Would you have the possibility to push this change so everyone can benefit ?

@mthiede-acn2
Copy link
Contributor Author

@erwango I've created #87541

Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: low Low impact/importance bug Stale Waiting for response Waiting for author's response
Projects
None yet
Development

No branches or pull requests

4 participants