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.

CMSIS Library build error in CCS v6 for Tiva C Series Microcontrollers

Hi,

    I am trying to use CMSIS DSP library on my Tiva launchpad, I have followed user guide given at http://www.ti.com/lit/an/spma041d/spma041d.pdf as well as some other thread discussed on TM4C forum after getting these errors but did not get solution. I have tried with ARM compiler 5.1.6 as well as 5.1.9. 

It seems all the errors are caused by only arm_math.h header file. Please someone help me... 

  • LAXMI KANT TIWARI said:
    I have followed user guide given at http://www.ti.com/lit/an/spma041d/spma041d.pdf as well as some other thread discussed on TM4C forum after getting these errors but did not get solution. I have tried with ARM compiler 5.1.6 as well as 5.1.9.

    I had the same errors when attempted to build CMSIS-SP-00300-r4p2-00rel0 using TI ARM compiler v5.1.9 following the instructions in spma041d. The errors seems to be a conflict between the definition of _INLINE in the CMSIS core_cme4.h include file the the TI ARM compiler linkage.h include file.

    As an initial work-around I added predefined symbols for _LINKAGE, _CODE_ACCESS="" and _DATA_ACCESS="" which allowed the project to compile with TI ARM compiler v5.1.9:

    These predefined symbols allow the run time library to compile without bringing in the definitions from linkage.h which cause the conflict over _INLINE. Need to determine if this is the correct "fix.

  • Hello All,

    Thanks for the quick response. It can be corrected by updating linkage.h

    replace the line
    #define __INLINE static __inline

    with
    #define __INLINE inline

    UPDATE: Instead of modifying the linkage.h, attached is the updated core_cm4.h (to replace the core_cm4.h in the CMSIS\Include directory. The same shall be pushed into the zip package and App Note updated in the next couple of weeks)

    Regards
    Amit

  • Amit Ashara said:
    UPDATE: Instead of modifying the linkage.h, attached is the updated core_cm4.h (to replace the core_cm4.h in the CMSIS\Include directory. The same shall be pushed into the zip package and App Note updated in the next couple of weeks)

    When I tried the updated core_cm4.h, without modifying linkage.h, I got the original compile error.

    Did linkage.h get restored to the original state when the updated core_cm4.h was tested?

  • Hello Chester

    You are right. The linkage.h I was checking was the for 5.1.9 compiler while the CMSIS was built with 5.1.8. So the original modification in linkage.h is required or as you suggested adding the new define (subject to testing). I will strikeout the UPDATE from my post

    Regards
    Amit
  • I am also getting the following warnings about missing definitions for intrinsic functions:

    Description Resource Path Location Type
    function "__ROR" declared implicitly arm_power_q7.c /splib-cm4f/StatisticsFunctions line 99 C/C++ Problem
    function "__SXTB16" declared implicitly arm_power_q7.c /splib-cm4f/StatisticsFunctions line 99 C/C++ Problem
    function "__SXTB16" declared implicitly arm_dot_prod_q7.c /splib-cm4f/BasicMathFunctions line 101 C/C++ Problem
    function "__ROR" declared implicitly arm_dot_prod_q7.c /splib-cm4f/BasicMathFunctions line 101 C/C++ Problem
    function "__ROR" declared implicitly arm_q7_to_q15.c /splib-cm4f/SupportFunctions line 100 C/C++ Problem
    function "__SXTB16" declared implicitly arm_q7_to_q15.c /splib-cm4f/SupportFunctions line 100 C/C++ Problem
    function "__ROR" declared implicitly arm_q7_to_q31.c /splib-cm4f/SupportFunctions line 97 C/C++ Problem

    To define these intrinsic functions, suggest the following needs to be added to cmsis_ccs.h:

    #define __ROR          __ror
    #define __SXTB16(src1)     _sxtb16(src1,0) /* The TI ARM compiler rotamt (2nd) argument set to zero, as not in the ARM compiler intrinsic */
    

  • Hello Chester

    Is this after the update to linkage.h and reversal of core_cm4.h?

    Regards
    Amit
  • Amit Ashara said:
    Is this after the update to linkage.h and reversal of core_cm4.h?

    Yes.

    The lack of the intrinsics in cmsis_ccs.h for __ROR and __SXTB16 is a separate issue to the conflict over the __INLINE definition.

  • Hello Chester,

    Appreciate the clarifications & feedback. Have added it to the same and cross checked for compilation warning not being there.

    Regards
    Amit
  • Thanx for your effort. cheers
  • One other thing I forgot to mention is that SPMA041E is written for TI ARM compiler 5.1.9. I found that if use TI ARM compiler 5.2.0 then also need to add the predefined symbol __GNUC__=1 as otherwise get an "#error Unknown compiler" from arm_math.h:

    The reason for this is that TI ARM compiler v5.2.0 no longer defines __GNUC__ when --gcc is used

  • Hello Chester,

    Always appreciate your contribution to the forum...

    Regards
    Amit
  • Had the same problem with compiler v.5.2.2 and add  __GNUC__=1 works like a charm!!

    Thanks !!!

    Would be nice to review "spma041e"

  • Hello All,

    Updated CMSIS document has been released and will be online with all changes for CCS6.1, compiler 5.2.3 and CMSIS 4.2 rolled with updates.

    Regards
    Amit