how we enable standard printf() IO in IMXRT1060 SDK code without using LPUART ?

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

how we enable standard printf() IO in IMXRT1060 SDK code without using LPUART ?

ソリューションへジャンプ
1,475件の閲覧回数
naresh2
Contributor I

Hi,

 

i am using IMXRT1062, IAR IDE is 8.40.1

how we enable printf() IO console in IMXRT1062, SDK code without using LPUART, in my custom board i don't have UART. I have done semihost configuration in the IAR IDE but i am not able get printf in the debug terminal window.

 

please help me out on this

0 件の賞賛
返信
1 解決策
1,470件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @naresh2 ,

   It's easy, just take the SDK hello_world project as an example, please check my following picture:

kerryzhou_0-1655900985418.png

You can see, after the modification:

#define SDK_DEBUGCONSOLE DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN

The printf is into the IAR console window.

 

Wish it helps you!

Best Regards,

Kerry

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,471件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @naresh2 ,

   It's easy, just take the SDK hello_world project as an example, please check my following picture:

kerryzhou_0-1655900985418.png

You can see, after the modification:

#define SDK_DEBUGCONSOLE DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN

The printf is into the IAR console window.

 

Wish it helps you!

Best Regards,

Kerry

 

0 件の賞賛
返信
1,465件の閲覧回数
naresh2
Contributor I

Hi kerryzhou,

Thanks for the quick response. I have configured as per your suggestion its not working, i am not able to see console.

i am using IMXRT1062 customized board, i dont have LPUART.


#define DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN 0U 

the above macro should be 0U or 1U, please let me know ?

#ifndef SDK_DEBUGCONSOLE
#define SDK_DEBUGCONSOLE DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN
#endif

Note: in SDK Hello world example code i have checked,  they are  mapping with LPUART1

i have attached images  please have a look, please help me out on this

 

 

0 件の賞賛
返信
1,458件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @naresh2 ,

  No, you misunderstand it, when you modify the sdk :

SDK_2_11_1_EVK-MIMXRT1060\boards\evkmimxrt1060\demo_apps\hello_world\iar

#define SDK_DEBUGCONSOLE DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN

The printf will print to the IAR console: terminal I/O

This is my testing with the above sdk on my MIMXRT1060-EVK board:

 

kerryzhou_0-1655944936789.png

 

You can see, the real uart didn't receive the data now, it all loop to the IAR terminal I/O.

If you have the MIMXRT1060-EVK board, you totally can test it.

Please also make sure your IAR version matches the SDK:

IAR Embedded Workbench for Arm, version is 9.20.2

All the picture which I share with you is from my testing with RT1060.

Wish it helps you!

Best Regards,

Kerry

 

 

0 件の賞賛
返信