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.

TDA4VM: c7000 compiler error

Tool/software:

Building file: "../GVS/gvs_motion_stab.c"
Invoking: C7000 Compiler
"D:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c7000_4.1.1.LTS/bin/cl7x" --mma_version=2 -mv7120 -O2 --opt_for_speed=5 --include_path="A:/grmn/prj/avtn/gvs_board/src/gdu/kernel/c7x" --include_path="D:/ti/J7/j7+_j784s4/09_02_00_05/ti-processor-sdk-rtos-j784s4-evm-09_02_00_05/pdk_j784s4_09_02_00_30/packages/ti/csl/" --include_path="D:/ti/J7/j7+_j784s4/09_02_00_05/ti-processor-sdk-rtos-j784s4-evm-09_02_00_05/pdk_j784s4_09_02_00_30/packages/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/gfx/" --include_path="D:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c7000_4.1.1.LTS/include" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/gfx2/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/rndr/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/grm/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/utl/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/mth/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/bmp/" --include_path="A:/grmn/prj/avtn/gvs_board/src/adl" --include_path="A:/grmn/prj/avtn/gvs_board/src/gdu/kernel" --include_path="A:/grmn/prj/avtn/gvs_board/src/gdu/kernel/dmpac/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/kernel/cpu/coprocessor/" --include_path="A:/grmn/prj/avtn/gvs_board/lib/acl/kernel/cpu/coprocessor/generic" --include_path="A:/grmn/prj/avtn/gvs_board/src/gdu/gifd3" --include_path="A:/grmn/prj/avtn/gvs_board/build/I/0/" --advice:performance=all --advice:performance_dir=c:\temp --advice:performance_file=c:\temp\perf_advice.txt --define=_MODTEST_ARM_SP_OVERRIDE=1 --define=SOC_J721S2=1 --define=CPU_COUNT=1 -g --c99 --vectypes=off --diag_remark=1 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --gen_data_subsections=on --debug_software_pipeline --fp_mode=relaxed --optimizer_interlist -k --c_src_interlist --asm_directory="asm/" --gen_opt_info=2 --section_sizes=on --parallel=16 --preproc_with_compile --preproc_dependency="GVS/gvs_motion_stab.d_raw" --obj_directory="GVS" "../GVS/gvs_motion_stab.c"

>> Compilation failure
GVS/subdir_rules.mk:9: recipe for target 'GVS/gvs_motion_stab.obj' failed
"A:\grmn\prj\avtn\gvs_board\build\I\0\grm_pub_compiler_ti_c7x.h", line 95: warning #303-D: typedef name has already been declared (with same type)
"A:/grmn/prj/avtn/gvs_board/build/I/0/hwm_pub_timer.h", line 94: warning #174-D: external/internal linkage conflict with previous declaration

>>>> Optimizer terminated abnormally
>>>> in function diff_wdw_pixels2()
>>>> in file "../GVS/gvs_motion_stab.c"
This is caused by a defect in the TI C/C++ Optimizer.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI on the E2E support forums at http://e2e.ti.com

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.
Include the .pp file created by option --preproc_with_comment

here is c code. If I change next_pt_fxd to a * ptr it works. Also happens on latest 5.0.0 compiler.

typedef struct
{
int x;
int y;
} _pt_2d_fxd_t;

