Skip to content
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

STM32WL5x: unable to restart code on second core #2076

Open
AJ528 opened this issue Feb 13, 2025 · 1 comment
Open

STM32WL5x: unable to restart code on second core #2076

AJ528 opened this issue Feb 13, 2025 · 1 comment

Comments

@AJ528
Copy link

AJ528 commented Feb 13, 2025

While attempting to debug code on the Cortex-M0+ core of my STM32WL55 microcontroller, I realized I am not able to restart code execution. I am able to attach to the already-running core in GDB, but when I send the start command, it fails to restart the program with the error Running the default executable on the remote target failed; try "set remote exec-file"?. BMDA error log says Attach failed.

Attempting to load a new program also generates a BMDA warning of remote_v4_adiv5_mem_read_bytes error around 0xe000edf0 but GDB doesn't complain at that point. But it's not possible to step or continue after that point, the execution freezes.

The BMP is version v2.0.0-rc1-47-g3148437e, Hardware Version 6.

The issue can be replicated on a WL55JC Nucleo board. A minimal reproducible example can be found at this github repo, in the bmp_bug branch. The repo has a submodule. Simple compile the code using make, load the code for both cores on the MCU, then reload and try to debug the M0+ core. Even though the M4 core is enabling it immediately, you are still unable to restart the M0+ program in GDB.

Let me know if there is any other information that would be helpful to know.

@dragonmux
Copy link
Member

We'll give it a look and aim to fix this for the v2.0.0 final release.. this looks like an issue with halting the target or so as 0xe000edf0 is DHCSR.

When BMDA says the attach failed, this is why start is not happy as while GDB thinks its attached to the core, it's not really if that message occurs. Similarly, when load fails with a DHCSR error, that's why step/continue don't work as target comms is gone at that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants