Skip to content

STM32WL5x: unable to restart code on second core #2076

@AJ528

Description

@AJ528

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions