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

📄 sordi.h

📁 realview22.rar
💻 H
📖 第 1 页 / 共 2 页
字号:
 *           far, and typically displays this in a user-interface
 *           component.
 */
typedef void SORDI_SetProgressFuncProc(SORDI_ProgressFuncProc *func,
                                       SORDI_ProgressArg *handle);


/*
 * Function: SORDI_ZeroProgressValues (optional)
 *
 *  Purpose: Zero the progress counters
 */
typedef void SORDI_ZeroProgressValuesProc(void);

/************* Info **********************************************************/

/*
 *        Function: SORDI_Info
 *         Purpose: A general purpose SORDI call, used to communicate issues
 *                  concerning configuration, initialisation and capabilities
 *
 *  Pre-conditions: Should be called immediately following SORDI_Initialise,
 *                  and before any call to SORDI_Config, or any RDI_* call.
 *
 *          Params:
 *                   In: config - toolconf
 *                       reason - Reason for calling
 *                       arg1 - (void *) argument: meaning defined by reason
 *                       arg2 - (void *) argument: meaning defined by reason
 *
 *    Return value:  As defined by reason, or RDIError_UnimplementedMessage
 *                   if reason is not understood/implemented.
 */
typedef unsigned SORDI_InfoProc(toolconf config, unsigned reason,
                                void *arg1, void *arg2);


/*
 *        Function: SORDI_Info#SORDIInfo_ControllerCapabilities
 *         Purpose: Allows the controller to indicate that it can understand
 *                  certain RDI features.
 *
 *          Params:
 *                   In: reason = SORDIInfo_ControllerCapabilities
 *                   In: *((uint32 *)arg1) = Bitfield describing
 *                                           controller capabilities
 *
 *    Return value: RDIError_NoError - OK
 *                  RDIError_IncompatibleRDILevels - The target can not be
 *                                                   debugged by a controller
 *                                                   with these capabilities
 *
 */
#define SORDIInfo_ControllerCapabilities 0x1000

/* Controller understands ETM */
#define RDIControllerCapability_ETMModules            0x01
/* Controller understands SDM */
#define RDIControllerCapability_SDMModules            0x02
#define RDIControllerCapability_SelfDescribingModules 0x02 /* old synonym for the above */
/* Controller can use trace (ETM) */
#define RDIControllerCapability_Trace                 0x04
/* Controller understands APC */
#define RDIControllerCapability_APCModules            0x08
/* Controller can use trace, but prefers to handle the capture DLL itself */
#define RDIControllerCapability_Trace_SeparateBuffer  0x10
/* Controller accepts RDI 1.5.1 Multiprocessor configurations */
#define RDIControllerCapability_MultiprocessorConfig  0x20


/*
 *        Function: SORDI_Info#SORDIInfo_TargetCapabilities
 *         Purpose: Allows the target to advertise that, if configured with
 *                  the supplied toolconf, it will have a particular set of
 *                  RDI features.
 *
 *  Pre-conditions: Should be called immediately following a call to
 *                  SORDI_TargetCapabilities
 *
 *          Params:
 *                   In: toolconf
 *                  Out: *((uint32 *)arg1 Target capability bitfield
 *                  Out: *((uint32 *)arg2 Level of understanding bitfield
 *
 *                       arg1[n] arg2[n]
 *                         0       0     Feature [n] has no meaning to target
 *                         0       1     Target incapable of feature [n]
 *                         1       0     Target understands [n], but is unable
 *                                       to provide an answer
 *                         1       1     Target capable of feature [n]
 *
 *    Return value: RDIError_NoError
 *
 */
#define SORDIInfo_TargetCapabilities 0x1001

/*
 * HGB 28/03/2000 - Removed spurious #undefs, checked in by plg.  If there is
 * a genuine reason for these #undefs, will plg please get in touch.
 */

/* Can accept calls during execute */
#define RDITargetCapability_CallDuringExecute         0x01
/* Target has RDI 1.5.1rt */
#define RDITargetCapability_RT                        0x02
/* Target has RDI 1.5.1tx */
#define RDITargetCapability_TX                        0x04
/* Target has RDI 1.5.1tx run */
#define RDITargetCapability_TXRun                     0x08
/* Target has RDI 1.5.1tx buffer */
#define RDITargetCapability_TXBuffer                  0x10
/* Target can use asynch RDI */
#define RDITargetCapability_Asynch                    0x20
/* Target can use synch RDI */
#define RDITargetCapability_Synch                     0x40
/* Target generates RDI 1.5.1 Multiprocessor configurations if
 * RDIControllerCapability_MultiprocessorConfig is also set
 */
#define RDITargetCapability_MultiprocessorConfig      0x80
/* If RDITargetCapability_MultiprocessorConfig is set, then
 * RDITargetCapability_Multiprocessor indicates whether the
 * target is capable of accepting connections to multiple
 * processors. If NOT set, then the controller MUST NOT
 * attempt to connect to more than one processor.
 */
