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.

Asm errors after migrating from ccs3.3 to ccs5.1

Other Parts Discussed in Thread: CCSTUDIO
Hi,
I have migrated my project from ccs3.3 to ccs5.1. I am particularly unable to build some asm files. Below is one such error. 
I*********************************************************************************

"D:/ROM/source/fpu/FS_MUL.asm", ERROR! at line 50:
[E0002]
Instruction is only available in V5 and higher
CDP p5,#F_MUL,ResultReg0,SP_OP2,SP_OP1 ; Perform the Single Precision Multiplication
*********************************************************************************
I went through the instruction set in Reference manuals(thumb instruction set) which says 
*********************************************************************************
Assembler syntax
CDP{2}<c><q> <coproc>, #<opc1>, <CRd>, <CRn>, <CRm> {,#<opc2>}
where:
2 If specified, selects the C == 1 form of the encoding. If omitted, selects the C == 0 form.
<c><q> See Standard assembler syntax fields on page 4-6.
<coproc> Specifies the name of the coprocessor, and causes the corresponding coprocessor number to
be placed in the cp_num field of the instruction. The standard generic coprocessor names
are p0, p1, ..., p15.
<opc1> Is a coprocessor-specific opcode, in the range 0 to 15.
<CRd> Specifies the destination coprocessor register for the instruction.
<CRn> Specifies the coprocessor register that contains the first operand.
<CRm> Specifies the coprocessor register that contains the second operand.
<opc2> Is a coprocessor-specific opcode in the range 0 to 7. If it is omitted, <opc2> is assumed to
be 0.
*********************************************************************************
The usage does not seem to violate this.
I would like to know how to resolve this issue and what is meant by V5 in the message
 'Instruction is only available in V5 and higher'
Also, has the ARM syntax changed from ccs3.3 to ccs5.1 in some cases?
 Is there no compatibility module which can compile the ccs3.3 code itself in ccs5.1.

