Setting up Arduino IDE for STM32

First, open up Arduino IDE. Now navigate to File and click on Preferences.

Once we click on preferences, a new window opens up. The preferences menu is used to customise your Arduino IDE, you can change font sizes, editor language and more. The part that we are interested in is called Additional Boards Managers URLs, we need to paste the link given below into this field.

After pasting the given link in the Additional Boards Managers URLs field, click on OK. Now we are ready to add the support for STM32 based boards in the Arduino IDE. Navigate to Toolsand then Board, Once your cursor goes to Board, a list of installed boards appears. Now click on Boards Manager.

This opens up a new window. The Boards Manager is how you can add support for additional boards from different OEMs. Once the boards manager opens up, click on the Type dropdown in the top left corner and select Contributed. You will see a list of different development boards under STM32 MCU based boards: click on Install.

All the relevant files will be downloaded and support for STM32 based boards will now be added to Arduino IDE. Once the installation is finished, we can close the Boards Manager. Now we will select the Nucleo 64 board for our Arduino IDE. Again Navigate to Tools and then Board, select STM32 based boards and finally the Nucleo-64.

Once we have selected the Nucleo-64, we open the Tools menu again. Now we can select the exact model of the Nucleo-64 board. UnderTools, go to the Board part number and select Nucleo F411RE, which is the version supported by the Simuli Virtual Lab Platform.

Now we are ready to program the STM32 using our Arduino IDE.

For our Motor driver example, we will need to install an additional library that supports the DRV8834. For this, we will be using the Library Manager built into the Arduino IDE. Go to Tools and then select the Manage Libraries... option.

A new window called the Library Manager opens up. We need to search for the library for the DRV8834. Now select the StepperDriver library and click on Install. This will install the libraries required for programming the DRV8834.

Finally, let's use the Arduino IDE to program the STM32 and the stepper motor driver.

Last updated