Using the µVision Socket Interface  Application Note 198
Control and monitor µVision via the built-in TCP/IP interface
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Operation and Function Codes

Enumerations

enum  UV_OPERATION {
  UV_NULL_CMD = 0x0000,
  UV_GEN_GET_VERSION = 0x0001,
  UV_GEN_UI_UNLOCK = 0x0002,
  UV_GEN_UI_LOCK = 0x0003,
  UV_GEN_HIDE = 0x0004,
  UV_GEN_SHOW = 0x0005,
  UV_GEN_RESTORE = 0x0006,
  UV_GEN_MINIMIZE = 0x0007,
  UV_GEN_MAXIMIZE = 0x0008,
  UV_GEN_EXIT = 0x0009,
  UV_GEN_GET_EXTVERSION = 0x000A,
  UV_GEN_CHECK_LICENSE = 0x000B,
  UV_GEN_CPLX_COMPLETE = 0x000C,
  UV_GEN_SET_OPTIONS = 0x000D,
  UV_PRJ_LOAD = 0x1000,
  UV_PRJ_CLOSE = 0x1001,
  UV_PRJ_ADD_GROUP = 0x1002,
  UV_PRJ_DEL_GROUP = 0x1003,
  UV_PRJ_ADD_FILE = 0x1004,
  UV_PRJ_DEL_FILE = 0x1005,
  UV_PRJ_BUILD = 0x1006,
  UV_PRJ_REBUILD = 0x1007,
  UV_PRJ_CLEAN = 0x1008,
  UV_PRJ_BUILD_CANCEL = 0x1009,
  UV_PRJ_FLASH_DOWNLOAD = 0x100A,
  UV_PRJ_GET_DEBUG_TARGET = 0x100B,
  UV_PRJ_SET_DEBUG_TARGET = 0x100C,
  UV_PRJ_GET_OPTITEM = 0x100D,
  UV_PRJ_SET_OPTITEM = 0x100E,
  UV_PRJ_ENUM_GROUPS = 0x100F,
  UV_PRJ_ENUM_FILES = 0x1010,
  UV_PRJ_CMD_PROGRESS = 0x1011,
  UV_PRJ_ACTIVE_FILES = 0x1012,
  UV_PRJ_FLASH_ERASE = 0x1013,
  UV_PRJ_GET_OUTPUTNAME = 0x1014,
  UV_PRJ_ENUM_TARGETS = 0x1015,
  UV_PRJ_SET_TARGET = 0x1016,
  UV_PRJ_GET_CUR_TARGET = 0x1017,
  UV_PRJ_SET_OUTPUTNAME = 0x1018,
  UV_DBG_ENTER = 0x2000,
  UV_DBG_EXIT = 0x2001,
  UV_DBG_START_EXECUTION = 0x2002,
  UV_DBG_RUN_TO_ADDRESS = 0x2102,
  UV_DBG_STOP_EXECUTION = 0x2003,
  UV_DBG_STATUS = 0x2004,
  UV_DBG_RESET = 0x2005,
  UV_DBG_STEP_HLL = 0x2006,
  UV_DBG_STEP_HLL_N = 0x2106,
  UV_DBG_STEP_INTO = 0x2007,
  UV_DBG_STEP_INTO_N = 0x2107,
  UV_DBG_STEP_INSTRUCTION = 0x2008,
  UV_DBG_STEP_INSTRUCTION_N = 0x2108,
  UV_DBG_STEP_OUT = 0x2009,
  UV_DBG_CALC_EXPRESSION = 0x200A,
  UV_DBG_MEM_READ = 0x200B,
  UV_DBG_MEM_WRITE = 0x200C,
  UV_DBG_TIME_INFO = 0x200D,
  UV_DBG_SET_CALLBACK = 0x200E,
  UV_DBG_VTR_GET = 0x200F,
  UV_DBG_VTR_SET = 0x2010,
  UV_DBG_SERIAL_GET = 0x2011,
  UV_DBG_SERIAL_PUT = 0x2012,
  UV_DBG_VERIFY_CODE = 0x2013,
  UV_DBG_CREATE_BP = 0x2014,
  UV_DBG_ENUMERATE_BP = 0x2015,
  UV_DBG_CHANGE_BP = 0x2016,
  UV_DBG_ENUM_SYMTP = 0x2017,
  UV_DBG_ADR_TOFILELINE = 0x2018,
  UV_DBG_ENUM_STACK = 0x2019,
  UV_DBG_ENUM_VTR = 0x201A,
  UV_DBG_UNUSED = 0x201B,
  UV_DBG_ADR_SHOWCODE = 0x201C,
  UV_DBG_WAKE = 0x201D,
  UV_DBG_SLEEP = 0x201E,
  UV_MSGBOX_MSG = 0x201F,
  UV_DBG_EXEC_CMD = 0x2020,
  UV_DBG_POWERSCALE_SHOWCODE = 0x2021,
  UV_DBG_POWERSCALE_SHOWPOWER = 0x2022,
  POWERSCALE_OPEN = 0x2023,
  UV_DBG_EVAL_EXPRESSION_TO_STR = 0x2024,
  UV_DBG_FILELINE_TO_ADR = 0x2025,
  UV_DBG_ENUM_REGISTER_GROUPS = 0x2026,
  UV_DBG_ENUM_REGISTERS = 0x2027,
  UV_DBG_READ_REGISTERS = 0x2028,
  UV_DBG_REGISTER_SET = 0x2029,
  UV_DBG_DSM_READ = 0x202A,
  UV_DBG_EVAL_WATCH_EXPRESSION = 0x202B,
  UV_DBG_REMOVE_WATCH_EXPRESSION = 0x202D,
  UV_DBG_ENUM_VARIABLES = 0x202E,
  UV_DBG_VARIABLE_SET = 0x202F,
  UV_DBG_ENUM_TASKS = 0x2030,
  UV_DBG_ENUM_MENUS = 0x2031,
  UV_DBG_MENU_EXEC = 0x2032,
  UV_DBG_ITM_REGISTER = 0x2033,
  UV_DBG_ITM_UNREGISTER = 0x2034,
  UV_DBG_EVTR_REGISTER = 0x2035,
  UV_DBG_EVTR_UNREGISTER = 0x2036,
  UV_DBG_EVTR_GETSTATUS = 0x2037,
  UV_DBG_EVTR_ENUMSCVDFILES = 0x2038,
  UV_CMD_RESPONSE = 0x3000,
  UV_ASYNC_MSG = 0x4000,
  UV_PRJ_BUILD_COMPLETE = 0x5000,
  UV_PRJ_BUILD_OUTPUT = 0x5001,
  UV_DBG_CALLBACK = 0x5002,
  UV_DBG_BP_ENUM_START = 0x5004,
  UV_DBG_BP_ENUMERATED = 0x5005,
  UV_DBG_BP_ENUM_END = 0x5006,
  UV_PRJ_ENUM_GROUPS_START = 0x5007,
  UV_PRJ_ENUM_GROUPS_ENU = 0x5008,
  UV_PRJ_ENUM_GROUPS_END = 0x5009,
  UV_PRJ_ENUM_FILES_START = 0x500A,
  UV_PRJ_ENUM_FILES_ENU = 0x500B,
  UV_PRJ_ENUM_FILES_END = 0x500C,
  UV_PRJ_PBAR_INIT = 0x500D,
  UV_PRJ_PBAR_STOP = 0x500E,
  UV_PRJ_PBAR_SET = 0x500F,
  UV_PRJ_PBAR_TEXT = 0x5010,
  UV_DBG_ENUM_SYMTP_START = 0x5011,
  UV_DBG_ENUM_SYMTP_ENU = 0x5012,
  UV_DBG_ENUM_SYMTP_END = 0x5013,
  UV_DBG_ENUM_STACK_START = 0x5014,
  UV_DBG_ENUM_STACK_ENU = 0x5015,
  UV_DBG_ENUM_STACK_END = 0x5016,
  UV_DBG_ENUM_VTR_START = 0x5017,
  UV_DBG_ENUM_VTR_ENU = 0x5018,
  UV_DBG_ENUM_VTR_END = 0x5019,
  UV_DBG_CMD_OUTPUT = 0x5020,
  UV_DBG_SERIAL_OUTPUT = 0x5120,
  UV_PRJ_ENUM_TARGETS_START = 0x5021,
  UV_PRJ_ENUM_TARGETS_ENU = 0x5022,
  UV_PRJ_ENUM_TARGETS_END = 0x5023,
  UV_DBG_ENUM_REGISTER_GROUPS_START = 0x5024,
  UV_DBG_ENUM_REGISTER_GROUPS_ENU = 0x5025,
  UV_DBG_ENUM_REGISTER_GROUPS_END = 0x5026,
  UV_DBG_ENUM_REGISTERS_START = 0x5027,
  UV_DBG_ENUM_REGISTERS_ENU = 0x5028,
  UV_DBG_ENUM_REGISTERS_END = 0x5029,
  UV_DBG_ITM_OUTPUT = 0x5030,
  UV_DBG_ENUM_VARIABLES_START = 0x5040,
  UV_DBG_ENUM_VARIABLES_ENU = 0x5041,
  UV_DBG_ENUM_VARIABLES_END = 0x5042,
  UV_DBG_ENUM_TASKS_START = 0x5050,
  UV_DBG_ENUM_TASKS_ENU = 0x5051,
  UV_DBG_ENUM_TASKS_END = 0x5052,
  UV_DBG_ENUM_MENUS_START = 0x5060,
  UV_DBG_ENUM_MENUS_ENU = 0x5061,
  UV_DBG_ENUM_MENUS_END = 0x5062,
  UV_DBG_EVTR_OUTPUT = 0x5063,
  UV_DBG_EVTR_ENUMSCVDFILES_START = 0x5064,
  UV_DBG_EVTR_ENUMSCVDFILES_ENU = 0x5065,
  UV_DBG_EVTR_ENUMSCVDFILES_END = 0x5066,
  UV_RTA_MESSAGE = 0x6000,
  UV_RTA_INCOMPATIBLE = 0x6001,
  UV_TST_1 = 0xFF00,
  UV_TST_2 = 0xFF01,
  UV_TST_3 = 0xFF02,
  UV_TST_4 = 0xFF03,
  UV_TST_5 = 0xFF04,
  UV_TST_6 = 0xFF05,
  UV_TST_7 = 0xFF06,
  UV_TST_8 = 0xFF07,
  UV_TST_9 = 0xFF08,
  UV_TST_10 = 0xFF09
}
 