#define RDITargetCapability_Multiprocessor            0x100

/*
 * WinRDI uses WinRDI_ConfigInPlace.  SORDI cannot use this (and mustn't
 * reuse the info number...)
 */
#define SORDIInfo_ConfigInPlace 0x1002 /* NOT USED ON SORDI */


#define SORDIInfo_Reserved_0x1003 0x1003 /* This number is reserved */

/*
 *        Function: SORDIInfo_ModuleServerCapabilities
 *         Purpose: Used only by module server, and clients of it.
 *
 *          Params:
 *                  Out: *arg1 = a bitfield of capabilities
 *                       RDIReadWrite => the modsvr will use RDIRead/RDIWrite
 *                              if a memory code sequence fails
 *                       TargetComponents => ??? (added by dsinclai)
 *                       PeripheralList => ModuleServerPeripherals call is
 *                              supported. (The call itself may be costly, so
 *                              this check can be used to save that cost.)
 *                       BoardList => ModuleServerBoards call is
 *                              supported. (The call itself may be costly, so
 *                              this check can be used to save that cost.)
 *
 *         Returns: RDIError_NoError (if a module server)
 *                  RDIError_UnimplementedMessage (if otherwise)
 *
 */
#define RDIModuleServerCapability_RDIReadWrite      0x01
#define RDIModuleServerCapability_TargetComponents  0x02
#define RDIModuleServerCapability_PeripheralList    0x04
#define RDIModuleServerCapability_BoardList         0x08

#define SORDIInfo_ModuleServerCapabilities 0x1004

/*
 *        Function: SORDIInfo_ModuleServerPeripherals
 *         Purpose: Used only by module server, and clients of it.
 *
 *          Params:
 *                  In:  *arg1 = pointer to empty RDI_NameList
 *                       *arg2 = NULL or processor name as filter
 *                  Out: *arg1 = pointer to filled in RDI_NameList
 *
 *                  Allocates memory for the RDI_NameList. Must be
 *                  freed using a FreeNameList call.
 *
 *         Returns: RDIError_NoError (if a module server)
 *                  RDIError_UnimplementedMessage (if otherwise)
 *
 */
#define SORDIInfo_ModuleServerPeripherals       0x1005

/*
 *        Function: SORDIInfo_FreeNameList
 *         Purpose: Used only by module server, and clients of it.
 *
 *          Params:
 *                  In:  *arg1 = pointer to RDI_NameList
 *                       *arg2 = not used
 *
 *                  Frees memory used by the RDI_NameList (but not the list
 *                  itself, which is instead 'reset'). To be used where
 *                  CloseAgent isn't appropriate. (A list was retrieved without
 *                  first calling OpenAgent.)
 *
 *         Returns: RDIError_NoError (if a module server)
 *                  RDIError_UnimplementedMessage (if otherwise)
 *
 */
#define SORDIInfo_FreeNameList 0x1006

/*
 *        Function: SORDIInfo_ModuleServerBoards
 *         Purpose: Used only by module server, and clients of it.
 *
 *          Params:
 *                  In:  *arg1 = pointer to empty RDI_NameList
 *                       *arg2 = NULL or processor name as filter
 *                  Out: *arg1 = pointer to filled in RDI_NameList
 *
 *                  Allocates memory for the RDI_NameList. Must be
 *                  freed using a FreeNameList call.
 *
 *         Returns: RDIError_NoError (if a module server)
 *                  RDIError_UnimplementedMessage (if otherwise)
 *
 */
#define SORDIInfo_ModuleServerBoards        0x1007

/************* Obtaining the interface ***************************************/

typedef struct SORDI_ProcVec
{
    uint32                             size;     /* = sizeof (SORDI_ProcVec) */
    uint32                             reserved; /* Should be zero */

    SORDI_Valid_RDI_DLLProc           *isvalid;
    SORDI_SetVersionProc              *setversion;
    SORDI_GetVersionProc              *getversion;
    SORDI_Get_DLL_DescriptionProc     *description;
    SORDI_GetRDIProcVecProc           *getrdi;

    SORDI_InitialiseProc              *init;

    SORDI_Register_Yield_CallbackProc *regyield;
    SORDI_SetProgressFuncProc         *setprog;
    SORDI_ZeroProgressValuesProc      *zeroprog;

    SORDI_InfoProc                    *info;

    /*  SORDI_DescribeConfig              *descconfig;*/

} SORDI_ProcVec;

/*
 * Function: QuerySORDI
 *    Notes: This function is exported as a shared symbol
 *
 *  Purpose: Retrieve the SORDI interface
 *
 *  Returns: SORDI_ProcVec
 */
typedef SORDI_ProcVec const *QuerySORDI_Proc(void);
extern                       QuerySORDI_Proc QuerySORDI;
#define                      QuerySORDI_String "QuerySORDI"

#ifdef __cplusplus
};                              /* extern "C" */
#endif

#endif /* !def sordi_h */

/* EOF sordi.h */

⌨️ 快捷键说明

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