void diff_wdw_pixels2 /* [comment] */
(
_pt_2d_fxd_t next_pt_fxd, /* get pixel frac offsets from this */
long * dx_sum_rslt
)
{
/*----------------------------------------------------------
Local variables
----------------------------------------------------------*/
__int16 diff = __int16(3);
__int16 orig = __int16(0);

for( int y = 0; y < 16; y++ )
{

diff -= orig;
diff += ( diff * orig );
}

*dx_sum_rslt = __horizontal_add( diff );

} /* diff_wdw_pixels2() */

  • Hi,

    If possible can you provide a standalone code for the error. I tried the following .cpp code compiled with latest compiler and it was building.


    #include <c7x.h>
    #include<iostream>
    
    typedef struct
    {
    int x;
    int y;
    } _pt_2d_fxd_t;
    
    void diff_wdw_pixels2 /* [comment] */
    (
        _pt_2d_fxd_t next_pt_fxd, /* get pixel frac offsets from this */
        long * dx_sum_rslt)
    {
        /*----------------------------------------------------------
        Local variables
        ----------------------------------------------------------*/
        __int16 diff = __int16(3);
        __int16 orig = __int16(0);
    
        for( int y = 0; y < 16; y++ )
        {
    
            diff -= orig;
            diff += ( diff * orig );
        }
    
        *dx_sum_rslt = __horizontal_add( diff );
    
    } /* diff_wdw_pixels2() */
    
    int main(){
    
        _pt_2d_fxd_t pt_2d;
        long long_sum=0;
        diff_wdw_pixels2(pt_2d,&long_sum);
    
    
        std::cout<<long_sum<<std::endl;
    
        return 0;
    }

    Regards,
    Sivadeep

  • Your code has error for me on c, cpp, debug and release. Here is a simplified version that also fails.

    typedef struct
    {
    int x;
    } _pt_2d_fxd_t;
    
    void diff_wdw_pixels2
    (
        _pt_2d_fxd_t  next_pt_fxd,  //make * ptr to fix compiler error
        long * dx_sum_rslt)
    {
    __int16 diff = __int16(3);
    __int16 orig = __int16(0);
    
    diff -= orig;
    diff += ( diff * orig );
    
    *dx_sum_rslt = __horizontal_add( diff );
    
    } /* diff_wdw_pixels2() */

    I also just ran it from command line with this minimal number of arguments and also get the error.

    C:\Users\starkr>"D:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c7000_4.1.1.LTS/bin/cl7x" --include_path="D:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c7000_4.1.1.LTS/include" "A:\grmn\prj\avtn\gvs_board\src\gdu\kernel\c7x\compiler_err.c"
    "A:\grmn\prj\avtn\gvs_board\src\gdu\kernel\c7x\compiler_err.c", line 17: warning: function "__horizontal_add" declared implicitly

    >>>> Optimizer terminated abnormally
    >>>> in function diff_wdw_pixels2()
    >>>> in file "A:\grmn\prj\avtn\gvs_board\src\gdu\kernel\c7x\compiler_err.c"
    This is caused by a defect in the TI C/C++ Optimizer.
    TI Customer Support may be able to suggest a workaround to avoid this.

    Upgrading to the newest version of the compiler may fix this problem.

    Contact TI on the E2E support forums at http://e2e.ti.com

    We need to see this ENTIRE error message and a complete, reproducible
    test case including ALL of the command-line options.
    Include the .pp file created by option --preproc_with_comment


    >> Compilation failure

  • Hi,

    I also just ran it from command line with this minimal number of arguments and also get the error.

    Could you please mention the optimization level that you are using.

    Your code has error for me on c, cpp, debug and release. Here is a simplified version that also fails.

    Were you building the independent code. Can you please provide a independent test file which can produce this error.

    Regards,
    Sivadeep

  • "Could you please mention the optimization level that you are using."
    I did you have the whole cmd line. You can rename this bat.txt to .bat and run it to get the error. For what its worth it happens on debug and release build so doesn't

    "D:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c7000_4.1.1.LTS/bin/cl7x" -O0 --include_path="D:/ti/ccs1011/ccs/tools/compiler/ti-cgt-c7000_4.1.1.LTS/include" "A:\grmn\prj\avtn\gvs_board\src\gdu\kernel\c7x\compiler_err.c"
    pause
    
    appear to be affected by optimization level.

    "Were you building the independent code. Can you please provide a independent test file which can produce this error."
    Yes I put your code in a c file and got the error. You can put my code in compiler_err.c and get the error.

    I am running on windows 11.

    typedef struct
    {
    int x;
    } _pt_2d_fxd_t;
    
    void diff_wdw_pixels2
    (
        _pt_2d_fxd_t  next_pt_fxd,  //make * ptr to fix compiler error
        long * dx_sum_rslt)
    {
    __int16 diff = int16(3);
    __int16 orig = int16(0);
    
    diff -= orig;
    diff += ( diff * orig );
    
    *dx_sum_rslt = __horizontal_add( diff );
    
    } /* diff_wdw_pixels2() */
    
    

  • Hi,

    Thanks for the update. I will check this and get back to you.

    Regards,
    Sivadeep

  • Hi,

    I'm able to reproduce this error. I will loop in the compiler team for further investigation. As a workaround, could you please try using any other optimization level other than 0?

    Regards,
    Sivadeep