I m integrating TCP/IP stack and compiling it with C166 Kiel compiler. The TCP/IP stack is from microchip. I m getting the error
"GENERICTYPEDEFS.H(144): error C27: illegal type specifier" line 144 contains "typedef unsigned long long QWORD; "
This 64 bit dataype is being used frequently by TCP/IP stack. How can we get this datatype in keil? I found out that there is a file limits .h which defines the limits of the datatype
/*-------------------------------------------------------------------------- LIMITS.H ANSI standard include file for C166/EC++ Version 5. Copyright (c) 1992-2004 Keil Elektronik GmbH and Keil Software, Inc. All rights reserved. --------------------------------------------------------------------------*/ #ifndef __LIMITS_H__ #define __LIMITS_H__ #define CHAR_BIT 8 /* Number of bits in any "char" */ #define CHAR_MAX 127 /* Max "char" value */ #define CHAR_MIN -128 /* Min "char" value */ #define SCHAR_MAX 127 /* Max "signed" "char" value */ #define SCHAR_MIN -128 /* Min "signed" "char" value */ #define UCHAR_MAX 255 /* Max "unsigned" "char" value */ #define SHRT_MAX 32767 /* Max ("signed") "short" value */ #define SHRT_MIN (-32767-1) /* Min ("signed") "short" value */ #define USHRT_MAX 0xFFFF /* Max "unsigned" "short" value */ #define INT_MAX 32767 /* Max ("signed") "int" value */ #define INT_MIN (-32767-1) /* Min ("signed") "int" value */ #define UINT_MAX 0xFFFF /* Max "unsigned" "int" value */ #define LONG_MAX 2147483647L /* Max ("signed") "long" value */ #define LONG_MIN (-2147483647L-1) /* Min ("signed") "long" value */ #define ULONG_MAX 0xFFFFFFFF /* Max "unsigned" "long" value */ #endif
"long long" is not ANSI 'C' - so C166 may well not support it - you'll have to check the documentation
"The TCP/IP stack is from microchip"
Have you read the licence carefully? Vendor-provided software like this usually has an "only to be used on our products" clause...
There are plenty of generic (and free) TCP/IP stacks available for "small" microcontrollers - why not look at them? They would not be using non-standard extensions...
What size is an unsigned long long with the Microchip compiler?
I cannot think of a reason why a TCP (V4) stack would need a 64 bit variable.
Ok,
Just re-read your post - So it's 64 bit on Microchip.
Anyway - I still cannot see a need for it. All I've ever seen (and maintained) have needed a maximum of 32 bit.
"All I've ever seen (and maintained) have needed a maximum of 32 bit."
Likewise.
Sounds like all the more reason to ditch the Microchip stack and go for something generic...
View all questions in Keil forum