Showing results for 
Search instead for 
Did you mean: 

Custom toolchain for STM32CubeIDE


The STM32CubeIDE uses toolchains from and the version it uses is 7.

I'd like to use some C++17 features which are not available with gcc7.

How can I add a custom toolchain to the IDE? Is there an easy way? Is there a way to get updates or alternatives to achieve my goal?




There has been support for custom toolchains for a while now.

If you go to Preferences and Toolchain Manager


This will bring up a window where you can browse for a local toolchain installed on your PC.


I have not used this myself so I cannot say whether this is prone to errors, but it is there, and you might even be able to use other toolchains that are not gcc based.

Thanks @Adam Hamilton, I was aware of this feature, and I tried it, and it doesn't work for either clang or the standard gcc toolchain from ARM. The reason is that it seems to look for specific things that ST have compiled into their own toolchain. This is a huge shame, as it would be amazing if it worked in a more generic fashion.


If anyone out there DID get this working, I'd love to know how. The reason it doesn't work for clang is that it expects the gcc directory structure layout, which the clang toolchain doesn't have.

Yes @etheory - I tried this with the latest version of the ARM GCC compiler. I ran into a similar problem.

The problem I ran into was the -fcyclomatic-complexity option. This was an unrecognised option with the official GCC compiler. Removing this from the compilation options (in the Tool Settings) worked for me.

ST could solve this where installing a local toolchain (not compiled by ST) should disable (or at least uncheck) any non-standard option.