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.

assembly generated by asm6x vs cl6x - abi error format

Hi,

Short description:

I want to build a linear assembly file and generate the object for C6600 DSP core. The assembly file was built for C6400 in the past, so it does not contain any "modern" or complicated assembly commands for new architectures.

When I call the assembler directly, the generated file is coff format while when I call the compiler the generated file is EABI format!

I am using CGT 7.4, the following problem also appears with CGT 8.0.1


In detail:

> asm6x -mv6600 --abi=eabi -g file.asm file.obj ...
then the obj file has the following:

  Format:                    TI-COFF Version 2                                      
    File Type:                 relocatable file                                       
    Time Stamp:                Wed Apr 22 10:00:05 2015                               
    Machine:                   TI C6x                                                 
    Machine Endian:            little endian                                          
    Entry Point:               0x00000000                                             
    Vendor:                    Texas Instruments, Inc.                                
    Producer:                  Assembler                                              
    Assembler Version:         7.4.8                                                  
    Number of Sections:        7                                                      
    File Length:               1519                                                   
    Symbol Table File Offset:  0x000004a6                                             
    String Table File Offset:  0x00000590                                             
    TI-COFF f_flags:           0x00000100                                             
    CPU Generation:            C6200                                                  
    Control Data Endian:       little endian                                          

on the opposite:

> cl6x -mv6600 --abi=eabi -g file.asm file.obj ...

then the obj file has the following:

    Format:              ELF Version 1                                            
    File Type:           relocatable file                                         
    Machine:             TI C6x                                                   
    Machine Endian:      little endian                                            
    Entry Point:         0x00000000                                               
    Vendor:              Texas Instruments, Inc.                                  
    Producer:            Assembler                                                
    Assembler Version:   7.4.8                                                    
    Number of Sections:  21                                                       
    File Length:         3124                                                     
    ELF Class:           32-bit objects                                           
    ELF e_flags:         0x00000000                                               

Is there any parameter that I am missing in order to build with asm6x ? I would prefer to use the assembler directly because I need to include this option in the makefile which I use for my projects.

  • The interface to asm6x is not documented.  It is not intended to be invoked directly.  The only documented way to assemble code is with the compiler shell utility cl6x.

    When the C6000 tools first came out, the interface to asm6x was documented, and some customers did invoke it directly.  There may still be examples of that scattered about.  But several years ago (I don't recall when), the build interface changed to only cl6x.  

    Nasos Pap said:
    I would prefer to use the assembler directly because I need to include this option in the makefile which I use for my projects.

    I'm confused.  Please show a specific example of something you can do with asm6x that you cannot do with cl6x.

    Thanks and regards,

    -George

  • Hi,

    the project which I am working on has many makefiles with several rules for building C files, assembly files, creating interlist files etc.
    It was created for C62/64 DSPs and now I am porting it to C66x.
    I have problems with other rules if I use the compiler only and I need to modify more rules to build correct.
    Is there any documentation for the assembler/compiler except from spru187 and spru186?

    Nevertheless another question, perhaps the most important is why the generated assembly file has COFF format? C66 architecture is supposed to support only ELF format!
  • Nasos Pap said:
    Is there any documentation for the assembler/compiler except from spru187 and spru186?

    No

    Nasos Pap said:
    why the generated assembly file has COFF format? C66 architecture is supposed to support only ELF format!

    We no longer test the assembler as a standalone tool.  All our tests invoke the assembler through cl6x.  Invoking asm6x directly probably has many other problems similar to this one you stumbled on.

    I understand your problem.  Your makefile was written in the days when invoking asm6x directly was documented and supported.  Since then, the interface to asm6x has changed: you have to go through cl6x.  You didn't anticipate this change when you started this project.  You are hoping for an easy fix.  I wish I could give you one.  But there is no easy fix.  Sorry.

    Thanks and regards,

    -George

  • Hi,

    I found the parameter required for the wrong abi format of the object generated.

    The assembler must be invoked with the parameter

    --object_format=elf

    The parameter --abi=eabi is not enough.


    Regards,

    Nasos

  • Nasos Pap said:

    The assembler must be invoked with the parameter

    --object_format=elf

    I strongly advise against using this option.  This detail of the assembler is not documented precisely because it can change at any time with no prior notice.  The only documented way to control the assembler is through the shell utility cl6x.

    Thanks and regards,

    -George