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.

Get link error when attempt to located rts64plus.lib using link.cmd (CGT 7.0 & SYSBIOS 6.31)

Other Parts Discussed in Thread: SYSBIOS

With CGT 6.1 and DSP BIOS 5.4.x, I was able to specify the location in memory of rts64plus.lib (and others) using my link.cmd file:

.ti_lib {
  c64x_fixedpt_fxns.lib (.text)
  c64x_fixedpt_fxns.lib (.const)
  c64x_fixedpt_fxns.lib ($BRID)
  dsplib64plus.lib (.text)
  fastrts64x.lib (.text)
  rts64plus.lib (.text)  (line 86)
  rts64plus.lib (.const) (line 87)
  csl_c6486.lib (.text)
} > SL2RAM

With CGT 7.0.x and SYSBIOS 6.31.x I get a linker error and the *.out is not generated. However, the *.map does show the rts64plus.lib to be located where I asked (SL2RAM).

 

'Building target: mma_encoder_II.out'

'Invoking: Linker'

"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" -mv64+ -g --diag_warning=225 -z -m"mma_encoder_II.map" --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" -i"C:/Program Files/Texas Instruments/CSL/csl_c6486/lib" --reread_libs --rom_model -o "mma_encoder_II.out" "../lib/Fraunhofer/lib/CDK_mp2enc.lib" "../lib/Fraunhofer/lib/libAACenc.lib" "../lib/Fraunhofer/lib/libSBRenc.lib" "../lib/Fraunhofer/lib/libMpegTPEnc.lib" "../lib/TI/dsplib64plus.lib" "../lib/Fraunhofer/lib/libCDK.lib" "./lib/Fraunhofer/lib/genericStds.obj" "../lib/Dolby/lib/ddp_encode.lib" "../lib/Dolby/lib/ddp_common.lib" "../lib/TI/c64x_fixedpt_fxns.lib" "../lib/TI/fastrts64x.lib" -l"csl_c6486.lib" -l"./configPkg/linker.cmd" "../link.cmd" "./src/tonegen_table.obj" "./src/testtones.obj" "./src/streams.obj" "./src/srio_enc.obj" "./src/spin_unlock.obj" "./src/spin_lock.obj" "./src/shared_data_encoder.obj" "./src/rates.obj" "./src/pll.obj" "./src/passthru.obj" "./src/param_change.obj" "./src/pack.obj" "./src/metadata.obj" "./src/main.obj" "./src/hw_id.obj" "./src/hostport.obj" "./src/gpio.obj" "./src/globals.obj" "./src/format.obj" "./src/encode_task.obj" "./src/default_params.obj" "./src/bootentry.obj" "./src/alarm_manager.obj" "./src/TaskHooks.obj" "./src/Srio_Msg.obj" "./src/MPEG_calls.obj" "./src/AC3_calls.obj" "./src/AAC_calls.obj" -l"rts64plus.lib"

<Linking>

"../link.cmd", line 86: error: cannot find file "rts64plus.lib"

"../link.cmd", line 87: error: cannot find file "rts64plus.lib"

error: errors encountered during linking; "mma_encoder_II.out" not built

>> Compilation failure

gmake: *** [mma_encoder_II.out] Error 1

