Want to use stdio.h and string.h with 51QE Coldfire V1

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Want to use stdio.h and string.h with 51QE Coldfire V1

2,060 次查看
Lokutas
Contributor I
Can somebody please help me figure out how to make the string manipulation ANSI routines work with Codewarrior and the Coldfire QE MCU line.
 
I have ported 08QE code to 51QE but all the string manipulation and formated printed routines are not working...
 
I haven't been able to figure out where in the headers to activate or deactivate compiler directives to make them work.
 
Can somebody be kind enough to help me get out of this jam?
 
Thanks in advance,
Carlos
标签 (1)
0 项奖励
回复
2 回复数

983 次查看
Lokutas
Contributor I
The functions I'm havingo problems with are:
 
sprintf, sscanf, strstr, memcpy and strchr
 
Thanks,
C
0 项奖励
回复

983 次查看
Lokutas
Contributor I
I had words reading int on scanf sscanf ... sscanf returns 16bit ints with 08 and 32 bit ints with CF...
 
sprintf required a couple of #defineson the preprocessor directives for LIBDEF_PRINTF_ALLOW_HEXINT and LIBDEF_PRINTF_PREC, after this it all worked as a charm...
 
Thanks for the attention paid.
 
Cheers,
Carlos
 
0 项奖励
回复