Using the new version of FreeRTOS I get always this error:
Source/portable/GCC/ARM_CM3/portmacro.h:91:23: error: missing binary operator before token “long”
/* Type definitions. */
#define portCHAR char
#define portFLOAT float
#define portDOUBLE double
#define portLONG long
#define portSHORT short
#define portSTACK_TYPE uint32_t
#define portBASE_TYPE long <---- HERE
typedef portSTACK_TYPE StackType_t;
typedef long BaseType_t;
typedef unsigned long UBaseType_t;
(sorry I read the formating help, I can’t figure out how to highlight this small c code, why not using simple code???)
The error is not related with the uint32_t before (it remains when I comment the line).
The error doesn’t seem to make any sense when viewed in isolation as ‘long’ is obviously a standard C type, but this is a #define so the error must be coming from where the #define is actually used in the source code. Which file is being compiled when portmacro.h gets included? Maybe it would help if you posted the all the compiler output (not of the whole build - just the output when you try recompiling after this error has been output).
Very curious - it is compiling heap_3.c, but heap_3.c does not make any
reference to portLONG. In fact, portLONG has not been used in the code
for a very long time and its definition is just maintained for backward
compatibility with some old demos.
Is it possible there are some version mismatches somewhere? What is the
version number at the top of heap_3.c?