Hi All!
!!! EDIT: Most of these steps are not necessary anymore because the board is added to STM32duino for arduino IDE already, it will remain here for people who want to add the board manually !!!
Past month was a frustrating experience for me. I had lots of inconsistencies when uploading code from Platform.IO. Sometimes codes that worked the other day, would not work anymore the other day. After watching a video from Andreas Spies about debugging, he also said that he had some inconsistencies with Platform.IO. So I switched back to Arduino IDE and almost all inconsistencies seem to be gone (for now?).
Platform.IO has many advantages, but if you have the feeling that 80 percent of your time is going into making code runnable and you do not know anymore how to fix it? Then maybe this guide can be something for you!
B-G431B-ESC with Arduino IDE guide:
-
Go to Arduino IDE -> Preferences -> Additional Board URL
and add the STM32duino library: https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json -
Go to Arduino IDE -> Tools -> Boards -> Boards Manager
and installSTM32 Cores
-
After that open file explorer and go to:
C:\Users\wittecactus\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\variants
-
Make a new folder there and name it
DISCO_B_G431B_ESC1
-
Add/replace the following files created by @Owen_Williams : PeripheralPins.c , PinNamesVar.h, ldscript.ld, variant.cpp, variant.h
-
Go to:
C:\Users\wittecactus\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0
and and update the boards.txt file -
Download driver for Windows (available here) and update the ST-Link adapter to the latest firmware (application to upgrade the firmware).
-
Download STM32CubeProgrammer
The board is now fully installed and operational. When uploading use the following settings:
You can now use Arduino IDE and the B-G431B-ESC1 board. It made programming a lot easier for me .
I hope to update the guide soon for full-FOC mode.
Greetings,
Wittecactus
Usefull links:
- Upload methods · stm32duino/wiki Wiki · GitHub
- Add a new variant (board) · stm32duino/wiki Wiki · GitHub
- Useful link with the install guide of STM32duino for Arduino IDE
#Edit 1: Added missing step, thanks @Valentine!
#Edit 2: Added warning because board has been added in STM32duino 2.0