For the STM32 microcontrollers we use, there is a specific IDE that is used to configure the microcontrollers, write code for them, and debug using the hardware. For this bootcamp and when you are writing drivers as a task, you will be using the STM32 CUBE IDE.
To open the provided base project ensure you had the IDE downloaded and navigate to the “.project” file in the forked Git repo and open it.
Use the default workspace for now, this is just a folder that can save your preferences.
Find the project in the “2021-Firmware-Bootcamp” project explorer on the left side of the screen.
...
Clone your forked bootcamp into a folder
...
Import the project (File > Import… > Existing Projects into Workspace > Next)
...
Set the root directory to be the folder in which you cloned into. Make sure the nucleof072rb project is checked. Click Finish.
...
This IDE can generate code to configure the microcontroller’s pins and that is exactly how we will start.
STM32 Cube IDE Device Configuration Tool
Double click on the “2021-Firmware-Bootcamp“nucleof072rb.ioc” file. This or the blue “MX” button in the top right corner , and this will bring you to the device configuration tool.
...
This is the microcontroller chip that is being used in this bootcamp.
Configuring Pins and Peripherals
This chip by default will not have any of the pins we need configured. To configure them either find the pin you want to configure and click on it, or use the menu on the left and find what configuration you want it to be.
...
For this bootcamp you will need to configure pins for the SPI communication line, an extra GPIO line to manage the chip select “CS” line to the ADC, and a timer output for the PWM signal to the motor.
The pins used for this bootcamp are specified in the schematic on the next pageNote that the project you are given will have some initialized pins (seen above). You do not need to worry about those as they are configured by default.