Keil Logo

Differences Between µVision3 and C

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

  • µVision3 does not differentiate between uppercase and lowercase. The names of objects and control statements may be written in either uppercase or lowercase.
  • µVision3 has no preprocessor. Preprocessor directives like #define, #include, and #ifdef are not supported.
  • µVision3 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 µVision3, variables may not be initialized when they are declared. Explicit assignment statements must be used to initialize variables.
  • µVision3 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.
  • µVision3 functions may only return scalar variable types. Pointers and structures may not be returned.
  • µVision3 functions cannot be called recursively. During function execution, µVision3 recognizes recursive calls and aborts function execution if one is detected.
  • µVision3 functions may only be invoked directly using the function name. Indirect function calls via pointers are not supported.
  • µVision3 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 */
{
  /* ... */
}
  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.