2025-10-23 11:10 AM - last edited on 2025-10-23 11:31 AM by mƎALLEm
Hello Everyone,
Am looking for a little help on what I hope is a simple issue.
A quick summary is when I use freeRTOS + STM32Cube and set a breakpoint in one of the default task lines it never triggers. Breakpoints enabled before the scheduler is started work ok.
Can anyone point me in a direction to remedy this? Will provide more details below.
BTW, I'm new to the community and this is my first time posting. Happy to hear any suggestions from any of you that will improve my posts.
Details
Cheers,
MC
Solved! Go to Solution.
2025-10-23 12:59 PM - edited 2025-10-23 1:04 PM
Hello,
Attached a project where the on board (STM32F769I-DISCO) LEDs are toggling in the default task.
I can set a break point and reach the GPIO toggle here:
void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
HAL_GPIO_TogglePin(GPIOJ,GPIO_PIN_5 | GPIO_PIN_13);
osDelay(500);
}
/* USER CODE END 5 */
}
Hope that helps
2025-10-23 11:40 AM
Hello @MCENG and welcome to the community,
Did you select another timeer for the system (HAL) and kept the FreeRTOS time base with the system tick?
See this video: FreeRTOS on STM32 v2 - 01 Preparation - lab
Slide at @4:05 it indicates that the "Time base source" needs to be changed to another timer like TIM6 and System tick needs to be reserved for FreeRTOS scheduler time base:
2025-10-23 12:25 PM
Hi,
Thanks, glad to be here.
Yes I did take care of the Timers in a similar fashion to that shown in the video.
The difference being my debugger shows the only viable option as Serial Wire and all wakeup selections are highlighted
But, I will re-do them just to be sure.
Cheers,
MC
2025-10-23 12:59 PM - edited 2025-10-23 1:04 PM
Hello,
Attached a project where the on board (STM32F769I-DISCO) LEDs are toggling in the default task.
I can set a break point and reach the GPIO toggle here:
void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
HAL_GPIO_TogglePin(GPIOJ,GPIO_PIN_5 | GPIO_PIN_13);
osDelay(500);
}
/* USER CODE END 5 */
}
Hope that helps
2025-10-23 1:27 PM
Hi,
Thanks for the application example.
It compiled and runs just fine. Still no breakpoint trigger in default task routine.
this seems so very strange.... maybe I'm just doing something wrong setting the breakpoint.
This is more or less grasping at straws at this point. Now i'm looking for things i may be doing differently.
Apologies for all the hassle. Thought this was going to be a simple thing but now i'm not so sure.
We have 2 more eval boards. I think I will try this on another one to rule out a issue with the board itself.
Best Regards,
MC
2025-10-23 1:41 PM
Were you able to set a break point and reach it before adding FreeRTOS?
2025-10-23 2:03 PM
Hi,
It's been solved. A case of user stupidity on my part :)
One of the other devs ran your project and BP's work for him.
I started looking around and realized a while back I had used the skip all breakpoint toggle. it appears that controls scope is the IDE rather than a specific project and apparently persistent. In any case my mistake was not checking / turning it back off.
I'm good to go now.
Thanks for the help.
MC