Difference between revisions of "How to use SWO with GDB"
(Created page with "GDB does not know what SWO is. But the J-Link GDB server is able to send SWO data to a socket. This article is a step-by-step guide about how to use SWO with GDB. If not set d...") |
|||
Line 1: | Line 1: | ||
GDB does not know what SWO is. But the J-Link GDB server is able to send SWO data to a socket. |
GDB does not know what SWO is. But the J-Link GDB server is able to send SWO data to a socket. |
||
This article is a step-by-step guide about how to use SWO with GDB. |
This article is a step-by-step guide about how to use SWO with GDB. |
||
− | If not set differently, J-Link GDB Server will |
+ | If not set differently, J-Link GDB Server will use default settings. |
− | SWO will be sent to port :2332 |
||
__TOC__ |
__TOC__ |
||
+ | |||
+ | =Default settings= |
||
+ | Default port for SWO via GDB is: |
||
+ | *Telnet port: 2331 |
||
+ | *SWO data port: 2332 |
||
=Example with a MK22FN512xxx12 device using putty (default ports)= |
=Example with a MK22FN512xxx12 device using putty (default ports)= |
Revision as of 17:14, 21 November 2019
GDB does not know what SWO is. But the J-Link GDB server is able to send SWO data to a socket. This article is a step-by-step guide about how to use SWO with GDB. If not set differently, J-Link GDB Server will use default settings.
Contents
Default settings
Default port for SWO via GDB is:
- Telnet port: 2331
- SWO data port: 2332
Example with a MK22FN512xxx12 device using putty (default ports)
This example shows how to setup GDB for SWO. It was created by using default port settings. Further information about setting different ports and more can be found in UM08001. In this example the following applications were used:
- J-Llink GDB Server
- ARM GDB Client (tool-chain)
- Putty
Setting up the J-Link GDB Server
Setting up the GDB client
- Open a command line GDB client
- Connect to the GDB Server. This can be achieved via these commands:
target remote :2331 monitor SWO EnableTarget 0 0 1 0 c