compiler error using sprintf while using adc example on TWRk60N512

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

compiler error using sprintf while using adc example on TWRk60N512

跳至解决方案
2,061 次查看
abdullahansari
Contributor III

Hello every one.

I am working on to build a prototype application. That would store the results of adc into file and then to SD card.

Now I am modifying the ADC example given with CW10.5 installer file. The ADC is being trigerred by pdb.

As soon as I am using sprintf function to convert adc integer results to string. The compile is giving me error. I have attached the screen shot along with ADC interrupt service routine.

Any solution?

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,948 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

I guess that project was created with No I/O support. In this case you cannot use any console related functions. To solve this go to Project -> Properties -> C/C++ Build -> Settings -> Librarian, and from the "Model" drop down menu select "ewl". Also do not forget the #include <stdio.h>. Then your project should compile.

IO_support.png

Hope this is useful!

Jorge Gonzalez

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,949 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello:

I guess that project was created with No I/O support. In this case you cannot use any console related functions. To solve this go to Project -> Properties -> C/C++ Build -> Settings -> Librarian, and from the "Model" drop down menu select "ewl". Also do not forget the #include <stdio.h>. Then your project should compile.

IO_support.png

Hope this is useful!

Jorge Gonzalez

0 项奖励
回复
1,948 次查看
abdullahansari
Contributor III

Hi Jorge,

Yes you are right! The problem is solved now.

0 项奖励
回复