Search code examples
macrosiarspy

In IAR embedded workbench spy macro, is there have variable of breakpoint's function name?


When I use message with macro script like below:

__message "cctimer = ", #CCTIMER1

I would like to display the function name which use with breakpoint. Is there variable like c, __function__ which could I use in marco script!

(At the current stage, I pass the function name through the expression.)

Using C-SPY macros of IAR


Solution

  • Unfortunately the only way for a C-SPY macro to know the name of the function the calling breakpoint is set in is by having it passed through the expression. There is no built in variable that contains the function name nor is there any way to inspect the call stack from within a macro.