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.

Compiler/TMS320C6748: DSP67x.lib rebuild using CCSv7

Part Number: TMS320C6748
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: TI C/C++ Compiler

The DSP67x.lib has been downloaded from the Ti website, however this prebuilt library is in the COFF format.

I would like to rebuild the library DSP67x.lib in the EABI format.

In the "TMS320C67x DSP Library Programmer’s Reference Guide" in section 2.3, the instructions for a rebuild is:

2.3 How to Rebuild DSPLIB
If you would like to rebuild DSPLIB (for example, because you modified the
source file contained in the archive), you will have to use the mk6x utility as
follows:
mk6x dsp67x.src −l dsp67x.lib

My rebuild command line is:

mk6x.exe "C:\CCStudio\c6700\dsplib\lib\dsp67x.src" -l "C:\CCStudio\c6700\dsplib\lib\dsp67x.lib" -mv6740 --abi=eabi

The library file is successfully rebuilt, however the compiler rejects the --abi=eabi runtime option.

How do I get it to accept this option for the rebuild?

Is it possible to rebuild dsp67x.src into dsp67x.lib using CCSv7?  i.e. is the output result even correct?

John

  • Later edit of this post ...  Please ignore this post.  It is wrong.  It remains here just so the entire thread still makes sense.  -George

    My recommendation is a bit of hack.  But I think it is the best choice in this situation.

    Just before running the mk6x command.  Add this environment variable setting:

    >>> set C6X_C_OPTION=--abi=eabi

    This is another method for informing the compiler shell cl6x about build options.  

    The library build utility mk6x is being phased out.  It is not part of recent compiler releases.  This is why EABI support was not added to it.

    Thanks and regards,

    -George

  • George,

    Thanks for your reply.  I have included the C6X_C_OPTION environment variable but the output file dsp67x.lib still appears to be COFF.

    set C6X_C_OPTION=--abi=eabi
    mk6x.exe "C:\CCStudio\c6700\dsplib\lib\dsp67x.src" -l "C:\CCStudio\c6700\dsplib\lib\dsp67x.lib" -c -mv6740

    The only way I candetermine that it is COFF or EABI is to include it in a link for the app that I am building. 

    I have doubled checked - the dsp67x.lib is indeed updated and has a time stamp 2017-02-14 5:14PM, and the path setting is correct for the build.

    Here is the warning statement, from the build.

    'Building target: Ferra_SBC6748.out'
    'Invoking: C6000 Linker'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6740 --abi=eabi -g --define=c6748 --diag_wrap=off --diag_warning=225 --display_error_number --printf_support=full -z -m"Ferra_SBC6748.map" --stack_size=0x1400000 --heap_size=0x400000 -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3/include" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3/lib" -i"C:/ti/C6748_StarterWare_1_20_03_03/binary/c674x/cgt_ccs/grlib/Debug" -i"C:/ti/C6748_StarterWare_1_20_03_03/binary/c674x/cgt_ccs/c6748/usblib/Debug" -i"C:/ti/C6748_StarterWare_1_20_03_03/binary/c674x/cgt_ccs/c6748/system_config/Debug" -i"C:/ti/C6748_StarterWare_1_20_03_03/binary/c674x/cgt_ccs/c6748/drivers/Debug" -i"C:/ti/C6748_StarterWare_1_20_03_03/binary/c674x/cgt_ccs/c6748/lcdkC6748/platform/Debug" -i"C:/ti/C6748_StarterWare_1_20_03_03/binary/c674x/cgt_ccs/utils/Debug" -i"C:/CCStudio/c6700/dsplib/lib" --reread_libs --diag_wrap=off --warn_sections --display_error_number --xml_link_info="Ferra_SBC6748_linkInfo.xml" --rom_model -o "Ferra_SBC6748.out" "./FerraADC_Control.obj" "./FerraDDSControl.obj" "./FerraEDMA.obj" "./FerraPinMux.obj" "./Ferra_ADCtask.obj" "./Ferra_DDStask.obj" "./Ferra_Main.obj" "./Ferra_Process.obj" "./Ferra_SPI_Driver.obj" "./Ferra_Uart2.obj" "./Ferra_Uart_GPS.obj" "./Ferra_Uart_LD90.obj" "./Ferra_UserInterface.obj" -l"configPkg/linker.cmd" -lsystem_config.lib -lplatform.lib -lutils.lib -ldrivers.lib -llibc.a -ldsp67x.lib
    <Linking>
    warning #10373-D: library "C:/CCStudio/c6700/dsplib/lib/dsp67x.lib" contains TI-COFF object files which are incompatible with the ELF output file.  Ensure you are using the proper library.
    warning #10373-D: library "C:/CCStudio/c6700/dsplib/lib/dsp67x.lib" contains TI-COFF object files which are incompatible with the ELF output file.  Ensure you are using the proper library.
    warning #10373-D: library "C:/CCStudio/c6700/dsplib/lib/dsp67x.lib" contains TI-COFF object files which are incompatible with the ELF output file.  Ensure you are using the proper library.
    'Finished building target: Ferra_SBC6748.out'
    ' '

    **** Build Finished ****

    Is there another way to determine the coff/eabi format of the dsp67x.lib file?

    Is it possible to remove the build options/instructions  at the top of the dsp67x.src file:

    !<arch> <filenames>/    0           1     0     0       3682      `DSPF_sp_autocor.asm/DSPF_sp_bitrev_cp .........

    and to compile the source code into a object file?

    If yes, should the file have the extension ".asm"?

    Thanks for your help,

    John

  • I apologize.  My recommendation to use C6X_C_OPTION does not work.  

    The only remaining solution is to build the library manually.  Here are the basic steps.  You will probably have to change them a bit.

    Become familiar with the archiver tool ar6x.  It is documented in the C6000 assembly language tools manual.  Look for the chapter titled Archiver Description.  

    Step 1: Create a new directory.  All remaining commands occur in this new directory.

    Step 2: Extract all the source code from from the source library.

    >>> ar6x -x C:\CCStudio\c6700\dsplib\lib\dsp67x.src

    Step 3: Build each source file.  I'll describe that in more detail after the last step.

    Step 4: Create a library composed of the object files just built.

    >>> ar6x -r C:\CCStudio\c6700\dsplib\lib\dsp67x.lib file1.obj file2.obj ...

    The existing mk6x utility can show the commands used to build the source files.  Run it just like before, but add the option --v (for verbose).  The cl6x commands are what is needed for step 3.  Except --abi=eabi must be added to each one.

    You probably ought to capture all of those steps in a script (or batch file), and run that.

    JohnL said:
    The only way I can determine that it is COFF or EABI is to include it in a link for the app that I am building. 

    There is a more direct method.  Use the object file display utility ofd6x.  It is also described in the previously mentioned C6000 assembly tools manual.  Here is what it looks like to run it on a EABI C6x RTS library ...

    >>> ofd6x C:\ti\ccsv6\tools\compiler\c6000_7.3.23\lib\rts6600_elf.lib
    
    ARCHIVE: C:\ti\ccsv6\tools\compiler\c6000_7.3.23\lib\rts6600_elf.lib
    
    OBJECT FILE:  _bufread.obj
    
     Object File Information
    
        File Name:               _bufread.obj
        Format:                  ELF Version 1
        File Type:               relocatable file
        Machine:                 TI C6x
    ...

    The Format line shows the object file format.  When you see ELF, that means EABI.

    Thanks and regards,

    -George

  • George,

    Thanks for the instructions on how to extract the source code and how to then rebuild the library with the EABI option set.
    As a test I have been able to extract one of the functions from the library and to then build it with the EABI option.
    The rebuilt EABI format file links correctly now.
    Thanks for your help.
    Best regards,
    John