Quality RTOS & Embedded Software

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


Loading

odd error in portmacro.h

Posted by Jerry Durand on July 16, 2012
I was just setting up an LPC1754 job and received an odd error from the compiler. It didn't like this line:
typedef unsigned portLONG portTickType;


I had to change that section to make it work:
#if( configUSE_16_BIT_TICKS == 1 )
typedef unsigned portSHORT portTickType;
#define portMAX_DELAY ( portTickType ) 0xffff
#else
;// this is here to keep compiler from complaining
typedef unsigned portLONG portTickType;
#define portMAX_DELAY ( portTickType ) 0xffffffff
#endif

RE: odd error in portmacro.h

Posted by Richard on July 16, 2012
You have not said which compiler you are using, or what the error was.

This code does however compile without any problem with many different compilers and for many different chips. Generally an error originating from a header file like this is a symptom on an error in the file from which the header file is being called.

Regards.

RE: odd error in portmacro.h

Posted by Richard Damon on July 16, 2012
Having to put a ; like that is indicative that the statement before it is missing its ;

Check the end of the last file included previously by that header, or the statement just before the header was included.

The offending line may be quite a bit before as comments and preproccessor lines won't trigger the error message.

RE: odd error in portmacro.h

Posted by Jerry Durand on July 16, 2012
LPCxpresso 4.2.3 [255]

And now that I'm awake, I found it... A sticky CTRL key on my new laptop left an "s" hanging at the end of a file when I tried to save it, I thought I'd fixed that.

Sorry for the trouble.


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


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



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

Renesas

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