cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the code size in IAR

darla14
Senior
Posted on March 02, 2016 at 07:29

is the.map fiel correct way to determine the size of the code?

I have written a module and wanted to find the size of the code (ROM and RAM).I first took a STM32F* template built it and noted the figures from the .map file (readonly code memory,readonly data memory ,readwrite data memory)

Then I added my module and call it in one of the while loop and then  built it and noted the figures from the .map file  again(readonly code memory1,readonly data memory1 ,readwrite data memory1)

Now is the code size of the new module i have made will be the difference of the two map file figures.

in Keil when we load the hex file we come to know about the size of the code before run time.I have seen teh size reported by the Keil and IAR are different.Is this due to the internal in built  funciton used by each compiler IAR vs Keil?

#codesize #keil #iar
1 REPLY 1
AvaTar
Lead
Posted on March 07, 2016 at 07:39

> is the.map fiel correct way to determine the size of the code?

 

Yes, I think so.

I don't know why the IAR toolchain does not include size information in the build console output.

> I have seen teh size reported by the Keil and IAR are different.Is this due to the internal in built  funciton used by each compiler IAR vs Keil?

 

Even if it's the same source code that both builds were created from - they have different project settings, different libraries and startup code, and different compilers (and none of them is gcc-based). So the results are necessarily different.