cancel
Showing results for 
Search instead for 
Did you mean: 

Speed up compile time in STM32CubeIDE

eng23
Senior

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

9 REPLIES 9
Martin KJELDSEN
Chief III

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

Something like antivirus interrupting?

/Martin

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

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

Sorry, but it is code from my company, I can't share.

But if there is some test that I can do here please let me know.

What I could see in Compile Console is the Touchgx files, I think 80% of time is spent on this...

What time would be expect in a code with this size for example? Is too away from mine?

in my case it helped a lot to switch off the *.bin file generation...

project -> properties -> c/c++ build -> Settings -> mcu post build ouputs -> tool settings tab -> uncheck "convert to binary file"

these bins can get really large and depending on your storage place (network share ?) this can cause some trouble.

Pavel A.
Evangelist III

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
Lead

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

Thanks for answer, but I've already unchecked this option

I have enabled only hex file..

This one I've already enabled..