Skip to main content
eng23
Senior
April 22, 2020
Question

Speed up compile time in STM32CubeIDE

  • April 22, 2020
  • 9 replies
  • 3705 views

Hi,

Is there a way to compile the firmware using GCC in different computers or in a faster server available in local network?

I am using STM32CubeIDE, GCC, TouchGFX and my compile time is increasing as the code sizes increases too. Now I take about 5 minutes to compile...

I've found some applications to build a "farm of compilation", along different computers in local network, but it was for Linux, I'm Windows user.

*I have already tick "Enable parallel build" in C/C++ Build.

Regards,

Anderson

This topic has been closed for replies.

9 replies

Martin KJELDSEN
Principal III
April 22, 2020

5 Minutes seems like a very long time. I'm assuming you have a fairly new computer.

Something like antivirus interrupting?

/Martin

eng23
eng23Author
Senior
April 22, 2020

Hi @Martin KJELDSEN​ 

Thanks for reply.

It takes 5 minutes when I do Clean>Rebuild All. When I only Build it takes about 2 minutes... but still long time.

No, I've tested without antivirus working and my computer is a good one.

I've tested in others computers and I get the same result with this code.

Some time ago I tried the new version of Touchgfx in H7, and it took about 20 seconds to compile, very fast. Of course there was one screen and no long code. I don't know if the version can affect compile time...

I have 13 screens and my firmware takes about 5MB of flash.

Anderson

Martin KJELDSEN
Principal III
April 22, 2020

Peculiar. You could send the project to me and i could try it.

Pavel A.
April 23, 2020

I know someone who uses ccache with Atollic. Should work for CubeIDE too.

On Windows, you can use Linux tools in a container or VM.

The initial step of "headless" scripts (initialization of workspace, importing the projects into workspace) takes quite long time, even before compilation starts. if ST developers could improve *this*, would be super great.

-- pa

alister
Senior III
April 23, 2020

But for Eclipse CDT generally, go to Settings, C/C++ Build, Behavior tab, enable Parallel build.

eng23
eng23Author
Senior
April 28, 2020

This one I've already enabled..