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
Solved! Go to Solution.
Hi @naresh2 ,
It's easy, just take the SDK hello_world project as an example, please check my following picture:
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
Hi @naresh2 ,
It's easy, just take the SDK hello_world project as an example, please check my following picture:
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
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
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:
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