Compiler is IAR. I would like to monitor printf message through serial port. Please advise how to build a system.
(borate, serial port(port number), schematic, etc.)
Current system,
device : MK60FN1M0VLQ12
MQX board connects to PC program through serial port 5.
The customer needs other serial port or other port for communication debugging between PC program and MQX board.
I have to modify MQX code, so they want to use printf for verification.
Hello,
Are you using the TWR-K60F120M BSP?
The default Console for the TWR-K60F120M is UART5 OSJTAG-USB mini connector (mapped to ttyf: device in the MQX RTOS)
If you need to change the default configuration you need to follow the below steps:
1. Ensure that the serial channel (UART0- ttya, UART1 -ttyb, UART2 -ttyc, UART3 -ttyd, UART4 -ttye,UART5 -ttyf ) is in enabled in user_config.h file as follows,
For example:
#define BSPCFG_ENABLE_TTYC 1
2. In addition, user_config.h file defines the default IO channel, so it is necessary to modify this definition according the channel you need, for example:
#define BSP_DEFAULT_IO_CHANNEL "ittyc:"
3. clean all libraries, and rebuild again.
Please let me know if this helps.
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------