Skip to main content
Associate III
November 27, 2025
Solved

STM32CUBE RTOS STATE Not showing all Queues/Semaphores

  • November 27, 2025
  • 2 replies
  • 109 views

Hello, 

I am trying to use the STM32CUBE RTOS STATE panel within VSCode as opposed to setting a watch variable for xQueueRegistry, but the state panel does not match what is shown in the queue registry. Only the first queue is shown. 

NMartin_0-1764276589115.png

NMartin_1-1764276266856.png
Also, I am curious how to get Semaphores to show up in the semaphores portion of the tree in the state panel. The semaphores I am using are binary semaphores which under the hood are just generic queues.
NMartin_2-1764276444019.png

 

 

Best answer by LaurentL

Hello,

Here is where I have put the 2 lines, 1 before main and the temp inside main :

 
uint32_t xQueueRegistrySize = configQUEUE_REGISTRY_SIZE;
/**
  * @brief  The application entry point.
  * @retval int
  */
int main(void)
{
  /* USER CODE BEGIN 1 */
  /* USER CODE END 1 */
  /* MCU Configuration--------------------------------------------------------*/
  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();
  /* USER CODE BEGIN Init */
  uint32_t temp = xQueueRegistrySize;
 
Did you try this config ?
These 2 lines added should not interfere with debug and you should be able to not see the message of the missing symbol.
 

2 replies

LaurentL
ST Employee
December 8, 2025

Hello,

For the Semaphores that are just generic queues, I would say it is normal to not see them as Semaphores.

But why we don't see all the Queues, I don't know.

I remember that we had an issue to list the registry queue.

Do you have a msg in console debug log like "Missing symbol: xQueueRegistrySize." ?

In order for RTOS_proxy to return objects (Semaphores and Queues) from the queue registry, your application must have this code :

uint32_t xQueueRegistrySize = configQUEUE_REGISTRY_SIZE;

Check that the code is not optimized because variable not used.

I had to add this line in the appli code : 

uint32_t temp = xQueueRegistrySize;

The first line was added in global and this one in main.

Can you try this to see the queues.

 
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.
NMartinAuthor
Associate III
December 18, 2025

Hi Laurent, 

xQueueRegistrySize was not defined. So I added the following lines of code to main.c as you suggested 

Optimization is set to -O0, so nothing should be optimized out. But just to be sure, I checked that I could view temp, xQueueRegistrySize and xQueueRegistry as a watch variables.

NMartin_4-1766082904212.png

There are three entries in the registry queue, but only QCAD is shown in the RTOS State panel. 

Also, after flashing of the device, I still get this message "RTOS proxy: Missing symbol: xQueueRegistrySize."

I tried adding the xQueueRegistrySize variable as a global out (outside the int main(void) entry point), but when I do so I run into a different error that prevents the debug session from connecting. I think this is a different issue that I will create another post about. 

LaurentL
LaurentLBest answer
ST Employee
December 19, 2025

Hello,

Here is where I have put the 2 lines, 1 before main and the temp inside main :

 
uint32_t xQueueRegistrySize = configQUEUE_REGISTRY_SIZE;
/**
  * @brief  The application entry point.
  * @retval int
  */
int main(void)
{
  /* USER CODE BEGIN 1 */
  /* USER CODE END 1 */
  /* MCU Configuration--------------------------------------------------------*/
  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();
  /* USER CODE BEGIN Init */
  uint32_t temp = xQueueRegistrySize;
 
Did you try this config ?
These 2 lines added should not interfere with debug and you should be able to not see the message of the missing symbol.
 
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.