How to validate that a function is executing from RAM?
Wow, OK, thanks for clarifying where RAM starts on this device, Chris Stratton.

It looks like I finally proved that it can work on a more isolated project.

Control experiment:

f1 address = 0x0x8003161
f2 address = 0x0x8003179


After qualifying the function signature:

__attribute__ ((section (".ramfunc"))) void f1(void) {
...
}


I get log line:

f1 address = 0x0x200009b9
f2 address = 0x0x8003161


Note that this required adding the .ramfunc line to the linker script:

/* Initialized data sections goes into RAM, load LMA copy after code */
  .data : 
  {
    . = ALIGN(4);
    _sdata = .;        /* create a global symbol at data start */
    *(.data)           /* .data sections */
    *(.data*)          /* .data* sections */
    *(.ramfunc)        /* .ramfunc sections */
    . = ALIGN(4);
    _edata = .;        /* define a global symbol at data end */
  } &gt;RAM AT&gt; FLASH


To directly answer the original question, yes, you should be able to print the address of the function and see that it is in a different region OR check the .map file OR use the debugger to check this address.