cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt function in RAM, how to?

jomedfree2
Associate II
Posted on February 08, 2010 at 13:34

Interrupt function in RAM, how to?

1 REPLY 1
the_noxx
Associate
Posted on May 17, 2011 at 10:00

Hi Joel,

you can place a function in RAM using

''void yourfunc(void)__attribute((section(''.data'')));'' as declaration of the function. With attribute section you can place functions to every section defined in your linker script file. More information on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.

Don't forget to add ''-mlong-calls'' to your gcc-options.