MCU development code amount, the amount of data analysis

  In the course of using the MCU, engineers tend to pay special attention to the code volume, or the amount of data occupancy. MCU in the field of development, stringent hardware resources is a major feature of the area. Under harsh conditions, designed to meet the goals, the program is running stable, small size program code is a software engineer at the goal.

  Below to talk about themselves in the actual software development is how to grasp the program code size, the size of data occupies, to share a little experience.

  Hands, is being used to Fatfs file system, then fatfs file system talk about it!

  

  After the first in keil MDK integrated development environment, compile a project, compiled. View the output, as shown below:

         

  Icon: no error no warning, compile, submit it to dry off work. But that is not what we requested, in-depth optimization, analysis of code into another realm of their own!

  See above Program Size size always feel uncomfortable, such as a loud noise. There is always an idea which is still able to smaller.

 

  So explore just begun ......

  Step one: Go to the project file path, find MDK build output folder, open the .map file. Mouse toss (or if you do not have a mouse), until the last, to find this:

  Thus according to Program Size numerical value plus one plus, Hey, exactly the same, so the original!

  Step Two: to see so much value is always unhappy, that RO-data how can so much of it, before writing down, or need to talk to each of the above parameters do you mean (in case you do not know what 0.0) See blog: https://www.cnblogs.com/iriczhao/p/10500842.html , so he look .map file, as shown below:

Found, RO Data to 176,320, the right pleasing to the eye and saw cc936.o. Oo! So, this file may have a special place. Ever since, the project opens, look for the file, as follows:

You look worried angry, then shot a small part. Turned out to be such a string, which leads to RO Data become so big. Thus, an impulse which was commented, recompiled, as follows:

Wow! How such a small change to take advantage of lower than 100 K, for a time I could not believe Kazakhstan. A little happy, that was it. But not without cc936 ah, if it is commented out, then, fatfs file directly to the side to cool the system.

 

to sum up:

  Front feeling too much nonsense, so to sum up.

  (1) In keil MDK integrated development environment, .map file is extremely important. Through the relevant information provided in that document, the quick access to data and information program code size of each file generated by the compiler and so on (did not finish it! Can actually look)

  (2) by a wave of operation of the process, I believe you will optimize the program, there will be more in-depth understanding of the design (I'm not a big brother, but I would like to share a small idea Diudiu 0.0, on par with the big brother!).

 

Written in the last: 

IF (error text)
{
   Please tell me and I will correct!
   Do not call me yo!
}
else
{
   Haha! I wish to read the documentation happy!  
}

 

Guess you like

Origin www.cnblogs.com/iriczhao/p/11005018.html