2016-03-01 10:29 PM
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 #iar2016-03-06 10:39 PM
> 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.