#include "UVSOCK.h"
Go to the source code of this file.
Data Structures | |
| union | UVSC_CB_DATA |
| UVSC callback data. More... | |
Defines | |
| #define | UVSC_MAX_CLIENTS 10 |
| Maximum number of clients UVSC can support. | |
| #define | UVSC_MAX_API_STR_SIZE 1024 |
| Maximum string size. | |
| #define | UVSC_PORT_AUTO 0 |
| Auto port. | |
| #define | UVSC_MIN_AUTO_PORT 1 |
| Minimum auto port value. | |
| #define | UVSC_MAX_AUTO_PORT 65535 |
| Maximum auto port value. | |
Typedefs | |
| typedef void(* | uvsc_cb )(void *cb_custom, UVSC_CB_TYPE type, UVSC_CB_DATA *data) |
| UVSC callback function pointer definition. | |
| typedef void(* | log_cb )(const char *msg, int msgLen) |
| UVSC logging callback function pointer definition. | |
Enumerations | |
| enum | UVSC_STATUS { UVSC_STATUS_SUCCESS = 0, UVSC_STATUS_FAILED = 1, UVSC_STATUS_NOT_SUPPORTED = 2, UVSC_STATUS_NOT_INIT = 3, UVSC_STATUS_TIMEOUT = 4, UVSC_STATUS_INVALID_CONTEXT = 5, UVSC_STATUS_INVALID_PARAM = 6, UVSC_STATUS_BUFFER_TOO_SMALL = 7, UVSC_STATUS_CALLBACK_IN_USE = 8, UVSC_STATUS_COMMAND_ERROR = 9, UVSC_STATUS_END } |
| UVSC status codes. More... | |
| enum | UVSC_RUNMODE { UVSC_RUNMODE_NORMAL = 0, UVSC_RUNMODE_LABVIEW = 1, UVSC_RUNMODE_END = 2 } |
| uVision Runmode More... | |
| enum | UVSC_PBAR { UVSC_PBAR_INIT = 0, UVSC_PBAR_TEXT = 1, UVSC_PBAR_POS = 2, UVSC_PBAR_STOP = 3 } |
| Progress bar operations. More... | |
| enum | UVSC_CB_TYPE { UVSC_CB_ERROR = 0, UVSC_CB_ASYNC_MSG = 1, UVSC_CB_DISCONNECTED = 2, UVSC_CB_BUILD_OUTPUT_MSG = 3, UVSC_CB_PROGRESS_BAR_MSG = 4 } |
| UVSC callback type. More... | |
Functions | |
| _UVSC_FUNC_ void | UVSC_Version (UINT *pUVSCVersion, UINT *pUVSOCKVersion) |
| Get the library and interface versions. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_Init (int uvMinPort, int uvMaxPort) |
| Initialise UVSC. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_UnInit (void) |
| Uninitialise UVSC. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_OpenConnection (char *name, int *iConnHandle, int *pPort, char *uvCmd, UVSC_RUNMODE uvRunmode, uvsc_cb callback, void *cb_custom, char *logFileName, xBOOL logFileAppend, log_cb logCallback) |
| Open a connection to uVision session. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_CloseConnection (int iConnHandle, xBOOL terminate) |
| Close a connection to a uVision session. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_ConnHandleFromConnName (char *name, int *iConnHandle) |
| Get a connection handle (iConnHandle) from a connection name. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GetLastError (int iConnHandle, UV_OPERATION *msgType, UV_STATUS *status, char *str, int maxStrLen) |
| Retreive detailed information on the last UVSOCK error. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_LogControl (int iConnHandle, xBOOL enableRaw, xBOOL enableTrace) |
| Control message logging. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_UVSOCK_VERSION (int iConnHandle, UINT *pMajor, UINT *pMinor) |
| Get the uVision UVSOCK interface version. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_EXT_VERSION (int iConnHandle, EXTVERS *pVersions, UINT *pVersionsLen) |
| Get extended uVision versions. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_HIDE (int iConnHandle) |
| Hide the uVision window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_SHOW (int iConnHandle) |
| Show the uVision window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_MAXIMIZE (int iConnHandle) |
| Maximize the uVision window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_MINIMIZE (int iConnHandle) |
| Minimize the uVision window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_RESTORE (int iConnHandle) |
| Restore the uVision window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_UI_LOCK (int iConnHandle) |
| Lock the uVision window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_UI_UNLOCK (int iConnHandle) |
| Unlock the uVision window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GEN_CHECK_LICENSE (int iConnHandle, UVLICINFO *pLicInfo) |
| Get uVision license status. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_LOAD (int iConnHandle, PRJDATA *pProjectFile, int projectFileLen) |
| Load a project into uVision. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_CLOSE (int iConnHandle) |
| Close the current uVision project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_ADD_FILE (int iConnHandle, PRJDATA *pGroupFiles, int groupFilesLen) |
| Add a file to a group within the current uVision project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_DEL_FILE (int iConnHandle, PRJDATA *pGroupFiles, int groupFilesLen) |
| Remove a file from a group within the current uVision project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_ENUM_FILES (int iConnHandle, SSTR *pGroup, int groupLen, SSTR *pFiles, int *pFileIndexes, int *pFileCount) |
| Enumerate the files within a project group. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_ADD_GROUP (int iConnHandle, PRJDATA *pGroups, int groupsLen) |
| Add a group to the current uVision project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_DEL_GROUP (int iConnHandle, PRJDATA *pGroups, int groupsLen) |
| Remove a group from the current uVision project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_ENUM_GROUPS (int iConnHandle, SSTR *pGroups, int *pGroupIndexes, int *pGroupCount) |
| Enumerate the groups within the current project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_ACTIVE_FILES (int iConnHandle, UINT *pActiveFileCount) |
| Get the number of active files in the current project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_BUILD (int iConnHandle, xBOOL rebuild) |
| Build the current uVision project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_BUILD_CANCEL (int iConnHandle) |
| Cancel a build that is currently in progress. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_CLEAN (int iConnHandle) |
| Clean the current uVision project. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_FLASH_DOWNLOAD (int iConnHandle) |
| Download the currently built executable to FLASH. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_GET_OPTITEM (int iConnHandle, TRNOPT *pTrnOpt, int trnOptLen) |
| Get a uVision project option. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_SET_OPTITEM (int iConnHandle, TRNOPT *pTrnOpt, int trnOptLen) |
| Set a uVision project option. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_GET_DEBUG_TARGET (int iConnHandle, DBGTGTOPT *pDbgTgtOpt) |
| Set the debug uVision target configuration. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_SET_DEBUG_TARGET (int iConnHandle, DBGTGTOPT *pDbgTgtOpt) |
| Get the debug uVision target configuration. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_PRJ_CMD_PROGRESS (int iConnHandle, PGRESS *pPgress, int pgressLen) |
| Control the uVision UI progress bar. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ENTER (int iConnHandle) |
| Enter debug mode. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_EXIT (int iConnHandle) |
| Exit debug mode. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_START_EXECUTION (int iConnHandle) |
| Start execution. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_STOP_EXECUTION (int iConnHandle) |
| Stop execution. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_STATUS (int iConnHandle, int *pStatus) |
| Get execution status. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_STEP_HLL (int iConnHandle) |
| Step one High Level Language (HLL) code line. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_STEP_INSTRUCTION (int iConnHandle) |
| Step one ASM instruction. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_STEP_INTO (int iConnHandle) |
| Step into the current High Level Language (HLL) function. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_STEP_OUT (int iConnHandle) |
| Step out of the current High Level Language (HLL) function. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_RESET (int iConnHandle) |
| Reset the target. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_MEM_READ (int iConnHandle, AMEM *pMem, int memLen) |
| Read memory. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_MEM_WRITE (int iConnHandle, AMEM *pMem, int memLen) |
| Write memory. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_CREATE_BP (int iConnHandle, BKPARM *pBkptSet, int bkptSetLen, BKRSP *pBkptRsp, int *pBkptRspLen) |
| Create a breakpoint. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_CHANGE_BP (int iConnHandle, BKCHG *pBkptChg, int bkptChgLen, BKRSP *pBkptRsp, int *pBkptRspLen) |
| Modify an existing breakpoint. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ENUMERATE_BP (int iConnHandle, BKRSP *pBkptRsp, int *pBkptIndexes, int *pBkptCount) |
| Enumerate all breakpoints. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_SERIAL_GET (int iConnHandle, SERIO *pSerIO, int serIOLen) |
| Get terminal data from a uVision terminal window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_SERIAL_PUT (int iConnHandle, SERIO *pSerIO, int serIOLen) |
| Send terminal data to a uVision terminal window. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_CALC_EXPRESSION (int iConnHandle, VSET *pVSet, int vSetLen) |
| Calculate the value of an expression. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ENUM_VTR (int iConnHandle, iVTRENUM *piVtrEnum, AVTR *paVTR, int *pVtrIndexes, int *pVtrCount) |
| Enumerate the device Virtual Registers (VTRs). | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_VTR_GET (int iConnHandle, VSET *pVSet, int vSetLen) |
| Get the value of a virtual register (VTR). | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_VTR_SET (int iConnHandle, VSET *pVSet, int vSetLen) |
| Set the value of a virtual register (VTR). | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ENUM_STACK (int iConnHandle, iSTKENUM *piStkEnum, STACKENUM *pStackEnum, int *pStackCount) |
| Enumerate stack frames. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ADR_TOFILELINE (int iConnHandle, ADRMTFL *pAdrMtfl, AFLMAP *pAflMap, int *pAflMapLen) |
| Convert a code address to a High Level Language (HLL) file, line and function. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_ADR_SHOWCODE (int iConnHandle, iSHOWSYNC *piShowSync) |
| Show code at a specific address within uVision. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_WAKE (int iConnHandle, iINTERVAL *piInterval) |
| Wake the simulation [SIMULATOR ONLY]. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_DBG_SLEEP (int iConnHandle) |
| Sleep the simulation [SIMULATOR ONLY]. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GetBuildOutputSize (int iConnHandle, int *pBuildOutputSize) |
| Get the size (bytes) of the latest build output text. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_GetBuildOutput (int iConnHandle, char *pBuildOutput, int buildOutputLen) |
| Get the latest build output text. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_ReadBuildQ (int iConnHandle, char *pOutputLine, int timeout) |
| Read build messages from the build queue. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_ReadPBarQ (int iConnHandle, UVSC_PBAR *pBar, char *pStr, int timeout) |
| Read progress bar messages from the progress bar queue. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_ReadAsyncQ (int iConnHandle, int iQueueNo, UVSOCK_CMD *buf, int timeout) |
| Read a message from the UVSOCK asynchronous message queue. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_FlushAsyncQ (int iConnHandle, int iQueueNo) |
| Flush the UVSOCK asynchronous message queue. | |
| _UVSC_FUNC_ UVSC_STATUS | UVSC_TxRxRaw (int iConnHandle, UVSOCK_CMD *buf) |
| Send a raw UVSOCK message, and retreive the response. | |
| _UVSC_FUNC_ UVSOCK_CMD * | UVSC_CreateMsg (UVSOCK_CMD *buf, UV_OPERATION eCmd, int nLen, const void *pData) |
| Create a UVSOCK message. | |
General API Rules
Author, Date, Version
Version 2.02:
Definition in file UVSC_C.h.
| #define UVSC_MAX_API_STR_SIZE 1024 |
Maximum string size.
Maximum string size where strings are passed to or returned from API functions such as UVSC_OpenConnection.
| #define UVSC_MAX_AUTO_PORT 65535 |
| #define UVSC_MAX_CLIENTS 10 |
| #define UVSC_MIN_AUTO_PORT 1 |
| #define UVSC_PORT_AUTO 0 |
| typedef void(* log_cb)(const char *msg, int msgLen) |
UVSC logging callback function pointer definition.
Defines the format to which the UVSC logging callback function configured through UVSC_OpenConnection must correspond.
| typedef void(* uvsc_cb)(void *cb_custom, UVSC_CB_TYPE type, UVSC_CB_DATA *data) |
UVSC callback function pointer definition.
Defines the format to which the UVSC callback function configured through UVSC_OpenConnection must correspond.
| enum UVSC_CB_TYPE |
UVSC callback type.
Indicates the type of message retuned in the UVSC callback function uvsc_cb configured through UVSC_OpenConnection.
| UVSC_CB_ERROR | Error notification (not used). |
| UVSC_CB_ASYNC_MSG | Asynchronous message received (called from UVSC internal thread). |
| UVSC_CB_DISCONNECTED | uVision has disconnected (called from UVSC internal thread) |
| UVSC_CB_BUILD_OUTPUT_MSG | Called from the UVSC_PRJ_BUILD function - indicates a line of build output (called from API function callers own thread). |
| UVSC_CB_PROGRESS_BAR_MSG | Called from function that cause a progress bar in uVision - indicates the progress bar state (called from API function callers own thread). |
| enum UVSC_PBAR |
Progress bar operations.
Progress bar operations as returned by UVSC_ReadPBarQ.
| enum UVSC_RUNMODE |
| enum UVSC_STATUS |
UVSC status codes.
UVSC status codes are returned by UVSC API functions, and indicate the success or failure of the called API function.
| UVSC_STATUS_SUCCESS | Success. |
| UVSC_STATUS_FAILED | General failure. |
| UVSC_STATUS_NOT_SUPPORTED | Request for an unsupported operation. |
| UVSC_STATUS_NOT_INIT | UVSC not initialised. |
| UVSC_STATUS_TIMEOUT | Operation timed-out. |
| UVSC_STATUS_INVALID_CONTEXT | Function called from an invalid context (most likely the callback function). |
| UVSC_STATUS_INVALID_PARAM | Function called with one or more invalid parameters. |
| UVSC_STATUS_BUFFER_TOO_SMALL | Function called with a buffer that was not big enough to hold the result from uVision. |
| UVSC_STATUS_CALLBACK_IN_USE | Function cannot be used when the callback is in use. |
| UVSC_STATUS_COMMAND_ERROR | The command failed - call UVSC_GetLastError to get more information on how the command failed. |
| UVSC_STATUS_END | Always at end. |
| _UVSC_FUNC_ UVSC_STATUS UVSC_CloseConnection | ( | int | iConnHandle, | |
| xBOOL | terminate | |||
| ) |
Close a connection to a uVision session.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| terminate | Pass 'xTRUE' to terminate uVision. This parameter is ignored and the session is automatically terminated if it was auto-started |
| _UVSC_FUNC_ UVSC_STATUS UVSC_ConnHandleFromConnName | ( | char * | name, | |
| int * | iConnHandle | |||
| ) |
Get a connection handle (iConnHandle) from a connection name.
| name | Pointer to a zero terminated string containing a unique connection name. The name should correspond to a name that was previously passed to UVSC_OpenConnection. This pointer must not be NULL | |
| iConnHandle | Pointer to a variable to contain the handle assigned to this connection. The value assigned will be invalid if the function returns an error. This pointer must not be NULL |
| _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 |
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ADR_SHOWCODE | ( | int | iConnHandle, | |
| iSHOWSYNC * | piShowSync | |||
| ) |
Show code at a specific address within uVision.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| piShowSync | Pointer to a structure containing the type of code to show |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ADR_TOFILELINE | ( | int | iConnHandle, | |
| ADRMTFL * | pAdrMtfl, | |||
| AFLMAP * | pAflMap, | |||
| int * | pAflMapLen | |||
| ) |
Convert a code address to a High Level Language (HLL) file, line and function.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pAdrMtfl | Pointer to a structure containing the type of HLL information to retreive | |
| pAflMap | Pointer to a structure to contain the HLL code information. 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 | |
| pAflMapLen | Pointer to a variable containing the size of the pAflMap data (bytes). This variable will be updated with the length of the pAflMap data returned |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_CALC_EXPRESSION | ( | int | iConnHandle, | |
| VSET * | pVSet, | |||
| int | vSetLen | |||
| ) |
Calculate the value of an expression.
| 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. This is a variable length structure. | |
| vSetLen | Size of the pVSet data (bytes) |
uVision is in debug mode
Example 1: Evaluate the address of the function 'main()'
Set pVSet->str to "&main"
Example 2: Read the value of R0
Set pVSet->str to "R0"
Example 3: Modify the value of PC to 0x99
Set pVSet->str to "PC = 0x99"
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_CHANGE_BP | ( | int | iConnHandle, | |
| BKCHG * | pBkptChg, | |||
| int | bkptChgLen, | |||
| BKRSP * | pBkptRsp, | |||
| int * | pBkptRspLen | |||
| ) |
Modify an existing breakpoint.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pBkptChg | Pointer to a structure containing the breakpoint to change. This is a variable length structure. | |
| bkptChgLen | Size of the pBkptChg data (bytes) | |
| pBkptRsp | Pointer to a structure to contain the new breakpoint information. 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. | |
| pBkptRspLen | Size of the pBkptRsp data (bytes). This variable will be updated with the actual length of data written to the pBkptRsp structure |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_CREATE_BP | ( | int | iConnHandle, | |
| BKPARM * | pBkptSet, | |||
| int | bkptSetLen, | |||
| BKRSP * | pBkptRsp, | |||
| int * | pBkptRspLen | |||
| ) |
Create a breakpoint.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pBkptSet | Pointer to a structure containing the new breakpoint data. This is a variable length structure. | |
| bkptSetLen | Size of the pBkptSet data (bytes) | |
| pBkptRsp | Pointer to a structure to contain the new breakpoint information. 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. | |
| pBkptRspLen | Size of the pBkptRsp data (bytes). This variable will be updated with the actual length of data written to the pBkptRsp structure |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ENTER | ( | int | iConnHandle | ) |
Enter debug mode.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
A valid project is loaded, a binary has been built, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Debug-->Start/Stop Debug Session' menu item in uVision (when not in debug mode).
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ENUM_STACK | ( | int | iConnHandle, | |
| iSTKENUM * | piStkEnum, | |||
| STACKENUM * | pStackEnum, | |||
| int * | pStackCount | |||
| ) |
Enumerate stack frames.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| piStkEnum | Pointer to a structure containing the type of stack enumeration to perform | |
| pStackEnum | Pointer to a structure to contain the stack frame(s) | |
| pStackCount | Pointer to a variable to containing the number of items it is possible to fit into the pStackEnum structure. This variable will be updated with the actual number of stack frames returned |
uVision is in debug mode, and not executing
The pointer pStackEnum must point to memory which is a multiple of the size of the STACKENUM structure. This multiple must be passed in the variable pStackCount. The multiple must be at least equal to the maximum number of stack frames that may be returned. A recommended value is 256.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ENUM_VTR | ( | int | iConnHandle, | |
| iVTRENUM * | piVtrEnum, | |||
| AVTR * | paVTR, | |||
| int * | pVtrIndexes, | |||
| int * | pVtrCount | |||
| ) |
Enumerate the device Virtual Registers (VTRs).
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| piVtrEnum | Pointer to a structure containing the type of VTR enumeration to perform | |
| paVTR | Pointer to a structure to contain the VTR(s) | |
| pVtrIndexes | Pointer to a variable to contain the VTR index(es) within the paVTR data. | |
| pVtrCount | Pointer to a variable to containing the number of items it is possible to fit into the paVTR and pVtrIndexes structures. This variable will be updated with the actual number of VTRs returned |
uVision is in debug mode, and not executing
The pointers paVTR and pVtrIndexes must point to memory which is a multiple of the size of these structures. This multiple must be passed in the variable pVtrCount. The multiple must make the paVTR memory space large enough to contain the maximum number of VTRs 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.
The AVTR structure is designed to contain variable length data, therefore it may be the case that one record within paVTR actually takes up more than 1 index. Because of this, the returned data should be interpreted in the following way:
for (i=0; i<*pVtrCount; i++) {
pointer_to_ith_VTR = paVTR[pVtrIndexes[i]];
}
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_ENUMERATE_BP | ( | int | iConnHandle, | |
| BKRSP * | pBkptRsp, | |||
| int * | pBkptIndexes, | |||
| int * | pBkptCount | |||
| ) |
Enumerate all breakpoints.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pBkptRsp | Pointer to a structure to contain the breakpoint(s) information | |
| pBkptIndexes | Pointer to a variable to contain the breakpoint index(es) within the pBkptRsp data. | |
| pBkptCount | Pointer to a variable to containing the number of items it is possible to fit into the pBkptRsp and pBkptIndexes structures. This variable will be updated with the actual number of breakpoints returned. |
uVision is in debug mode
The pointers pBkptRsp and pBkptIndexes must point to memory which is a multiple of the size of these structures. This multiple must be passed in the variable pBkptCount. The multiple must make the pBkptRsp memory space large enough to contain the maximum number of breakpoints 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.
The BKRSP structure is designed to contain variable length data, therefore it may be the case that one record within pBkptRsp actually takes up more than 1 index. Because of this, the returned data should be interpreted in the following way:
for (i=0; i<*pBkptCount; i++) {
pointer_to_ith_Breakpoint = pBkptRsp[pBkptIndexes[i]];
}
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_EXIT | ( | int | iConnHandle | ) |
Exit debug mode.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode
This is the equivalent of clicking the 'Debug-->Start/Stop Debug Session' menu item in uVision (when in debug mode).
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_MEM_READ | ( | int | iConnHandle, | |
| AMEM * | pMem, | |||
| int | memLen | |||
| ) |
Read memory.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pMem | Pointer to a structure containing the information about the memory to read. This variable will be updated with the data read from memory. 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) |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_MEM_WRITE | ( | int | iConnHandle, | |
| AMEM * | pMem, | |||
| int | memLen | |||
| ) |
Write memory.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pMem | Pointer to a structure containing the information about the memory to write, including the data to write. This is a variable length structure | |
| memLen | Size of the pMem data (bytes) |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_RESET | ( | int | iConnHandle | ) |
Reset the target.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode
This is the equivalent of clicking the 'Peripherals-->Reset CPU' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_SERIAL_GET | ( | int | iConnHandle, | |
| SERIO * | pSerIO, | |||
| int | serIOLen | |||
| ) |
Get terminal data from a uVision terminal window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pSerIO | Pointer to a structure containing the information about the terminal window to get data from. This variable will be updated with the data read from the terminal window. 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. | |
| serIOLen | Size of the pSerIO data (bytes) |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_SERIAL_PUT | ( | int | iConnHandle, | |
| SERIO * | pSerIO, | |||
| int | serIOLen | |||
| ) |
Send terminal data to a uVision terminal window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pSerIO | Pointer to a structure containing the information about the terminal window to write data to, including the data to write. This is a variable length structure | |
| serIOLen | Size of the pSerIO data (bytes) |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_SLEEP | ( | int | iConnHandle | ) |
Sleep the simulation [SIMULATOR ONLY].
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode, and is targetting the simulator
NOTE: The simulator will automatically wake up after 500ms if it is not told to wake up by a UVSC_DBG_WAKE command.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_START_EXECUTION | ( | int | iConnHandle | ) |
Start execution.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode, and not executing
This is the equivalent of clicking the 'Debug-->Run' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_STATUS | ( | int | iConnHandle, | |
| int * | pStatus | |||
| ) |
Get execution status.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pStatus | Pointer to a variable to contain the execution status. 1:= the target is executing, 0:= the target is stopped. |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_STEP_HLL | ( | int | iConnHandle | ) |
Step one High Level Language (HLL) code line.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode, and not executing
This is the equivalent of clicking the 'Debug-->Step Over' menu item in uVision (when viewing HLL code).
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_STEP_INSTRUCTION | ( | int | iConnHandle | ) |
Step one ASM instruction.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode, and not executing
This is the equivalent of clicking the 'Debug-->Step' menu item in uVision (when viewing ASM code).
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_STEP_INTO | ( | int | iConnHandle | ) |
Step into the current High Level Language (HLL) function.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode, and not executing
This is the equivalent of clicking the 'Debug-->Step' menu item in uVision (when viewing HLL code).
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_STEP_OUT | ( | int | iConnHandle | ) |
Step out of the current High Level Language (HLL) function.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode, and not executing
This is the equivalent of clicking the 'Debug-->Step out of current function' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_STOP_EXECUTION | ( | int | iConnHandle | ) |
Stop execution.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
uVision is in debug mode, and executing
This is the equivalent of clicking the 'Debug-->Stop Running' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_VTR_GET | ( | int | iConnHandle, | |
| VSET * | pVSet, | |||
| int | vSetLen | |||
| ) |
Get the value of a virtual register (VTR).
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pVSet | Pointer to a structure containing the VTR to get. This structure will be updated with the VTR value. This is a variable length structure | |
| vSetLen | Size of the pVSet data (bytes) |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_VTR_SET | ( | int | iConnHandle, | |
| VSET * | pVSet, | |||
| int | vSetLen | |||
| ) |
Set the value of a virtual register (VTR).
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pVSet | Pointer to a structure containing the VTR to set, and the value to set it to. This is a variable length structure | |
| vSetLen | Size of the pVSet data (bytes) |
uVision is in debug mode
| _UVSC_FUNC_ UVSC_STATUS UVSC_DBG_WAKE | ( | int | iConnHandle, | |
| iINTERVAL * | piInterval | |||
| ) |
Wake the simulation [SIMULATOR ONLY].
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| piInterval | Pointer to a structure containing the information on how long the simulation should wake for. |
uVision is in debug mode, and is targetting the simulator
The function call can run the simulation for a specified time, after which the simulation is put to sleep and a notification generated. At this point, simulation virtual registers (ie device IO) can be read and written, and then this message can be sent again to wake the simulation again. This sequence can be used to simulate I/O to and from the simulator in a synchronous manner.
When the simulator is asleep, simulation is paused, but uVision still shows the simulation as running.
NOTE: The simulator will automatically wake up after 500ms if it is not told to wake up by another UVSC_DBG_WAKE command.
| _UVSC_FUNC_ UVSC_STATUS UVSC_FlushAsyncQ | ( | int | iConnHandle, | |
| int | iQueueNo | |||
| ) |
Flush the UVSOCK asynchronous message queue.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| iQueueNo | The asynchronous queue number to flush |
NULL was passed as the callback parameter to UVSC_OpenConnection.
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_CHECK_LICENSE | ( | int | iConnHandle, | |
| UVLICINFO * | pLicInfo | |||
| ) |
Get uVision license status.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pLicInfo | Pointer to a structure to contain the uVision license information |
A valid project is loaded, and uVision is not building, downloading, or debugging
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_EXT_VERSION | ( | int | iConnHandle, | |
| EXTVERS * | pVersions, | |||
| UINT * | pVersionsLen | |||
| ) |
Get extended uVision versions.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pVersions | Pointer to a structure to contain the extended version information. 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 | |
| pVersionsLen | Pointer to a variable containing the size of the pVersions data (bytes). This variable will be updated with the actual length of pVersions returned. |
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_HIDE | ( | int | iConnHandle | ) |
Hide the uVision window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_MAXIMIZE | ( | int | iConnHandle | ) |
Maximize the uVision window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_MINIMIZE | ( | int | iConnHandle | ) |
Minimize the uVision window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_RESTORE | ( | int | iConnHandle | ) |
Restore the uVision window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_SHOW | ( | int | iConnHandle | ) |
Show the uVision window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UI_LOCK | ( | int | iConnHandle | ) |
Lock the uVision window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
UI locking is performed automatically for all UVSC functions where it is required.
NOTE: UI locking is reference counted within uVision, therefore calls to UVSC_GEN_UI_LOCK and UVSC_GEN_UI_UNLOCK must be balanced.
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UI_UNLOCK | ( | int | iConnHandle | ) |
Unlock the uVision window.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
NOTE: UI locking is reference counted within uVision, therefore calls to UVSC_GEN_UI_LOCK and UVSC_GEN_UI_UNLOCK must be balanced.
| _UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UVSOCK_VERSION | ( | int | iConnHandle, | |
| UINT * | pMajor, | |||
| UINT * | pMinor | |||
| ) |
Get the uVision UVSOCK interface version.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pMajor | Pointer to a variable to contain the major version number | |
| pMinor | Pointer to a variable to contain the minor version number |
UVSOCK Version = V*pMajor.*pMinor
| _UVSC_FUNC_ UVSC_STATUS UVSC_GetBuildOutput | ( | int | iConnHandle, | |
| char * | pBuildOutput, | |||
| int | buildOutputLen | |||
| ) |
Get the latest build output text.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pBuildOutput | Pointer to a buffer to contain the build output text | |
| buildOutputLen | Size of the pBuildOutput buffer (bytes) |
A build must have been performed, otherwise no data will be returned
UVSC_GetBuildOutputSize must have been called successfully
| _UVSC_FUNC_ UVSC_STATUS UVSC_GetBuildOutputSize | ( | int | iConnHandle, | |
| int * | pBuildOutputSize | |||
| ) |
Get the size (bytes) of the latest build output text.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pBuildOutputSize | Pointer to a variable to contain the build output text size (bytes) |
| _UVSC_FUNC_ UVSC_STATUS UVSC_GetLastError | ( | int | iConnHandle, | |
| UV_OPERATION * | msgType, | |||
| UV_STATUS * | status, | |||
| char * | str, | |||
| int | maxStrLen | |||
| ) |
Retreive detailed information on the last UVSOCK error.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| msgType | Pointer to a variable to contain the UVSOCK message that caused the error | |
| status | Pointer to a variable to contain status code of the UVSOCK message that caused the error | |
| str | Pointer to a buffer to contain the zero terminated error string of the UVSOCK message that caused the error | |
| maxStrLen | Size of the buffer pointer to by str (bytes) |
The last call to UVSC_XXXX should have returned an error
| _UVSC_FUNC_ UVSC_STATUS UVSC_Init | ( | int | uvMinPort, | |
| int | uvMaxPort | |||
| ) |
Initialise UVSC.
| uvMinPort | Minimum port avialable to the automatic port allocator. This must not be smaller than UVSC_MIN_AUTO_PORT | |
| uvMaxPort | Maximum port avialable to the automatic port allocator. This must not be larger than UVSC_MAX_AUTO_PORT |
| _UVSC_FUNC_ UVSC_STATUS UVSC_LogControl | ( | int | iConnHandle, | |
| xBOOL | enableRaw, | |||
| xBOOL | enableTrace | |||
| ) |
Control message logging.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| enableRaw | Pass 'xTRUE' to enable logging of raw UVSOCK data, or 'xFALSE' to disable it. The default option on connection is 'xFALSE' | |
| enableTrace | Pass 'xTRUE' to enable logging of UVSC function trace, or 'xFALSE' to disable it. The default option on connection is 'xTRUE' |
Logging should be enabled for this connection handle (ie one or both of logFileName and logCallback passed to UVSC_OpenConnection should not be NULL)
| _UVSC_FUNC_ UVSC_STATUS UVSC_OpenConnection | ( | char * | name, | |
| int * | iConnHandle, | |||
| int * | pPort, | |||
| char * | uvCmd, | |||
| UVSC_RUNMODE | uvRunmode, | |||
| uvsc_cb | callback, | |||
| void * | cb_custom, | |||
| char * | logFileName, | |||
| xBOOL | logFileAppend, | |||
| log_cb | logCallback | |||
| ) |
Open a connection to uVision session.
| name | Pointer to a zero terminated string containing a unique connection name. This name can be used later to retrieve the connection handle (iConnHandle) via the UVSC_ConnHandleFromConnName function. If a connection name is not required this parameter should be NULL | |
| iConnHandle | Pointer to a variable to contain the handle assigned to this connection. The value assigned will be invalid if the function returns an error. This pointer must not be NULL | |
| pPort | Pointer to a variable containing the port of an existing uVision session to connect, or the value UVSC_PORT_AUTO to auto-start a uVision session for this connection. If the function returns successfully, this variable will contain the port that was used for the connection. This pointer must not be NULL. | |
| uvCmd | Pointer to a zero terminated string containing the path to a uVision executable to be started automatically for this connection. If uVision is not being auto-started this parameter is ignored and should be NULL | |
| uvRunmode | Indicates the mode uVision should be started in when auto-started. If uVision is not being auto-started this parameter is ignored | |
| callback | Pointer to a function to receive callbacks from UVSC. The callbacks provide notification of asynchronous UVSOCK messages, connection events, and errors relating to the connection. NOTE: UVSC_xxx API functions must not be called from the callback. To call a UVSC_xxx function in response to the callback, a notification must be passed another thread, which can then call the UVSC_xxx function. | |
| cb_custom | This pointer will be returned in the calls to the callback function. It may be used for any purpose, but a common usage is for keeping track of the 'this' pointer of a C++ object relating to the connection | |
| logFileName | Pointer to a zero terminated string containing the path to a file to use for logging UVSOCK messages for this connection for debug purposes. If a debugging log file is not required, this parameter should be NULL | |
| logFileAppend | Pass 'xTRUE' to append to the log file specified in logFileName, or 'xFALSE' to overwrite the file. If logFileName is NULL, this parameter is ignored | |
| logCallback | Pointer to a function to receive logging callbacks. These callbacks contain the same information that is entered into the log file. If this callback is not required, this parameter should be NULL |
To auto-start a new uVision session (recommended):
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_ACTIVE_FILES | ( | int | iConnHandle, | |
| UINT * | pActiveFileCount | |||
| ) |
Get the number of active files in the current project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pActiveFileCount | Pointer to a variable to contain the active file count |
A valid project is loaded, and uVision is not building, downloading, or debugging
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_ADD_FILE | ( | int | iConnHandle, | |
| PRJDATA * | pGroupFiles, | |||
| int | groupFilesLen | |||
| ) |
Add a file to a group within the current uVision project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pGroupFiles | Pointer to a structure containing the group name, and filename(s) for the files to add to the group. This is a variable length structure | |
| groupFilesLen | Size of the pGroupFiles data (bytes) |
A valid, writable project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Add Files to Group 'x'' group context menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_ADD_GROUP | ( | int | iConnHandle, | |
| PRJDATA * | pGroups, | |||
| int | groupsLen | |||
| ) |
Add a group to the current uVision project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pGroups | Pointer to a structure containing the group name(s) for the groups to add to the uVision project. This is a variable length structure | |
| groupsLen | Size of the pGroupFiles data (bytes) |
A valid, writable project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'New Group' Project context menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_BUILD | ( | int | iConnHandle, | |
| xBOOL | rebuild | |||
| ) |
Build the current uVision project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| rebuild | 'xTRUE':= a rebuild is performed, 'xFALSE':= a build is performed |
A valid project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Project-->Build', or 'Project-->Rebuild all target files' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_BUILD_CANCEL | ( | int | iConnHandle | ) |
Cancel a build that is currently in progress.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
A project build is in progress
This is the equivalent of clicking the 'Project-->Stop Build' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_CLEAN | ( | int | iConnHandle | ) |
Clean the current uVision project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
A valid project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Project-->Clean target' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_CLOSE | ( | int | iConnHandle | ) |
Close the current uVision project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
A valid project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Project-->Close Project' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_CMD_PROGRESS | ( | int | iConnHandle, | |
| PGRESS * | pPgress, | |||
| int | pgressLen | |||
| ) |
Control the uVision UI progress bar.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pPgress | Pointer to a structure containing the progress bar data set. This is a variable length structure | |
| pgressLen | Size of the pPgress data (bytes) |
This is the equivalent of reading settings in the 'Options for XYZ' dialogs in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_DEL_FILE | ( | int | iConnHandle, | |
| PRJDATA * | pGroupFiles, | |||
| int | groupFilesLen | |||
| ) |
Remove a file from a group within the current uVision project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pGroupFiles | Pointer to a structure containing the group name, and filename(s) for the files to remove from the group. This is a variable length structure | |
| groupFilesLen | Size of the pGroupFiles data (bytes) |
A valid, writable project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Remove File 'x'' file context menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_DEL_GROUP | ( | int | iConnHandle, | |
| PRJDATA * | pGroups, | |||
| int | groupsLen | |||
| ) |
Remove a group from the current uVision project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pGroups | Pointer to a structure containing the group name(s) for the groups to remove from the uVision project. This is a variable length structure | |
| groupsLen | Size of the pGroupFiles data (bytes) |
A valid, writable project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Remove Group 'x' and its Files' group context menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_ENUM_FILES | ( | int | iConnHandle, | |
| SSTR * | pGroup, | |||
| int | groupLen, | |||
| SSTR * | pFiles, | |||
| int * | pFileIndexes, | |||
| int * | pFileCount | |||
| ) |
Enumerate the files within a project group.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pGroup | Pointer to a structure containing the group for which to enumerate the files | |
| groupLen | Length of the pGroup data | |
| pFiles | Pointer to a structure to contain the file(s) | |
| pFileIndexes | Pointer to a variable to contain the file index(es) within the pFiles data. | |
| pFileCount | Pointer to a variable to containing the number of items it is possible to fit into the pFiles and pFileIndexes structures. This variable will be updated with the actual number of files returned. |
A valid project is loaded, and uVision is not building, downloading, or debugging
The pointers pFiles and pFileIndexes must point to memory which is a multiple of the size of these structures. This multiple must be passed in the variable pFileCount. The multiple must make the pFiles memory space large enough to contain the maximum number of files 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.
The SSTR structure is designed to contain variable length data, therefore it may be the case that one record within pFiles actually takes up more than 1 index. Because of this, the returned data should be interpreted in the following way:
for (i=0; i<*pFileCount; i++) {
pointer_to_ith_file = pFiles[pFileIndexes[i]];
}
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_ENUM_GROUPS | ( | int | iConnHandle, | |
| SSTR * | pGroups, | |||
| int * | pGroupIndexes, | |||
| int * | pGroupCount | |||
| ) |
Enumerate the groups within the current project.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pGroups | Pointer to a structure to contain the group(s) | |
| pGroupIndexes | Pointer to a variable to contain the group index(es) within the pGroups data. | |
| pGroupCount | Pointer to a variable to containing the number of items it is possible to fit into the pGroups and pGroupIndexes structures. This variable will be updated with the actual number of groups returned. |
A valid project is loaded, and uVision is not building, downloading, or debugging
The pointers pGroups and pGroupIndexes 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.
The SSTR structure is designed to contain variable length data, therefore it may be the case that one record within pGroups actually takes up more than 1 index. Because of this, the returned data should be interpreted in the following way:
for (i=0; i<*pGroupCount; i++) {
pointer_to_ith_group = pGroups[pGroupIndexes[i]];
}
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_FLASH_DOWNLOAD | ( | int | iConnHandle | ) |
Download the currently built executable to FLASH.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection |
A valid project is loaded, has been built successfully, and uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Flash-->Download' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_GET_DEBUG_TARGET | ( | int | iConnHandle, | |
| DBGTGTOPT * | pDbgTgtOpt | |||
| ) |
Set the debug uVision target configuration.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pDbgTgtOpt | Pointer to a structure to contain the debug target configuration |
A valid project is loaded
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_GET_OPTITEM | ( | int | iConnHandle, | |
| TRNOPT * | pTrnOpt, | |||
| int | trnOptLen | |||
| ) |
Get a uVision project option.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pTrnOpt | Pointer to a structure containing the option item to get. The structure will be updated with the option item value. 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 | |
| trnOptLen | Size of the pTrnOpt data (bytes) |
A valid project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of modifying settings in the 'Options for XYZ' dialogs in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_LOAD | ( | int | iConnHandle, | |
| PRJDATA * | pProjectFile, | |||
| int | projectFileLen | |||
| ) |
Load a project into uVision.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pProjectFile | Pointer to a structure containing the path and filename of the project to load. This is a variable length structure | |
| projectFileLen | Size of the pProjectFile data (bytes) |
uVision is not building, downloading, or debugging
This is the equivalent of clicking the 'Project-->Open Project...' menu item in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_SET_DEBUG_TARGET | ( | int | iConnHandle, | |
| DBGTGTOPT * | pDbgTgtOpt | |||
| ) |
Get the debug uVision target configuration.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pDbgTgtOpt | Pointer to a structure containing the debug target configuration to set |
A valid, writable project is loaded, and uVision is not building, downloading, or debugging
| _UVSC_FUNC_ UVSC_STATUS UVSC_PRJ_SET_OPTITEM | ( | int | iConnHandle, | |
| TRNOPT * | pTrnOpt, | |||
| int | trnOptLen | |||
| ) |
Set a uVision project option.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pTrnOpt | Pointer to a structure containing the option item to set, and the value to set it to. This is a variable length structure | |
| trnOptLen | Size of the pTrnOpt data (bytes) |
A valid, writable project is loaded, and uVision is not building, downloading, or debugging
This is the equivalent of reading settings in the 'Options for XYZ' dialogs in uVision.
| _UVSC_FUNC_ UVSC_STATUS UVSC_ReadAsyncQ | ( | int | iConnHandle, | |
| int | iQueueNo, | |||
| UVSOCK_CMD * | buf, | |||
| int | timeout | |||
| ) |
Read a message from the UVSOCK asynchronous message queue.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| iQueueNo | The asynchronous queue number to read | |
| buf | Pointer to a structure to hold the asynchronous UVSOCK message data | |
| timeout | Time to wait for a message on the queue before giving up |
NULL was passed as the callback parameter to UVSC_OpenConnection.
If the queues are available, there are 3 queues (0, 1 and 2). This is to provide access to the aysnchronous messages for up to 3 tasks within the client application. Queues 1 and 2 will contain all UVSOCK asynchronous messages. Queue 0 ignores UV_DBG_WAKE and UV_DBG_SLEEP messages.
| _UVSC_FUNC_ UVSC_STATUS UVSC_ReadBuildQ | ( | int | iConnHandle, | |
| char * | pOutputLine, | |||
| int | timeout | |||
| ) |
Read build messages from the build queue.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pOutputLine | Pointer to a buffer to hold the build output line. The buffer should be at least UVSC_MAX_API_STR_SIZE bytes | |
| timeout | Time to wait for a message on the queue before giving up |
| _UVSC_FUNC_ UVSC_STATUS UVSC_ReadPBarQ | ( | int | iConnHandle, | |
| UVSC_PBAR * | pBar, | |||
| char * | pStr, | |||
| int | timeout | |||
| ) |
Read progress bar messages from the progress bar queue.
| iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection | |
| pBar | Pointer to an enumeration variable to hold the progress bar info type | |
| pStr | Pointer to a buffer to hold the progress bar information. The buffer should be at least UVSC_MAX_API_STR_SIZE bytes | |
| timeout | Time to wait for a message on the queue before giving up |
| _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 |
| _UVSC_FUNC_ UVSC_STATUS UVSC_UnInit | ( | void | ) |
Uninitialise UVSC.
| _UVSC_FUNC_ void UVSC_Version | ( | UINT * | pUVSCVersion, | |
| UINT * | pUVSOCKVersion | |||
| ) |
Get the library and interface versions.
| pUVSCVersion | Pointer to a variable to contain the UVSC library version | |
| pUVSOCKVersion | Pointer to a variable to contain the UVSOCK interface version |
The UINT version is converted to an X.YY version number by the following formula:
X.YY = UV3_SOCKIF_VERS / 100
For example:
*pUVSOCKVersion = 201 ==> V2.01
Copyright (c) KEIL - An ARM Company.
All rights reserved.
Visit our web site at www.keil.com.
Generated with doxygen.