This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320C6678: How can I move *.lib file position without Linker?

Part Number: TMS320C6678


Tool/software: Code Composer Studio

Hi~ I have a some question.

When I build my project,  I use some .lib files.

*.lib files are basically located in Cache Memory.

My team was moved *.lib files position to DDR using a Linker.

Under chart is Linker example.

SECTIONS

{

Test:

{

"../../Source/A.lib" (.const)

"../../Source/A.lib" (.far)

} > DDR

}

But I made a new build system.

In new build system *.lib relative path is different from original.

You can check new position in below chart.

SECTIONS

{

Test:

{

"../Source/A.lib" (.const)

"../Source/A.lib" (.far)

} > DDR

}

Two system's *.lib files relative path is different, but It must use same Linker..

How can I change my Linker to use both build system?

'#pragma DATA_SECTION' is just move variable or structure.. Is there any way to move *.lib file's located position in code level?

  • The solution calls for making two changes.  

    One ... In the linker command file, adopt the syntax seen in the section titled Specifying Library or Archive Members as Input to Output Sections from the C6000 Assembly Tools Manual.  

    Test:
    {
        --library=A.lib (.const)
        --library=A.lib (.far)
    } > DDR

    Two ... On the command line, use the option --include_path=full path here to tell the linker where to find A.lib.  Since it is on the command line, it easy to change as needed.

    Thanks and regards,

    -George

  • Thank you for your help!
    I used firth method. But It couldn't find library position..
    As you said I see the 'C6000 Assembly Tools Manual'.
    I found new linker option '--search_path'.
    If I use this option & you teached to me option, I can solve this problem!

    In my Thinking, completed code is same below.
    Test:
    {
    --search_path=../../Source
    --search_path=../Source
    --library=A.lib (.const)
    --library=A.lib (.far)
    }

    Before do that, I made test code.
    Test:
    {
    --search_path=../../Source
    --library=A.lib (.const)
    --library=A.lib (.far)
    }
    But It have a compile error. It occured in linker's --search_path option. error message is 3 line.
    line 71: error: -l must specify a filename
    line 71: fatal error: cannot open file
    "../../Source": Permission denied

    How can I solve this ploblem?
    When I used below code, It work so good!
    Test:
    {
    --library=../../Source/A.lib (.const)
    --library=../../Source/A.lib (.far)
    }

  • I answered this question in the other thread you started.

    Thanks and regards,

    -George