armv7m: add a TCP channel to stream captured trace
[openocd.git] / src / target / armv7m_trace.h
index e5879fb082a6d67bd928a3bcccf597af502d6356..076f9d5829d119b4a2fddfe9c5cada03a7524008 100644 (file)
@@ -18,6 +18,7 @@
 #ifndef OPENOCD_TARGET_ARMV7M_TRACE_H
 #define OPENOCD_TARGET_ARMV7M_TRACE_H
 
+#include <server/server.h>
 #include <target/target.h>
 #include <command.h>
 
@@ -32,8 +33,14 @@ enum trace_config_type {
        TRACE_CONFIG_TYPE_INTERNAL      /**< trace output is handled by OpenOCD adapter driver */
 };
 
+enum trace_internal_channel {
+       TRACE_INTERNAL_CHANNEL_TCL_ONLY,        /** trace data is sent only to 'tcl_trace'  */
+       TRACE_INTERNAL_CHANNEL_FILE,            /** trace data is appended to a file */
+       TRACE_INTERNAL_CHANNEL_TCP                      /** trace data is appended to a TCP/IP port*/
+};
+
 enum tpiu_pin_protocol {
-       TPIU_PIN_PROTOCOL_SYNC,                 /**< synchronous trace output */
+       TPIU_PIN_PROTOCOL_SYNC,                         /**< synchronous trace output */
        TPIU_PIN_PROTOCOL_ASYNC_MANCHESTER,     /**< asynchronous output with Manchester coding */
        TPIU_PIN_PROTOCOL_ASYNC_UART            /**< asynchronous output with NRZ coding */
 };
@@ -49,6 +56,9 @@ struct armv7m_trace_config {
        /** Currently active trace capture mode */
        enum trace_config_type config_type;
 
+       /** The used channel when internal mode is selected */
+       enum trace_internal_channel internal_channel;
+
        /** Currently active trace output mode */
        enum tpiu_pin_protocol pin_protocol;
        /** TPIU formatter enable/disable (in async mode) */
@@ -73,8 +83,10 @@ struct armv7m_trace_config {
        unsigned int traceclkin_freq;
        /** Current frequency of trace port */
        unsigned int trace_freq;
-       /** Handle to output trace data in INTERNAL capture mode */
+       /** Handle to output trace data in INTERNAL capture mode via file */
        FILE *trace_file;
+       /** Handle to output trace data in INTERNAL capture mode via tcp */
+       struct service *trace_service;
 };
 
 extern const struct command_registration armv7m_trace_command_handlers[];

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)