<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>size of the executable using make command</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2603/size-of-the-executable-using-make-command</link><description>I want to get size of the project executable and display it in make file. How to get exact size of the executable file in make file. 
 Can you please provide the make file command to extract this information.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Aug 2014 07:29:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2603/size-of-the-executable-using-make-command" /><item><title>RE: size of the executable using make command</title><link>https://devzone.nordicsemi.com/thread/10307?ContentTypeID=1</link><pubDate>Fri, 15 Aug 2014 07:29:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9837cca-1aa9-411f-abb7-01592f51d311</guid><dc:creator>Anne</dc:creator><description>&lt;p&gt;Hey Hakon, I think &amp;quot;Flash size = text; RAM = data + bss; dec = RAM+flash&amp;quot; would be easier to read. Right now it&amp;#39;s a little hard to figure out how the line parses.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: size of the executable using make command</title><link>https://devzone.nordicsemi.com/thread/10306?ContentTypeID=1</link><pubDate>Thu, 22 May 2014 13:45:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60fedbc4-8623-4904-847e-803720ca2668</guid><dc:creator>raju</dc:creator><description>&lt;p&gt;Thank you very much for your input!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: size of the executable using make command</title><link>https://devzone.nordicsemi.com/thread/10305?ContentTypeID=1</link><pubDate>Thu, 22 May 2014 08:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8502a245-1a05-44c5-9425-42fc55301855</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can get the size by calling
&lt;code&gt;arm-none-eabi-size _build/outfile.out&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It will give you something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
   text    data     bss     dec     hex filename
  37568     128    4112   41808    a350 _build/example.out

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Flash size = text
RAM = data+bss
dec = RAM+Flash&lt;/p&gt;
&lt;p&gt;Go to your makefile.common and add it somewhere, for instance in the .out-&amp;gt;.hex conversion:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
## Create binary .hex file from the .out file
$(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex: $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
	$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
	arm-none-eabi-size $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note, if you check out my colleagues repo and use those makefiles, then it&amp;#39;s taken care of for you:
&lt;a href="https://github.com/hlnd/nrf51-pure-gcc-setup/tree/master/template"&gt;github.com/.../template&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>