The CMSIS-DSP library is a rich collection of DSP (Digital Signal Processing) function that provided by ARM has been highly optimized for Cortex-M processor cores. The library can support lots of DSP algorithms, and is divided into a number of functions that include basic math, fast math, Matrix, Transforms function and so on.
And currently, ARM provided some example projects for Keil uVision IDE to demonstrate how to use the CMSIS-DSP library and run them on Cortex-M target. The article will introduce how to use the CMSIS-DSP library with EFM32 Cortex-M4 device on the Simplicity Studio IDE.
For using the CMSIS-DSP library, you can download the latest source code from the website of ARM, and in fact the Gecko SDK come with the CMSIS-DSP library, you can get the source code from the folder below after installing the Gecko SDK.
Create a project with Simplicity Studio, you can create an empty C project or create your project base on the pre-existing examples. For more information about how to create a New project, please refer to AN0822.
Suppose that you have create an empty project for EFM32GG11 named as “EFM32GG11_Variance”. The article will guide you how to include the CMSIS-DSP functionality support into this project to calculate the variance of given input data sequence.
1. Merge the source code of the existing example “arm_variance_example_f32.c” provided by CMSIS-lib to the main.c
2. Create a new folder “DSP_Lib” in the EFM32GG11_Variance project, and then import the source code of CMSIS-DSP library to your project. In general, it only need to import the necessary C files to the project.
3. Add the symbols “ARM_MATH_CM4=1” and “__FPU_PRESENT=1” to tell the compiler to build DSP library with Cortex-M4 supported, and also the presence of FPU.
4. Build the “EFM32GG11_Variance” project, program the hex file to EFM32GG11 STK board, and check the result.
This article demonstrate how to use the default example “arm_variance_example_f32.c” to calculate the variance for given input sequence, and it’s pretty easy to use other examples provided by the CMSIS-DSP library follow the steps above.
CMSIS DSP Software Library User manual
I'm working with the xGM210P032 wireless Gecko module radio board and the EFR32xG21 Radio Board. These have the M33 Cortex core with FPU and DSP. So I have a similar question:
How do I access the DSP functions from within Simplicity Studio with the GCC GNU ARM v7.2.1 compiler?