s32k printf("%.2X",0x12); nothing is ouput , other is ok.

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

s32k printf("%.2X",0x12); nothing is ouput , other is ok.

1,218件の閲覧回数
wenhongkui
Contributor II

I change example "LPUART.zip" 

printf("Running LPUART example\r\n");
printf("This is printf formating example string %d\r\n",10);

printf("%.2X",10);
for(;;) {

}

but is result is 

Running LPUARunning LPUART example
This is printf formating example string 10

0 件の賞賛
返信
2 返答(返信)

988件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

for printing without \r\n at the end you need to use fflush(stdout); function like this:

printf("Running LPUART example\r\n");
printf("This is printf formating example string %d\r\n",10);

printf("%.2X",10);
fflush(stdout);

Here is output of your project in terminal: 
pastedImage_12.png

Without fflush or \r\n - the last line is not printed. 

Jiri

0 件の賞賛
返信

988件の閲覧回数
wenhongkui
Contributor II

thank you!

wenhk@ejlae.com

0 件の賞賛
返信