How to add printf's in my application program.

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

How to add printf's in my application program.

812 Views
arvindsingh
Contributor I

I am working on Freescale FXTH87 Tire Pressure Monitor Sensor .

In my application i Want to add printf's so that i can log my results , and can check on codewarrier console.

I tried to add stdio.h but i guess their is no header file(stdio.h) available with codewarrier.

 

Is their any library and header file available which i can use.

Thanks in Advance.

Labels (1)
0 Kudos
3 Replies

552 Views
david_diaz
NXP Employee
NXP Employee

Hello Arvind,

Could you please describe your application?

In case you are trying to use the printf function with the FXTH87 device, I am afraid the sensor does not contain a dedicated serial data accelerator block.

Besides, it is not recommended because the printf function requires a lot of memory.

You can refer to the following tutorial in case it is useful for you:

Tutorial: Printf() with (and without) Processor Expert | MCU on Eclipse

I hope this information helps.

If I misunderstood your question, feel free to let me know.  I will be glad to help.

Have a great day.

David Diaz.

0 Kudos

552 Views
arvindsingh
Contributor I

Can i get get a response from any of freescale people.

0 Kudos

552 Views
kef2
Senior Contributor IV

Arvind,

As David said, FXTH87 doesn't have serial communications unit (SCI), so you need to emulate it if you want to communicate via PC COM port. If you mean printf over debug line (which is available on ARM or Coldfire devices), such thing doesn't exist on S08. But there's a Noice debugger, which can turn 2? bytes in RAM into bidirectional communication port (virtual UART), which allows I/O to debuggers terminal window. But you need to keep debugger connected to target, else your target will hang waiting for debugger I/O handshake. Look here if interested

NoICE Debugger

NoICE BDM virtual UART: Background Debug Mode (BDM) for the MC9S08

0 Kudos