Description

Enumeration Type Documentation

UVSOCK command codes

Each request, response and asynchronous message has a unique command code. The response to a message will contain the same command code as the request in its UVSOCK_CMD_RESPONSE structure.

The UV_OPERATION enumerators define the UVSOCK command codes used in messages between the Client and uVision. Each message contains a header as specified in UV_HEADER, and may contain command-specific data.

Several messages have the same format, except the command code contained in the request header.

Enumerator
UV_NULL_CMD 

Not a command. A message containing this code should be ignored.

UV_GEN_GET_VERSION 

Get the UVSOCK interface version number

  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content:
    Data Type Width (bytes) Description
    Value Type unsigned integer 4 (32 bits) Type of value:
    4:int
    Value signed integer
    unsigned integer
    floating point
    8 Version
UV_GEN_UI_UNLOCK 

Enable message boxes and user input in uVision

  • Enable message boxes / user input to uVision.
  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_UI_LOCK 

Disable message boxes and user input in uVision

  • Disable message boxes / user input to uVision.
  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_HIDE 

Completely hide the uVision window

  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_SHOW 

Show the uVision window (bringing it to the front if it is behind other windows)

  • Show the uVision window.
  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_RESTORE 

Restore the uVision window

  • Restore the uVision window.
  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_MINIMIZE 

