Keil Logo Arm Logo

µVision4 User's Guide

Differences Between µVision4 and C

There are a number of differences between ANSI C and the subset of features support in µVision4 debug user and signal functions.

  • µVision4 does not differentiate between uppercase and lowercase. The names of objects and control statements may be written in either uppercase or lowercase.
  • µVision4 has no preprocessor. Preprocessor directives like #define, #include, and #ifdef are not supported.
  • µVision4 does not support global declarations. Scalar variables must be declared within a function definition. You may define symbols with the DEFINE command and use them like you would use a global variable.
  • In µVision4, variables may not be initialized when they are declared. Explicit assignment statements must be used to initialize variables.
  • µVision4 functions only support scalar variable types. Structures, arrays, and pointers are not allowed. This applies to the function return type as well as the function parameters.
  • µVision4 functions may only return scalar variable types. Pointers and structures may not be returned.
  • µVision4 functions cannot be called recursively. During function execution, µVision4 recognizes recursive calls and aborts function execution if one is detected.
  • µVision4 functions may only be invoked directly using the function name. Indirect function calls via pointers are not supported.
  • µVision4 supports only the ANSI style for function declarations with a parameter list. The old K&R format is not supported. For example, the following ANSI style function is acceptable.
func test (int pa1, int pa2)  {    /* ANSI type, correct */
  /* ...  */
}

The following K&R style function is not acceptable.

func test (pa1, pa2)                     /* Old K&R style is */
int pa1, pa2;                               /* not supported */
{
  /* ... */
}

Keil logo

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.