odd error in portmacro.h

jdurand wrote on Monday, 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
	;		// this is here to keep compiler from complaining
	typedef unsigned portLONG portTickType;
	#define portMAX_DELAY ( portTickType ) 0xffffffff

rtel wrote on Monday, 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.


richard_damon wrote on Monday, 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.

jdurand wrote on Monday, July 16, 2012:

LPCxpresso 4.2.3

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.