|
|||||||||||
Technical Support On-Line Manuals µVision User's Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
User FunctionsUser Functions are created by the developer and can be used for debugging within the µVision Debugger. Create user functions directly in the Command window or with the function editor. Refer to Creating Functions for details. System Variables can be used in user functions. User functions begin with the keyword FUNC and are defined as follows: FUNC return_type fname (parameter_list) { statements } Where
ExampleThe following user function displays the contents of several CPU registers. FUNC void MyRegs (void) { printf ("---------- MyRegs() ----------\n"); printf (" R4 R8 R9 R10 R11 R12\n"); printf (" %04X %04X %04X %04X %04X %04X\n", R4, R8, R9, R10, R11, R12); printf ("------------------------------\n"); } Invoke the function by typing the function name into the Command window. MyRegs() The function output could be: ---------- MyRegs() ---------- R4 R8 R9 R10 R11 R12 B02C 8000 0001 0000 0000 0000 ------------------------------ As an alternative, define a Toolbox button to invoke the user function: DEFINE BUTTON "My Registers", "MyRegs()" Restrictions
| ||||||||||
|
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.