FAQ's and links - Please read if you are new

Please read this if you are new to the STM32

Message to all users

I've upgraded the forum (PHPBB) to version 3.1.10 which is the last stable release in the 3.1 tree.

As far as I can tell everything is still working OK, e.g. all posts look like they are there and the attachments are OK

If anyone has any problems please PM me.
PS. Don't PM the admin account as for some reason I still don't get email notifications of these PM's (but I never have ;-)

User avatar
Posts: 167
Joined: Sat Apr 16, 2016 5:30 pm

Re: FAQ's and links

Postby WereCatf » Wed May 04, 2016 2:22 am

mrburnette wrote:I feel helpful most times, but I have no intentions to tutor a newbie starting at knowledge level zero.

You don't have to tutor newbies if you don't wish to, but in several posts you come off as actively trying to push anyone not up to your standards away. "Go away and stick with baby-toys if you're not already a god-level nerd!" is not a particularly good attitude to foster, IMHO.

User avatar
Posts: 5331
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia

Re: FAQ's and links

Postby RogerClark » Wed May 04, 2016 3:45 am


I think I need to keep this thread clean and just have FAQ's in it.

I'll log in as Admin later and delete all but the FAQ stuff.

If we need to have a discussion about prerequsite skillsets, I think it would be better if its in another thread, or just as a Q and A
(though I'm not sure how it could be phrased)

Posts: 1
Joined: Sun May 08, 2016 7:18 pm

Re: FAQ's and links

Postby jdenis » Sun May 08, 2016 7:24 pm

Hi, forgive me for asking but is it to hard to make the F4 series chip compatible with the STM32DUINO? I'm interested in some newer boards like this one https://world.taobao.com/item/523361737 ... .14.XrYnnB It uses STM32F407VET6, with a lot of good stuff on it even ethernet! Thanks for the attention of all!

User avatar
Posts: 214
Joined: Fri May 22, 2015 12:58 am
Location: Silicon Valley Vortex

Re: FAQ's and links

Postby sheepdoll » Sun May 08, 2016 8:33 pm

jdenis wrote:Hi, forgive me for asking but is it to hard to make the F4 series chip compatible with the STM32DUINO? I'm interested in some newer boards like this one https://world.taobao.com/item/523361737 ... .14.XrYnnB It uses STM32F407VET6, with a lot of good stuff on it even ethernet! Thanks for the attention of all!

There are some F4 variants based on older leaf labs code. This is somewhat hardware dependent.

The current effort is to get the Newer Hardware Abstraction Layer (HAL) code to work with the Arduino IDE. This is in active alpha level development.

The HALMX project uses ST's CubeMx tool to generate the low level code. This is then called by a stripped down version of the library headers. Several of us have some GPIO and USART serial classes working. Some work needs to be done with USB CDC.

User avatar
Posts: 1132
Joined: Mon Apr 27, 2015 1:45 pm

Re: FAQ's and links

Postby martinayotte » Sun May 08, 2016 9:35 pm

Since F4xx is currently supporting Discovery_F407, Netduino2Plus which a F405 as well as plain STM32F4Stamp (another F405), it should not be a big issue for using the above board with the current core since it is a F407, although HALMX initiative is really good and will be even more relevant as new boards will been added.

User avatar
Posts: 5331
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia

Re: FAQ's and links

Postby RogerClark » Mon Oct 10, 2016 11:02 am

RogerClark wrote:Please post your additions and I will merge and remove your postings.


Please read all the way down, as OS specific FAQs are below the general FAQs

Q. Whats this all about?
A. Its about using the Arduino IDE and API to program STM32 based controller boards.

Q: How do I get Started?

  1. install the stm32duino support package with Arduino 1.6.12 - https://www.youtube.com/watch?v=TePglhSkghg + https://github.com/rogerclarkmelbourne/Arduino_STM32
  2. figure out how to upload code to your board
    1. Serial - requires a TTL (3.3V) serial adapter - http://stm32duino.com/viewtopic.php?f=36&p=295
    2. ST-Link - requires a ST-Link adapter - hook up the SWD lines: GND, Clock (labeled DCLK or SWCLK), and Data (labeled DIO or SWDIO) between your ST-Link and board
    3. STM32duino bootloader - requires you flash your target board with the bootloader first
    4. BMP (Black Magic Probe) - requires a device dedicated to being a Black Magic Probe. Hook up the SWD lines like the ST-Link and optionally the UART for debugging
  3. set the Board and Variant for your target under the Tools menu
  4. set the upload method in the Arduino IDE under Tools > Upload method
  5. set the com port for the Serial or STM32duino methods (it's optional for the BMP method)

Q. What boards are supported
A. STM32F103 based boards have the best level of support. This includes STM32F103C serial, STM32F103R series, STM32F103T series, STM32F103V series and STM32F103Z series.
STM32F4 series are supported to a lesser extend, and use a modified version of the F103 codebase.
GD32F103 is also supported within the STM32F103 boards, as they are very similar

Q. What Arduino IDE version is supported
A. Version 1.6.9,1.6.10,1.6.11,1.6.12

Q. What Operating Systems are supported
A. Windows, Vista, 7, 8, 8.1 and 10 are all known to work.
OSX works for most people (Special setup for DFU may be needed)
Linux, both 32 and 64 bit flavours work for most people (Special setup / configuration for both Serial and DFU may be needed based on your distro)

Q.Where can I download the bootloader binaries or source
A. Here... https://github.com/rogerclarkmelbourne/ ... bootloader
There are precompiled binaries for a number of different boards.

Q. How to I get the bootloader onto my board.
A. You will need either a USB to Serial Adaptor or a ST-Link Adaptor, or you can use any other SWD programmer that supports the STM32 e.g. JLink.
See this video which shows how to upload firmware, (a bootloader of a sketch) to a STM32 board using a USB to Serial adaptor

Q. I managed to upload once, (using the bootloader), but when I tried to upload again it didn't work?
A. You probably forgot to select the Serial device for the board. The IDE uses the Serial port to reset the board back into upload mode.

Q: Which upload methods have USB serial?

For the STM32F1 boards, SERIAL_USB is defined for the STM32duino and ST-Link methods. This means the "Serial" object is the virtual UART on the USB port, and UART1 is "Serial1" and so on. For the other upload methods, "Serial" is UART1 and "Serial1" is UART2 and so on.

For the STM32F4 boards, "SerialUSB" is the virtual UART on the USB port and "Serial" is UART1 and so on.

Q.I have another / different board. Can you add support for this board?
A. Sorry. No. If you have a new sort of board based on the STM32F103 or STM32F4 we may be able to help you create the necessary files to add support for that board, but we can't do it for you.

Q. My board has an LED and / or a button on it which doesnt match with any of the available bootloaders. What should I do?
A. If you are despirate to get going with your new board and its not one which the bootloader specifically supports, you can use any of the bootloaders, e.g. generic-pc13.bin, however you won't get a flashing LED to indicate what is going on.
If you want a custom version of the bootloader, you will need to modify the existing code and rebuild it. The process is extensively documented at https://github.com/rogerclarkmelbourne/ ... bootloader

Q. I uploaded a sketch using the bootloader and now want to upload using ST-Link. Why doesn't ST-Link connect?
A. The SWD pins are set to GPIO mode when you use the bootloader and Serial upload methods, so that people can use them as GPIO.
Use the "Connect Under Reset" option in the Windows ST-Link tool, and press and hold reset on the board, then connect via ST-Link and release the button. This eventually works, but sometimes you need to try a few times before it will connect.
If you select the ST-Link upload method, the SWD pins are not assigned as GPIO, so you should be able to upload again without needing Connect Under Reset

General questions

Q. I just flashed the bootloader but I can't see the Maple serial device
A. The bootloader only provides a DFU device, its only for uploading.
The Serial device is compiled as part of the sketch. You will only see a Serial USB device after you have uploaded your first sketch and the sketch is running.

Q. I get a message like "arm-none-eabi-g++: no such file or directory"
A. You didn't follow the install instructions and have not installed the ARM compiler. (Hint, Boards manager - install Arduino SAM (Due) )

Windows specific questions

Q. When I plug in my board to the USB on my PC, it says device not recognized
A.If you have a brand new board, other than a Maple, or Maple mini, the chances are that your board does not have a bootloader, or any other firmware installed on it at all. In this case you need to "flash" the Stm32duino bootloader onto your board.

Q. I installed the bootloader, but Windows says it can't find a driver for the board?
A. You need to install the special Windows driver using the batch file in /drivers/win in the files you downloaded from GitHub

Q: I ran the install_drivers.bat file, but Maple board doesn't create virtual serial port and has yellow exclamation mark in device manager.
A: Connect your board, run the Zadig http://zadig.akeo.ie/downloads/zadig_2.2.exe tool - select Maple in hardware dropdown menu, choose USB CDC driver, install.

Q. I've noticed that Windows device manager shows either the "Maple DFU" device or "Maple Serial". What are these?
A. Maple DFU is the USB device that the bootloader enumerates as, which allows the OS to upload to the board using the DFU protocol.
Maple Serial is the virtual UART / Serial device which the sketch enumerates as, when its running, which you can use Serial.print etc or Serial.read etc to communicate with.

Mac OSX specific questions

Q. dfu-util doesn't seem to work.
A. Install dfu-util using HomeBrew (google osx homebrew if you don't know what this is)

Linux specific questions

Q. dfu-util doesn't seem to work.
A. dfu-util was built for 32 bit linux, and only seems to work on some 64 bit linuxes. The easiest solution is to build dfu-util from the sources included in tools/src/dfu-util and copy the resultant binaries to the tools/linux folder to replace the 32 bit version

Q. Linux won't open the Maple serial port
A. You need to update the rules files. Try running the linux installer script, or search the forum for the ways other people resolved this problem.


Main Github repository. https://github.com/rogerclarkmelbourne/Arduino_STM32
Bootloader Github repository. https://github.com/rogerclarkmelbourne/ ... bootloader

ST-Link utility. http://www.st.com/web/en/catalog/tools/PF258168
ST Serial Flash utility. http://www.st.com/web/en/catalog/tools/PF257525

Main programming reference manual for the STM32F103 series. http://www2.st.com/content/ccc/resource ... 171190.pdf

Old. Leaflabs wiki on the Maple Mini. hhttp://docs.leaflabs.com/docs.leaflabs.com/index.html

Posts: 3
Joined: Fri Dec 23, 2016 8:55 pm

Re: FAQ's and links - Please read if you are new

Postby blackt1ger » Fri Dec 23, 2016 9:54 pm

There was a message post about the steps needed to bring a new board variant up. And now, for the life of me, I can't find it. Could it please be posted in the FAQ's and links?
okay finally found it - https://github.com/rogerclarkmelbourne/ ... -new-board

Return to “Welcome & FAQs”

Who is online

Users browsing this forum: No registered users and 1 guest