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/RM46L852: CMSIS_5 - build arm_sqrt_qXX.c - Undefined symbol SUB

Part Number: RM46L852

Tool/software: TI C/C++ Compiler

I try to compile the CMSIS DSP lib for RM46L852. I use the CMSIS-5.1.1 version and the CCS-7.3.

The build exit with 2 errors :

"D:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.obj -O

'Building file: ../CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c'

'Invoking: ARM Compiler'

"D:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 -me -O3 --opt_for_speed=5 --include_path="D:/SVN/BlackProgram/trunk/HEART/03_Product_PHM/01_ARU/02_Software/05-Problem_and_Lesson_learnt/fxr/workpace-ccs/CMSIS_5" --include_path="D:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/include" --include_path="D:/SVN/BlackProgram/trunk/HEART/03_Product_PHM/01_ARU/02_Software/05-Problem_and_Lesson_learnt/fxr/workpace-ccs/CMSIS_5/CMSIS/DSP/Include" --include_path="D:/SVN/BlackProgram/trunk/HEART/03_Product_PHM/01_ARU/02_Software/05-Problem_and_Lesson_learnt/fxr/workpace-ccs/CMSIS_5/CMSIS/Core/Include" --define=ARM_MATH_CM4 --define=__TI_ARM_V7M4__ --define=__DSP_PRESENT=1U --define=__FPU_PRESENT=1U --define=__MPU_PRESENT --define=ARM_MATH_ROUNDING --define=ARM_MATH_MATRIX_CHECK --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --asm_define=ARM_MATH_CM4 --asm_define=__TI_ARM_V7M4__ --preproc_with_compile --preproc_dependency="CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.d_raw" --obj_directory="CMSIS/DSP/Source/FastMathFunctions" "../CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c"

5 Assembly Errors, No Assembly Warnings

>> Compilation failure

CMSIS/DSP/Source/FastMathFunctions/subdir_rules.mk:51: recipe for target 'CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.obj' failed

"T:\Temp\{9A9C39D0-6623-4091-9572-C498E22B53CC}", ERROR! at line 210: [E0001] Undefined symbol

SUB V9, A4, D0, ASR #1 ; [DPU_4_PIPE0] |94|

"T:\Temp\{9A9C39D0-6623-4091-9572-C498E22B53CC}", ERROR! at line 210: [E0003] Unexpected trailing operand(s)

SUB V9, A4, D0, ASR #1 ; [DPU_4_PIPE0] |94|

"T:\Temp\{9A9C39D0-6623-4091-9572-C498E22B53CC}", ERROR! at line 210: [E0004] Illegal operand

SUB V9, A4, D0, ASR #1 ; [DPU_4_PIPE0] |94|

"T:\Temp\{9A9C39D0-6623-4091-9572-C498E22B53CC}", ERROR! at line 210: [E0003] Unexpected trailing operand(s)

SUB V9, A4, D0, ASR #1 ; [DPU_4_PIPE0] |94|

"T:\Temp\{9A9C39D0-6623-4091-9572-C498E22B53CC}", ERROR! at EOF: [E0300] The following symbols are undefined:

ASR

Errors in Source - Assembler Aborted

gmake: *** [CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.obj] Error 1

Same error on file ../CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q31.c

More informations:

  •  The error disapear when the following line of arm_sqrt_q15.c is disabled.
    /*Store as integer */
    tempconv.floatval = temp_float1;
  • or The error disapear when the optimisation of the file is decreased to 0. In all other case of optimisation level, the build exit with error.

I have selected RM46L852 device and the SUB instruction exist on this armv7 processor. Compiler bug ?
Or a problem on the predefined symbol --define=ARM_MATH_CM4 --define=__TI_ARM_V7M4__  ?

-Xavier

  • This appears to be a bug in the compiler.  I'd appreciate if, for the file arm_sqrt_q15.c, you would send in a test case as described in the article How to Submit a Compiler Test Case.

    Thanks and regards,

    -George

  • I agree, I think the compiler is generating a bogus instruction.
  • The compiler version extract from asm file:
    ;* TI ARM C/C++ Codegen                                        PC v16.9.4.LTS *

    The build log file:

    3808.build_log.txt
    **** Build of configuration Release for project CMSIS_5 ****
    
    "D:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.obj -O 
    'Building file: ../CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c'
    'Invoking: ARM Compiler'
    "D:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 -me -Ooff --opt_for_speed=5 --include_path="D:/-modified-/workpace-ccs/CMSIS_5" --include_path="D:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/include" --include_path="D:/-modified-/workpace-ccs/CMSIS_5/CMSIS/DSP/Include" --include_path="D:/-modified-/workpace-ccs/CMSIS_5/CMSIS/Core/Include" --define=ARM_MATH_CM4 --define=__TI_ARM_V7M4__ --define=__DSP_PRESENT=1U --define=__FPU_PRESENT=1U --define=__MPU_PRESENT --define=ARM_MATH_ROUNDING --define=ARM_MATH_MATRIX_CHECK --preproc_with_comment --preproc_with_compile --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi -k --asm_define=ARM_MATH_CM4 --asm_define=__TI_ARM_V7M4__ --obj_directory="CMSIS/DSP/Source/FastMathFunctions"  "../CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c"
    'Finished building: ../CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c'
    ' '
    
    **** Build Finished ****
    

    The .pp file found in the same directory as the source file:

    arm_sqrt_q15..pp.txt

    -xavier

  • Thank you for submitting a test case.  I can reproduce the problem.  I filed CODEGEN-3880 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