Minimise the uVision window

  • Minimize the uVision window.
  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_MAXIMIZE 

Maximise the uVision window

  • Maximize the uVision window.
  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_EXIT 

Exit uVision

  • Close uVision.
  • Precondition
    None.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_GEN_GET_EXTVERSION 

Get extended version number information for uVision (in ASCII format)

UV_GEN_CHECK_LICENSE 

Check toolchain licensing

UV_GEN_CPLX_COMPLETE 

Complex command has completed

UV_GEN_SET_OPTIONS 

Sets UVSOCK options

UV_PRJ_LOAD 

Load a uVision project

  • Load a project into uVision. This will close and save the currently open project.
  • Precondition
    uVision is not in debugging mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Reserved Reserved 4 (32 bits) Reserved(0)
    Reserved Reserved 4 (32 bits) Reserved(0)
    Project Name NULL terminated string <= SOCK_NDATA -8 Name of the Project to load
    - Response Content: No Data
UV_PRJ_CLOSE 

Close the currently loaded uVision project

  • Close a uVision project. This will automatically close any currently open project.
  • Precondition
    uVision is not in debugging mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_PRJ_ADD_GROUP 

Add one or more groups to the current project

UV_PRJ_DEL_GROUP 

Remove one or more groups from the current project

  • Remove a Project Group from a project in uVision. A Project Group is a selection of files that are built with specific settings. The settings are inherited from the project configuration, and can be overrridden within the group.
  • Precondition
    uVision is not in debugging mode, a project is loaded, the specified group exists within the project.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Reserved Reserved 4 (32 bits) Reserved(0)
    Reserved Reserved 4 (32 bits) Reserved(0)
    Project GroupNULL terminated string <= SOCK_NDATA -8 Name of the Project group to delete
    - Response Content: No Data
UV_PRJ_ADD_FILE 

Add one or more files to a group in the current project

UV_PRJ_DEL_FILE 

Remove one or more files from a group in the current project

UV_PRJ_BUILD 

Build the current project

UV_PRJ_REBUILD 

Rebuild the current project

UV_PRJ_CLEAN 

Clean current project

UV_PRJ_BUILD_CANCEL 

Stop a currently progressing build / rebuild

UV_PRJ_FLASH_DOWNLOAD 

Download the built binary to flash

  • Download the current projects executable to target Flash.
  • Precondition
    uVision is not in debugging mode, a project is loaded and was built successfully.
  • Asynchronous Responses: UV_ASYNC_MSG [UV_PRJ_FLASH_DOWNLOAD]
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_PRJ_GET_DEBUG_TARGET 

Get the currently configured debug target

UV_PRJ_SET_DEBUG_TARGET 

Set the currently configured debug target

UV_PRJ_GET_OPTITEM 