gmake: Target `all' not remade because of errors.

Build complete for project mma_encoder_II

 

What different with CGT 7.0/SYSBIOS 6.31 that this no longer works?

Thanks,

Calvin

 

  • Calvin,
    you may want to ask in the compiler forum for more details, but the order of the files on the command line seems to matter. Try putting your link.cmd at the very end. You can control the order in Project->Properties->CCS Build->Link Order

  • Sash,

    I do have it last in the link order. Sorry if I posted in the wrong area - its sometimes hard to tell what is a compiler issue and what is a BIOS issue.

     

    Thanks,

    Calvin

     

  • I created a test similar to your project, with the following content in link.cmd:
    SECTIONS {
        .ti_lib { rts64plus.lib(.text) } > IRAM
    }

     

    and this is what I am getting with link.cmd at the end, and link.cmd before rts64plus.lib:

    'Building target: Test64P.out'
    'Invoking: Linker'
    "E:/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/bin/cl6x" -mv64+ -g --diag_warning=225 --abi=coffabi -z -m"Test64P.map" --warn_sections -i"E:/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/lib" -i"E:/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/include" --reread_libs --rom_model -o "Test64P.out" -l"./configPkg/linker.cmd" "./stairstep.obj" -l"rts64plus.lib" "../link.cmd"
    <Linking>
    'Finished building target: Test64P.out'
    ' '
    Build complete for project Test64P

    --------------------------------------------------------------------------------------------------------------
    'Building target: Test64P.out'
    'Invoking: Linker'
    "E:/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/bin/cl6x" -mv64+ -g --diag_warning=225 --abi=coffabi -z -m"Test64P.map" --warn_sections -i"E:/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/lib" -i"E:/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/include" --reread_libs --rom_model -o "Test64P.out" -l"./configPkg/linker.cmd" "./stairstep.obj" "../link.cmd" -l"rts64plus.lib" 
    <Linking>
    "../link.cmd", line 2: error: cannot find file "rts64plus.lib"
    error: errors encountered during linking; "Test64P.out" not built

  • Sasha,

    Interesting! In my initial link order I did not include rts64plus.lib as I assumed it fell under "Generated files" category since in DSP BIOS it is linked via one of the auto generated link files. Now, using that same logic with CGT 7.0 rts64plus is linked in last.

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/bin/cl6x" -mv64+ -g --diag_warning=225 --abi=coffabi -z -m"mma_encoder_II.map" --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/include" -i"C:/Program Files/Texas Instruments/CSL/csl_c6486/lib" --reread_libs --rom_model -o "mma_encoder_II.out" "../lib/Fraunhofer/lib/CDK_mp2enc.lib" "../lib/Fraunhofer/lib/libAACenc.lib" "../lib/Fraunhofer/lib/libSBRenc.lib" "../lib/Fraunhofer/lib/libMpegTPEnc.lib" "../lib/TI/dsplib64plus.lib" "../lib/Fraunhofer/lib/libCDK.lib" "./lib/Fraunhofer/lib/genericStds.obj" "../lib/Dolby/lib/ddp_encode.lib" "../lib/Dolby/lib/ddp_common.lib" "../lib/TI/c64x_fixedpt_fxns.lib" "../lib/TI/fastrts64x.lib" -l"csl_c6486.lib" -l"./configPkg/linker.cmd" "../link.cmd" "./src/tonegen_table.obj" "./src/testtones.obj" "./src/streams.obj" "./src/srio_enc.obj" "./src/spin_unlock.obj" "./src/spin_lock.obj" "./src/shared_data_encoder.obj" "./src/rates.obj" "./src/pll.obj" "./src/passthru.obj" "./src/param_change.obj" "./src/pack.obj" "./src/metadata.obj" "./src/main.obj" "./src/hw_id.obj" "./src/hostport.obj" "./src/gpio.obj" "./src/globals.obj" "./src/format.obj" "./src/encode_task.obj" "./src/default_params.obj" "./src/bootentry.obj" "./src/alarm_manager.obj" "./src/TaskHooks.obj" "./src/Srio_Msg.obj" "./src/MPEG_calls.obj" "./src/AC3_calls.obj" "./src/AAC_calls.obj" -l"rts64plus.lib"

     

    If I add rts64plus.lib to the "Link Order" and list it before link.cmd the error goes away:

    'Building target: mma_encoder_II.out'

    'Invoking: Linker'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/bin/cl6x" -mv64+ -g --diag_warning=225 --abi=coffabi -z -m"mma_encoder_II.map" --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.2.2/include" -i"C:/Program Files/Texas Instruments/CSL/csl_c6486/lib" --reread_libs --rom_model -o "mma_encoder_II.out" "../lib/Fraunhofer/lib/CDK_mp2enc.lib" "../lib/Fraunhofer/lib/libAACenc.lib" "../lib/Fraunhofer/lib/libSBRenc.lib" "../lib/Fraunhofer/lib/libMpegTPEnc.lib" "../lib/TI/dsplib64plus.lib" "../lib/Fraunhofer/lib/libCDK.lib" "./lib/Fraunhofer/lib/genericStds.obj" "../lib/Dolby/lib/ddp_encode.lib" "../lib/Dolby/lib/ddp_common.lib" "../lib/TI/c64x_fixedpt_fxns.lib" "../lib/TI/fastrts64x.lib" -l"csl_c6486.lib" -l"./configPkg/linker.cmd" -l"rts64plus.lib" "../link.cmd" "./src/tonegen_table.obj" "./src/testtones.obj" "./src/streams.obj" "./src/srio_enc.obj" "./src/spin_unlock.obj" "./src/spin_lock.obj" "./src/shared_data_encoder.obj" "./src/rates.obj" "./src/pll.obj" "./src/passthru.obj" "./src/param_change.obj" "./src/pack.obj" "./src/metadata.obj" "./src/main.obj" "./src/hw_id.obj" "./src/hostport.obj" "./src/gpio.obj" "./src/globals.obj" "./src/format.obj" "./src/encode_task.obj" "./src/default_params.obj" "./src/bootentry.obj" "./src/alarm_manager.obj" "./src/TaskHooks.obj" "./src/Srio_Msg.obj" "./src/MPEG_calls.obj" "./src/AC3_calls.obj" "./src/AAC_calls.obj"

     

     

     So, something has changed, but I can get the results I am after by including rts64plus.lib in my link order list (and listing it before my link.cmd).

    Cool! Thanks for your help.

    Calvin

  • Even though you are using the "Link Order" interface to address this problem, it really isn't about link order.  Instead, the central question is this: When the linker first sees the file name “rts64plus.lib”, how does it know that this is a compiler RTS library, and thus will be found not in the local directory, but in a system directory indicated by a -i option? If the compiler sees -l rts64plus.lib first, then every time it sees rts64plus.lib after that, it knows where the file can be found.  If it sees an unadorned rts64plus.lib first, then you will get an error message about not being able to find it.  There are multiple ways to supply the -l.  You can do it on the command line, or within the command file ...

    -l rts64plus.lib (.text)

    Probably the best choice is to always precede the compiler RTS library name with -l.  Then, with regard to this one issue, order won't matter.

    None of this explains why it works when you use the older tools.  I cannot reproduce that behavior myself.  No matter what I try, if the linker sees an unadorned rts64plus.lib first, then I get an error message.  I can only guess that, in some way that is not obvious, the linker is seeing -l rts64plus.lib first.

    Thanks and regards,

    -George