diff --git a/Inc/itmfifos.h b/Inc/itmfifos.h index fe905a9c..3cef32b6 100644 --- a/Inc/itmfifos.h +++ b/Inc/itmfifos.h @@ -11,7 +11,7 @@ #include "tpiuDecoder.h" #include "itmDecoder.h" -#include "otag.h" +#include "oflow.h" #include "generics.h" @@ -27,7 +27,7 @@ extern "C" { struct Channel; struct itmfifosHandle; -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; /* Fifos running */ void itmfifoForceSync( struct itmfifosHandle *f, bool synced ); /* Force sync status */ diff --git a/Inc/otag.h b/Inc/oflow.h similarity index 52% rename from Inc/otag.h rename to Inc/oflow.h index 5b66f9b5..1093b22b 100644 --- a/Inc/otag.h +++ b/Inc/oflow.h @@ -1,13 +1,13 @@ /* SPDX-License-Identifier: BSD-3-Clause */ /* - * OTAG Module - * =========== + * ORBFLOW Module + * ============== * */ -#ifndef _OTAG_ -#define _OTAG_ +#ifndef _ORBFLOW_ +#define _ORBFLOW_ #include #include @@ -18,7 +18,7 @@ extern "C" { #endif -struct OTAGFrame +struct OFLOWFrame { unsigned int len; /* Received length (after pre-processing) */ uint8_t tag; /* Tag (packet type) */ @@ -29,41 +29,41 @@ struct OTAGFrame uint8_t *d; /* ...pointer to the data itself */ }; -struct OTAG +struct OFLOW { bool selfAllocated; /* Flag indicating that memory was allocated by the library */ struct COBS c; - struct OTAGFrame f; + struct OFLOWFrame f; /* Materials for callback */ - void ( *cb )( struct OTAGFrame *p, void *param ); + void ( *cb )( struct OFLOWFrame *p, void *param ); void *param; }; -#define OTAG_MAX_PACKET_LEN (COBS_MAX_PACKET_LEN-2) -#define OTAG_MAX_ENC_PACKET_LEN (COBS_MAX_ENC_PACKET_LEN) -#define OTAG_EOP_LEN (COBS_EOP_LEN) -#define OTAG_TS_RESOLUTION (1000000000L) +#define OFLOW_MAX_PACKET_LEN (COBS_MAX_PACKET_LEN-2) +#define OFLOW_MAX_ENC_PACKET_LEN (COBS_MAX_ENC_PACKET_LEN) +#define OFLOW_EOP_LEN (COBS_EOP_LEN) +#define OFLOW_TS_RESOLUTION (1000000000L) // ==================================================================================================== -static inline uint64_t OTAGResolution( struct OTAG *t ) +static inline uint64_t OFLOWResolution( struct OFLOW *t ) { - return OTAG_TS_RESOLUTION; + return OFLOW_TS_RESOLUTION; } -const uint8_t *OTAGgetFrameExtent( const uint8_t *inputEnc, int len ); -bool OTAGisEOFRAME( const uint8_t *inputEnc ); +const uint8_t *OFLOWgetFrameExtent( const uint8_t *inputEnc, int len ); +bool OFLOWisEOFRAME( const uint8_t *inputEnc ); -void OTAGEncode( const uint8_t channel, const uint64_t tstamp, const uint8_t *inputMsg, int len, struct Frame *o ); +void OFLOWEncode( const uint8_t channel, const uint64_t tstamp, const uint8_t *inputMsg, int len, struct Frame *o ); /* Context free functions */ -void OTAGPump( struct OTAG *t, const uint8_t *incoming, int len, - void ( *packetRxed )( struct OTAGFrame *p, void *param ), - void *param ); +void OFLOWPump( struct OFLOW *t, const uint8_t *incoming, int len, + void ( *packetRxed )( struct OFLOWFrame *p, void *param ), + void *param ); -void OTAGDelete( struct OTAG *t ); -struct OTAG *OTAGInit( struct OTAG *t ); +void OFLOWDelete( struct OFLOW *t ); +struct OFLOW *OFLOWInit( struct OFLOW *t ); // ==================================================================================================== #ifdef __cplusplus } diff --git a/Inc/orbtraceIf.h b/Inc/orbtraceIf.h index e6028d6b..71cac094 100644 --- a/Inc/orbtraceIf.h +++ b/Inc/orbtraceIf.h @@ -91,7 +91,7 @@ struct OrbtraceIf uint8_t ep; /* Endpoint used for data transfer */ uint8_t iface; /* ...and the interface */ bool isOrbtrace; /* Is this an orbtrace device? */ - bool supportsOTAG; /* ...and does it support OTAG for transfer? */ + bool supportsOFLOW; /* ...and does it support OFLOW for transfer? */ int numDevices; /* Number of matching devices found */ struct OrbtraceIfDevice *devices; /* List of matching devices found */ @@ -142,9 +142,9 @@ static inline libusb_device_handle *OrbtraceIfGetHandle( struct OrbtraceIf *o ) return o->handle; } -static inline bool OrbtraceSupportsOTAG( struct OrbtraceIf *o ) +static inline bool OrbtraceSupportsOFLOW( struct OrbtraceIf *o ) { - return o->supportsOTAG; + return o->supportsOFLOW; } /* Device selection management */ @@ -156,7 +156,7 @@ bool OrbtraceGetIfandEP( struct OrbtraceIf *o ); void OrbtraceIfCloseDevice( struct OrbtraceIf *o ); enum Channel OrbtraceIfNameToChannel( char *x ); bool OrbtraceIsOrbtrace( struct OrbtraceIf *o ); -bool OrbtraceSupportsOTAG( struct OrbtraceIf *o ); +bool OrbtraceSupportsOFLOW( struct OrbtraceIf *o ); /* Device manipulation */ bool OrbtraceIfSetTraceWidth( struct OrbtraceIf *o, int width ); diff --git a/README.md b/README.md index 8a5858a1..12a352c3 100644 --- a/README.md +++ b/README.md @@ -335,21 +335,21 @@ Some debug drivers (e.g. openocd, pyocd) can now create an orbuculum-compatible allows you to connect the rest of the suite to that directly, without needing to use the orbuculum mux itself. However, times have moved on. Passing all those data through transparently was wasteful as a fair bit of it -was 'nothing to see here', so Orbuculum now supports a new protocol, OTAG. OTAG is always carried on TCP/3402 and +was 'nothing to see here', so Orbuculum now supports a new protocol, orbflow (OFLOW). Orbflow is always carried on TCP/3402 and is a bit more intelligent than simply passing through the messages from the probe. It turns the stream of data into COBS encoded sequenced messages with defined message boundries and it also removes the redundant data. When used -in conjunction with an ORBTrace probe the OTAG messages are created in the probe itself, providing a further +in conjunction with an ORBTrace probe the orbflow messages are created in the probe itself, providing a further performance improvement. -Basically, all of this is mostly transparent to the regular end user. OTAG is automatically used for communication +Basically, all of this is mostly transparent to the regular end user. Orbflow is automatically used for communication between orbuculum and its clients if it's available, and Orbuculum still provides the TCP/3443 port it always did, -which you can connect to in the same way as you used to if you've got custom clients. OTAG will give you a performance +which you can connect to in the same way as you used to if you've got custom clients. Orbflow will give you a performance improvement, but it's otherwise mostly transparent. There are come slight changes to the command line options though. Historically, when using TPIU decoding, you had to specify the channels to be decoded with an option like `-T 1,2`. You now simply need to tell orbuculum which tags to process with `-t 1,2` and, if your probe doesn't remove TPIU framing automatically, specify the `-T` -option on its own....if you try to specify the `-T` option and you've got an ORBTrace that supports OTAG protocol +option on its own....if you try to specify the `-T` option and you've got an ORBTrace that supports Orbflow protocol then you'll get a warning, because TPIU framing removal is done automatically in the probe in that case, so you don't generally need it. diff --git a/Src/itmfifos.c b/Src/itmfifos.c index 1225b2e4..d71746a6 100644 --- a/Src/itmfifos.c +++ b/Src/itmfifos.c @@ -21,7 +21,7 @@ #include "generics.h" #include "tpiuDecoder.h" #include "itmDecoder.h" -#include "otag.h" +#include "oflow.h" #include "fileWriter.h" #include "itmfifos.h" #include "msgDecoder.h" @@ -61,7 +61,7 @@ struct itmfifosHandle struct ITMPacket h; struct TPIUDecoder t; struct TPIUPacket p; - struct OTAG ot; + struct OFLOW ot; enum timeDelay timeStatus; /* Indicator of if this time is exact */ uint64_t timeStamp; /* Latest received time */ @@ -73,10 +73,10 @@ struct itmfifosHandle bool filewriter; /* Is the filewriter in use? */ bool forceITMSync; /* Is ITM to be forced into sync? */ bool permafile; /* Use permanent files rather than fifos */ - int tag; /* Which OTAG or TPIU stream are we decoding? */ + int tag; /* Which OFLOW or TPIU stream are we decoding? */ bool amEnding; /* Flag indicating end is in progress */ - enum Prot protocol; /* What protocol to communicate (default to OTAG (== orbuculum)) */ + enum Prot protocol; /* What protocol to communicate (default to OFLOW (== orbuculum)) */ struct Channel c[NUM_CHANNELS + 1]; /* Output for each channel */ }; @@ -553,7 +553,7 @@ static void _tpiuProtocolPump( struct itmfifosHandle *f, uint8_t c ) // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { struct itmfifosHandle *f = ( struct itmfifosHandle * )param; @@ -705,9 +705,9 @@ void itmfifoProtocolPump( struct itmfifosHandle *f, uint8_t *c, int len ) { - if ( PROT_OTAG == f->protocol ) + if ( PROT_OFLOW == f->protocol ) { - OTAGPump( &f->ot, c, len, _OTAGpacketRxed, f ); + OFLOWPump( &f->ot, c, len, _OFLOWpacketRxed, f ); } else while ( len-- ) @@ -745,7 +745,7 @@ bool itmfifoCreate( struct itmfifosHandle *f ) /* Reset the TPIU handler before we start */ TPIUDecoderInit( &f->t ); - OTAGInit( &f->ot ); + OFLOWInit( &f->ot ); ITMDecoderInit( &f->i, f->forceITMSync ); /* Cycle through channels and create a fifo for each one that is enabled */ diff --git a/Src/otag.c b/Src/oflow.c similarity index 69% rename from Src/otag.c rename to Src/oflow.c index e4ea92d7..8f1330a3 100644 --- a/Src/otag.c +++ b/Src/oflow.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: BSD-3-Clause */ /* - * OTAG Encoder/Decoder Module - * =========================== + * ORBFLOW Encoder/Decoder Module + * ============================== * * */ @@ -12,17 +12,17 @@ #include #include #include "cobs.h" -#include "otag.h" +#include "oflow.h" // ==================================================================================================== -struct OTAG *OTAGInit( struct OTAG *t ) +struct OFLOW *OFLOWInit( struct OFLOW *t ) -/* Reset a OTAG instance */ +/* Reset a OFLOW instance */ { if ( !t ) { - t = ( struct OTAG * )calloc( 1, sizeof( struct OTAG ) ); + t = ( struct OFLOW * )calloc( 1, sizeof( struct OFLOW ) ); t->selfAllocated = true; } @@ -32,9 +32,9 @@ struct OTAG *OTAGInit( struct OTAG *t ) return t; } // ==================================================================================================== -void OTAGDelete( struct OTAG *t ) +void OFLOWDelete( struct OFLOW *t ) -/* Destroy a OTAG instance, but only if we created it */ +/* Destroy a OFLOW instance, but only if we created it */ { /* Need to remove the containing COBS instance */ @@ -49,7 +49,7 @@ void OTAGDelete( struct OTAG *t ) // ==================================================================================================== -void OTAGEncode( const uint8_t channel, const uint64_t tstamp, const uint8_t *inputMsg, int len, struct Frame *o ) +void OFLOWEncode( const uint8_t channel, const uint64_t tstamp, const uint8_t *inputMsg, int len, struct Frame *o ) /* Encode frame and write into provided output Frame buffer */ @@ -71,7 +71,7 @@ void OTAGEncode( const uint8_t channel, const uint64_t tstamp, const uint8_t *in // ==================================================================================================== -bool OTAGisEOFRAME( const uint8_t *inputEnc ) +bool OFLOWisEOFRAME( const uint8_t *inputEnc ) { return ( COBS_SYNC_CHAR == *inputEnc ); @@ -82,11 +82,11 @@ static void _pumpcb( struct Frame *p, void *param ) { /* Callback function when a COBS packet is complete */ - struct OTAG *t = ( struct OTAG * )param; + struct OFLOW *t = ( struct OFLOW * )param; - t->f.len = p->len - 2; /* OTAG frames have the first element representing the tag and last element the checksum */ - t->f.tag = p->d[0]; /* First byte of an OTAG frame is the tag */ - t->f.sum = p->d[p->len - 1]; /* Last byte of an OTAG frame is the sum */ + t->f.len = p->len - 2; /* OFLOW frames have the first element representing the tag and last element the checksum */ + t->f.tag = p->d[0]; /* First byte of an OFLOW frame is the tag */ + t->f.sum = p->d[p->len - 1]; /* Last byte of an OFLOW frame is the sum */ t->f.d = &p->d[1]; /* This is the rest of the data */ /* Calculate received packet sum and insert good status into packet */ @@ -104,8 +104,8 @@ static void _pumpcb( struct Frame *p, void *param ) ( t->cb )( &t->f, t->param ); } -void OTAGPump( struct OTAG *t, const uint8_t *incoming, int len, - void ( *packetRxed )( struct OTAGFrame *p, void *param ), +void OFLOWPump( struct OFLOW *t, const uint8_t *incoming, int len, + void ( *packetRxed )( struct OFLOWFrame *p, void *param ), void *param ) @@ -115,20 +115,20 @@ void OTAGPump( struct OTAG *t, const uint8_t *incoming, int len, struct timespec ts; t->cb = packetRxed; clock_gettime( CLOCK_REALTIME, &ts ); - t->f.tstamp = ts.tv_sec * OTAG_TS_RESOLUTION + ts.tv_nsec; /* For now, fake the timestamp */ + t->f.tstamp = ts.tv_sec * OFLOW_TS_RESOLUTION + ts.tv_nsec; /* For now, fake the timestamp */ t->param = param; COBSPump( &t->c, incoming, len, _pumpcb, t ); } // ==================================================================================================== -const uint8_t *OTAGgetFrameExtent( const uint8_t *inputEnc, int len ) +const uint8_t *OFLOWgetFrameExtent( const uint8_t *inputEnc, int len ) /* Look through memory until an end of frame marker is found, or memory is exhausted. */ { /* Go find the next sync */ - while ( !OTAGisEOFRAME( inputEnc ) && --len ) + while ( !OFLOWisEOFRAME( inputEnc ) && --len ) { inputEnc++; } diff --git a/Src/orbcat.c b/Src/orbcat.c index 5cbdc9a2..0ec81c1a 100644 --- a/Src/orbcat.c +++ b/Src/orbcat.c @@ -26,7 +26,7 @@ #include "msgDecoder.h" #include "msgSeq.h" #include "stream.h" -#include "otag.h" +#include "oflow.h" #define NUM_CHANNELS 32 #define HW_CHANNEL (NUM_CHANNELS) /* Make the hardware fifo on the end of the software ones */ @@ -51,8 +51,8 @@ enum TSType { TSNone, TSAbsolute, TSRelative, TSDelta, TSStamp, TSStampDelta, TSNumTypes }; -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; const char *tsTypeString[TSNumTypes] = { "None", "Absolute", "Relative", "Delta", "System Timestamp", "System Timestamp Delta" }; @@ -60,7 +60,7 @@ const char *tsTypeString[TSNumTypes] = { "None", "Absolute", "Relative", "Delta" struct { /* Config information */ - uint32_t tag; /* Which TPIU or OTAG stream are we decoding? */ + uint32_t tag; /* Which TPIU or OFLOW stream are we decoding? */ bool forceITMSync; uint64_t cps; /* Cycles per second for target CPU */ @@ -75,7 +75,7 @@ struct /* Source information */ int port; /* What port to connect to on the server (default to orbuculum) */ char *server; /* Which server to connect to (default to localhost) */ - enum Prot protocol; /* What protocol to communicate (default to OTAG (== orbuculum)) */ + enum Prot protocol; /* What protocol to communicate (default to OFLOW (== orbuculum)) */ char *file; /* File host connection */ bool endTerminate; /* Terminate when file/socket "ends" */ @@ -96,7 +96,7 @@ struct struct MSGSeq d; struct ITMPacket h; struct TPIUDecoder t; - struct OTAG c; + struct OFLOW c; struct Frame cobsPart; /* Any part frame that has been received */ struct TPIUPacket p; /* Any TPIU packet that has been recevied */ @@ -614,10 +614,10 @@ static void _printHelp( const char *const progName ) fprintf( stdout, " -g, --trigger: to use to trigger timestamp (default is newline)" EOL ); fprintf( stdout, " -h, --help: This help" EOL ); fprintf( stdout, " -n, --itm-sync: Enforce sync requirement for ITM (i.e. ITM needs to issue syncs)" EOL ); - fprintf( stdout, " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise ITM unless" EOL \ + fprintf( stdout, " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise ITM unless" EOL \ " explicitly set to TPIU to decode TPIU frames on channel set by -t" EOL ); fprintf( stdout, " -s, --server: : to use" EOL ); - fprintf( stdout, " -t, --tag: : Which TPIU stream or OTAG tag to use (normally 1)" EOL ); + fprintf( stdout, " -t, --tag: : Which TPIU stream or OFLOW tag to use (normally 1)" EOL ); fprintf( stdout, " -T, --timestamp: : Add absolute, relative (to session start)," EOL " delta, system timestamp or system timestamp delta to output. Note" EOL " a,r & d are host dependent and you may need to run orbuculum with -H." EOL ); @@ -887,7 +887,7 @@ bool _processOptions( int argc, char *argv[] ) // ------------------------------------ } - /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OFLOW */ if ( serverExplicit && !protExplicit ) { options.protocol = PROT_ITM; @@ -932,8 +932,8 @@ bool _processOptions( int argc, char *argv[] ) switch ( options.protocol ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, options.tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, options.tag ); break; case PROT_ITM: @@ -976,7 +976,7 @@ static struct Stream *_tryOpenStream( void ) } // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { if ( !p->good ) @@ -1025,9 +1025,9 @@ static void _feedStream( struct Stream *stream ) if ( receivedSize ) { - if ( PROT_OTAG == options.protocol ) + if ( PROT_OFLOW == options.protocol ) { - OTAGPump( &_r.c, cbw, receivedSize, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, cbw, receivedSize, _OFLOWpacketRxed, &_r ); } else { @@ -1075,7 +1075,7 @@ int main( int argc, char *argv[] ) /* Reset the TPIU handler before we start */ TPIUDecoderInit( &_r.t ); ITMDecoderInit( &_r.i, options.forceITMSync ); - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); MSGSeqInit( &_r.d, &_r.i, MSG_REORDER_BUFLEN ); /* This ensures the signal handler gets called */ diff --git a/Src/orbdump.c b/Src/orbdump.c index a5e36935..5bc3f8e8 100644 --- a/Src/orbdump.c +++ b/Src/orbdump.c @@ -17,7 +17,7 @@ #include "git_version_info.h" #include "generics.h" #include "tpiuDecoder.h" -#include "otag.h" +#include "oflow.h" #include "itmDecoder.h" #include "stream.h" @@ -28,8 +28,8 @@ #define DEFAULT_OUTFILE "/dev/stdout" #define DEFAULT_TIMELEN 10000 -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; /* ---------- CONFIGURATION ----------------- */ @@ -72,7 +72,7 @@ struct struct ITMPacket h; struct TPIUDecoder t; struct TPIUPacket p; - struct OTAG c; + struct OFLOW c; bool ending; } _r; @@ -169,10 +169,10 @@ void _printHelp( const char *const progName ) genericsPrintf( " -M, --no-colour: Supress colour in output" EOL ); genericsPrintf( " -n, --itm-sync: Enforce sync requirement for ITM (i.e. ITM needs to issue syncs)" EOL ); genericsPrintf( " -o, --output-file: to be used for dump file (defaults to %s)" EOL, options.outfile ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise ITM unless" EOL \ + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise ITM unless" EOL \ " explicitly set to TPIU to decode TPIU frames on channel set by -t" EOL ); genericsPrintf( " -s, --server: : to use" EOL ); - genericsPrintf( " -t, --tag: Which TPIU stream or OTAG tag to use (normally 1)" EOL ); + genericsPrintf( " -t, --tag: Which TPIU stream or OFLOW tag to use (normally 1)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); genericsPrintf( " -w, --sync-write: Write synchronously to the output file after every packet" EOL ); @@ -326,7 +326,7 @@ bool _processOptions( int argc, char *argv[] ) return false; } - /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OFLOW */ if ( serverExplicit && !protExplicit ) { options.protocol = PROT_ITM; @@ -355,8 +355,8 @@ bool _processOptions( int argc, char *argv[] ) switch ( options.protocol ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, options.tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, options.tag ); break; case PROT_ITM: @@ -377,7 +377,7 @@ bool _processOptions( int argc, char *argv[] ) // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { if ( !p->good ) @@ -432,7 +432,7 @@ int main( int argc, char *argv[] ) /* Reset the TPIU handler before we start */ TPIUDecoderInit( &_r.t ); ITMDecoderInit( &_r.i, options.forceITMSync ); - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); struct Stream *stream = _tryOpenStream(); /* This ensures the signal handler gets called */ @@ -484,9 +484,9 @@ int main( int argc, char *argv[] ) } - if ( PROT_OTAG == options.protocol ) + if ( PROT_OFLOW == options.protocol ) { - OTAGPump( &_r.c, cbw, receivedSize, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, cbw, receivedSize, _OFLOWpacketRxed, &_r ); } else { diff --git a/Src/orbfifo.c b/Src/orbfifo.c index 18636d03..f2613a31 100644 --- a/Src/orbfifo.c +++ b/Src/orbfifo.c @@ -29,7 +29,7 @@ #include "itmfifos.h" -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; //#define DUMP_BLOCK @@ -79,10 +79,10 @@ static void _printHelp( const char *const progName ) genericsPrintf( " -h, --help: This help" EOL ); genericsPrintf( " -M, --no-colour: Supress colour in output" EOL ); genericsPrintf( " -P, --permanent: Create permanent files rather than fifos" EOL ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise ITM unless" EOL \ + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise ITM unless" EOL \ " explicitly set to TPIU to decode TPIU frames on stream set by -t" EOL ); genericsPrintf( " -s, --server: : to use" EOL ); - genericsPrintf( " -t, --tag: Which TPIU stream or OTAG tag to use (normally 1)" EOL ); + genericsPrintf( " -t, --tag: Which TPIU stream or OFLOW tag to use (normally 1)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); genericsPrintf( " -W, --writer-path: Enable filewriter functionality using specified base path" EOL ); @@ -327,7 +327,7 @@ static bool _processOptions( int argc, char *argv[] ) // ------------------------------------ } - /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OFLOW */ if ( serverExplicit && !protExplicit ) { itmfifoSetProtocol( _r.f, PROT_ITM ); @@ -359,8 +359,8 @@ static bool _processOptions( int argc, char *argv[] ) switch ( itmfifoGetProtocol( _r.f ) ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, itmfifoGettag( _r.f ) ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, itmfifoGettag( _r.f ) ); break; case PROT_ITM: diff --git a/Src/orblcd.c b/Src/orblcd.c index 883b0a47..42ccfc8f 100644 --- a/Src/orblcd.c +++ b/Src/orblcd.c @@ -26,7 +26,7 @@ #include "tpiuDecoder.h" #include "itmDecoder.h" #include "msgDecoder.h" -#include "otag.h" +#include "oflow.h" #include "stream.h" #include "nw.h" #include "orblcd_protocol.h" @@ -66,8 +66,8 @@ struct TApp }; /************** APPLICATION SPECIFIC ENDS ***************************************************************/ -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; /* Record for options, either defaults or from command line */ struct Options @@ -75,12 +75,12 @@ struct Options /* Source information */ int port; /* Source port, or zero if no port set */ char *server; /* Source server */ - enum Prot protocol; /* What protocol to communicate (default to OTAG (== orbuculum)) */ + enum Prot protocol; /* What protocol to communicate (default to OFLOW (== orbuculum)) */ char *file; /* File host connection */ bool fileTerminate; /* Terminate when file read isn't successful */ /* Demux information */ - uint32_t tag; /* Which TPIU or OTAG stream are we decoding? */ + uint32_t tag; /* Which TPIU or OFLOW stream are we decoding? */ bool forceITMSync; /* Do we need ITM syncs? */ } _options = {.forceITMSync = true, .tag = 1, .port = OTCLIENT_SERVER_PORT, .server = "localhost"}; @@ -92,7 +92,7 @@ struct RunTime struct ITMPacket h; struct TPIUDecoder t; struct TPIUPacket p; - struct OTAG c; + struct OFLOW c; bool ending; /* Flag indicating app is terminating */ bool errored; /* Flag indicating problem in reception process */ @@ -373,7 +373,7 @@ static struct Stream *_tryOpenStream( struct RunTime *r ) } // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { struct RunTime *r = ( struct RunTime * )param; @@ -436,9 +436,9 @@ static bool _feedStream( struct Stream *stream, struct RunTime *r ) } } - if ( PROT_OTAG == r->options->protocol ) + if ( PROT_OFLOW == r->options->protocol ) { - OTAGPump( &_r.c, cbw, receivedSize, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, cbw, receivedSize, _OFLOWpacketRxed, &_r ); } else { @@ -472,11 +472,11 @@ void _printHelp( const char *const progName ) genericsPrintf( " -f, --input-file: Take input from specified file" EOL ); genericsPrintf( " -h, --help: This help" EOL ); genericsPrintf( " -n, --itm-sync: Enforce sync requirement for ITM (i.e. ITM needsd to issue syncs)" EOL ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise ITM unless" EOL \ + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise ITM unless" EOL \ " explicitly set to TPIU to decode TPIU frames on channel set by -t" EOL ); genericsPrintf( " -s, --server: : to use" EOL ); genericsPrintf( " -S, --sbcolour: to be used for single bit renders, ignored for other bit depths" EOL ); - genericsPrintf( " -t, --tag: : Which TPIU stream or OTAG tag to use (normally 1)" EOL ); + genericsPrintf( " -t, --tag: : Which TPIU stream or OFLOW tag to use (normally 1)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); genericsPrintf( " -w, --window: Set title for output window" EOL ); @@ -658,7 +658,7 @@ bool _processOptions( int argc, char *argv[], struct RunTime *r ) /* ... and dump the config if we're being verbose */ _printVersion(); - /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OFLOW */ if ( serverExplicit && !protExplicit ) { r->options->protocol = PROT_ITM; @@ -701,8 +701,8 @@ bool _processOptions( int argc, char *argv[], struct RunTime *r ) switch ( r->options->protocol ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, r->options->tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, r->options->tag ); break; case PROT_ITM: @@ -748,7 +748,7 @@ int main( int argc, char *argv[] ) /* Reset the TPIU handler before we start */ TPIUDecoderInit( &_r.t ); ITMDecoderInit( &_r.i, _r.options->forceITMSync ); - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); if ( SDL_Init( SDL_INIT_VIDEO ) < 0 ) { diff --git a/Src/orbmortem.c b/Src/orbmortem.c index 1f2ef438..fe480a40 100644 --- a/Src/orbmortem.c +++ b/Src/orbmortem.c @@ -24,7 +24,7 @@ #include "nw.h" #include "traceDecoder.h" #include "tpiuDecoder.h" -#include "otag.h" +#include "oflow.h" #include "loadelf.h" #include "sio.h" #include "stream.h" @@ -33,8 +33,8 @@ typedef unsigned long int symbolMemaddr; -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; #define SCRATCH_STRING_LEN (65535) /* Max length for a string under construction */ //#define DUMP_BLOCK @@ -59,7 +59,7 @@ struct Options int buflen; /* Length of post-mortem buffer, in bytes */ int channel; /* When TPIU is in use, which channel to decode? */ - int tag; /* which TPIU or OTAG stream are we decoding? */ + int tag; /* which TPIU or OFLOW stream are we decoding? */ int port; /* Source information */ char *server; enum Prot commProt; @@ -102,7 +102,7 @@ struct RunTime { struct TRACEDecoder i; struct TPIUDecoder t; - struct OTAG c; + struct OFLOW c; const char *progName; /* Name by which this program was called */ struct symbol *s; /* Symbols read from elf */ @@ -184,7 +184,7 @@ static void _printHelp( const char *const progName ) genericsPrintf( " -h, --help: This help" EOL ); genericsPrintf( " -M, --no-colour: Supress colour in output" EOL ); genericsPrintf( " -O, --objdump-opts: Options to pass directly to objdump" EOL ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise TPIU" EOL ); + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise TPIU" EOL ); genericsPrintf( " -P, --trace-proto: { " ); for ( int i = TRACE_PROT_LIST_START; i < TRACE_PROT_NUM; i++ ) @@ -194,7 +194,7 @@ static void _printHelp( const char *const progName ) genericsPrintf( "} trace protocol to use, default is %s" EOL, TRACEDecodeGetProtocolName( TRACE_PROT_LIST_START ) ); genericsPrintf( " -s, --server: : to use" EOL ); - genericsPrintf( " -t, --tag: : Which TPIU stream or OTAG tag to use (normally 2)" EOL ); + genericsPrintf( " -t, --tag: : Which TPIU stream or OFLOW tag to use (normally 2)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); genericsPrintf( EOL "(Will connect one port higher than that set in -s when TPIU is not used)" EOL ); @@ -412,7 +412,7 @@ static bool _processOptions( int argc, char *argv[], struct RunTime *r ) // ------------------------------------ } - /* If we set an explicit server and port and didn't set a protocol chances are we want TPIU, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want TPIU, not OFLOW */ if ( serverExplicit && !protExplicit && r->options->port != OTCLIENT_SERVER_PORT ) { r->options->commProt = PROT_TPIU; @@ -464,8 +464,8 @@ static bool _processOptions( int argc, char *argv[], struct RunTime *r ) switch ( r->options->commProt ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG with ETM in stream %d" EOL, r->options->tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW with ETM in stream %d" EOL, r->options->tag ); break; case PROT_ITM: @@ -612,7 +612,7 @@ static bool _rxAdd( struct RunTime *r, uint8_t c ) // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { struct RunTime *r = ( struct RunTime * )param; @@ -1437,7 +1437,7 @@ int main( int argc, char *argv[] ) TPIUDecoderInit( &_r.t ); } - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); /* Create a screen and interaction handler */ _r.sio = SIOsetup( _r.progName, _r.options->elffile, ( _r.options->file != NULL ) ); @@ -1510,9 +1510,9 @@ int main( int argc, char *argv[] ) { /* Pump all of the data through the protocol handler */ - if ( PROT_OTAG == _r.options->commProt ) + if ( PROT_OFLOW == _r.options->commProt ) { - OTAGPump( &_r.c, _r.rawBlock.buffer, _r.rawBlock.fillLevel, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, _r.rawBlock.buffer, _r.rawBlock.fillLevel, _OFLOWpacketRxed, &_r ); } else { diff --git a/Src/orbprofile.c b/Src/orbprofile.c index 53815207..78593d1c 100644 --- a/Src/orbprofile.c +++ b/Src/orbprofile.c @@ -21,7 +21,7 @@ #include "uthash.h" #include "generics.h" #include "traceDecoder.h" -#include "otag.h" +#include "oflow.h" #include "symbols.h" #include "nw.h" #include "ext_fileformats.h" @@ -31,8 +31,8 @@ #define DEFAULT_DURATION_MS (1000) /* Default time to sample, in mS */ #define HANDLE_MASK (0xFFFFFF) /* cachegrind cannot cope with large file handle numbers */ -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; /* How many transfer buffers from the source to allocate */ #define NUM_RAW_BLOCKS (1000) @@ -65,12 +65,12 @@ struct Options /* Record for options, either defaults int sampleDuration; /* How long we are going to sample for */ bool mono; /* Supress colour in output */ bool noaltAddr; /* Dont use alternate addressing */ - int tag; /* Which TPIU or OTAG stream are we decoding? */ + int tag; /* Which TPIU or OFLOW stream are we decoding? */ enum TRACEprotocol tProtocol; /* Encoding protocol to use */ int port; /* Source information for where to connect to */ char *server; - enum Prot protocol; /* What protocol to communicate (default to OTAG (== orbuculum)) */ + enum Prot protocol; /* What protocol to communicate (default to OFLOW (== orbuculum)) */ } _options = @@ -116,7 +116,7 @@ struct RunTime /* Subsystem data support */ struct TRACEDecoder i; struct SymbolSet *s; /* Symbols read from elf */ - struct OTAG c; + struct OFLOW c; /* Calls related info */ struct edge *calls; /* Call data table */ @@ -469,9 +469,9 @@ static void _printHelp( const char *const progName ) genericsPrintf( " -M, --no-colour: Supress colour in output" EOL ); genericsPrintf( " -O, --objdump-opts: Options to pass directly to objdump" EOL ); genericsPrintf( " -P, --trace-proto: {ETM35|MTB} trace protocol to use, default is ETM35" EOL ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise TPIU" EOL ); + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise TPIU" EOL ); genericsPrintf( " -s, --server: : to use" EOL ); - genericsPrintf( " -t, --tag: : Which TPIU stream or OTAG tag to use (normally 2)" EOL ); + genericsPrintf( " -t, --tag: : Which TPIU stream or OFLOW tag to use (normally 2)" EOL ); genericsPrintf( " -T, --all-truncate: truncate -d material off all references (i.e. make output relative)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); @@ -691,7 +691,7 @@ static bool _processOptions( int argc, char *argv[], struct RunTime *r ) // ------------------------------------ } - /* If we set an explicit server and port and didn't set a protocol chances are we want TPIU, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want TPIU, not OFLOW */ if ( serverExplicit && !protExplicit ) { r->options->protocol = PROT_TPIU; @@ -719,14 +719,14 @@ static bool _processOptions( int argc, char *argv[], struct RunTime *r ) genericsReport( V_INFO, "Elf File : %s (%s Names)" EOL, r->options->elffile, r->options->truncateDeleteMaterial ? "Truncate" : "Don't Truncate" ); genericsReport( V_INFO, "Objdump options : %s" EOL, r->options->odoptions ? r->options->odoptions : "None" ); genericsReport( V_INFO, "Protocol : %s" EOL, TRACEDecodeGetProtocolName( r->options->tProtocol ) ); - genericsReport( V_INFO, "Tag (TPIU/OTAG) : %d" EOL, r->options->tag ); + genericsReport( V_INFO, "Tag (TPIU/OFLOW) : %d" EOL, r->options->tag ); genericsReport( V_INFO, "DOT file : %s" EOL, r->options->dotfile ? r->options->dotfile : "None" ); genericsReport( V_INFO, "Sample Duration : %d mS" EOL, r->options->sampleDuration ); switch ( r->options->protocol ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, r->options->tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, r->options->tag ); break; case PROT_ITM: @@ -766,7 +766,7 @@ static void _intHandler( int sig ) // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { if ( !p->good ) @@ -822,9 +822,9 @@ static void *_processBlocks( void *params ) #endif - if ( PROT_OTAG == r->options->protocol ) + if ( PROT_OFLOW == r->options->protocol ) { - OTAGPump( &_r.c, r->rawBlock[r->rp].buffer, r->rawBlock[r->rp].fillLevel, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, r->rawBlock[r->rp].buffer, r->rawBlock[r->rp].fillLevel, _OFLOWpacketRxed, &_r ); } else { @@ -890,7 +890,7 @@ int main( int argc, char *argv[] ) #endif TRACEDecoderInit( &_r.i, _r.options->tProtocol, !_r.options->noaltAddr, genericsReport ); - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); while ( !_r.ending ) { diff --git a/Src/orbstat.c b/Src/orbstat.c index f49b6291..b9349dc1 100644 --- a/Src/orbstat.c +++ b/Src/orbstat.c @@ -21,7 +21,7 @@ #include "itmDecoder.h" #include "tpiuDecoder.h" #include "msgDecoder.h" -#include "otag.h" +#include "oflow.h" #include "symbols.h" #include "nw.h" #include "ext_fileformats.h" @@ -38,8 +38,8 @@ #define IN_EVENT (0x40000000) #define OUT_EVENT (0x50000000) -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; /* States for sample reception state machine */ enum CDState { CD_waitinout, CD_waitsrc, CD_waitdst }; @@ -66,11 +66,11 @@ struct Options /* Record for options, either defaults bool forceITMSync; /* Do we assume ITM starts synced? */ bool mono; /* Supress colour in output */ - uint32_t tag; /* Which TPIU or OTAG stream are we decoding? */ + uint32_t tag; /* Which TPIU or OFLOW stream are we decoding? */ int port; /* Source information for where to connect to */ char *server; - enum Prot protocol; /* What protocol to communicate (default to OTAG (== orbuculum)) */ + enum Prot protocol; /* What protocol to communicate (default to OFLOW (== orbuculum)) */ } _options = { @@ -98,7 +98,7 @@ struct RunTime struct ITMPacket h; struct TPIUDecoder t; struct TPIUPacket p; - struct OTAG c; + struct OFLOW c; struct msg m; /* Decoded message out of ITM layer */ const char *progName; /* Name by which this program was called */ @@ -484,10 +484,10 @@ static void _printHelp( struct RunTime *r ) genericsPrintf( " -n, --itm-sync: Enforce sync requirement for ITM (i.e. ITM needs to issue syncs)" EOL ); genericsPrintf( " -M, --no-colour: Supress colour in output" EOL ); genericsPrintf( " -O, --objdump-opts: Options to pass directly to objdump" EOL ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise ITM unless" EOL \ + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise ITM unless" EOL \ " explicitly set to TPIU to decode TPIU frames on channel set by -t" EOL ); genericsPrintf( " -s, --server: : to use" EOL ); - genericsPrintf( " -t, --tag: : Which TPIU stream or OTAG tag to use (normally 1)" EOL ); + genericsPrintf( " -t, --tag: : Which TPIU stream or OFLOW tag to use (normally 1)" EOL ); genericsPrintf( " -T, --all-truncate: truncate -d material off all references (i.e. make output relative)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); @@ -704,7 +704,7 @@ static bool _processOptions( int argc, char *argv[], struct RunTime *r ) // ------------------------------------ } - /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OFLOW */ if ( serverExplicit && !protExplicit ) { r->options->protocol = PROT_ITM; @@ -738,8 +738,8 @@ static bool _processOptions( int argc, char *argv[], struct RunTime *r ) switch ( r->options->protocol ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, r->options->tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, r->options->tag ); break; case PROT_ITM: @@ -767,7 +767,7 @@ static void _intHandler( int sig ) } // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { struct RunTime *r = ( struct RunTime * )param; @@ -829,7 +829,7 @@ int main( int argc, char *argv[] ) /* Reset the TPIU handler before we start */ TPIUDecoderInit( &_r.t ); ITMDecoderInit( &_r.i, _r.options->forceITMSync ); - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); while ( !_r.ending ) { @@ -910,9 +910,9 @@ int main( int argc, char *argv[] ) /* ...and record the fact that we received some data */ _r.intervalBytes += _r.rawBlock.fillLevel; - if ( PROT_OTAG == _r.options->protocol ) + if ( PROT_OFLOW == _r.options->protocol ) { - OTAGPump( &_r.c, _r.rawBlock.buffer, _r.rawBlock.fillLevel, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, _r.rawBlock.buffer, _r.rawBlock.fillLevel, _OFLOWpacketRxed, &_r ); } else { diff --git a/Src/orbtop.c b/Src/orbtop.c index c6c8c085..e2473067 100644 --- a/Src/orbtop.c +++ b/Src/orbtop.c @@ -23,7 +23,7 @@ #include "git_version_info.h" #include "tpiuDecoder.h" #include "itmDecoder.h" -#include "otag.h" +#include "oflow.h" #include "symbols.h" #include "msgSeq.h" #include "nw.h" @@ -52,8 +52,8 @@ struct reportLine struct nameEntry *n; }; -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; struct exceptionRecord /* Record of exception activity */ @@ -76,7 +76,7 @@ struct exceptionRecord /* Record of exception activity */ /* ---------- CONFIGURATION ----------------- */ struct /* Record for options, either defaults or from command line */ { - uint32_t tag; /* Which TPIU or OTAG stream are we decoding? */ + uint32_t tag; /* Which TPIU or OFLOW stream are we decoding? */ bool reportFilenames; /* Report filenames for each routine? */ bool outputExceptions; /* Set to include exceptions in output flow */ bool forceITMSync; /* Must ITM start synced? */ @@ -101,7 +101,7 @@ struct /* Record for options, either defau int port; /* Source information */ char *server; - enum Prot protocol; /* What protocol to communicate (default to OTAG (== orbuculum)) */ + enum Prot protocol; /* What protocol to communicate (default to OFLOW (== orbuculum)) */ } options = { @@ -125,7 +125,7 @@ struct struct ITMPacket h; struct TPIUDecoder t; struct TPIUPacket p; - struct OTAG c; + struct OFLOW c; enum timeDelay timeStatus; /* Indicator of if this time is exact */ uint64_t timeStamp; /* Latest received time */ struct Frame cobsPart; /* Any part frame that has been received */ @@ -969,12 +969,12 @@ void _printHelp( const char *const progName ) genericsPrintf( " -n, --itm-sync: Enforce sync requirement for ITM (i.e. ITM needs to issue syncs)" EOL ); genericsPrintf( " -o, --output-file: to be used for output live file" EOL ); genericsPrintf( " -O, --objdump-opts: Options to pass directly to objdump" EOL ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise ITM unless" EOL \ + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise ITM unless" EOL \ " explicitly set to TPIU to decode TPIU frames on channel set by -t" EOL ); genericsPrintf( " -r, --routines: to record in live file (default %d routines)" EOL, options.maxRoutines ); genericsPrintf( " -R, --report-files: Report filenames as part of function discriminator" EOL ); genericsPrintf( " -s, --server: : to use" EOL ); - genericsPrintf( " -t, --tag: Which TPIU stream or OTAG tag to use (normally 1)" EOL ); + genericsPrintf( " -t, --tag: Which TPIU stream or OFLOW tag to use (normally 1)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); genericsPrintf( EOL "Environment Variables;" EOL ); @@ -1203,7 +1203,7 @@ bool _processOptions( int argc, char *argv[] ) // ------------------------------------ } - /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OFLOW */ if ( serverExplicit && !protExplicit ) { options.protocol = PROT_ITM; @@ -1236,8 +1236,8 @@ bool _processOptions( int argc, char *argv[] ) switch ( options.protocol ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, options.tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, options.tag ); break; case PROT_ITM: @@ -1257,7 +1257,7 @@ bool _processOptions( int argc, char *argv[] ) } // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { if ( !p->good ) @@ -1355,7 +1355,7 @@ int main( int argc, char *argv[] ) /* Reset the TPIU handler before we start */ TPIUDecoderInit( &_r.t ); ITMDecoderInit( &_r.i, options.forceITMSync ); - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); MSGSeqInit( &_r.d, &_r.i, MSG_REORDER_BUFLEN ); /* This ensures the signal handler gets called */ @@ -1483,9 +1483,9 @@ int main( int argc, char *argv[] ) if ( receivedSize ) { - if ( PROT_OTAG == options.protocol ) + if ( PROT_OFLOW == options.protocol ) { - OTAGPump( &_r.c, cbw, receivedSize, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, cbw, receivedSize, _OFLOWpacketRxed, &_r ); } else { diff --git a/Src/orbtraceIf.c b/Src/orbtraceIf.c index 078c756d..b98dbe0e 100644 --- a/Src/orbtraceIf.c +++ b/Src/orbtraceIf.c @@ -47,9 +47,9 @@ static const struct OrbtraceInterfaceType _validDevices[DEVICE_NUM_DEVICES] = #define MAX_USB_DESC_LEN (256) /* ORBTrace protocol versions */ -#define PROT_UNKNOWN (0x00) -#define PROT_TPIU (0x01) -#define PROT_OTAGV1_0 (0x10) +#define PROT_UNKNOWN (0x00) +#define PROT_TPIU (0x01) +#define PROT_OFLOWV1_0 (0x10) /* String on front of version number to remove */ #define VERSION_FRONTMATTER "Version: " @@ -552,7 +552,7 @@ bool OrbtraceGetIfandEP( struct OrbtraceIf *o ) i->bInterfaceSubClass != 0x54 || ( i->bInterfaceProtocol != PROT_UNKNOWN && i->bInterfaceProtocol != PROT_TPIU && - i->bInterfaceProtocol != PROT_OTAGV1_0 ) || + i->bInterfaceProtocol != PROT_OFLOWV1_0 ) || i->bNumEndpoints != 0x01 ) { /* Not the interface we're looking for */ @@ -564,7 +564,7 @@ bool OrbtraceGetIfandEP( struct OrbtraceIf *o ) altsetting = i->bAlternateSetting; num_altsetting = config->interface[if_num].num_altsetting; - o->supportsOTAG = ( i->bInterfaceProtocol == PROT_OTAGV1_0 ); + o->supportsOFLOW = ( i->bInterfaceProtocol == PROT_OFLOWV1_0 ); genericsReport( V_DEBUG, "Found interface %#x with altsetting %#x and ep %#x" EOL, o->iface, altsetting, o->ep ); interface_found = true; diff --git a/Src/orbuculum.c b/Src/orbuculum.c index bd8d647b..169a95b4 100644 --- a/Src/orbuculum.c +++ b/Src/orbuculum.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause */ /* - * Orbuculum main receiver and TPIU/OTAG demux - * =========================================== + * Orbuculum main receiver and TPIU/OFLOW demux + * ============================================ * */ @@ -52,7 +52,7 @@ #include "git_version_info.h" #include "generics.h" #include "tpiuDecoder.h" -#include "otag.h" +#include "oflow.h" #include "nwclient.h" #include "orbtraceIf.h" #include "stream.h" @@ -64,9 +64,9 @@ /* Multiple blocks are used for USB, otherwise just the one */ #define NUM_RAW_BLOCKS (32) -/* File header for OTAG formatted file */ -#define OTAG_SIG (const char*)"%%OTAG1.0.0%%" -#define OTAG_SIG_LEN (strlen(OTAG_SIG)) +/* File header for OFLOW formatted file */ +#define OFLOW_SIG (const char*)"%%OFLOW1.0.0%%" +#define OFLOW_SIG_LEN (strlen(OFLOW_SIG)) /* Number of potential tags */ #define NUM_TAGS (256) @@ -117,7 +117,7 @@ struct handlers struct RunTime { struct TPIUDecoder t; /* TPIU decoder instance, in case we need it */ - struct OTAG otag; /* OTAG instance, in case we need it */ + struct OFLOW oflow; /* OFLOW instance, in case we need it */ struct OrbtraceIf *o; /* For accessing ORBTrace devices + BMPs */ @@ -135,8 +135,8 @@ struct RunTime struct dataBlock rawBlock[NUM_RAW_BLOCKS]; /* Transfer buffers from the receiver */ - struct nwclientsHandle *otagHandler; /* Handle to OTAG output handler */ - bool usingOTAG; /* Flag that OTAG protocol is in use from the source */ + struct nwclientsHandle *oflowHandler; /* Handle to OFLOW output handler */ + bool usingOFLOW; /* Flag that OFLOW protocol is in use from the source */ struct TagDataCount tagCount[NUM_TAGS]; /* Data carried per tag/TPIU channel */ int numHandlers; /* Number of TPIU channel handlers in use */ @@ -152,7 +152,7 @@ struct RunTime #define NWSERVER_HOST "localhost" /* Address to connect to NW Server */ #define NWSERVER_PORT (2332) -#define NUM_OTAG_CHANNELS 0x7F +#define NUM_OFLOW_CHANNELS 0x7F #define INTERVAL_100US (100U) #define INTERVAL_1MS (10*INTERVAL_100US) @@ -355,7 +355,7 @@ void _printHelp( const char *const progName, struct RunTime *r ) genericsPrintf( " -f, --input-file: Take input from specified file" EOL ); genericsPrintf( " -h, --help: This help" EOL ); genericsPrintf( " -H, --hires: High resolution time (much higher CPU load though!)" EOL ); - genericsPrintf( " -l, --listen-port: Listen port for incoming OTAG connections (defaults to %d)" EOL, r->options->listenPort ); + genericsPrintf( " -l, --listen-port: Listen port for incoming ORBFLOW connections (defaults to %d)" EOL, r->options->listenPort ); genericsPrintf( " -m, --monitor: Output monitor information about the link at ms, min 100ms" EOL ); genericsPrintf( " -M, --no-colour: Supress colour in output" EOL ); genericsPrintf( " -n, --serial-number: any part of serial number to differentiate specific device" EOL ); @@ -659,7 +659,7 @@ bool _processOptions( int argc, char *argv[], struct RunTime *r ) genericsReport( V_INFO, "Orbtrace CL : %s" EOL, r->options->otcl ); } - genericsReport( V_INFO, "OTAG Port : %d" EOL, r->options->listenPort ); + genericsReport( V_INFO, "OFLOW Port : %d" EOL, r->options->listenPort ); if ( r->options->file ) { @@ -793,12 +793,12 @@ void _checkInterval( void *params ) // ==================================================================================================== // Block decoders and handlers for the various line formats // ==================================================================================================== -static void _purgeBlock( struct RunTime *r, bool createOTAG ) +static void _purgeBlock( struct RunTime *r, bool createOFLOW ) /* Send any packets to clients who want it, no matter where they originate from */ { - struct Frame otagOtg; + struct Frame oflowOtg; struct handlers *h = r->handler; int i = r->numHandlers; @@ -808,18 +808,18 @@ static void _purgeBlock( struct RunTime *r, bool createOTAG ) { nwclientSend( h->n, h->strippedBlock->fillLevel, h->strippedBlock->buffer ); - if ( createOTAG ) + if ( createOFLOW ) { - /* The OTAG encoded version goes out on the combined OTAG channel, with a specific channel header */ + /* The OFLOW encoded version goes out on the combined OFLOW channel, with a specific channel header */ int j = h->strippedBlock->fillLevel; const uint8_t *b = h->strippedBlock->buffer; while ( j ) { - OTAGEncode( h->channel, 0, b, ( j < OTAG_MAX_PACKET_LEN ) ? j : OTAG_MAX_PACKET_LEN, &otagOtg ); - nwclientSend( _r.otagHandler, otagOtg.len, otagOtg.d ); - b += ( j < OTAG_MAX_PACKET_LEN ) ? j : OTAG_MAX_PACKET_LEN; - j -= ( j < OTAG_MAX_PACKET_LEN ) ? j : OTAG_MAX_PACKET_LEN; + OFLOWEncode( h->channel, 0, b, ( j < OFLOW_MAX_PACKET_LEN ) ? j : OFLOW_MAX_PACKET_LEN, &oflowOtg ); + nwclientSend( _r.oflowHandler, oflowOtg.len, oflowOtg.d ); + b += ( j < OFLOW_MAX_PACKET_LEN ) ? j : OFLOW_MAX_PACKET_LEN; + j -= ( j < OFLOW_MAX_PACKET_LEN ) ? j : OFLOW_MAX_PACKET_LEN; } } @@ -900,9 +900,9 @@ static void _TPIUpacketRxed( enum TPIUPumpEvent e, struct TPIUPacket *p, void *p } // ==================================================================================================== -static void _OTAGpacketRxed( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed( struct OFLOWFrame *p, void *param ) -/* OTAG packet received, account for it and reflect it to legacy buffers if needed */ +/* OFLOW packet received, account for it and reflect it to legacy buffers if needed */ { int chIndex; @@ -950,12 +950,12 @@ static void _OTAGpacketRxed( struct OTAGFrame *p, void *param ) // ==================================================================================================== -static void _processNonOTAGBlock( struct RunTime *r, ssize_t fillLevel, uint8_t *buffer ) +static void _processNonOFLOWBlock( struct RunTime *r, ssize_t fillLevel, uint8_t *buffer ) -/* Not an OTAG block, so might be TPIU or clean ITM...deal with both */ +/* Not an OFLOW block, so might be TPIU or clean ITM...deal with both */ { - struct Frame otagOtg; + struct Frame oflowOtg; if ( fillLevel ) { @@ -975,17 +975,17 @@ static void _processNonOTAGBlock( struct RunTime *r, ssize_t fillLevel, uint8_t nwclientSend( r->handler->n, fillLevel, buffer ); } - /* The OTAG encoded version goes out on the default OTAG channel */ + /* The OFLOW encoded version goes out on the default OFLOW channel */ uint8_t *b = buffer; while ( fillLevel ) { - OTAGEncode( DEFAULT_ITM_STREAM, 0, b, - ( fillLevel < OTAG_MAX_PACKET_LEN ) ? fillLevel : OTAG_MAX_PACKET_LEN, - &otagOtg ); - nwclientSend( r->otagHandler, otagOtg.len, otagOtg.d ); - b += ( fillLevel < OTAG_MAX_PACKET_LEN ) ? fillLevel : OTAG_MAX_PACKET_LEN; - fillLevel -= ( fillLevel < OTAG_MAX_PACKET_LEN ) ? fillLevel : OTAG_MAX_PACKET_LEN; + OFLOWEncode( DEFAULT_ITM_STREAM, 0, b, + ( fillLevel < OFLOW_MAX_PACKET_LEN ) ? fillLevel : OFLOW_MAX_PACKET_LEN, + &oflowOtg ); + nwclientSend( r->oflowHandler, oflowOtg.len, oflowOtg.d ); + b += ( fillLevel < OFLOW_MAX_PACKET_LEN ) ? fillLevel : OFLOW_MAX_PACKET_LEN; + fillLevel -= ( fillLevel < OFLOW_MAX_PACKET_LEN ) ? fillLevel : OFLOW_MAX_PACKET_LEN; } } } @@ -993,7 +993,7 @@ static void _processNonOTAGBlock( struct RunTime *r, ssize_t fillLevel, uint8_t // ==================================================================================================== static void _handleBlock( struct RunTime *r, ssize_t fillLevel, uint8_t *buffer ) -/* Handle an incoming block from any source in either 'conventional' or OTag format */ +/* Handle an incoming block from any source in either 'conventional' or orbflow format */ { genericsReport( V_DEBUG, "RXED Packet of %d bytes%s" EOL, fillLevel, ( r->options->intervalReportTime ) ? EOL : "" ); @@ -1006,26 +1006,26 @@ static void _handleBlock( struct RunTime *r, ssize_t fillLevel, uint8_t *buffer } } - if ( r->usingOTAG ) + if ( r->usingOFLOW ) { if ( r->options->intervalReportTime ) { /* We need to decode this so we can get the stats out of it .. we don't bother if we don't need stats */ - OTAGPump( &r->otag, buffer, fillLevel, _OTAGpacketRxed, r ); + OFLOWPump( &r->oflow, buffer, fillLevel, _OFLOWpacketRxed, r ); } - /* ...and reflect this packet to the outgoing OTAG channels */ - nwclientSend( r->otagHandler, fillLevel, buffer ); + /* ...and reflect this packet to the outgoing OFLOW channels */ + nwclientSend( r->oflowHandler, fillLevel, buffer ); } else { - _processNonOTAGBlock( r, fillLevel, buffer ); + _processNonOFLOWBlock( r, fillLevel, buffer ); } r->intervalRawBytes += fillLevel; - /* Send the block to clients, but only send OTAG if it wasn't OTAG already */ - _purgeBlock( r, !r->usingOTAG ); + /* Send the block to clients, but only send OFLOW if it wasn't OFLOW already */ + _purgeBlock( r, !r->usingOFLOW ); } // ==================================================================================================== @@ -1156,22 +1156,22 @@ static int _usbFeeder( struct RunTime *r ) break; } - r->usingOTAG = OrbtraceSupportsOTAG( r->o ); + r->usingOFLOW = OrbtraceSupportsOFLOW( r->o ); - if ( r->usingOTAG ) + if ( r->usingOFLOW ) { - genericsReport( V_INFO, "Orbtrace supports OTAG protocol" EOL ); + genericsReport( V_INFO, "Orbtrace supports ORBFLOW protocol" EOL ); if ( r->options->useTPIU ) { - genericsReport( V_WARN, "TPIU decoding specified, but ORBTrace supports OTAG, are you sure?" EOL ); + genericsReport( V_WARN, "TPIU decoding specified, but ORBTrace supports ORBFLOW, are you sure?" EOL ); } if ( firstRunThrough && _r.opFileHandle ) { - if ( write( _r.opFileHandle, OTAG_SIG, OTAG_SIG_LEN ) < 0 ) + if ( write( _r.opFileHandle, OFLOW_SIG, OFLOW_SIG_LEN ) < 0 ) { - genericsExit( -4, "Could not write OTAG signature to file (%s)" EOL, strerror( errno ) ); + genericsExit( -4, "Could not write OFLOW signature to file (%s)" EOL, strerror( errno ) ); } } @@ -1430,7 +1430,7 @@ static int _serialFeeder( struct RunTime *r ) // ==================================================================================================== static int _fileFeeder( struct RunTime *r ) -/* Setup incoming data stream from a file in either legacy or OTAG format */ +/* Setup incoming data stream from a file in either legacy or OFLOW format */ { struct dataBlock *rxBlock = &r->rawBlock[0]; @@ -1443,14 +1443,14 @@ static int _fileFeeder( struct RunTime *r ) r->conn = true; - /* Start off by checking if this is OTAG formatted */ - rxBlock->fillLevel = read( r->f, rxBlock->buffer, OTAG_SIG_LEN ); - r->usingOTAG = ( ( OTAG_SIG_LEN == rxBlock->fillLevel ) && ( !strncmp( OTAG_SIG, ( char * )rxBlock->buffer, OTAG_SIG_LEN ) ) ); - genericsReport( V_INFO, "File is %sin OTAG format" EOL, ( r->usingOTAG ) ? "" : "not " ); + /* Start off by checking if this is OFLOW formatted */ + rxBlock->fillLevel = read( r->f, rxBlock->buffer, OFLOW_SIG_LEN ); + r->usingOFLOW = ( ( OFLOW_SIG_LEN == rxBlock->fillLevel ) && ( !strncmp( OFLOW_SIG, ( char * )rxBlock->buffer, OFLOW_SIG_LEN ) ) ); + genericsReport( V_INFO, "File is %sin OFLOW format" EOL, ( r->usingOFLOW ) ? "" : "not " ); - if ( r->usingOTAG ) + if ( r->usingOFLOW ) { - /* This is OTAG, so we need to read the first data after the header */ + /* This is OFLOW, so we need to read the first data after the header */ rxBlock->fillLevel = read( r->f, rxBlock->buffer, USB_TRANSFER_SIZE ); } @@ -1522,7 +1522,7 @@ int main( int argc, char *argv[] ) TPIUDecoderInit( &_r.t ); } - OTAGInit( &_r.otag ); + OFLOWInit( &_r.oflow ); genericsScreenHandling( !_r.options->mono ); @@ -1571,7 +1571,7 @@ int main( int argc, char *argv[] ) if ( x ) { /* This is a good number, so open */ - if ( ( x < 0 ) || ( x >= NUM_OTAG_CHANNELS ) ) + if ( ( x < 0 ) || ( x >= NUM_OFLOW_CHANNELS ) ) { genericsExit( -1, "Channel number out of range" EOL ); } @@ -1590,9 +1590,9 @@ int main( int argc, char *argv[] ) } } - /* The OTAG handler doesn't need a channel list ... it works on all channels */ - _r.otagHandler = nwclientStart( _r.options->listenPort ); - genericsReport( V_INFO, "Started Network interface for OTAG on port %d" EOL, _r.options->listenPort ); + /* The OFLOW handler doesn't need a channel list ... it works on all channels */ + _r.oflowHandler = nwclientStart( _r.options->listenPort ); + genericsReport( V_INFO, "Started Network interface for OFLOW on port %d" EOL, _r.options->listenPort ); /* Don't do anything with interval times for at least the first interval time */ clock_gettime( CLOCK_REALTIME, &ts ); diff --git a/Src/orbzmq.c b/Src/orbzmq.c index fd17e8f3..e76704bb 100644 --- a/Src/orbzmq.c +++ b/Src/orbzmq.c @@ -18,7 +18,7 @@ #include "tpiuDecoder.h" #include "itmDecoder.h" #include "msgDecoder.h" -#include "otag.h" +#include "oflow.h" #define NUM_CHANNELS 32 #define HWFIFO_NAME "hwevent" @@ -26,8 +26,8 @@ #define DEFAULT_ZMQ_BIND_URL "tcp://*:3442" /* by default bind to all source interfaces */ -enum Prot { PROT_OTAG, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; -const char *protString[] = {"OTAG", "ITM", "TPIU", NULL}; +enum Prot { PROT_OFLOW, PROT_ITM, PROT_TPIU, PROT_UNKNOWN }; +const char *protString[] = {"OFLOW", "ITM", "TPIU", NULL}; // Record for options, either defaults or from command line @@ -51,7 +51,7 @@ struct /* Source information */ int port; char *server; - enum Prot protocol; /* What protocol to communicate (default to OTAG (== orbuculum)) */ + enum Prot protocol; /* What protocol to communicate (default to OFLOW (== orbuculum)) */ bool mono; /* Supress colour in output */ char *file; /* File host connection */ @@ -73,7 +73,7 @@ struct struct ITMPacket h; struct TPIUDecoder t; struct TPIUPacket p; - struct OTAG c; + struct OFLOW c; /* Timestamp info */ uint64_t lastHWExceptionTS; @@ -477,10 +477,10 @@ void _printHelp( const char *const progName ) genericsPrintf( " -h, --help: This help" EOL ); genericsPrintf( " -M, --no-colour: Supress colour in output" EOL ); genericsPrintf( " -n, --itm-sync: Enforce sync requirement for ITM (i.e. ITM needs to issue syncs)" EOL ); - genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OTAG if -s is not set, otherwise ITM unless" EOL \ + genericsPrintf( " -p, --protocol: Protocol to communicate. Defaults to OFLOW if -s is not set, otherwise ITM unless" EOL \ " explicitly set to TPIU to decode TPIU frames on channel set by -t" EOL ); genericsPrintf( " -s, --server: : to use, default %s:%d" EOL, options.server, options.port ); - genericsPrintf( " -t, --tag: : Which TPIU stream or OTAG tag to use (normally 1)" EOL ); + genericsPrintf( " -t, --tag: : Which TPIU stream or OFLOW tag to use (normally 1)" EOL ); genericsPrintf( " -v, --verbose: Verbose mode 0(errors)..3(debug)" EOL ); genericsPrintf( " -V, --version: Print version and exit" EOL ); genericsPrintf( " -z, --zbind: : ZeroMQ bind URL, default %s" EOL, options.bindUrl ); @@ -786,7 +786,7 @@ bool _processOptions( int argc, char *argv[] ) } } - /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OTAG */ + /* If we set an explicit server and port and didn't set a protocol chances are we want ITM, not OFLOW */ if ( serverExplicit && !protExplicit ) { options.protocol = PROT_ITM; @@ -847,8 +847,8 @@ bool _processOptions( int argc, char *argv[] ) switch ( options.protocol ) { - case PROT_OTAG: - genericsReport( V_INFO, "Decoding OTAG (Orbuculum) with ITM in stream %d" EOL, options.tag ); + case PROT_OFLOW: + genericsReport( V_INFO, "Decoding OFLOW (Orbuculum) with ITM in stream %d" EOL, options.tag ); break; case PROT_ITM: @@ -882,7 +882,7 @@ static struct Stream *_tryOpenStream() } // ==================================================================================================== -static void _OTAGpacketRxed ( struct OTAGFrame *p, void *param ) +static void _OFLOWpacketRxed ( struct OFLOWFrame *p, void *param ) { if ( !p->good ) @@ -927,9 +927,9 @@ static void _feedStream( struct Stream *stream ) } } - if ( PROT_OTAG == options.protocol ) + if ( PROT_OFLOW == options.protocol ) { - OTAGPump( &_r.c, cbw, receivedSize, _OTAGpacketRxed, &_r ); + OFLOWPump( &_r.c, cbw, receivedSize, _OFLOWpacketRxed, &_r ); } else { @@ -974,7 +974,7 @@ int main( int argc, char *argv[] ) /* Reset the TPIU handler before we start */ TPIUDecoderInit( &_r.t ); ITMDecoderInit( &_r.i, options.forceITMSync ); - OTAGInit( &_r.c ); + OFLOWInit( &_r.c ); /* This ensures the signal handler gets called */ if ( SIG_ERR == signal( SIGINT, _intHandler ) ) diff --git a/meson.build b/meson.build index 94c93c0d..b65f96d9 100644 --- a/meson.build +++ b/meson.build @@ -87,7 +87,7 @@ liborb = library('orb', 'Src/tpiuDecoder.c', 'Src/msgDecoder.c', 'Src/cobs.c', - 'Src/otag.c', + 'Src/oflow.c', 'Src/msgSeq.c', 'Src/traceDecoder_etm35.c', 'Src/traceDecoder_etm4.c',