Regards,
Aadishri
  • Aadishri G S said:
     'Instruction is only available in V5 and higher'



    This message is saying that the instruction syntax is supported only in ARM v5 architecture and higher. Please take a look at slide 3 of this presentation for  correlating architecture versions with processors.

    Over time, the ARM codegen tools have evolved to add support for the different ABIs and ARM architectures, Starting with codegen tools 4.1.x the default ABI also changed from the older TIABI to TI ARM9 ABI. If you have the latest version of CCS 3.3, you will find ARM codegen tools v4.1.4 in it. You can review the CGTNew.txt file within the C:\CCStudio_v3.3\tms470\docs folder to understand the ABI changes that came starting with that veraion. If you are migrating code from an older version of compiler tools (that came with CCS 3.3) to a newer version (that comes with CCS v5) these are some of the factors to consider.

    Which version of compiler tools did you use when building with CCS 3.3? You can check by going to the Component Manager, Build Tools and check the version of TMS470 code generation tools. To perform the migration in a more step-by-step approach you could first start off by setting CCSv5 to use the same version of compiler tools as you did with CCS 3.3. This page describes how to do that: http://processors.wiki.ti.com/index.php/Compiler_Installation_and_Selection#CCStudio_5.1 
    Verify that the project builds and works as expected. Then modify the project to use the newer version of compiler tools. You may need to set/keep some compiler options to maintain backward compatibility and/or modify code to make it compatible with the newer tools.

     

  • Dear AartiG,

    As per your suggestion, I compiled with earlier ccd 3.3 cgtools(4.1.4). The files compiled. Thank you.

    But if I change to compile with cg tools 4.9.0(Project->Properties->CCS General->Code-generation tools),

    the abi option((Project->Properties->CCS Build->TMS470 Compiler->Runtime Model Options->abi) automatically changes to ti_arm9_abi.

    Even if I change to tiabi, I get the same error,

    **********************************************************************************************************************
    Instruction is only available in V5 and higher
    CDP p5,#F_SUB,ResultReg0,SP_OP2,SP_OP1 ; Perform the Single Precision Substraction
    **********************************************************************************************************************

    I checked this presentation. Here, in slide, 'ARM Processors Overview', it says 

    ARM7  |       ARMv4T  |      -mv4 
    ARM9 | ARMv5TE | -mv5e
    I am using '-mv4' option itself.
    I am unable to understand whether I have to change some other compile option or make the change in the instruction. 
    I am skeptical about the latter as I am still using '-mv4' option and the same instruction ran with '-mv4 -tiabi ' options in cgtools 4.1.4 and it compiles.
    Please help me resolve this.
    Regards,
    Aadishri
  • It may be that the instruction may need to be changed. Could you attach the assembly file which generates this error and the full list of compiler options you are using?

  • Hi AartiG,

    Please find the compile options I am using:

    "-mv4 -g --define="_DEBUG" --include_path="C:/ccs/ccsv5/tools/compiler/tms470/include" --include_path="/packages/ti/xdais" --diag_warning=225 -me --abi=tiabi --code_state=16 --std_lib_func_redefined --obj_directory="C:/GNSS_45nm/Private/source/product/ti/GPS_ROM/projectfiles/fpu/Build_45NM""

    I have attached one of the asm files(renamed as .txt) which throws this error. The CDP instruction is used in line 47 and 61.

    Below are the ccs 3.3 compiler options that I used:

    -g -pdsw225 -ol0 -fr"C:\GNSS_45nm\Private\source\product\ti\GPS_ROM\projectfiles\fpu\Build_45NM" -d"_DEBUG" -me -mt -mv4 --abi=tiabi

    Regards,

    Aadishri

    5516.PRI_SUB.asm.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    ;******************************************************************************
    ; TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
    ;
    ; Property of Texas Instruments -- For Unrestricted Internal Use Only
    ; Unauthorized reproduction and/or distribution is strictly prohibited. This
    ; product is protected under copyright law and trade secret law as an
    ; unpublished work. Created 2010, (C) Copyright 1997 Texas Instruments. All
    ; rights reserved.
    ;
    ;
    ; Filename : pri32.asm
    ;
    ; Description : 32BIS compiled Coprocessor functions
    ;
    ; Version number : 1
    ;
    ; Date : 28/6/2010
    ;
    ;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • I am missing the include file pri.h hence cannot compile the file successfully. However, even with all the other assembler errors generated I don't see the "Instruction is only available in V5 and higher " error with CGT 4.9.0. If you can include the pri.h and any other files that file may include so I can get a successful compile, I can confirm if I can reproduce the error or not.

  • Dear AartiG,

    Please find the header file attached.

    Regards,

    Aadishri

  • Sorry, but there was no file attached.

  • Hi AarthiG,

    Sorry too! Please find the same attached

    2627.PRI.h.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    ;******************************************************************************
    ; TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
    ;
    ; Property of Texas Instruments -- For Unrestricted Internal Use Only
    ; Unauthorized reproduction and/or distribution is strictly prohibited. This
    ; product is protected under copyright law and trade secret law as an
    ; unpublished work. Created 2010, (C) Copyright 1997 Texas Instruments. All
    ; rights reserved.
    ;
    ;
    ; Filename : pri.h
    ;
    ; Description : pri coprocessor header file
    ;
    ; Version number : 1
    ;
    ; Date : 28/6/2010
    ;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    .

    Regards,

    Aadishri

  • Thanks for providing the file. I can reproduce the error you mentioned. I see that there is no error with CGT 4.1.x but starting with 4.4.0, all the later compiler versions generate the error. I will see if I can get someone else to comment on the reason for this.

  • can you please update me...

  • The CDP and CDP2 instructions are only available for Thumb-2 devices.  I read the thread too quickly. This appears to be a bug. It looks like we took the warning for the CDP2 instruction (available for v5 and higher) and applied it to CDP.

  • This issue is now in our bug tracking system as SDSCM00043069. The only workaround would be to assemble with version v5e or higher.

  • How can I check if the issue SDSCM00043069 is resolved?

    Regards,

    Aadishri

  • As indicated in the signatures of both Aarti and Thomas, you can track the status of known bugs by using SDOWP

  • Team,

    Thank you for thr resolution.

    Please let me know if I have to re-install CCSv5 or a version update will suffice to get the bug-free version.

    Regards,

    Aadishri

  • Aadishri G S said:

    Please let me know if I have to re-install CCSv5 or a version update will suffice to get the bug-free version.

    If you are using CCS 5.1, you can simply download and install the latest ARM compiler tools v4.9.5 through the CCS update site. Go to CCS menu Help->Check for Updates and you can select the latest ARM CGT from there.