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

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 ]    [ 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