Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

compling error in winAVR

Posted by cai zifang on May 5, 2008
I want to use the mutexes,and
#define configUSE_MUTEXES 1 //in FreeRTOSConfig.h
#include "semphr.h" //in FreeRTOSConfig.h
xSemaphoreHandle xSemaphore = NULL ; //in main.c


../queue.h:119: error: expected ';', ',' or ')' before 'uxQueueLength'
../queue.h:455: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueGenericSend'
../queue.h:735: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueGenericReceive'
../queue.h:750: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uxQueueMessagesWaiting'
../queue.h:1057: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueGenericSendFromISR'
../queue.h:1146: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueReceiveFromISR'
../queue.h:1152: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueIsQueueEmptyFromISR'
../queue.h:1153: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueIsQueueFullFromISR'
../queue.h:1154: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'uxQueueMessagesWaitingFromISR'
../queue.h:1171: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueAltGenericSend'
../queue.h:1172: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueAltGenericReceive'
../queue.h:1187: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueCRSendFromISR'
../queue.h:1188: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueCRReceiveFromISR'
../queue.h:1189: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueCRSend'
../queue.h:1190: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueCRReceive'
../queue.h:1197: error: expected ';', ',' or ')' before 'uxCountValue'
../queue.h:1203: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueTakeMutexRecursive'
../queue.h:1204: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xQueueGiveMutexRecursive'
make: *** [croutine.o] Error 1

I donot change the queue.h file,why does it have error?
I use the FreeRTOS V5.0.0.

RE: compling error in winAVR

Posted by woops_ on May 5, 2008
Probably you are including header files in bad order. Do not include semphr from freertosconfig.h but from the C file that uses semaphore. semphr.h must come after FreeRTOS.h. See the demo files that include semphr.h for an example of including in the right place.

RE: compling error in winAVR

Posted by cai zifang on May 5, 2008
woops,Thank you very much . I move #include “semphr.h" to main.c file,and locate it after #include "FreeRTOS.h",then it is ok.
When I locate it before #include "FreeRTOS.h", the same error will occur.Really incredible!I didnot think of it before.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Careers

FreeRTOS and other embedded software careers at AWS.


Latest News

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner