cancel
Showing results for 
Search instead for 
Did you mean: 

how to switch to other task's context

HarryXia
Associate II

I am using STM32CubeIDE to develop a product with STM32H7 chip. I enabled freeRTOS in our software system. When I debug code, I can see freeRTOS tasks in "FreeRTOS Task list window" and I am in current task context. How can I switch to other task's context for debug?

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hello @HarryXia 

 

Here is an introduction STM32Cube tools in practice - STM32CubeIDE - FreeRTOS aware debug - YouTube.
In order to use debug feature for debug, it is necessary to activate few options within FreeRTOS configuration, configure a timer or use DWT to count ticks for CPU time usage by tasks.

 

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.

View solution in original post

3 REPLIES 3
FBL
ST Employee

Hello @HarryXia 

 

Here is an introduction STM32Cube tools in practice - STM32CubeIDE - FreeRTOS aware debug - YouTube.
In order to use debug feature for debug, it is necessary to activate few options within FreeRTOS configuration, configure a timer or use DWT to count ticks for CPU time usage by tasks.

 

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.

Piranha
Chief II

There is a secret revolutionary method - setting a breakpoint and running the code!

Thanks @FBL 

I watched the introduction link and found that I forgot to enable RTOS proxy. After I enable RTOS proxy, I can see all freeRTOS threads and can switch and see all threads context.