printf prints only one character

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

printf prints only one character

跳至解决方案
962 次查看
lijofrancis
Contributor III

Dear sir

For debugging i am using printf function .i have problem when it printing it prints only one character.

please answer me urgently . i am using TWR k60f120m tower board with on board osjtag with kinetic design studio.But the same code by using k40 tower board i able perform full printf function and its working.the same toolchain using for k60 tower board then what is the reason i am not getting

my code some portion

 

1) now i write my code

printf("ad7193 is ok\n\r\n\r");

      else

      printf("ad7193 is not ok");

  for(;;) {

  //Block(0xffff);

  ad7193_setreg(AD7193_REG_MODE,0x090D56,3);

  Block(0xffff);

  value=ad7193_getreg(AD7193_REG_MODE,3);

  printf(print,value);

  Block(0xfffff);

  value=ad7193_getreg(AD7193_REG_CONF,3);

  printf("config reg\n\r %x\n\r",value);

  value=ad7193_getreg(AD7193_REG_ID,1);

  printf("Id reg\n\r %x\n\r",value);

  value=ad7193_getreg(AD7193_REG_STAT ,1);

  printf("stat reg\n\r %x\n\r",value);

  Block(1000000);

2) ouput of console port

19886_19886.jpgconsole.JPG.jpg

it prints only first character of printf

3) inserting my debugger image

19884_19884.jpgdebug set.JPG.jpg

4)  inserting startup for semihosting enabling

19885_19885.jpgstartup sett.JPG.jpg

标签 (1)
0 项奖励
回复
1 解答
753 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Lijo,

I have replied to your question on this other post:

Re: K60 PE Micro debugging not working console using printf

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
1 回复
754 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Lijo,

I have replied to your question on this other post:

Re: K60 PE Micro debugging not working console using printf

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复