have MQX shell run in two different serial port.

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

have MQX shell run in two different serial port.

696 次查看
kalaiyarasansel
Contributor II

Hi,

I need to have shell in two different serial port for two different purposes. One for debugging and other as user interface to a custom device or a customer through a PC.

I know that we can have two different structure and use different set of command for different shell.

But i don't know, How to configure to  two serial port at a time.

Please share if any solution.

Thanks,

Kalaiyarasan.

标签 (1)
标记 (3)
1 回复

518 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi  KALAIYARASAN SELVARAJ 

Shell functions use printf() to print output to stdout. Thus, you would need to redirect printf() to some other file.

This can be done  for example by _io_set_handle(IO_STDOUT, fh_ptr);

as in the example

C:\Freescale\Freescale_MQX_4_2\mqx\examples\io

Please check this demo, it examines the two UART modules at the same time. The serial driver is used.  The default serial port and one additional serial port are invoked. Different messages- strings of characters -are sent over each serial port and displayed over the output terminals.

I hope this helps.


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

Have a great day,
Daniel