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/AM5728: Random error compiling source code for the C66 on Sitara for no apparent reasons.

Part Number: AM5728

Tool/software: TI C/C++ Compiler

Hi, 

I am having a similar problem where our DSP Code would randomly give errors for no apparent reason. Rebuilding resolves the problem but it make us waste a lot of time as it happen more and more frequently and we have to restart our release build in order to get it right. 

Here is the type of errors that we see. 

Compilation triggered by a bitbake recipe

Building file: /releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/common/ipc/ipcserver.c
| Invoking: C6000 Compiler
| "/opt/ti-rtos/am57xx/2.0/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6600 -O3 --opt_for_speed=5 --include_path="/opt/ti-rtos/am57xx/2.0/ti-cgt-c6000_8.1.3/include" --include_path="/opt/ti-rtos/am57xx/2.0/mathlib_c66x_3_1_1_0/packages" --include_path="/opt/ti-rtos/am57xx/2.0/dsplib_c66x_3_4_0_0/packages" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/jupiter/common" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/host/mrdspaccess/inc" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/mrdspapp/src/include" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/mrdspapp/src/ti/opus" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/mrdspapp/src/ti/g722" --define=am5726 --define=IVCNEXTGEN --define=SOC_AM572x --define=VAYU_DSP_1 --define=core1 --diag_wrap=off --diag_warning=225 --emit_warnings_as_errors --display_error_number --gen_func_subsections=on --no_bad_aliases --debug_software_pipeline --fp_mode=relaxed --preproc_with_compile --preproc_dependency="ipc-common/ipc/ipcserver.d" --obj_directory="ipc-common/ipc" --cmd_file="configPkg/compiler.opt" "/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/common/ipc/ipcserver.c"

Get this

"ipcserver.asm", ERROR!   at line 30: [W0003] This file contains DWARF
|                                               directives that can only be used
|                                               in unmodified assembly files
|                                               generated by the compiler;
|                                               ignoring all DWARF directives
| 	$C$DW$CU	.dwtag  DW_TAG_compile_unit
| 
| "ipcserver.asm", ERROR!   at line 355: [E0003] Unexpected trailing operand(s)
| 		.sect	".resource_table", RW
| 
| "ipcserver.asm", ERROR!   at line 1111: [E0900] Common symbols require ELF
|                                                 object format
| 		.nearcommon	dspRegisters,4,4
| 

...

INTERNAL ERROR: /opt/ti-rtos/am57xx/2.0/ti-cgt-c6000_8.1.3/bin/asm6x experienced a segmentation fault
|                   while processing section .text:jupiter_user_task file ipcserver.asm line 1263
| 
| This is caused by a defect in the compiler itself. 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.
| 

  • It appears the assembler has some intermittent error which is exposed by assembly code generated by the compiler.  I need to reproduce this problem, then submit it to the compiler development team for investigation.  For the source file ipcserver.c, please follow the directions in the article How to Submit a Compiler Test Case.  Note you have already shown the compiler version and build options, so you can skip that part.

    Thanks and regards,

    -George

  • Thank for the answer,
    I can submit the case but the error on ipcServer.c is just an example as it can happen on any files randomly.
  • claude.chausse said:
    I can submit the case

    Please do

    claude.chausse said:
    but the error on ipcServer.c is just an example as it can happen on any files randomly.

    I understand.  I misspoke when I said I will reproduce the error.  In this particular case, I don't expect to reproduce the error.  Instead, I will ask the compiler development team to use some tools that are helpful in searching for intermittent problems.  The compiler needs to be processing some code while these tools are used.  The code to process is the test case I have requested.

    Thanks and regards,

    -George

  • So I included the pp file
    And the command line is : 

    /opt/ti-rtos/am57xx/2.0/ti-cgt-c6000_8.1.3/bin/cl6x" -mv6600 -O3 --opt_for_speed=5 --include_path="/opt/ti-rtos/am57xx/2.0/ti-cgt-c6000_8.1.3/include" --include_path="/opt/ti-rtos/am57xx/2.0/mathlib_c66x_3_1_1_0/packages" --include_path="/opt/ti-rtos/am57xx/2.0/dsplib_c66x_3_4_0_0/packages" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/jupiter/common" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/host/mrdspaccess/inc" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/mrdspapp/src/include" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/mrdspapp/src/ti/opus" --include_path="/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/mrdspapp/src/ti/g722" --define=am5726 --define=IVCNEXTGEN --define=SOC_AM572x --define=VAYU_DSP_1 --define=core1 --diag_wrap=off --diag_warning=225 --emit_warnings_as_errors --display_error_number --gen_func_subsections=on --no_bad_aliases --debug_software_pipeline --fp_mode=relaxed --preproc_with_compile --preproc_dependency="ipc-common/ipc/ipcserver.d" --obj_directory="ipc-common/ipc" --cmd_file="configPkg/compiler.opt" "/releases/neptune/NEP-1.16.0.0/common.hg/yocto/ti/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-clearcom-linux-gnueabi/ivcdsp/0.0.1-r2.1/dsp.hg/common/ipc/ipcserver.c"

    The version is included in the command line
    the error message is included in the original message

    ipcserver.pp.txt

  • Thank you for submitting a test case.  I filed CODEGEN-5795 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • I am not able to detect a problem in the assembler. I haven't been able to get this internal error to happen for me, nor were the tools George had mentioned able to detect anything that might cause the problem. I suspect the bug is not in the assembler, but earlier in the compiler. Please add the option --keep_asm and the (hidden) option --z to the compilation options and the next time you see the error, zip up the .if file, the .opt file, and the .asm file and post them here.

    Have you tried using a later patch version on that branch? 8.1.8 is the latest version and contains a lot of bug fixes that could possibly related to the problem.
  • We finally resolved the problem by disabling completely all parallel build configuration. It seems that the compiler is buggy when it has to compile with a multi-core processor with option -j