This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RAM/ROM usage calculation

Hello,
I am using C compiler version 4.27, assembler version 5.04 and linker version 4.28, along with microvision 3.05. Is there a way to calculate the RAM/ROM usage of my application?
Thanks in advance
Cactus Blip

  • Yes. Write the application. Compile. Link. Look in the map file.

    That is the only working way. There are no fixed relation between number of source code lines and amount of generated code.

    Even if you could get an estimate that the produced code size would be x * number of if statements + y * number of case statements + ..., you would still have a bit problem trying to predict the amount of code space needed for the runtime library, i.e. how much of the runtime library that the application will drag into the binary.

  • Per,
    Thanks for your reply. I knew that, but I cannot find a summary in the .map file. Do I have to sum up all the numbers manually?

  • I have not done 166 for a while, but, if I recall correctly, it is the same as for the '51.

    in that case all you need is the last entry in the list for which origin + size = total use.

    Erik