Can I redirect the MQX shell to the Segger J-Link RTT Viewer?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can I redirect the MQX shell to the Segger J-Link RTT Viewer?

974件の閲覧回数
marcohaddad
Contributor III

I have this working board with kinetis K24 where there is a MQX shell running on UART4. I want to use this board to send a lot of binary data through that UART, but I need to keep the shell and one easy solution, if possible, would be to redirect stout and stdin to the JTAG and use the RTT Viewer, like what can be done with printf().

Thanks for any help.

0 件の賞賛
返信
2 返答(返信)

795件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Marco Haddad:

Many shell functions use printf() to print output to stdout. Thus, you would need to redirect printf() to some other file. This can be done by _io_set_handle(IO_STDOUT, fh_ptr);

Please check this io demo in the MQX installation folder

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

This demo accomplishes the following jobs.

Print out a message to the default serial port using printf() function.

open another serial port and assign the standard output stream to this serial channel.

print out another message to the new serial port.

I hope it helps.

Regards

Daniel

0 件の賞賛
返信

795件の閲覧回数
marcohaddad
Contributor III

Hi Daniel,

Thanks for your reply.

Unfortunately I'm using the MQX that comes within the KSDK 1.3, and it does not contain that example. I'll try to get it somehow...

Anyway I think I won't be able to use the Segger RTT as a stream to assign it to stdout. Some sort of device driver will be required...

Best regards,

Marco Haddad

0 件の賞賛
返信