Keil Logo

FUNC

The command FUNC defines ANSI-style C-like functions for being used during a debugging session. Though this command can be entered in the Command window, it is better suited for enhancing debugging using scripts.

The general syntax form is:

Syntax Description
FUNC f_name ( args[] ) { f_body } Creates a function for that debugging session. RESET commands have no impact.

 

f_name Is the function name. Refer to Debug Functions for details about creating and using functions.
args[] List of parameters. Parameters must be separated by commas and must have an type identifier. Can be left void.
f_body The function body must comply to ANSI-C standards. Refer to Differences Between µVision and C functions.

Examples

// define
FUNC add(int a, int b)  { return (a+b); }


// call
add(10,6)
  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.