Error #20: identifier "StaticQueue_t" is undefined

Hi,

static StaticQueue_t xStaticQueue;

I couldn’t find the data type of StaticQueue_t .

The reference of this declaration:

#include “FreeRTOS.h”
#include “queue.h”
QueueHandle_t xQueueCreateStatic( UBaseType_t uxQueueLength,
UBaseType_t uxItemSize,
uint8_t *pucQueueStorageBuffer,
StaticQueue_t *pxQueueBuffer );

Do you have configSUPPORT_STATIC_ALLOCATION set to 1 in FreeRTOSConfig.h?

Hi Richard,
I have done this:

#define configSUPPORT_STATIC_ALLOCATION     1

as well as this

#define configSUPPORT_STATIC_ALLOCATION CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION

The last one I got it by search engine.
None of them solved the error.

Are you sure that the correct FreeRTOSConfig.h is getting picked? In the file where you get this identifier missing error, add the following code:

#if( configSUPPORT_STATIC_ALLOCATION == 1 )
    #error Test to see if static allocation is enabled.
#endif

If the above #error is triggered, then we know that configSUPPORT_STATIC_ALLOCATION is configured correctly.

Thanks.

Thanks aggarg.
I updated from version 8 to version 10 and I added the callback function code from FreeRTOS website. Then I was able to compile completely and the program worked as expected.
The callback function:

void vApplicationGetIdleTaskMemory(,,..){.....}