Volunteers needed to test OpenOCD/JLink with SEGGER Real Time Trace (RTT)
See original GitHub issueUpdated: Aug 6, 2021, 7:12 PST SWO text output is now directed to a Terminal and so is output of GDB server (OpenOCD, JLink, etc.). This also enables bidirectional semihosting
I have a branch made for implementing RTT support in VSCode. The branch is called ‘rtt’. There are a few things you need to get started
If you just want to install the extension in its current state see https://github.com/Marus/cortex-debug/releases.
But, if you want to build from sources, clone and compile the extension (make sure you are using the rtt
branch. See instructions here
I had to patch OpenOCD due to a race condition I kept running into that is available here (more on that later). Unfortunately, you have to build OpenOCD which is not a trivial task. But the public OpenOCD might work for you https://github.com/haneefdm/openocd
~~You may need to install node
so that it is available from the command line.
https://nodejs.org/en/download/~~ NodeJS installation is no longer required.
Most of my testing has been on a Mac and some on Windows.
console
, binary
and 'graphdecoders, very similar to what SWO supports. The text output of the RTT goes into a new Terminal. In VSCode (July 2021 release), you can peel a terminal and dock it in other places. You will have as many consoles as you have channels and they are bi-directional. There is quite a bit of customization. You have to use IntelliSense in
launch.json` to learn more.
Here is a launch.json
entry for enabling RTT
"rttConfig": {
"enabled": true,
"address": "auto",
"decoders": [
{
"port": 0, // In RTT lingo, this is the buffer index (or channel)
"type": "console",
}
]
},
Note: RTT has been enabled only for launch
type debug sessions. attach
will come soon after launch
is working properly.
Technically, you can use VSCode to do all the setup and no decoders. You can then use SEGGERs free RTT tools if that is what you prefer. That method has certain benefits.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:46 (21 by maintainers)
Coming today. Now, you can plot RTT data (especially with OpenOCD) just like you could with SWO
The procedure is the same as what is described for SWO. Wherever it says
port
, it is the same as an RTT channel. We may support the use ofchannel
later or we just get used to it 😃 In the plot abovegraph
.inlaunch.json
. I set thegraphId
to"ABCD"
graphConfig
to create the plot. I used thegraphId
created above. I used a timespan of 5 secondsI reused all the wonderful infrastructure that @Marus had already created and hooked it up to the RTT channels. Notice that the
plots
is an array meaning that you can plot data from multiplegraphId
.@bmcdonnell-fb Yes, I know that the virtual terminals are very different from actual channels. The logging tool is an offline tool and does not cooperate with a debug session. Here, I am trying to do all of that with one tool. The existing JLink tools (Viewer, Client & Logger) can be used standalone (or while debugging with Cortex-Debug) as always.
We want the additional channel functionality in the JLinkGDBServer which would be most useful.