AR# 16547

|

11.1 EDK - Assigning "C" functions to a specific memory location

Description

How do I assign a "C" function to a specific memory location?

Solution

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).

AR# 16547
Date 12/15/2012
Status Active
Type General Article
People Also Viewed