2014-10-14 5 views
0

나는 stm32f303 검색에서 freertos를 실행하려고합니다. 공식 웹 사이트에서 다운로드 한 freertos archive의 모든 헤더 및 소스 파일을 포함합니다. 또한 폴더 /GCC/ARM_CM4F에서 이식 가능한 파일을 포함합니다. 나는 codesourcery lite 컴파일러를 사용합니다. 프리 프로세서 오류가 있음을주고 있지만, 나에게 포인트를 얻을하지 않습니다 구글에서 검색Stm32f303 freertos

#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 

:

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의 167-172 문자열 : 내가 프로젝트를 컴파일 할 때 그리고 난 오류 내가 뭘해야하는지. 내 메이크 설정 : 내가 잘못 생각

# 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 

?

답변

2

컴파일러는 C 전처리 기가 configMAX_PRIORITIES 정의를 이해하지 못한다고 전합니다. FreeRTOSConfig.h의 정의를 살펴보면 프리 프로세서가 이해할 수없는 캐스트가 포함되어 있다고 생각됩니다. 캐스트를 제거하면 아마 괜찮을 것입니다.

+0

FreeRTOS 지원 포럼에 대한 설명도 참조하십시오. [link] (http://www.freertos.org/FreeRTOS_Support_Forum_Archive/October_2014/freertos_FreeRTOS_V812_portmacro.h_missing_binary_operator_before_token_long_bffa0f71j.html) – eatyourgreens