This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP432P401R: ERROR:#20 identifier "xSemaphoreHandle" is undefined - FreeRTOS

Part Number: MSP432P401R

Tool/software: Code Composer Studio



Hello,

I'm using FreeRTOS and MSP432, but I'm receiving an error when I try to use the "xSemaphoreHandle". I would like to know whether anyone can help me?

CODE:

#include "dataStorageTask.h"
#include "semphr.h"
#include "FreeRTOS.h"

xSemaphoreHandle semaphoreSignaling =0;
...

PRINTSCREEN:

  • Hi,

    when using the xSemaphore functions you still use the normal SemaphoreHandle.

    e.g.

    SemaphoreHandle_t xSemaphore;
    
    void vATask( void * pvParameters )
    
    {
    
      /* Create a mutex type semaphore. */
    
      xSemaphore = xSemaphoreCreateMutex();
    
      if( xSemaphore != NULL )
    
      {
    
          /* The semaphore was created successfully and
    
          can be used. */
    
      }
    
    }

    See also the FreeRTOS documentation:

    https://www.freertos.org/CreateMutex.html

    Regards,

    Stefan

**Attention** This is a public forum