I try to redirect printf() to lpuart3 to use it in the bootloader on a costumed board. So i imported a SDK example but it didn’t work.
The microcontroller i use is a MIMXRT1024CAG4A not a MIMXRT1024DAG5A how I can change it.
What I did wrong?
Thanks in advance.
Solved! Go to Solution.
Hi @KhaledG ,
You should set SDK_DEBUGCONSOLE 0 0. It means DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN.
I can use printf to print out via lpuart1 on my evk.
(I havent rt1024 evk, so I use rt1170 evk to make the demo.)
Regards,
Jing
Hi @KhaledG ,
Except change in config tools, you should also modify the code.
For example, BOARD_DEBUG_UART_INSTANCE in board.h.
Regards,
Jing
Hi @jingpan,
Even if I do it still doesn’t work. It was necessary that I add xip devices and xip board. Now PRINTF() works but not printf().
Are there any changes needed to make printf() work?
Thank you.
Hi @KhaledG ,
You should set SDK_DEBUGCONSOLE 0 0. It means DEBUGCONSOLE_REDIRECT_TO_TOOLCHAIN.
I can use printf to print out via lpuart1 on my evk.
(I havent rt1024 evk, so I use rt1170 evk to make the demo.)
Regards,
Jing
Hi @jingpan,
PRINTF() works thank you. To use printf() i added SDK_DEBUGCONSOLE_UART in Project → Properties → C/C++ Build → Settings →Tools settings→Preprocessor.
Thanks for help.