|
|||||||||||
Technical Support On-Line Manuals µVision3 User's Guide µVision3 Overview User Interface Creating Applications Utilities Debugging Debug Commands Debug Functions Creating Functions Invoking Functions Predefined Functions __acos __asin __atan __cos __exp __log __log10 __sin __sqrt __tan _RBYTE _RDOUBLE _RDWORD _RFLOAT _RWORD _sleep_ _TaskRunning_ _WBYTE _WDOUBLE _WDWORD _WFLOAT _WWORD exec execf (Cortex-M) F32ToRawF16 F32ToRawF32 F64ToRawF64 getdbl getint getlong memset printf rand RawF16ToF32 RawF32ToF32 RawF64ToF64 rwatch swatch twatch wwatch User Functions Signal Functions Differences Between µVision3 and C Differences Between µVision3 and dScope Simulation Flash Programming Dialogs Example Programs Command Line Appendix |
User FunctionsUser functions are functions you create to use with the µVision3 debugger. You may enter user functions directly in the function editor or you may use the INCLUDE command to load a file that contains one or more user functions. Note
User functions begin with FUNC keyword and are defined as follows: FUNC return_type fname (parameter_list) { statements }
ExampleThe following user function displays the contents of several CPU registers. For more information refer to Creating Functions. 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"); } To invoke this function, type the following in the command window. MyRegs() When invoked, the MyRegs function displays the contents of the registers and appears similar to the following: ---------- MyRegs() ---------- R4 R8 R9 R10 R11 R12 B02C 8000 0001 0000 0000 0000 ------------------------------ You may define a toolbox button to invoke the user function with: 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.