Skip to main content
HPere.1
Associate II
August 3, 2020
Question

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

  • August 3, 2020
  • 1 reply
  • 941 views

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
August 4, 2020

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""."