Skip to main content
Sasha A
Associate II
January 29, 2018
Question

KEIL very slow with CubeMX

  • January 29, 2018
  • 6 replies
  • 3963 views
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
This topic has been closed for replies.

6 replies

Bogdan Golab
Lead
January 29, 2018
Posted on January 29, 2018 at 21:45

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

Szymon PANECKI
Senior III
January 29, 2018
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

Sasha A
Sasha AAuthor
Associate II
January 29, 2018
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

Tesla DeLorean
Guru
January 29, 2018
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 VenmoUp vote any posts that you find helpful, it shows what's working..
Bogdan Golab
Lead
January 30, 2018
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.

Tilen MAJERLE
ST Employee
February 1, 2018
Posted on February 01, 2018 at 09:31

Hello,

problem on your side is due to the fact thatstm32fxxxxx.h files (files with bit descriptions, peripheral memory addresses) have been enlarged by 2 additional definitions for every bit, and can go up to 20k lines of code in F7 family:

/* These 2 are new for every bit */
#define PERIPH_REG_BIT_Pos 1
#define PERIPH_REG_BIT_Msk (1 << PERIPH_REG_BIT_Pos)
/* This one is old */
#define PERIPH_REG_BIT PERIPD_REG_BIT_Msk�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

Keil cannot handle (apparently) big files for include. Similar problem does not affect GCC or IAR.

Best regards,

Tilen

Meyer Yu
Visitor II
November 28, 2018

Change Arm compiler to use V6, default is V5.

You can modify it on Project Option → Target → Code Generation.