TMS570LS3134: CLANG Compiler Warnings

Part Number: TMS570LS3134
Other Parts Discussed in Thread: HALCOGEN

Tool/software:

Hello,

I changed the project compiler from ARM v20.2.0.LTS to Clang v4.0.1.LTS. After a lot of problems are resolved, the compiler gives some warnings. Could you suggsest a method to resolve the warnings?

Warning Type 1: "argument unused during compilation" for all asm files. Note: Other project files are compiled without warning. v20.2.0.LTS compiler do not give these warnings.

One of Console Outputs:

Building file: "../Src/sys_core.asm"
Invoking: Arm Compiler
"C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/bin/tiarmclang.exe" -c -march=armv7r -mcpu=cortex-r4 -mfloat-abi=hard -mfpu=vfpv3-d16 -mbig-endian -marm -O0 -I"C:/Users/.../Project_Folder" -I"C:/Users/.../Project_Folder/Src" -I"C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include" -gdwarf-3 -Werror=ti-pragmas -Werror=ti-macros -Werror=ti-intrinsics -fno-short-wchar -fcommon -xti-asm -o"Src/sys_core.o" "../Src/sys_core.asm"
tiarmclang: warning: argument unused during compilation: '-O0' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-I C:/Users/.../Project_Folder' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-I C:/Users/.../Project_Folder/Src' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-I C:/ti/ccs1230/ccs/tools/compiler/ti-cgt-armllvm_4.0.1.LTS/include' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-gdwarf-3' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-Werror=ti-pragmas' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-Werror=ti-macros' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-Werror=ti-intrinsics' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-fno-short-wchar' [-Wunused-command-line-argument]
tiarmclang: warning: argument unused during compilation: '-fcommon' [-Wunused-command-line-argument]
Finished building: "../Src/sys_core.asm"

Warning Type 2: warning #10247-D: creating output section ".rodata" without a SECTIONS specification. Note: v20.2.0.LTS compiler do not give these warnings.

Thanks in advance.

Best Regards

  • Warning Type 1: "argument unused during compilation" for all asm files.

    Thank you for notifying us of this problem.  I am able to reproduce this behavior.  I filed EXT_EP-12044 to have this investigated.  You are welcome to follow it with that link.

    As a workaround, use the option -Wno-unused-command-line-argument to disable the diagnostic.

    Warning Type 2: warning #10247-D: creating output section ".rodata" without a SECTIONS specification.

    Please see the Compiler-Generated Section Names part of the tiarmclang online manual.  It explains how the .rodata section can appear in code generated by tiarmclang.  That must be happening in your case.  The solution is to modify the linker command file to explicitly allocate .rodata to a range of memory.

    Thanks and regards,

    -George

  • Hello George,

    I implemented your suggestions. There is no warning now. Your type 1 solution is disabling the warnings. I want to be ensure, these warnings are related with compiler itself, not affecting the project output.

    TI does not suggest to use CLANG with TMS570 series. I want to know why. If there is no suppurt with halcogen or CCS, I think there is no problem. But if TI CLANG is not fully compatible or applicable with cortex R4, I must know. Could you explain?