Get an option item for the current project, see OPTSEL

UV_PRJ_SET_OPTITEM 

Set an option item for the current project, see OPTSEL

UV_PRJ_ENUM_GROUPS 

Enumerate the groups of the current project

UV_PRJ_ENUM_FILES 

Enumerate the files of a given group in the current project

UV_PRJ_CMD_PROGRESS 

Control the uVision UI progress bar

  • Test the uVision progress bar.
  • Precondition
    None
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_PRJ_ACTIVE_FILES 

Get number of active files for the current project (i.e. how many files would be built on a rebuild)

UV_PRJ_FLASH_ERASE 

Erase flash device

UV_PRJ_GET_OUTPUTNAME 

Get the executable/library output object name for the current project

UV_PRJ_ENUM_TARGETS 

Enumerate the targets of the current project

UV_PRJ_SET_TARGET 

Set a target active

UV_PRJ_GET_CUR_TARGET 

returns a string containing the current active target

UV_PRJ_SET_OUTPUTNAME 

Set a target name

UV_DBG_ENTER 

Start the debugger

  • Enter debugging mode.
  • Precondition
    uVision is not in debugging mode, a project is loaded, and the executable was built successfully.
  • Asynchronous Responses:
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_DBG_EXIT 

Stop the debugger

UV_DBG_START_EXECUTION 

Start target execution

UV_DBG_RUN_TO_ADDRESS 

Start target execution and run to specified address

UV_DBG_STOP_EXECUTION 

Stop target execution

UV_DBG_STATUS 

Check if the target / simulation is running

  • Check if a program is executing or not.
  • Precondition
    uVision is in debugging mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content:
    Data Type Width (bytes) Description
    Result Code unsigned integer 4 (32 bits) Running status indication:
    1: Target running
    2: Target not running
UV_DBG_RESET 

Reset the target / simulation

UV_DBG_STEP_HLL 

Step one line over HLL code(High Level Language code, eg C)

UV_DBG_STEP_HLL_N 

Step N lines over HLL code(High Level Language code, eg C)

UV_DBG_STEP_INTO 

Step into HLL code(High Level Language code, eg C)

UV_DBG_STEP_INTO_N 

Perform N steps into HLL code(High Level Language code, eg C)

UV_DBG_STEP_INSTRUCTION 

Step one ASM Instruction

UV_DBG_STEP_INSTRUCTION_N 

Step N ASM Instruction

UV_DBG_STEP_OUT 

Step out of the current function

UV_DBG_CALC_EXPRESSION 

Calculate the value of an expression

  • Calculate an expression. The expression has the same format as expressions that can be entered in the uVision Command Window.
  • Precondition
    uVision is in debugging mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Expression | NULL terminated string <= SOCK_NDATA | Expression to calculate
  • Response Content:
    Data Type Width (bytes) Description
    Value Type unsigned integer 4 (32 bits) Variant Type
    Value signed integer/unsigned integer/floating point 8 Variant Type
UV_DBG_MEM_READ 

Read memory

  • Read target memory.
  • Precondition
    uVision is in debugging mode. To read memory from a physical target while executing, it is necessary that the Real-Time Agent is present on the target. It is not required for simulator mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Address unsigned integer 4 (32 bits) Address from which to read
    Data Length unsigned integer 4 (32 bits) Length to read in bytes (maximum length of (SOCK_NDATA - 16) bytes)
  • Response Content:
    Data Type Width (bytes) Description
    Address unsigned integer 4 (32 bits) Address to which data has been written
    Data Length unsigned integer 4 (32 bits) Length to read in bytes (maximum length of (SOCK_NDATA - 16) bytes)
    Error Addressunsigned integer 4 (32 bits) If Error Flag is set, then this is the address that caused the error
    Error Flag unsigned integer 4 (32 bits) Set if a read error occurred
    Data bytes Data Length bytes Data read from memory
UV_DBG_MEM_WRITE 

Write memory

  • Write target memory.
  • Precondition
    uVision is in debugging mode. To write memory to a physical target while executing, it is necessary that the Real-Time Agent is present on the target. It is not required for simulator mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Address unsigned integer 4 (32 bits) Address from which to read
    Data Length unsigned integer 4 (32 bits) Length to read in bytes (maximum length of (SOCK_NDATA - 16) bytes)
    Error Addressunsigned integer 4 (32 bits) Always 0
    Error Flag unsigned integer 4 (32 bits) Always 0
    Data bytes Data Length bytes Data to write to memory
  • Response Content:
    Data Type Width (bytes) Description
    Address unsigned integer 4 (32 bits) Address to which data has been written
    Data Length unsigned integer 4 (32 bits) Length to read in bytes (maximum length of (SOCK_NDATA - 16) bytes)
    Error Addressunsigned integer 4 (32 bits) If Error Flag is set, then this is the address that caused the error
    Error Flag unsigned integer 4 (32 bits) Set if a write error occurred
