Own design board with MK20, how to be able to print debugging info on console

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

Own design board with MK20, how to be able to print debugging info on console

ソリューションへジャンプ
1,461件の閲覧回数
yarannan
Contributor III

As question above, I have own designed board with MK20 processor. I am using processor expert + MQX-Lite on KDS.

Currently, one side JLink-EDU is connected to JTAG on board and the other side is connected to usb port on computer.

I have a micro usb designed on the board.

What I would like to do is to print something on terminal window via connecting microusb. Is it doable and how would

I do it?

Thanks,

Yaran

1 解決策
1,104件の閲覧回数
marek_neuzil
NXP Employee
NXP Employee

Hello,

The j-link support virtual COM port, you can find the description in the document http://www.segger.com/cms/admin/uploads/productDocs/UM08001_JLink.pdf, chapter 5.14 Virtual COM Port (VCOM).

In this case you need to have connected pins J-Link-Tx and J-Link-Rx to your MCU pins (to an UART device).

In the KDS project, you can add the fsl_debug_console component into your application, select the UART device that is connected to J-link port (J-Link-Tx and J-Link-Rx pins), select the baudrate and correct pins. Then you can use printf() function in your application. See below.

pastedImage_1.png

In this case you can use the virtual COM port on your computer - use the COM port by your Terminal to send and receive data (for example you can use TeraTerm terminal).

If your MK20 board design does not provide the connection of UART pins to j-link port you can use the Segger RTT (Real Time Terminal). You can find description in the document http://www.segger.com/cms/admin/uploads/productDocs/UM08001_JLink.pdf and on the page SEGGER - The Embedded Experts - Real Time Terminal (use this link to download the software). In this case you can use SEGGER_RTT_printf and other functions that are provided in the Segger RTT Implementation Pack.

Best Regards,

Marek Neuzil

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,105件の閲覧回数
marek_neuzil
NXP Employee
NXP Employee

Hello,

The j-link support virtual COM port, you can find the description in the document http://www.segger.com/cms/admin/uploads/productDocs/UM08001_JLink.pdf, chapter 5.14 Virtual COM Port (VCOM).

In this case you need to have connected pins J-Link-Tx and J-Link-Rx to your MCU pins (to an UART device).

In the KDS project, you can add the fsl_debug_console component into your application, select the UART device that is connected to J-link port (J-Link-Tx and J-Link-Rx pins), select the baudrate and correct pins. Then you can use printf() function in your application. See below.

pastedImage_1.png

In this case you can use the virtual COM port on your computer - use the COM port by your Terminal to send and receive data (for example you can use TeraTerm terminal).

If your MK20 board design does not provide the connection of UART pins to j-link port you can use the Segger RTT (Real Time Terminal). You can find description in the document http://www.segger.com/cms/admin/uploads/productDocs/UM08001_JLink.pdf and on the page SEGGER - The Embedded Experts - Real Time Terminal (use this link to download the software). In this case you can use SEGGER_RTT_printf and other functions that are provided in the Segger RTT Implementation Pack.

Best Regards,

Marek Neuzil

0 件の賞賛
返信
1,104件の閲覧回数
yarannan
Contributor III

Hi Marek,

Thanks. That is really helpful.

Regards,

Yaran

0 件の賞賛
返信