5445 views|10 replies

1368

Posts

6

Resources
The OP
 

About the compilation speed when compiling STM32 with MDK [Copy link]

 
The most commonly used compilers for developing STM32F are generally MDK and IAR. IAR is relatively simple and has slightly better compilation efficiency. MDK simulation effect is better, and most people first come into contact with keil, so it may be faster to get started. I also often use iar and MDK. The MDK project is large, so the compilation speed is naturally slow. Sometimes it is very annoying to compile for a small modification for a long time. In fact, there are some tips in MDK to improve the compilation speed: 1) Make the files that do not need to be modified in the project into library files. There are many detailed tutorials on the Internet about how to generate and load lib, so I will not go into details here. The author's original project took about 1 minute and 2 seconds to compile. I compiled the files that did not need to be modified into lib, added them to the project, and recompiled. The compilation time was only 17 seconds. Of course, this is related to the computer and the project. 2) Remove some unnecessary compilation options, such as debugging information, as shown below: After this optimization, the compilation speed can be increased by about 5-10 seconds. Of course, this is related to the project and computer configuration. 3) Remove unnecessary source files and unused functions. 4) In addition, if you are familiar with registers, you can directly operate on registers, which is faster than directly calling library functions, but of course not too obvious. 5) The computer configuration is higher, this is a must-have skill^_^ 6) You are welcome to add other improvement tips, thank you^_^ This content was originally created by EEWORLD forum user 懒猫爱飞. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source



This post is from stm32/stm8

Latest reply

Yes, you can update it. At least you should use the official version 5.26. 5.27 has many new features that are good.  Details Published on 2019-2-24 10:16
Personal signature专注智能产品的研究与开发,专注于电子电路的生产与制造……QQ:2912615383,电子爱好者群: void
 

931

Posts

3

Resources
2
 
    I've learned a lot! I'm still in the process of getting started, and my projects are very small. I haven't noticed that the compilation takes too long, usually only a dozen seconds at most, which is within the tolerable range.
This post is from stm32/stm8
 
 

1368

Posts

6

Resources
3
 
hujj posted on 2019-2-21 10:40 I have learned a lot! I am still in the process of getting started, and the projects are very small. I have not noticed that the compilation takes too long. Usually I wait for more than ten seconds at most. In...
This post is from stm32/stm8
 
Personal signature专注智能产品的研究与开发,专注于电子电路的生产与制造……QQ:2912615383,电子爱好者群: void
 

7452

Posts

2

Resources
4
 
Change to version 6 of the compiler.
This post is from stm32/stm8

Comments

Currently using version 5.25 of MDK  Details Published on 2019-2-21 14:33
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

1368

Posts

6

Resources
5
 
freebsder posted on 2019-2-21 13:31 Change to version 6 of the compiler.
Currently using version 5.25 of MDK
This post is from stm32/stm8

Comments

Find it in the C/C++ tab.  Details Published on 2019-2-21 15:15
 
Personal signature专注智能产品的研究与开发,专注于电子电路的生产与制造……QQ:2912615383,电子爱好者群: void
 
 

7452

Posts

2

Resources
6
 
Lazy Cat Loves Flying posted on 2019-2-21 14:33 Currently using version 5.25 of MDK
Find it in the C/C++ tab.
This post is from stm32/stm8
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

4005

Posts

0

Resources
7
 
You can also configure the project to group the code by function
This post is from stm32/stm8
 
 
 

4005

Posts

0

Resources
8
 
You can also edit the library, with the debug option and open the library project, you can single-step into the library for debugging
This post is from stm32/stm8
 
 
 

137

Posts

0

Resources
9
 
The key is to uncheck the browse information. Try it with the latest mdk5.27 version https://armkeil.blob.core.windows.net/eval/MDK527pre.EXE
This post is from stm32/stm8

Comments

The update is so fast, it’s already version 5.27, and I’m still using version 5.24^_^  Details Published on 2019-2-23 08:47
 
Personal signature 与时间赛跑
 
 

1368

Posts

6

Resources
10
 
xinxiaojun posted on 2019-2-22 14:20 The key is to uncheck the browse information. Try the latest mdk5.27 version https://armkeil.blob.core.wind ...
The update is so fast, it's already version 5.27, and I'm still using version 5.24^_^
This post is from stm32/stm8

Comments

Yes, it is time to update. At least the official version 5.26 should be used. 5.27 has many new features.  Details Published on 2019-2-24 10:16
 
Personal signature专注智能产品的研究与开发,专注于电子电路的生产与制造……QQ:2912615383,电子爱好者群: void
 
 

137

Posts

0

Resources
11
 
Lazy Cat Loves Flying posted on 2019-2-23 08:47 The update is so fast, it's already version 5.27, and I'm still using version 5.24^_^
Yes, you can update it. At least you should use the official version 5.26. 5.27 has many new features that are good.
This post is from stm32/stm8
 
Personal signature 与时间赛跑
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list