UV_DBG_TIME_INFO 

Get the current simulation cycles and time-stamp (NOTE: This information is also available in every UVSOCK message) [SIMULATOR ONLY]

  • Get timing information from the target. Specifically how many MCU cycles, and how many seconds, have passed since the program started execution.
  • Precondition
    uVision is in debugging mode. This feature is only available in simulator mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header only (No Data)
  • Response Content:
    Data Type Width (bytes) Description
    Cycle Count unsigned integer 8 (64 bits) Number of MCU cycles since program execution started
    Timestamp floating point 8 (32 bits) Time in seconds since program execution started
UV_DBG_SET_CALLBACK 

Set a time-interval for callback [SIMULATOR ONLY]

UV_DBG_VTR_GET 

Read a Virtual Register (VTR) value

  • Retrieve the value of a Virtual Register (VTR).
  • Precondition
    uVision is in debugging mode. This feature is only available in simulator mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    VTR NULL terminated string <= SOCK_NDATA Name of VTR to read
  • Response Content:
    Data Type Width (bytes) Description
    Value Type unsigned integer 4 (32 bits) Variant Type
    Value signed integer/unsigned integer/floating point 8 Variant Type
UV_DBG_VTR_SET 

Write a Virtual Register (VTR) value

  • Set the value of a Virtual Register (VTR).
  • Precondition
    uVision is in debugging mode. This feature is only available in simulator mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    VTR NULL terminated string <= SOCK_NDATA Name of VTR to read
  • Response Content: No Data.
UV_DBG_SERIAL_GET 

DEPRECATED use DBG_SERIAL_OUTPUT response. Read serial output from a uVision serial window

  • DEPRECATED - use UV_DBG_SERIAL_OUTPUT
  • Retrieve serial data from a serial interface or debug interface on the (simulated) target.
    • Simulation: This operation can be used for all simulated UARTs as well as simulated debug interfaces. For Cortex-M devices, this operation can receive data from the Debug (printf) Viewer window via simulated ITM channel 0. For ARM7/9 devices, this operation can receive data from the Real-Time Agent Terminal window via simulated DCC channel.
    • Target debugging: No UART channel is supported, only debug interfaces (Channel=3). For Cortex-M devices, this operation receives data from the Debug (printf) Viewer window, which uses ITM channel 0 to communicate with the target. For ARM7/9 devices, this operation receives data from the Real-Time Agent Terminal window, which uses the DCC channel to communicate with the target.
  • Precondition
    uVision is in debugging mode.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Channel unsigned integer 2 (16 bits) Channel from which to get data
  • Response Content:
    Data Type Width (bytes) Description
    Channel unsigned integer 2 (16 bits) Channel from which the data came:
    0: UART 1
    1: UART 2
    2: UART 3
    3: Real-Time Agent Terminal or Debug (printf) Viewer on ITM channel 0
    Item Mode unsigned integer 2 (16 bits) Width of the data:
    0: 8 bits
    1: 16 bits
    Data Length unsigned integer 4 (32 bits) Length of data in bytes (maximum length of (SOCK_NDATA - 8) bytes)
    Data 8-bit or 16-bit characters Data Length Serial data output from the channel.
UV_DBG_SERIAL_PUT 

Write serial output to a uVision serial window

  • Send data to a serial interface or debug interface on the (simulated) target.
    • Simulation: This operation can be used for all simulated UARTs as well as simulated debug interfaces. Due to restrictions in the simulator, only one character can be transmitted with every function call (parameter Data Length = 1). For Cortex-M devices, this operation can send data to the Debug (printf) Viewer window via simulated ITM channel 0. For ARM7/9 devices, this operation can send data to the Real-Time Agent Terminal window via simulated DCC channel.
    • Target debugging: No UART channel is supported, only debug interfaces (Channel=3). For Cortex-M devices, this operation sends data to the Debug (printf) Viewer window, which uses ITM channel 0 to communicate with the target. For ARM7/9 devices, this operation sends data to the Real-Time Agent Terminal window, which uses the DCC channel to communicate with the target.
  • Precondition
    uVision is in debugging mode, and the program is executing.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Channel unsigned integer 2 (16 bits) Channel to which to send the data:
    0: UART 1
    1: UART 2
    2: UART 3
    3: Real-Time Agent Terminal or Debug (printf) Viewer on ITM channel 0
    Item Mode unsigned integer 2 (16 bits) Width of the data:
    0: 8 bits
    1: 16 bits
    Data Length unsigned integer 4 (32 bits)
    1 (for Simulator)
    Length of data in bytes (maximum length of (SOCK_NDATA - 8) bytes). 1 byte when using the Simulator.
    Data 8-bit or 16-bit characters Data Length Serial data to input to the channel. Only one character is allowed when using the Simulator.
  • Response Content: No Data
UV_DBG_VERIFY_CODE 

