Optimized application of MDK

Source: Internet
Author: User

MDK the optimized application http://blog.163.com/zhaojun_xf/blog/static/300505802011291384721/

?????? using KEIL/MDK for so many years, it has not used its code optimization function. Always feel that it is not necessary to be able to accommodate the capacity. When you recently made a webcam project, you can always display approximately on tft 2/3 image. The remaining 1/3 are not displayed. When the key is pressed, the entire tft can be displayed, then according to the analysis, It should be because the code is too slow. But the analysis of the code is really no place to change. So is the single-chip microcomputer operating speed problem?

?????? This code is intended to be used IAR written, and in the monolithic computer implementation, the effect is very good. So we can completely eliminate the above problem. Then it can only be explained that the compiler platform in the process of generating code, causing a speed problem.

?????? in that case, let's optimize the code by changing MDK optimization option, after compiling the download, the problem is fixed. Look at the optimization function is still good.

??

??

To ensure that your code runs correctly after optimization, be sure to add it before the variable that cannot be optimized: volatile .

Optimized application of MDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.