Setting up the required CMSIS files
In this section, we will work through the process of integrating CMSIS files into our project. These files also contain the definitions of all the registers and their respective bits, making it easier to manage and configure peripherals without manually defining each register.
Getting the right header files
Let’s start by downloading the package for our microcontroller from the STMicroelectronics website:
- Open your browser and go to https://www.st.com/content/st_com/en.html.
- Search for
STM32CubeF4
to locate the package for the STM32F4 microcontroller series. - Next, download the STM32CubeF4 package:
- Locate the STM32CubeF4 package and download the latest version. Make sure not to download the patch version.
- Once the download is complete, unzip the package. You will find several subfolders inside, including the
Drivers
folder.
Our next steps involve organizing the files:
- Inside your project workspace, create...