![]() |
Using the µVision Socket Interface
Application Note 198
Control and monitor µVision via the built-in TCP/IP interface
|
Functions | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_TxRxRaw (int iConnHandle, UVSOCK_CMD *buf) |
| _UVSC_FUNC_ UVSOCK_CMD * | UVSC_CreateMsg (UVSOCK_CMD *buf, UV_OPERATION eCmd, int nLen, const void *pData) |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_EVAL_EXPRESSION_TO_STR (int iConnHandle, VSET *pVSet, int vSetLen) |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_FILELINE_TO_ADR (int iConnHandle, AFLMAP *pAflMap, int nAflMapLen, VSET *pVSet, int vSetLen) |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ENUM_REGISTER_GROUPS (int iConnHandle, SSTR *pGroups, int *pGroupCount) |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ENUM_REGISTERS (int iConnHandle, REGENUM *pRegisters, int *pRegisterCount) |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_READ_REGISTERS (int iConnHandle, char *pBuf, int *pBufLen) |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_REGISTER_SET (int iConnHandle, VSET *pVSet, int vSetLen) |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_DSM_READ (int iConnHandle, AMEM *pMem, int memLen) |
| _UVSC_FUNC_ UVSOCK_CMD * UVSC_CreateMsg | ( | UVSOCK_CMD * | buf, |
| UV_OPERATION | eCmd, | ||
| int | nLen, | ||
| const void * | pData | ||
| ) |
Create a UVSOCK message
| buf | Pointer to a structure to hold the UVSOCK message data |
| eCmd | Mssage command to add to the message |
| nLen | Length of the data in pData |
| pData | Pointer to the data to add to the message |
Use this function to create a correctly formatted UVSOCK message. This function is useful only in conjunction with the UVSC_TxRxRaw function. This is an advanced feature, and normally is not required.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_DSM_READ | ( | int | iConnHandle, |
| AMEM * | pMem, | ||
| int | memLen | ||
| ) |
Get block of disassembly lines for given address
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| pMem | Pointer to a structure containing the information about the address of disassembly to read. This variable will be updated with block of disassembly lines. This is a variable length structure, and must be large enough to contain the returned data, otherwise an error code will be returned from the function |
| memLen | Size of the pMem data (bytes) |
Use this function to get a block of disassembly lines starting with given address current project.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ENUM_REGISTER_GROUPS | ( | int | iConnHandle, |
| SSTR * | pGroups, | ||
| int * | pGroupCount | ||
| ) |
Enumerate register groups
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| pGroups | Pointer to a structure to contain the group(s) |
| pGroupCount | Pointer to a variable to containing the number of items it is possible to fit into the pGroups structures. This variable will be updated with the actual number of groups returned. |
Use this function to get a list of all register groups that exist within the current project.
The pointer pGroups must point to memory which is a multiple of the size of these structures. This multiple must be passed in the variable pGroupCount. The multiple must make the pGroups memory space large enough to contain the maximum number of groups that may be returned. If the memory area is not large enough for the returned data, the function will return an error. A recommended value is 256.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ENUM_REGISTERS | ( | int | iConnHandle, |
| REGENUM * | pRegisters, | ||
| int * | pRegisterCount | ||
| ) |
Enumerate registers
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| pRegisters | Pointer to a structure to contain the registers |
| pRegisterCount | Pointer to a variable containing the number of items it is possible to fit into the pRegisters. This variable will be updated with the actual number of registers returned. |
Use this function to get a list of all register groups that exist within the current project.
The pointer pRegisters must point to memory which is a multiple of the size of these structures. This multiple must be passed in the variable pRegisterCount. The multiple must make the pRegisters memory space large enough to contain the maximum number of registers that may be returned. If the memory area is not large enough for the returned data, the function will return an error. A recommended value is 256.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_EVAL_EXPRESSION_TO_STR | ( | int | iConnHandle, |
| VSET * | pVSet, | ||
| int | vSetLen | ||
| ) |
Evaluate expession and retur result as string
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| pVSet | Pointer to a structure containing the expression to calculate. This variable will be updated with the result of the expression calculation. input : pVSet->val : stack frame address (VTT_uint64) pVSet-str : expression to avaluate |
| vSetLen | Size of the pVSet data (bytes) |
Use this function to get stack frame based expression evaluation, for example to display a variable value in a tooltip
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_FILELINE_TO_ADR | ( | int | iConnHandle, |
| AFLMAP * | pAflMap, | ||
| int | nAflMapLen, | ||
| VSET * | pVSet, | ||
| int | vSetLen | ||
| ) |
Convert High Level Language (HLL) file and line to an address
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| pAflMap | Pointer to a structure to contain the HLL code information about file and line |
| nAflMapLen | size of the pAflMap data (bytes). |
| pVSet | Pointer to a structure containing calculated address. This variable will be updated with the result of the calculation. |
| vSetLen | Size of the pVSet data (bytes) |
Use this function to convert a code address to a High Level Language (HLL) file, line and function.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_READ_REGISTERS | ( | int | iConnHandle, |
| char * | pBuf, | ||
| int * | pBufLen | ||
| ) |
Read all register values
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| pBuf | pointer to a string buffer to contain the register values |
| pBufLen | pointer to a variable containing the size of pBuf in bytes This variable will be updated with the actual number of bytes returned. |
Use this function to get a list of all register groups that exist within the current project.
The pointer pBuf must point to memory which is a multiple of the 32 bytes (32*register_count). The length of this buffer be passed in the variable pBufLen. The multiple must make the pBuf memory space large enough to contain the maximum number of register values that may be returned. If the memory area is not large enough for the returned data, the function will return an error. A recommended value is 4096.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_REGISTER_SET | ( | int | iConnHandle, |
| VSET * | pVSet, | ||
| int | vSetLen | ||
| ) |
Set register value
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| pVSet | pointer to a VSET structure that contains: TVAL member contains register index as integer SSTR contains register value as string expression |
| vSetLen | size of VSET stucture |
Use this function to set a new value to a register
| _UVSC_FUNC_ UVSC_STATUS UVSC_TxRxRaw | ( | int | iConnHandle, |
| UVSOCK_CMD * | buf | ||
| ) |
Send a raw UVSOCK message, and retreive the response
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| buf | Pointer to a structure containing the UVSOCK request message data. This will be replaced by the response message data |
Use this function to send a raw UVSOCK message, and retreive the response. This is useful when implementing UVSOCK features that are not yet fully supported in UVSC. This is an advanced feature, and normally is not required.