compiler error using sprintf while using adc example on TWRk60N512

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

compiler error using sprintf while using adc example on TWRk60N512

Jump to solution
546 Views
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?

Labels (1)
Tags (1)
0 Kudos
1 Solution
433 Views
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

View solution in original post

0 Kudos
2 Replies
434 Views
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 Kudos
433 Views
abdullahansari
Contributor III

Hi Jorge,

Yes you are right! The problem is solved now.

0 Kudos