Verify the code in flash against built binary

  • Verify object code in the target FLASH against the current object code build.
  • Precondition
    uVision is not in debugging mode, a project is loaded and an executable has been built successfully.
  • Asynchronous Responses: N/A
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_DBG_CREATE_BP 

Create a new breakpoint

  • Create a breakpoint.
  • Precondition
    uVision is in debugging mode, and the target is not executing. Cortex-M processor-based devices allow you to set or clear breakpoints while the targt is executing.
  • Asynchronous Responses: UV_ASYNC_MSG [UV_DBG_CHANGE_BP( UV_STATUS_BP_CREATED)]
  • Response Codes:
  • Request Format: Header Only (No Data)
  • Response Content: No Data
UV_DBG_ENUMERATE_BP 

Enumerate all currently defined breakpoints

UV_DBG_CHANGE_BP 

Enable, disable or delete an existing breakpoint

UV_DBG_ENUM_SYMTP 

Enumerate the struct members of a variable, i.e. the member size and packing

UV_DBG_ADR_TOFILELINE 

Map an address to code file & linenumber

UV_DBG_ENUM_STACK 

Enumerate the call stack

UV_DBG_ENUM_VTR 

Enumerate all virtual registers (VTRs)

UV_DBG_UNUSED 

Unused.

UV_DBG_ADR_SHOWCODE 

Show disassembly and/or HLL (High Level Language) file for an address

UV_DBG_WAKE 

Set sleep callback and/or wake up simulation [SIMULATOR ONLY]

UV_DBG_SLEEP 

Sleep the simulation [SIMULATOR ONLY]

UV_MSGBOX_MSG 

Notification of a UV message box

UV_DBG_EXEC_CMD 

Execute a command (as if via the command line)

UV_DBG_POWERSCALE_SHOWCODE 

Show disassembly / HLL and trace entry in uVision for timestamp

UV_DBG_POWERSCALE_SHOWPOWER 

Show power in PowerScale for timestamp

POWERSCALE_OPEN 

Register PowerScale device.

UV_DBG_EVAL_EXPRESSION_TO_STR 

Evaluate expression and return result as string

What is the difference to UV_DBG_CALC_EXPRESSION

UV_DBG_FILELINE_TO_ADR 

Map a file & line number to an address

UV_DBG_ENUM_REGISTER_GROUPS 

Enumerate register groups

UV_DBG_ENUM_REGISTERS 

Evaluate registers

UV_DBG_READ_REGISTERS 

Get register values

UV_DBG_REGISTER_SET 

Set register value

UV_DBG_DSM_READ 

Read disassembly block

UV_DBG_EVAL_WATCH_EXPRESSION 

Add watch expression / evaluate existing Extended stack mode only

UV_DBG_REMOVE_WATCH_EXPRESSION 

Remove watch expression Extended stack mode only

UV_DBG_ENUM_VARIABLES 

Get variables for given stack frame, globals or struct/array members of a variable/watch Extended stack mode only

UV_DBG_VARIABLE_SET 

Set variable value Extended stack mode only

UV_DBG_ENUM_TASKS 

Enumerate task list - in non - Rtx case returns main thread Extended stack mode only

UV_DBG_ENUM_MENUS 

Enumerate available dynaic menus and peripheral dialogs

UV_DBG_MENU_EXEC 

Execute menu entry (for example to show view or or peripheral dialog)

UV_DBG_ITM_REGISTER 

Book ITM Channel (0..31) to receive the data sent to this channels

  • Register an ITM channel for retrieving data. After registration, asynchronous UV_DBG_ITM_OUTPUT messages are sent as soon as data are awaylable for this channel. Unregister channels with UV_DBG_ITM_UNREGISTER.
  • Precondition
    uVision is in debugging mode.
  • Asynchronous Responses: UV_DBG_ITM_OUTPUT
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Channel unsigned integer 2 (16 bits) ITM channel from which to get data
  • Response Content:
    Data Type Width (bytes) Description
    Channel unsigned integer 2 (16 bits) Registered ITM channel
    Item Mode unsigned integer 2 (16 bits) Width of the data: 0 — 8 bits
    Data Length unsigned integer 4 (32 bits) Always 0
    Data 8-bit characters Data Length N/A
UV_DBG_ITM_UNREGISTER 

Unbook ITM Channel (0..31) to not receive the data sent to this channels anymore

  • Unregister an ITM channel. No data are sent on this channel any longer. Register channels with UV_DBG_ITM_REGISTER.
  • Precondition
    uVision is in debugging mode.
  • Asynchronous Responses: none
  • Response Codes:
  • Request Format:
    Data Type Width (bytes) Description
    Header UV_HEADER 32 Header with command code
    Channel unsigned integer 2 (16 bits) ITM channel to unregister
  • Response Content:
    Data Type Width (bytes) Description
    Channel unsigned integer 2 (16 bits) Unregistered ITM channel
    Item Mode unsigned integer 2 (16 bits) Width of the data: 0 — 8 bits
    Data Length unsigned integer 4 (32 bits) Always 0
    Data 8-bit characters Data Length N/A
