Getting started with STM32Cube IDE and Arm MDK for the Arm CMSIS-DSP library
Overview
This document describes the steps required to integrate the Arm CMSIS-DSP library with C code generated from the ASN Filter Designer’s CMSIS-DSP C code generator into an STM32CubeIDE or equivalent Eclipse-based IDE and Arm MDK (μVision IDE). The steps mentioned in this document are common for other Eclipse-based IDEs, and therefore portable. As an example, we will generate a project in the STM32CUBE-IDE and for the STM32F446RE microcontroller based on a Cortex-M4.
The content is as follows:
- Steps for including the Arm CMSIS-DSP library in an STM32Cube IDE project
- Steps for including the Arm CMSIS-DSP library to Arm’s μVision IDE
For Arm MDK users, an MDK5 software pack is available from Arm Keil’s software pack repository, providing several complete filtering examples based on the ASN Filter Designer’s code generator using the Arm CMSIS-DSP library.
After installing this software pack, please update the Arm CMSIS-DSP library as discussed below.
Steps for including the Arm CMSIS-DSP library in an STM32Cube IDE project
1. Download the latest release of the Arm CMSIS-DSP library using the following link
https://github.com/ARM-software/CMSIS-DSP/releases
You should see the following (the exact version number may differ)
Download the .pack file (MDK users) or the .zip/tar.gz file.
2. Create a folder in your project directory and name it DSP. We have to copy all the CMSIS dependencies mentioned in the following list to DSP.
CMSIS-DSP-1.14.2\Include
CMSIS-DSP-1.14.2\Source\BasicMathFunctions
CMSIS-DSP-1.14.2\Source\CommonTables
CMSIS-DSP-1.14.2\Source\FastMathFunctions
CMSIS-DSP-1.14.2\Source\FilteringFunctions
The exact path will be dependent on the CMSIS-DSP library version that you are using.
The final folder structure should look like this:
The following files have to be excluded from the compilation process:
CMSIS-DSP-1.14.2\Source\BasicMathFunctions\BasicMathFunctions.c
CMSIS-DSP-1.14.2\Source\BasicMathFunctions\BasicMathFunctionsF16.c
CMSIS-DSP-1.14.2\Source\CommonTables\CommonTables.c
CMSIS-DSP-1.14.2\Source\CommonTables\CommonTablesF16.c
CMSIS-DSP-1.14.2\Source\FastMathFunctions\FastMathFunctions.c
CMSIS-DSP-1.14.2\Source\FastMathFunctions\FastMathFunctionsF16.c
CMSIS-DSP-1.14.2\Source\FilteringFunctions\FilteringFunctions.c
CMSIS-DSP-1.14.2\Source\FilteringFunctions\FilteringFunctionsF16.c
How to exclude files from compilation
- Navigate to project properties -> Paths and Symbols under the option C/C++ General.
- Select Core/Inc and then click on Exclude resource from build
4. Now we need to add the Arm CMSIS-DSP header files to the project:
5. Click on the Add option and type DSP/Include in the popup and then click OK.
6. Now click the Apply and Close button, now copy the code you have generated using the ASN Filter Designer to main.c and build the project.
Steps for including the Arm CMSIS-DSP library to Arm’s μVision IDE
1. Open your μvision project.
2. Navigate to the Manage Run-Time Environment option.
3. As shown below, you should see a popup, click on CORE and DSP checkboxes under CMSIS and then press the OK button.
The IDE will then automatically add the necessary files to your project.