⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rdi_rti.h

📁 做ARM仿真器和调试器的厂商需要RDI协议
💻 H
📖 第 1 页 / 共 2 页
字号:
 * Out: arg1 (RDI_TraceTriggerPosition) The position the trigger was actually
 *           set at.
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support tracing.
 */
#define RDITrace_SetTriggerPosition (RDIInfo_Trace + 5)


typedef enum {
    RDI_TraceReady_Readable = 0x1,
    RDI_TraceReady_Empty = 0x2, 
    RDI_TraceReady_Triggered = 0x4
} RDI_TraceReadyReason;

/*
 * Typedef:  RDI_TraceReadyArg
 * Purpose:  An opaque handle to be passed to a TraceReadyProc.
 */
typedef struct RDI_TraceReadyArgStr RDI_TraceReadyArg;

/*
 * Typedef:  RDI_TraceReadyProc
 * Purpose:  Function to call when the Trace Buffer becomes ready or not
 *           ready to be read.  Must be called whenever this state changes.
 *           A "reason" enumeration gives the reason why the call was made.
 */ 
typedef void RDI_TraceReadyProc(
        RDI_ModuleHandle *module, 
        RDI_TraceReadyArg *arg,
        RDI_TraceReadyReason reason);

/*
 * InfoProc: RDI_InfoProc(mh, RDITrace_SetReadyProc, arg1, arg2)
 * Purpose:  RDITrace_SetReadyProc allows a function to be registered, to be
 *           called when a Trace Buffer is ready to be read.
 *
 * Params:
 *  In: arg1 (RDI_TraceReadyProc *) Pointer to a function to call when the
 *                                  Trace Buffer is ready to be read. If NULL,
 *                                  the callback is removed.
 *  In: arg2 (RDI_TraceReadyArg *)  Argument to pass to the TraceReadyProc.
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support tracing.
 */
#define RDITrace_SetReadyProc (RDIInfo_Trace + 6)


/*
 * InfoProc: RDI_InfoProc(mh, RDITrace_Read, arg1, arg2)
 * Purpose:  RDITrace_Read reads data from a trace block into a buffer.
 *
 * Params:
 * In/Out:
 *     arg1  (RDI_TraceEvent *)  A buffer to place the trace data into.
 * In: arg2  A structure of the type:
 *           struct
 *           {
 *              uint32 size;
 *              RDI_TraceIndex start;
 *           }
 *           size is the size of the buffer, in terms of the size of a
 *           single RDI_TraceEvent, that is, the number of events that
 *           can fit in the buffer. start is the index of the first
 *           event to copy to buffer.
 *
 * Out:arg2  The same structure, but with size modified to be the number of
 *           events written to the buffer; and start modified to be the index
 *           of the first event actually copied.
 *           The first event copied must be the one specified, or any earlier
 *           event. The events copied must include the one specified.
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support tracing.
 *           RDIError_NoSuchHandle         No event with that index has been
 *                                         traced.
 */
#define RDITrace_Read (RDIInfo_Trace + 7)

/* 
 * InfoProc: RDI_InfoProc(mh, RDITrace_SetInputFormat, arg1, arg2)
 *
 * Purpose:  RDITrace_SetInputFormat allows an RDI Controller to tell a Trace
 *           Buffer DebugTarget what format the Trace Run Debug Target is
 *           providing.
 *
 *
 * Params:
 *  In: mh   Handle of module
 *
 *  In: arg1 (RDI_TraceFormat *) The trace format the Debug Controller would
 *                               prefer. NoFormat if the Debug Controller has
 *                               no preference.
 *  In: arg2 (uint32 *) Word describing the subformat.         
 *
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support tracing.
 *
 * THIS FUNCTION IS DEPRECATED, AND SHOULD NOT BE USED IN NEW CODE
 */
#define RDITrace_SetInputFormat (RDIInfo_Trace + 8)


/* 
 * InfoProc: RDI_InfoProc(mh, RDITrace_GetFormat, arg1, arg2)
 *
 * Purpose:  RDITrace_GetFormat allows a Debug Controller to specify what
 *           format of trace data it would prefer, and allows a Debug
 *           Target to specify what format it can provide.
 *
 *
 * Params:
 *  In: mh   Handle of module
 *  In: arg1 (RDI_TraceFormat *) The trace format the Debug Controller would
 *                               prefer. NoFormat if the Debug Controller has
 *                               no preference.
 *  Out:arg1                     The trace format the Debug Target will
 *                               provide. If the Debug Controller cannot use
 *                               this format, it should not attempt to use the
 *                               trace information.
 *  Out:arg2 (uint32 *)          subfmt - A supplementary word describing the
 *                               sub-format used. Its interpretation is
 *                               format-dependant.
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support tracing.
 *
 * THIS FUNCTION IS DEPRECATED, AND SHOULD NOT BE USED IN NEW CODE
 */
