Keil Logo

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.

Return Name Parameter Description
void exec ("command_string") Execute Debug Command
double getdbl ("prompt_string") Ask the user for a double number
int getint ("prompt_string") Ask the user for a int number
long getlong ("prompt_string") Ask the user for a long number
void memset (start_addr, value, len) Fill memory with constant value
void printf ("string", ...) Works like the ANSI C printf function
int rand (int seed) Return a random number in the range 0 to 32767
void rwatch (ulong address) Delay execution of signal function until read access to address
void swatch (float seconds) Delay execution of signal function for specified time
void twatch (ulong states) Delay execution of signal function for specified number of CPU states
void wwatch (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
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.