cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CUBE RTOS STATE NOT RUNNING

istery
Associate II

I used the STM32CUBE FOR VSCODE preview version and enabled FreeRTOS in STM32CUBEMX. However, during the debugging process, the STM32CUBE RTOS STATE is empty and does not display any content, even when the program is paused.

istery_0-1756812591341.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Florent V
ST Employee

Hi Istery,

To enable the RTOS state view during debugging, you need to add the "serverRtos" attribute to your debug configuration. For example, for FreeRTOS:

"serverRtos": {
    "enabled": true,
    "port": "60000",
    "driver": "freertos"
},

 

BR,

/Flo

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

7 REPLIES 7
Florent V
ST Employee

Hi Istery,

To enable the RTOS state view during debugging, you need to add the "serverRtos" attribute to your debug configuration. For example, for FreeRTOS:

"serverRtos": {
    "enabled": true,
    "port": "60000",
    "driver": "freertos"
},

 

BR,

/Flo

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.

istery_0-1756814567493.png

Thank you for your response! It really worked! However, now the Task name cannot be displayed directly under the Tasks label; it needs to be expanded to be visible. Is there a solution to this problem?

No, for now, the nodes need to be expanded to see the task name.
But thanks for the feedback; we are adding this to our roadmap.

KR,

/Flo

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.

I had to change the port to 61234 instead of the suggested 60000. Where can I find documentation on this?

Best,

Nate

LaurentL
ST Employee

That's strange, and if you try again with 60000, is it still failing ?

61234 is the default port of STLink gdb server.

Are you using an STLink or Segger JLink ?

Can you show your launch json file.

Can you show the "DEBUG CONSOLE" log ?

With the default launch as this one :

            "serverRtos": {
                "enabled": true,
                "port": "60000",
                "driver": "freertos"
            },

You should see these traces if using an STLink :

...

RTOS proxy: Connecting to GDB server 127.0.0.1 on port 61234 ... RTOS proxy: Connected

Listen for GDB connection on port: 60000 ... Debugger connected

...

connected to remote target localhost:60000

...

 

Rgds,

Laurent

 

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.

Working configuration
NMartin_2-1764272463776.png

NMartin_3-1764272515735.png
I opened the project on another computer and changed the port back to 60000... Which also works now. 

NMartin_4-1764272594016.png

NMartin_5-1764272710700.png

Now that I think about it, I was using a different STlink that had been abused (carried back and fourth in a backpack) and was seeing a few connection issues. Next time I do some development on that computer I will try changing the port with a better treated STlink. 

 

 

LaurentL
ST Employee

OK, next time you try this board, check that jumpers have not been lost and update the STLink Firmware to be sure to have the latest.

Cheers,

Laurent

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.