tip - how to see your project code size without digging in the map file  (CodeWarrior >=10.3 print size feature)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

tip - how to see your project code size without digging in the map file  (CodeWarrior >=10.3 print size feature)

1,565 Views
macl
Senior Contributor I

Hi,

I just learned how to do this and thought I would share.  This is a feature of CodeWarrior for MCUs 10.3 and later with gcc selected as compiler.  Someone asked me if there was a "button" that you could push to see what your compiled code size was, instead of having to open and scrutinize the map file which has this info.  Looks like there is not a button, but there is a check box to enable it to print this information to the console window.


So, in summary, to enable the project size to be printed to the console window after a build,  I did this.

 

Go to Project…Properties…C/C++ Build…Settings…

 

Tool Settings (Tab)…Additional Tools…  check Print Size

 

                11144_11144.pngprint_size.png

 

Build Artifact (Tab)…remove all spaces in the Artifact name: field.  In my case, I replaced the folder name “Int Flash SramData Debug” with “Int_Flash_SramData_Debug”.

11145_11145.pngprint_size_no_spaces.png

 

Now when the project is built, it runs the GNU Print Size utility to print the code size to the console. The code size is shown for in text, data, and bss sections as well as total size in decimal and hexadecimal format.

 

11146_11146.pngprint_size_console.png

 

Mac L

Labels (1)
0 Kudos
0 Replies