FreeRTOS V8.1.2 compile error

hpipon wrote on Thursday, July 02, 2015:

Hello
I wanted to compile FreeRTOS V8.1.2 with Keil µVision but I got an error :

#if( configMAX_PRIORITIES > 32 )
…\src\portable\RVDS\ARM_CM4F\portmacro.h(148): error: #18: expected a “)”

I saw a difference in the file portmacro.h now there is

/* Port specific optimisations. */
#ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#endif

#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1

  /* Check the configuration. */
  #if( configMAX_PRIORITIES > 32 )

The cast inside configMAX_PRIORITIE definition generates the error

rtel wrote on Thursday, July 02, 2015:

This is presumably because of the configMAX_PRIORITIES definition in FreeRTOSConfig.h.

[as you say] Ensure the definition does not contain a cast. For example, the following will be ok:

#define configMAX_PRIORITIES ( 8 )

whereas the following would not be ok:

#define configMAX_PRIORITIES ( ( UBaseType_t ) 8 )