Using CMSIS -> No such file ARMCM4.h?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using CMSIS -> No such file ARMCM4.h?

5,949 Views
marcohess
Contributor II

Playing around with the FRDM_K22F and got the KSDK demo apps to compile, load and debug.

Now moving on to the next step of using the CMSIS DSP functions.

Not sure how to reference these in my demo project. Can someone point me to the steps required to successfully use the CMSIS libraries in my project in KDS?

I tried to include the CMSIS directory from the KSDK directory in the project but during the build it complains that ARMCM4.h is missing. Looking through the KSDK tree there does not seem to be an any file with that name?

Any tutorial to get CMSIS DSP up and running?

0 Kudos
3 Replies

2,170 Views
Amit_Kumar1
Senior Contributor II

Hi Marco Hess

This Link Might me helpful to you. Interfacing CMSIS Library in Codewarrior?   It Is tested in Cw 10.5 and Cw 10.6 with FRDM board and I have tested CMSIS 3.2 Lib, CMSIS 4.0.0 Lib,  and CMSIS 4.0.1 Lib. CMSIS 3.2 may work easily but the higher version  had issues of memory overflowing so keep that in mind.  I think uneed to first build the lib. and then link the build lib. in your project.

Regards

Amit Kumar

0 Kudos

2,170 Views
marcohess
Contributor II

I found the ARMCM4.h file in the CMSIS library package downloaded from ARM in:

Device/ARM/ARMCM4/Include

And then managed to reference that include path in my project and then add the reference to the ARM math library as included in the KSDK for the linger and get my app to compile and run.

This seems to work when I cut and paste some of the ARM CMSIS example code in my app.

Nevertheless I find it strange that the KSDK contains the ARM CMSIS-DSP source files but not the required ARM header files to compile these?

Seems like a bug in the KSDK to me.

0 Kudos

2,170 Views
martynhunt
NXP Employee
NXP Employee

Hi Marco,

The sai_demo can provide a good template for how to use the CMSIS-DSP libraries with KDS. I suggest making sure the Properties->C/C++ Build->Settings in your project are similar to the sai_demo. For instance, the compiler tries to locate ARMCM4.h unless you define ARM_MATH_CM4 (or another Cortex-M core) in the C compiler preprocessor. ARMCM4.h is the header file that arm_math.h tries to include by default if no Cortex-M core has been defined.

ARMCM4.h is a generic Cortex-M4 device header file, it is not included in KSDK because we use the Kinetis device specific header files.

Best regards,

Martyn

0 Kudos