Reputation: 800
I try to run freertos on stm32f303 discovery.
I include all header and source files from freertos archive downloaded from official web site. Also I include portable files from folder /GCC/ARM_CM4F
.
I use codesourcery lite compiler. And when I try to compile project i get error:
In file included from freertos/inc/portable.h:321:0,
from freertos/inc/FreeRTOS.h:100,
from freertos/src/croutine.c:66:
freertos/inc/portmacro.h:167:7: error: missing binary operator before token "long"
portmacro.h
's 167-172 strings:
#if( configMAX_PRIORITIES > 32 )
#error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.
#endif
Searching in Google give that there is preprocessor error but it don't get me point what I should to do. My Makefile settings:
# Set Libraries
LIBS = -lm -lc
###################################################
# Set Board
MCU = -mthumb -mcpu=cortex-m4
FPU = -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
DEFINES = -DSTM32F3XX -DUSE_STDPERIPH_DRIVER
DEFINES += -DUSE_DEFAULT_TIMEOUT_CALLBACK
# Set Compilation and Linking Flags
CFLAGS = $(MCU) $(FPU) $(DEFINES) $(INCLUDES) \
-g -Wall -std=gnu90 -O0 -ffunction-sections -fdata-sections
ASFLAGS = $(MCU) $(FPU) -g -Wa,--warn -x assembler-with-cpp
LDFLAGS = $(MCU) $(FPU) -g -gdwarf-2\
-Tstm32f30_flash.ld \
-Xlinker --gc-sections -Wl,-Map=$(PROJ_NAME).map \
$(LIBS) \
-o $(PROJ_NAME).elf
Where I am mistaken?
Upvotes: 0
Views: 1694
Reputation: 3246
The compiler is telling you the C pre-processor does not understand the definition of configMAX_PRIORITIES. Look at the definition in FreeRTOSConfig.h, I suspect it includes a cast that the pre-processor does not understand. Remove the cast and it will probably be ok.
Upvotes: 5