cancel
Showing results for 
Search instead for 
Did you mean: 

KEIL very slow with CubeMX

Sasha A
Associate II
Posted on January 29, 2018 at 20:33

Hello!

I am using KEIL MDK 5 and it is compiling very very slow.

CubeMX  v4.24

STM32CubeF4 v4.19.

Any ideas  ??

Thanks

Sasha

#cubemx-4.24 #keil-mdk5
14 REPLIES 14
Posted on January 29, 2018 at 21:45

I see the same problem when compiling STM32F429-DISCO based projects.

Szymon PANECKI
Senior III
Posted on January 29, 2018 at 22:49

Hello Sasha,

Compilation time in Keil MDK-ARM IDE can be significantly reduced by changing project's options: please

uncheck

 ''Debug Information'' and ''Browse Information'' in ''Output'' tab of project's options. Below I attach picture with these two options highlighted.0690X00000609WeQAI.png

Regards

Szymon

Posted on January 29, 2018 at 23:07

It can be a bit of a sloth, especially when 'browser' information is checked, or your AV software drags.

If you have multiple real cores check options there. Hyper-threads tended to slow things back in the day.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 29, 2018 at 23:23

Hello Szymon,

This is not good solution. How am i suppose to find definitions now?? if this is the only solution than i cant use KEIL anymore.

This problem is new and it has began after upgrading to new versions. Before that everything was OK.

I think the problem is within the STM32F4CUBE  drivers. ST changed something inside and caused the problem.

Sasha

Posted on January 30, 2018 at 07:31

Many thanks Szymon for the suggestion. In my case a got the following results:

Tested the 'Rebuild' with checked and unchecked 'Browser Information':

-CubeMX v4.23 generated skeleton + 300 lines o custom code: 40s / 6s

-then migrated the project to CubeMX v4.24: 65s / 6s

In both cases I gained a lot for Rebuild process.

Test was performed a few times.

Posted on January 30, 2018 at 09:58

I noticed this problem some time ago for F4 but ignored it because it has the impact only on Rebuild, not on the regular Build process (which actually takes much less time).

I see slightly longer Rebuild time when v4.24 is used.

Posted on January 30, 2018 at 09:00

But you cant use the 'go to definition' option without the Browse information checked.

Posted on January 30, 2018 at 09:40

True. Just tested the performance.

Posted on January 30, 2018 at 09:52

Hello Sasha,

I confirm, that unchcking each of options, which I mentioned, introduces a drawback or limitation.

When you uncheck 'Debug Information', durign debug session you will experience problems with debugging.

When you uncheck 'Browse Information', you will experience problems with navigating in the source code.

But having in mind these two options you can decide to switch them on or off depending on the situation if you need them or not.

I don't have an information if latest

STM32F4 Cube

libraries compile longer than previous releases. But what I see on my side is that that Keil projects with F0/L0 HAL libraries compile much faster then Keil projects with F7/L4 HAL libraries. I guess that it is related to amount of code included in libraries (bigger libraries = longer compilation time).

You may consider to switch from HAL to LL for STM32F4 Cube. It should help a lot to decrease compilation time. 

Regards

Szymon