Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

FreeRTOS V812 portmacro.h: missing binary operator before token "long"

Posted by monnoliv on October 15, 2014

Hi,

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 portSTACKTYPE uint32t
define portBASE_TYPE long <---- HERE

typedef portSTACKTYPE StackTypet; typedef long BaseTypet; typedef unsigned long UBaseTypet; ~~~~~~~~~~~~~~~~~~

(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).

Someone can help me?

Regards,

O.


FreeRTOS V812 portmacro.h: missing binary operator before token "long"

Posted by rtel on October 15, 2014

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).

Regards.


FreeRTOS V812 portmacro.h: missing binary operator before token "long"

Posted by monnoliv on October 15, 2014

Here is the compilation error (removed some path data for confidentiality) ~~~~~~~~~~~~~~~~ make -r all Building file: ../Source/portable/MemMang/heap3.c Invoking: MCU C Compiler arm-none-eabi-gcc -std=gnu99 -DREDLIB -DDEBUG -D__CODERED -DCOREM3 -D__USELPCOPEN -DLPC17XX -I"/frtos/Source/include" -I"/frtos/Source/portable/GCC/ARMCM3" -I"/lpcboardnxplpcxpresso1769/inc" -I"/lpcchip175x6x/inc" -Og -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -specs=redlib.specs -MMD -MP -MF"Source/portable/MemMang/heap3.d" -MT"Source/portable/MemMang/heap3.o" -MT"Source/portable/MemMang/heap3.d" -o "Source/portable/MemMang/heap3.o" "../Source/portable/MemMang/heap3.c" In file included from /frtos/Source/include/portable.h:321:0, from /frtos/Source/include/FreeRTOS.h:100, from ../Source/portable/MemMang/heap3.c:85: /frtos/Source/portable/GCC/ARMCM3/portmacro.h:90:23: error: missing binary operator before token "long" #define portBASETYPE long | ~~~~~~~~~~~~ Regards,


FreeRTOS V812 portmacro.h: missing binary operator before token "long"

Posted by monnoliv on October 15, 2014

Oups, there is also: /frtos/Source/include/FreeRTOSConfig.h:74:44: note: in expansion of macro 'portBASETYPE' #define configMAXPRIORITIES ( ( unsigned portBASETYPE ) 8 ) ^ /frtos/Source/portable/GCC/ARMCM3/portmacro.h:166:7: note: in expansion of macro 'configMAXPRIORITIES' #if( configMAXPRIORITIES > 32 )


FreeRTOS V812 portmacro.h: missing binary operator before token "long"

Posted by rtel on October 15, 2014

Very curious - it is compiling heap3.c, but heap3.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?

Regards.


FreeRTOS V812 portmacro.h: missing binary operator before token "long"

Posted by rtel on October 15, 2014

That one is not so mysterious. Just take the cast off the front of the 8, so it becomes:


#define configMAX_PRIORITIES ( 8 )

Regards.


FreeRTOS V812 portmacro.h: missing binary operator before token "long"

Posted by monnoliv on October 15, 2014

Thank you, it works. I've learned something today :-) Regards, O.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists