have MQX shell run in two different serial port.

cancel
Showing results for 
Search instead for 
Did you mean: 

have MQX shell run in two different serial port.

207 Views
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.

Labels (1)
Tags (3)
1 Reply

29 Views
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