Main

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

AR# 16547

Search For Another Answer

Topic EDK GUI
Last Updated 12/21/2009
Status Active
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).

 
 
/csi/footer.htm