How do I assign a "C" function to a specific memory location?
In the C source file, include the following:
void myFunction(int myParameter) __attribute__ ((section (".function_section")));
void myFunction(int myParameter)
{
.. my code ..
}
In the linker script, include:
MEMORY {
FUNCTION : ....
....
}
.function_section : {*(.function_section) } > FUNCTION
This allows the function code to be placed in the memory defined by FUNCTION.
For additional information, see (Xilinx Answer 20068).