Problems compiling sample project for MC52235

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems compiling sample project for MC52235

2,175 Views
ND
Contributor I
Hi,
  I have the MC52235 DEMO board, and using codewarrier V6.3 that comes with it, I am trying to compile the free project that demonstrates the TCP stack,from NicheLite (project called coldfire_lite) from freescale web site.
 
I have tried to build it but got the following error (many times throughout the code):
 
***** Error received ****
Error   : unexpected end of line
(included from:
 cstdarg:40
 stdarg.h:17
 printf.c:9)
stdarg.68k.h line 20    #if __CFM68K__ 
 
 
**** Source ****
#if __STDABI__ || __REGABI__
 #define __va_start(parm) (__std(va_list)) (&parm + 1)
 #if __CFM68K__
  #define va_arg(ap, type) (*(type *)((ap += sizeof(type) + 3U & ~3U) - (sizeof(type) + 3U & ~3U)))
 #else
  #define va_arg(ap, type) (*(type *)((ap += sizeof(type) + 3U & ~3U) - (sizeof(type))))
 #endif
#else
 #define __va_start(parm) (__std(va_list)) ((char *)&parm + (sizeof(parm) + (1U) & ~(1U)))
 #define va_arg(ap, type) (*(((type *) (ap += sizeof(type))) - 1))
#endif
 
Anyone any ideas how to solve this?
 
Thanks
Neil
Labels (1)
0 Kudos
3 Replies

443 Views
DrSeuss
Contributor I
Something has changed in the new 6.3 release of the compiler. Look for the line:
#define __MC68K__
in common.h and add a zero at the end:
#define __MC68K__ 0
We are working on fixing this ASAP.
0 Kudos

443 Views
CompilerGuru
NXP Employee
NXP Employee
Can you generate the preprocessor output?
I guess you have some macro conflict, for example a macro like
#define __CFM68K__ /*nothing*/
somewhere else would explain the error message.h.
Also trigraphs are a source of surprising preprocessor error messages, are tri/bi graphs
enabled?

Daniel
0 Kudos

443 Views
Alban
Senior Contributor II
Hi,
 
When you are in a define, it just cut and paste the define value until the end of line.
 
If the define does not fit in one line, you are required to put a "\" at the end of the line to be able to continue at the next line within the same define value.
 
Code:
  #define va_arg(ap, type) (*(type *)((ap += sizeof(type) \ + 3U & ~3U) - (sizeof(type) + 3U & ~3U)))

 
Cheers,
Alban.
0 Kudos