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.

CCS: Issues Setting Up CMSIS DSP in CCS

Other Parts Discussed in Thread: TM4C123GH6PM

Tool/software: Code Composer Studio

Hello,

I am trying to implement the CMSIS DSP library in Code composer studio for use with my Tiva TM4C123GH6PM Launchpad.

I've been following the exact instructions detailed here: 

However when I get to the build step I get dozens of errors mostly stating some variation of "fatal error: cannot open source file "core_cm4.h"

Can someone help point me towards a solution for the issue?

Thanks,

Jim Carucci

  • Hello James,

    Can you please check if the various solutions presented in this thread lead you to a resolution?: https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/390789/1382173

  • Hi Ralph,

    I went to the article you mentioned. I was able to implement the first remedy in changing the predefined symbols to no avail. I am not able to locate the linkage.h header file. Where should that be?

    It also appears to me that I am only able to get CMSIS 5.2 which is potentially different than the version used in both the previous thread and documentation. Is there an updated version of the attached link above that works for the latest version of CCS and CMSIS respectively?

    Thanks,

    Jim

  • Hello James,

    The linkage.h file should be located inside of the CMSIS install at CMSIS\Core\Include\cmsis_compiler.h EDIT: see post below for correct location

    There isn't an updated version of the documentation.

  • I am confused by your statement. Are you saying that the linkage.h file should be a #include in the cmsis_compiler.h source code? Or are you saying that it should be in the same file directory as cmsis_compiler.h?

    At any rate, I am able to find no mention of linkage.h in the source code or in the file location CMSIS_5-5.2.0/CMSIS/DSP/Core.

    Please advise.
  • Hello James,

    I am so sorry. The wires in my brain seemed to have short circuited about where the linkage.h file is located.

    The correct file location is: [Install Path]\ccsv7\tools\compiler\ti-cgt-arm_16.9.3.LTS\include - the linkage.h file can be found in this folder. You may need to adjust the ARM compiler or CCS version numbers, I have CCS V7.2 and Compiler version 16.9.3 installed.

    I apologize for wasting your time with my mistake...
  • Thanks for the update. Understood that it's a Monday...

    I found linkage.h and tried implementing the solution in that thread however I'm still seeing a couple varieties of errors when trying to build (repeatedly)

    1. "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/_lock.h", line 57: error: function returning function is not allowed
    2."C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/float.h", line 68: error: expected an identifier
    3."C:\Users\jxc0508\Documents\CMSIS_5-5.2.0\CMSIS\Core\Include\cmsis_gcc.h", line 305: error: expected a ")"
    4. "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/ymath.h", line 176: error: expected an identifier

    Any recommendations to get me up and running?

    Thanks,
    Jim
  • Any reason you must use CMSIS James? From all appearances and past forum messages it's unsupported by TI, they favour TIVAWare.

    Robert
  • I want to use CMSIS for its optimized DSP libraries and portability across different ARM MCU's. Perhaps I will have to use a different vendor's products.
  • I know there are people who claim to have used the CMSIS DSP libraries with success. That's a more limited problem then getting the whole thing to work.

    I rather suspect that I/O portability is a bit of a Will O' Wisp.

    Any other aspects than the DSP libraries you want to get to work?

    Robert
  • I only care about the DSP library
  • Searching for CMSIS FFT in the Forums leads to posts from people working with the DSP portion including this thread

    e2e.ti.com/.../1521430 FFT#pi239031350=2

    Robert
  • Hello James,

    I am not familiar enough with CMSIS to comment on what is causing those issues. Searching the forums didn't bring up anything productive outside of the thread I already referenced to you.

    One thing that sticks out to me is...

    ""C:\Users\jxc0508\Documents\CMSIS_5-5.2.0\CMSIS\Core\Include\cmsis_gcc.h", line 305: error: expected a ")""

    That usually is because of a syntax error (most often a missed ';') somewhere in code which can then propagate through and cause unusual issues/errors to be reported by CCS.
  • James Carucci said:
    I only care about the DSP library

    Then try the FFT search I suggested. That may give you more fruitful discussions. Others have got that subset to work.
    Robert
  • Good day Jim,

    I have been away for some time, but a colleague has mentioned your question. I had to recently "enable" CMSIS DSP packages into my project, and ran through some trouble as well. These are some of my notes:

    1) Installing the proper CMSIS package: went to GitHub link that was found on the page below, and downloaded PACK 5.1.1, most recent one a month ago.

    developer.arm.com/.../cmsis

    2) Copied and extracted the folder to a convenient location.

    3) Created a WORKSPACE (not PROJECT) variable, pointing to C:\MYLOCATION\ARM_CMSIS_Pack_511\CMSIS, and called it “CMSIS_ROOT”

    4) Added the header path to the compiler's INCLUDE options:

    5) Added the lib path to the linker's INCLUDED LIBRARIES:

    6) Added the target type macro and the math lib header to your main.h file as per below:

    /* CMSIS-DSP Library Includes */
    #define ARM_MATH_CM4
    #include "arm_math.h"

    7) Added __FPU_PRESENT to the predefined symbols list on the project properties.

    8) Finally, downloaded the TI’s specific files from www.ti.com/.../spma041, and then merged the contents into the CMSIS folder previously installed.

    NOTE THAT, ALTHOUGH IT WORKED, A WARNING REMAINED:

    #1181-D warning: “No compiler specific solution for __RESTRICT.”

    (This warning could not yet been explained by TI/CCS team, and they suspect it is actually related to the MSP line - does not make much sense to me... I was asked to capture the whole environment status and send for analysis, but time to allow such has not yet come).

    In my particular application, I was looking for IIR Chebyshev filters. Because of my data's structure and flow not being "optimal" to run in the manner that the CMSIS library uses, in the end I actually abandoned the CMSIS package and hard coded the desired filter. But that does not mean it won't work well for your FFT!

    Complementing note: the CMSIS package is an "old", proven and stable package designed by the ARM people. It is supposed to be "as efficient as possible" when using the full resources of their core, such as the instruction set, registers and the numerical processor. Hence, it "sounds" like a good idea to use them, and I will surely revisit the library if I need FFT and other things.

    , I am unaware of a numeric functions package provided by TI in the realms of Tivaware, please correct me if I missed it. And thank you for warning me about this question from James.

    Regards

    Bruno

  • Bruno Saraiva said:
    , I am unaware of a numeric functions package provided by TI in the realms of Tivaware, please correct me if I missed it. And thank you for warning me about this question from James.

    No problem Bruno, and I'm not aware of a TI specific numerical package either.

    Robert

  • Bruno,

    Thank you so much for your insightful post. I followed your instructions and got all the example code up and running!

    One point I would add of your list of things to do is under Project Properties->Build->ARM Compiler->Predefined Symbols I would add ARM_MATH_CM4 rather than doing a #define:

    The reason being that there are often header files that will need to reference that define and it is a pain to go in and change that in every one of them.

    Once again thanks for the help from you and everyone in the community for getting me going!

    Cheers,

    James

  • Hi Bruno,

    Thanks for sharing that! I'll be saving your post for future use as well! :)
  • Hello James,
    Glad to be able to help!
    And your pre-defined symbol suggestion is indeed a good one.
    Keep visiting the forum and helping others when possible. And do let us know how did your FFT project go, if you can.
    Regards
    Bruno
  • Happy to help, Ralph!
    And we should thank Robert Adsett, as he remembered "I had tried something about the subject", and warned me of the post - for I have been through a busy phase which hasn't left me too much time to check all the messages here.
    Cheers
    Bruno
  • Of course such detailed, insightful and high-effort post deserves a "LIKE!"

    The proper paragraphing makes the post easier to read - and better delineates, "what's what."

    It has been noted that the "CMSIS efforts (App Notes etc.) of other ARM vendors" (more CMSIS friendly) may prove instructive to (even) those here...

  • dear 

    i ma getting error while trying to create the library. i have followed the procedure mentioned at the following link. am getting many errors . don know how to remove these error  

  • I'm not an expert here but you may need to go to Help->Install New Software and get one of the latest compilers (16.9+)

    That may be worth a try however if I were you I would look at 's post earlier in this thread which lays out in almost complete detail how to get the CMSIS DSP library running on a Tiva. That's the method I've used and it has been working for me spectacularly.

    Cheers,

    Jim