It has recently become a lot simpler to work with STM32-based boards, because of an add-on by Roger Clark called Arduino-STM32. While still early days, the project allows using the Arduino IDE version 1.6.5 to build and upload “sketches” to an attached STM32 board.
There are many STM32 boards – only a certain number have been added and tested so far. The project is under fairly active development, with a forum at http://stm32duino.com/ :
Please read through the Installation page on the GitHub wiki if you want to try this out.
To get started, you’ll need to put a copy of the files in the GitHub repository inside a folder called “hardware” in your “Sketchbook folder” (should be well-known to Arduinoistas…).
How exactly this is done depends on whether you are on Windows, Mac OSX, or Linux, and what tools you are familiar with. There is the GitHub Desktop app, for example, which makes it very easy to manage copies of software obtained from GitHub, as well as letting you “commit” changes and send “pull requests” to contribute to OSS projects.
Alternately, you can go to the github.com site, and download a ZIP file.
If you’re comfortable with the command line, try something like this:
cd /path/to/Arduino
mkdir -p hardware
cd hardware
git clone https://github.com/rogerclarkmelbourne/Arduino_STM32.git
git checkout development
In all of these cases, please use the “development branch” for now, which is where the latest changes tend to appear first. At this early stage of the Arduino-STM32 project, several of these changes will be essential for following along with the work described here.
Ok, once the directory has been downloaded, unpacked, and moved in the right place, you need to restart the Arduino IDE (it doesn’t pick up changes on the disk, or at least not all).
The “Tools” menu should now allow you to select many new boards, something like this:
The “Tools” menu itself will also change, depending a bit on the combination of settings:
Some of these options may change in the near future. Unfortunately, getting all of them just right is essential for making this stuff work. When in doubt, you should probably head over to the forum or the issue tracker on GitHub, to find out how to solve the problem.
And if you think you’re almost there: rest assured, there are many pesky little details!
One of them is understanding the way uploads work, and the many alternatives available, also for communicating over a serial port and for debugging at the hardware level.
Uploading and basic communication is a topic in itself, to be described in a separate series.
[Back to article index]