UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

的页面

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?

解决方案

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
日期 12/15/2012
状态 Active
Type 综合文章