2023-12-14 02:03 PM - edited 2023-12-15 02:24 AM
Hi everybody,
just some info regarding debug with dual core.
1. In Stm32CubeIde is it possible to debug a NUCLEO board equipped with STM32H755 with the two sessions contemporary alive? (The debugger mounted on NUCLEO board is STLINK-V3)
2. Is it possible to perform a single step debug (that should mean a step on both cores)?
I read the documents:
- AN5361
- AN5286
and video:
- https://www.youtube.com/watch?v=k3mXhPZSasw&lc=UgzaeLXhXTykoxWVHnp4AaABAg
I noticed a discrepancy between the video and the AN5361. At page 12 the AN reports "Since the STM32CubeMX default project puts the Cortex-M4 in the Deepsleep mode, the [Reset behaviour] field must be set to Connect under reset to be able to communicate with the CPU (refer to Figure 12). The Halt all cores option must not be set." In the video at min 11:30 seems enabled. Who is right?
Question answered by @Sarra.S !
The target 1 to is possible only by "Launch Group". If someone has another solution, please tell me how.
About the point 2. Currently I've no results... Therefore, if someone knows...
Thank you
2023-12-15 01:20 AM
Hello @lonejack,
In AN5361, the selected project (imported from STM32H7Cube package) puts CM4 in sleep mode by default, so that CM7 can wake it up, that's why the note "The Halt all cores option must not be set." is there, otherwise the CM4 won't enter sleep mode, so this is a specific case
The halt all cores option must be set when both cores are working together for a shared task and you want to keep their states synchronized for debugging purposes. So, if a breakpoint is hit or if you manually pause execution in one core, the other core will also be halted.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-12-15 01:48 AM
@Sarra.S, thank you for your answer. My mistake. Now, when you debug with dual core, do you expect to be allowed to proceed by step on both processors?
To me this don't happen...
Furthermore, in the video seems that is only necessary to debug configuration dedicated to CM7 (the CM4 is loaded automatically)... If I do the same thing, I see only CM7 side. If I want to see both I need to run the Launch Group configuration. But also in this case the step by step for both processor doesn't works..
Have you any idea?
Thank you
2024-08-01 04:57 AM
Hi I am still struggling with similar problems here but one thing that made a huge difference is to not use default break point I assume the standard example will run into misalignment with the power domain wait. so set you break point below this on the M7 core:
timeout = 0xFFFF;
while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0));
if ( timeout < 0 )
{
Error_Handler();
}
And disable the default break point in Debugging Config / start up. This way the CubeMx proposed start up works and debugging does not mess it up.
In other works with this tweak the CubeMx example now in version 6.12 frame work 1.11.2 it works together with the process from AN5361 - It seems possible to get it running with default break point but it is way more itchy that way. I assume I have not fully understood what I am doing at this point but to get started this might be helpful trick.