Skip to main content
HPere.1
Associate II
Aug 3, 2020 8:49 PM UTC
Question

How to make CubeMX Makefile to use Clang instead of GCC?

I have been using CubeMX to generate HAL libraries and made use of simple makefile option. I realized that makefile is based on GCC and what should I do to make use of clang instead of GCC and compile the project?

This topic has been closed for replies.

1 reply

TDK
Aug 4, 2020 2:50 AM UTC

CubeMX doesn't have this option. It's something you'd have to change yourself within the project. Add the path to the Clang binaries so the compiler sees them before it sees the GCC ones. Might have to tweak a few more things since some syntax is compiler specific.

"If you feel a post has answered your question, please click ""Accept as Solution""."