How to direct printf() to console or UART or other peripherals?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to direct printf() to console or UART or other peripherals?

1,628件の閲覧回数
tmf
Contributor I

How do you change the peripheral that will receive the printf() calls?

 

I guess it defaulkts in CW to console, I would like it to be a UART.

 

Thanks!

ラベル(1)
0 件の賞賛
返信
4 返答(返信)

908件の閲覧回数
JohnBabrick
Contributor II

I also need to knw how to correctly redirect console IO in the tower bareboard application to the serial port. I know how to do it under MQX, but not under a non-MQX project.

0 件の賞賛
返信

908件の閲覧回数
HZ
Contributor I

I have the same question on codewarrior 8.8 for MPC8306 chip, I used project wizard to generate one project which puts out a message to the UART terminal on the MPC8306_SOM evaluation board, when I looked through the project, I saw it includes a library output file "UART2_8306_SOM.UC.a", but there is no ".h" file associated with it also when I am stepping through the project from .reset or __start, I didn't see it called any function to initilize the UART, but the board do put out message into the UART terminal.

 

I want to know how to change the baudrate and other setups such as re-direct printf function into another UART on my own board.

0 件の賞賛
返信

908件の閲覧回数
CrasyCat
Specialist III

Hello

 

  - Which CPU are you targeting (HC08, HC12, Coldfire, ..)
  - Which version of CodeWarrior are you using?

CrasyCat

0 件の賞賛
返信

908件の閲覧回数
tmf
Contributor I

CW10.1 and Kinetis

 

Thanks.

0 件の賞賛
返信