µVision User's Guide

legacy

Predefined Functions

µVision3 includes a number of predefined debug functions that are always available for use. They cannot be redefined or deleted. Predefined functions are provided to assist the user and signal functions you create.

The following table lists all predefined µVision3 debug functions.

ReturnNameParameterDescription
voidexec("command_string")Execute Debug Command
doublegetdbl("prompt_string")Ask the user for a double number
intgetint("prompt_string")Ask the user for a int number
longgetlong("prompt_string")Ask the user for a long number
voidmemset(start_addr, value, len)Fill memory with constant value
voidprintf("string", ...)Works like the ANSI C printf function
intrand(int seed)Return a random number in the range 0 to 32767
voidrwatch(ulong address)Delay execution of signal function until read access to address
voidswatch(float seconds)Delay execution of signal function for specified time
voidtwatch(ulong states)Delay execution of signal function for specified number of CPU states
voidwwatch(ulong address)Delay execution of signal function until write access to address
uchar_RBYTE(address)Read char on specified memory address
uint_RWORD(address)Read short int on specified memory address
ulong_RDWORD(address)Read long on specified memory address
float_RFLOAT(address)Read float on specified memory address
double_RDOUBLE(address)Read double on specified memory address
int_TaskRunning_(ulong func_address)Checks if the specified task function is the current running task. Only available if a DLL for RTX Kernel Awareness is used.
double_sleep_(ulong milli_seconds)Delay script execution for a specified time
void_WBYTE(address, uchar val)Write char on specified memory address
void_WWORD(address, uint val)Write short int on specified memory address
void_WDWORD(address, ulong val)Write long on specified memory address
void_WFLOAT(address, float val)Write float on specified memory address
void_WDOUBLE(address, double val)Write double on specified memory address
double __acos (double x)Calculate arc cosine
double __asin (double x)Calculate arc sine
double __atan (double x)Calculate arc tangent
double __cos (double x)Calculate cosine
double __exp (double x)Calculate exponential function
double __log (double x)Calculate natural logarithm
double __log10(double x)Calculate common logarithm
double__sin(double x)Calculate sine
double__sqrt (double x)Calculate the square root
double__tan (double x)Calculate tangent