2021-09-30 01:06 AM
Hello everyone,
I have Nucleo-L4P5ZG and the development environment is WIN10 , CubeIde1.4 and CubeMx 6.2.
I am facing a strange behavior while I'm trying to debug a simple FREERTOS toggle Led code here are details:
1- I started with Cube Mx and generated code for Cube IDE with the following configurations:
and that's it.
2- I put the toggle led code in the default task
void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
osDelay(1000);
HAL_GPIO_WritePin(GPIOB, LD2_Pin, GPIO_PIN_RESET);
osDelay(1000);
HAL_GPIO_WritePin(GPIOB, LD2_Pin, GPIO_PIN_SET);
}
/* USER CODE END 5 */
}
3-Everything is working fine without launching the debug session
4-When I started debug session the code stops at main function as expected and when I pressed the play button the Led started to toggle
5- when I stopped and relaunched the debug session I noticed that code doesn't stop at main function and
6- when I stopped and relaunched the debug session again everything works as expected but this scenario must be repeated (one time debug hangs and nothing works then the next one everything is perfect)
I need to know the reason behind this hang behavior?
Thanks in advance.
Edit: Project is attached
Solved! Go to Solution.
2021-10-03 02:46 AM
Maybe related to https://community.st.com/s/question/0D53W00000raYd2SAE/intermittent-break-at-address-0x1fff51f4-with-no-debug , see post of MCU Support Center (ST Employee) there.
JW
2021-09-30 07:29 AM
In the stuck state, hit pause and see where the processor is at. Sounds like it may be a debugger initialization issue.
Latest CubeIDE version is v1.7.0, might see improvements there, might not.
2021-10-02 11:10 PM
Dear TDK,
Thank you so much for fast response.
Regarding where the processor is at, here what I got when pause is pressed : Break at address "0x1fff16a8" with no debug information available, or outside of program code.
Regarding using Cube IDE 1.7 instead 1.4, I tried V1.7 and nothing is changed the same behavior still exists.
Any other suggestions ?
Thanks.
2021-10-03 02:46 AM
Maybe related to https://community.st.com/s/question/0D53W00000raYd2SAE/intermittent-break-at-address-0x1fff51f4-with-no-debug , see post of MCU Support Center (ST Employee) there.
JW
2021-10-03 07:25 AM
2021-10-03 10:46 PM
Thanks TDK for your effort.
2021-10-03 10:48 PM
Thanks waclawek.jan ,the issue is resolved after applying the patch.