UV_DBG_EVTR_REGISTER 

Register to receive the Event Recorder Data

UV_DBG_EVTR_UNREGISTER 

Unregister to not receive the data sent from Event Recorder anymore

UV_DBG_EVTR_GETSTATUS 

Status of Event Recorder

UV_DBG_EVTR_ENUMSCVDFILES 

Get SCVD files

UV_CMD_RESPONSE 

Response to a command from the client (the UVSOCK_CMD_RESPONSE structure will contain the command code to which this is a response)

UV_ASYNC_MSG 

Asynchronous message from uVision (the UVSOCK_CMD_RESPONSE structure will contain the relevant command code)

UV_PRJ_BUILD_COMPLETE 

Notification of build completion

  • uVision has completed a build.
  • In Response to: UV_PRJ_BUILD, UV_PRJ_REBUILD
  • Format details:
    Data Type Width (Bytes) Description
    Header UV_HEADER 32 Header with command code
    Build Status unsigned integer 4 (32 bits) Result of build:
    1: Build OK
    2: Build OK, with warnings
    3: Build failed with errors
    4: Build cancelled
UV_PRJ_BUILD_OUTPUT 

Notification of a line of build output

UV_DBG_CALLBACK 

Notification of expiration of the callback timeout set by UV_DBG_SET_CALLBACK

  • The time interval set for a time interval callback has elapsed.
  • In Response to: UV_DBG_SET_CALLBACK
  • Format details: Header only (no data)
UV_DBG_BP_ENUM_START 

Start of breakpoint enumeration (no breakpoint info)

  • Async format : no data
  • Start of enumeration (no breakpoint info).
  • In Response to: UV_DBG_ENUMERATE_BP
  • Format details: Header only (no data)  
UV_DBG_BP_ENUMERATED 

Breakpoint enumeration; zero, one or more Response(s) with breakpoint info

  • Zero, one or more Response(s) with breakpoint info (BKRSP).
  • In Response to: UV_DBG_ENUMERATE_BP
  • Format details:
    Data Type Width (Bytes) Description
    Header UV_HEADER 32 Header with command code
UV_DBG_BP_ENUM_END 

End of breakpoint enumeration (no breakpoint info)

  • Async format : no data
  • End of enumeration (no breakpoint info).
  • In Response to: UV_DBG_ENUMERATE_BP
  • Format details: Header only (no data)
UV_PRJ_ENUM_GROUPS_START 

Start of group enumeration

  • Async format : no data
  • Start of group enumeration.
  • In Response to: UV_PRJ_ENUM_GROUPS
  • Format details: Header only (no data)
UV_PRJ_ENUM_GROUPS_ENU 

Group enumeration; zero, one or more Responses with group name

  • Zero, one or more Responses with group name (SSTR).
  • In Response to: UV_PRJ_ENUM_GROUPS
  • Format details:
    Data Type Width (Bytes) Description
    Header UV_HEADER 32 Header with command code
UV_PRJ_ENUM_GROUPS_END 

End of group enumeration

  • Async format : no data
  • End of group enumeration.
  • In Response to: UV_PRJ_ENUM_GROUPS
  • Format details: Header only (no data)
UV_PRJ_ENUM_FILES_START 

Start of files enumeration

  • Async format : no data
  • Start of files enumeration.
  • In Response to: UV_PRJ_ENUM_FILES
  • Format details: Header only (no data)
UV_PRJ_ENUM_FILES_ENU 

File enumeration; zero, one or more Response(s) with file name

  • Zero, one or more Response(s) with file name (SSTR).
  • In Response to: UV_PRJ_ENUM_FILES
  • Format details:
    Data Type Width (Bytes) Description
    Header UV_HEADER 32 Header with command code
UV_PRJ_ENUM_FILES_END 

End of files enumeration

  • Async format : no data
  • End of files enumeration.
  • In Response to: UV_PRJ_ENUM_FILES
  • Format details: Header only (no data)
UV_PRJ_PBAR_INIT 

Notification of progress bar initialisation

UV_PRJ_PBAR_STOP 

Notification of progress bar stopping

UV_PRJ_PBAR_SET 

Notification of progress bar position change

UV_PRJ_PBAR_TEXT 

Notification of progress bar text change

UV_DBG_ENUM_SYMTP_START 

Start of structure member enumeration

  • Async format : no data
UV_DBG_ENUM_SYMTP_ENU 

Structure member enumeration; zero, one or more Responses with member information

UV_DBG_ENUM_SYMTP_END 

End of structure member enumeration

  • Async format : no data
UV_DBG_ENUM_STACK_START 

Start of stack enumeration

  • Async format : no data
UV_DBG_ENUM_STACK_ENU 

Stack enumeration; one or more Response(s) with stack frame information

UV_DBG_ENUM_STACK_END 

End of stack enumeration

  • Async format : no data
UV_DBG_ENUM_VTR_START 

Start of vtr enumeration

  • Async format : no data
UV_DBG_ENUM_VTR_ENU 

Vtr enumeration; one or more Response(s) of structure

UV_DBG_ENUM_VTR_END 

End of vtr enumeration

  • Async format : no data
UV_DBG_CMD_OUTPUT 

Notification of a line of command window output

  • Async format : SSTR
UV_DBG_SERIAL_OUTPUT 

Notification of a serial output (debug or UART 1, 2 or 3)

UV_PRJ_ENUM_TARGETS_START 

Start of targets enumeration

  • Async format : no data
UV_PRJ_ENUM_TARGETS_ENU 

targets enumeration; zero, one or more Responses with group name

UV_PRJ_ENUM_TARGETS_END 

End of targets enumeration

  • Async format : no data
UV_DBG_ENUM_REGISTER_GROUPS_START 

Start of register group enumeration

  • Async format : no data
UV_DBG_ENUM_REGISTER_GROUPS_ENU 

register group enumeration; one or more Response(s) of structure

UV_DBG_ENUM_REGISTER_GROUPS_END 

End of register group enumeration

  • Async format : no data
UV_DBG_ENUM_REGISTERS_START 

Start of register enumeration

  • Async format : no data
UV_DBG_ENUM_REGISTERS_ENU 

register enumeration; one or more Response(s) of structure

UV_DBG_ENUM_REGISTERS_END 

End of register enumeration

  • Async format : no data
UV_DBG_ITM_OUTPUT 

Notification of an ITM data output (Channel 0..31)

  • Asynchronous response message for registered ITM channels (UV_DBG_ITM_REGISTER). The response is sent as soon as data are awaylable for a registered channel.
  • Precondition
    uVision is in debugging mode.
  • Response Content:
    Data Type Width (bytes) Description
    Channel unsigned integer 2 (16 bits) ITM channel number
    Item Mode unsigned integer 2 (16 bits) Width of the data: 0 — 8 bits
    Data Length unsigned integer 4 (32 bits) 1 Byte to 16 KB
    Data 8-bit Data Length Data
UV_DBG_ENUM_VARIABLES_START 

Start of variable enumeration

  • Async format : no data
UV_DBG_ENUM_VARIABLES_ENU 

variable enumeration; one or more Response(s) of structure

UV_DBG_ENUM_VARIABLES_END 

End of variable enumeration

  • Async format : no data
UV_DBG_ENUM_TASKS_START 

Start of task list enumeration

  • Async format : no data
UV_DBG_ENUM_TASKS_ENU 

Task list enumeration; one or more Response(s) with stack frame information

UV_DBG_ENUM_TASKS_END 

End of task list enumeration

  • Async format : no data
UV_DBG_ENUM_MENUS_START 

Start of available view enumeration

  • Async format : no data
UV_DBG_ENUM_MENUS_ENU 

View list enumeration; one or more Response(s) with view item information

UV_DBG_ENUM_MENUS_END 

End of task list enumeration

  • Async format : no data
UV_DBG_EVTR_OUTPUT 

Notification of Event Recorder Data

UV_DBG_EVTR_ENUMSCVDFILES_START 

Start of available view enumeration

  • Async format : no data
UV_DBG_EVTR_ENUMSCVDFILES_ENU 

View list enumeration; one or more Response(s) with view item information

UV_DBG_EVTR_ENUMSCVDFILES_END 

End of task list enumeration

  • Async format : no data
UV_RTA_MESSAGE 

Notification of a Real-Time Agent message from the target

  • A Real-Time Agent message that is routed to the Client.
  • In Response to: This message is completely asynchronous, but will only occur when the target is running a program that contains the Real-Time Agent.
  • Format details:
    Data Type Width (Bytes) Description
    Header UV_HEADER 32 Header with command code
    Data Length unsigned integer 4 (32 bits) Length of Data (maximum length of (SOCK_NDATA - 8) bytes)
    Route unsigned integer 4 (32 bits) Bit mask of routes on which this data has been sent:
    Bit 0: INT (internal route)
    Bit 1: TCP/IP (UVSOCK)
    Bit 2: RTX (internal route)
    Bit 3: UV3 (internal route)
    Data Real-Time Agent Message Data Length One line of build output
UV_RTA_INCOMPATIBLE 

Notification of an incompatible Real-Time Agent in the current target

  • Sent when the RTA version in target is incompatible with uVision, shorty after debug mode is entered.
  • In Response to: This message is completely asynchronous, but will only occur when the target is running a program that contains the Real-Time Agent.
  • Format details: Header only (no data)
UV_TST_1 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_2 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_3 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_4 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_5 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_6 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_7 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_8 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_9 

UV_TST_1 to UV_TST_10 for testing.

UV_TST_10 

UV_TST_1 to UV_TST_10 for testing.