#define RDITrace_GetFormat (RDIInfo_Trace + 9)

/* 
 * InfoProc: RDI_InfoProc(mh, RDIInfo_TraceRun, arg1, arg2)
 *
 * Purpose:  RDIInfo_TraceRun allows a Debug Controller to detect whether this
 *           RDI target supports the trace run control functions.
 *
 *
 * Params:
 *  In: mh   Handle of module
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support trace run control.
 */
#define RDIInfo_TraceRun (RDIInfo_Trace + 10)

/* 
 * InfoProc: RDI_InfoProc(mh, RDIInfo_TraceBuffer, arg1, arg2)
 *
 * Purpose:  RDIInfo_TraceRun allows a Debug Controller to detect whether this
 *           RDI target supports the trace buffer control functions.
 *
 *
 * Params:
 *  In: mh   Handle of module
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support trace buffer control.
 */
#define RDIInfo_TraceBuffer (RDIInfo_Trace + 11)

/* 
 * InfoProc: RDI_InfoProc(mh, RDITrace_ReadMarkerPos, arg1, arg2)
 *
 * Purpose:  RDITrace_ReadMarkerPos allows a Debug Controller to read the position of the
 *           trace marker
 *
 *
 * Params:
 *  In: mh   Handle of module
 *  Out:arg1                     The position of the trace marker, within the trace buffer.
 *                               The trace buffer has a readable size as given by 
 *                               RDITrace_BufferExtent.
 *
 *                               If the marker position is outside the extent of the buffer, 
 *                               then it is said to be invalid.  This can occur when a wrapping 
 *                               trace buffer has overwritten the event that the marker 
 *                               originally pointed at.  This also occurs if the marker has been 
 *                               reset (using RDITrace_Control), but no further trace events have 
 *                               yet been generated.
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage Processor does not support tracing.
 */
#define RDITrace_ReadMarkerPos (RDIInfo_Trace + 12)
/* 
 * InfoProc: RDI_InfoProc(mh, RDITrace_GetBufferFormats, arg1, arg2)
 *
 * Purpose:  Using RDITrace_GetBufferFormats the application can discover what formats, and
 *           combinations of formats, the Trace Buffer supports. On each call the application
 *           asks the target "If I select these features of the format, what additional format
 *           bits do I have to set, and to what values?"
 *
 *
 * Params:
 *  In: mh   Handle of module
 *  In:arg1  (RDI_TraceBufferFormat *)  A mask of the bits of the format value already chosen
 *                                      by the application.
 *  Out:arg1 (RDI_TraceBufferFormat *)  A mask of the bits that must be set in any format 
 *                                      compatible with the format asked about. This will be
 *                                      those bits that were in the input mask, plus any other
 *                                      bits that are forced to a particular value by having
 *                                      set those bits.
 *  In: arg2 (RDI_TraceBufferFormat *)  The values of the bits already chosen by the debug
 *                                      controller. Bits not in the input mask should be 0 but
 *                                      must be ignored by the target.
 *  Out:arg2 (RDI_TraceBufferFormat *)  The values of bits forced by the target. Bits not in the
 *                                      output mask should be 0 but must be ignored by the
 *                                      application.
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage  Processor does not support tracing.
 *           RDIError_BadFormat             The Trace Buffer cannot support any format that includes the 
 *                                          bits defined in the input arguments.
 */
#define RDITrace_GetBufferFormats (RDIInfo_Trace + 13)
/* 
 * InfoProc: RDI_InfoProc(mh, RDITrace_SetBufferFormat, arg1, arg2)
 *
 * Purpose:  Sets the formats to be be used by the trace buffer on its two interfaces.
 *
 * Params:
 *  In: mh   Handle of module
 *  In:arg1  (RDI_TraceBufferFormat *)  The format to be used.
 *
 * Return:   RDIError_NoError   
 *           RDIError_UnimplementedMessage  Processor does not support tracing.
 *           RDIError_BadFormat             The Trace Buffer cannot support this format
 */
#define RDITrace_SetBufferFormat (RDIInfo_Trace + 14)
/**********************************************************************/
/**********************************************************************/


#endif /* !def RDI_RTI_H */

/* EOF rdi_rti.h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -