Article Move library/object to specific memory Audit

Question :
How to move particular object/library file to desired memory location? Is there any example project to demonstrate this requirement?

Answer:
To move a particular object file from library file, we can edit the LDF file to instruct the linker to allocate the library object to a designated memory section. For instance, to assign the object "testlib.doj" from the library "testlib.dlb" to the L2 memory "mem_L2_bw", we just need to include the specified line in the suitable section of the LDF.
INPUT_SECTIONS( testlib.dlb [ xxxx.doj (seg_swco) ] )

To move the whole library "testlib.dlb"(including all .doj files), we can use the below
INPUT_SECTIONS( testlib.dlb (seg_swco) )

Ensure specified format above, as the spacing of the brackets is crucial. All adjustments to a System-Builder Generated LDF must be confined to the $VDSG sections clearly indicated in the LDF. Subsequently, the LDF, with the included INPUT_SECTIONS command, should appear as below:

For example,
PROCESSOR 21569_CORE0_SHARC0
{
...
SECTIONS
{
/*$VDSG<insert-new-sections-for-sdram> */
seg_l2lib_data SW
{
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS( testlib.dlb (seg_swco) )
...
} > mem_L2_bw
/*$VDSG<insert-new-sections-for-sdram> */
...
}

Please refer the attached project for reference and refer app.ldf (modified in line 240-249).

Here, “testlib.zip” is the library file project whereas “MoveLibtoL2.zip” is the project uses that library and demonstrate how to move the library/object to L2 memory.

It is necessary to identify the function and/or objects that require mapping to the designated memory section and then manually include these entries.

testlib.zip

MoveLibtoL2.zip

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.