Work around for Arduino STM32 with IDE V 1.6.3 or newer

Work around for Arduino STM32 with IDE V 1.6.3 or newer

posted in: Arduino, STM32 | 1

Changes were made to the Arduino IDE in version 1.6.2 which prevent the STM32 files from compiling. This article describes a work around that solves this problem.

From Arduino 1.6.2 onwards, the IDE no longer contains support for ARM based boards, this includes the Arduino Due, when it is first installed. A few feature called the “Boards Manager” was added, in 1.6.2 and all non-AVR based boards now need to be installed after the IDE has been installed and run for the first time.

The issue with this, is that the STM32 processor is an ARM M3 series device and requires the ARM compiler, which had previously been part of the default install of the IDE from version 1.5.0 to 1.6.1

The work around is to install the Due using the Board Manager.

On the Tools menu, select Board and then Boards Manager

In the Boards Manager popup, click on the Arduino SAM board (second in the list at the time of writing), and press the install button.

This will download the ARM compiler and the Due source files as well as other tools needed for the Due

Once the install is complete, the STM32 boards should work again.


For those interested in some other technical details…

Not only is the ARM compiler not installed by default, but all of the compilers, both AVR and ARM, have been moved and are no longer installed inĀ  Program Files (on Windows machines), but are instead stored in the individual user’s Application Data (AppData) Roaming profiles folder.Aside from issues about this practice not following Microsoft’s guidelines for the use of this folder and the fact that the compilers are likely to be synced to Microsoft’s cloud drive for anyone signed into Windows with a Microsoft account…The other problem is that the STM32 files (platform.txt), contain the path to the compiler in its original location (in Program Files). Fortunately, after user feedback, the IDE team added a work around for “Legacy” board support, by the use of a new file called platform.rewrite.keys.txt What this file does, is effectively do a search and replace on text in platform.txt in version 1.6.3 + so that the path to the compiler can be replaced with the path to its new location.For STM32 the file looks like thisold.0.compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
new.0.compiler.path={}/bin/One thing to note with this “rewrite keys” mechanism is that it doesn’t seem to work where the text to search contains user defined variables. Specifically the compiler version used to be defined separately in platform.txtbuild.gcc_ver=gcc-arm-none-eabi-4.8.3-2014q1with {build.gcc_vers} being used in the compiler path definition.So the platform.txt had to be changed to reference the compiler version directly for the compiler path, rather than via the substitution.


One Response

  1. Bengt

    Made my day!
    Had some cryptic message about missing files when trying to upload to a generic stm32F103 mini board.

Leave a Reply