cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with RTEdbg toolkit log/trace data transfer via ST-LINK

BPrem.1
Associate II

I have developed the RTEdbg toolkit for lightweight C/C++ code instrumentation. I tested it on the STM32 since I have several demo boards - see the demo code in the RTEdbg Releases for a few of them. The data logging code runs fine. However, there are problems with the binary data transfer to the PC where the logged data is decoded - see below:
1. It is possible to transfer the logged data to the PC in parallel to the debugger in the IDE if ST-LINK sharing is enabled using the ST-LINK command line utility. Such a solution is usable for post-mortem or snapshot data transfer, but not for streaming mode. It is also not very flexible.
2. If the logged data is transferred using the RTEgdbData utility that used the GDB protocol, the execution of the embedded system code is immediately stopped as soon as the utility connects to the ST-LINK GDB server. There is a workaround for this issue. The programmer must start debugging until the main() function is reached, start the RTEgdbData utility in persistent mode, and then start the embedded system.
3. The second problem is that the ST-LINK GDB debugger does not allow more than two parallel connections. The first one is used for general debugging and the second one is used for the "Live Variable Watch" function in the IDE. Live Variable Watch has to be disabled to allow GDB access to the RTEgdbData utility. My question is: Is it possible to enable more parallel GDB connections, e.g. using a command line option or a configuration file? The Live View is a valuable resource and it would be nice to use it in parallel with log data transfer to the host.

4. There is another workaround for the maximum two parallel ST-LINK GDB server connections. The OpenOCD GDB server can be used, but this server stops code execution as soon as the programmer exits the debugging session. This can be dangerous when debugging real-time control systems, as the device under control (e.g. power electronics) may be damaged.

5. There are no data transfer problems when using the Segger J-Link. It does not stop the CPU when the RTEgdbData utility connects to the GDB, and it allows more than two GDB server connections in parallel. But there is a catch. Editing live expressions while target is running does not work with SEGGER J-Link. And live expresions is a very useful feature, especially for real-time system debugging.

The data logging/tracing toolkit would be much more useful to STM32 programmers developing embedded systems with the STM32 family if at lease some of the above issues were resolved.

Best regards,

Branko

0 REPLIES 0