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

Why RW section belongs to Total ROM

Hi All,

I am using Keil uV5.15 version IDE for Cortex M0 controller. In order to calculate the total flash usage I am finding conflicts by seeing:
1. Size in IDE after build "data + RO" in KB
2. Size mention in map file - Total ROM size "data + RO + RW"

Can you please tell which data I should consider and why it is different at different places?
As per my understanding, RW is data belongs to RAM. So why it is consider in map file for ROM size calculation?

Thanks in advance!

Parents
  • So it means for the below condition say:
    Condition 1: char a;
    ROM usage 0 byte
    RAM usage 1 byte

    Condition 2: char a = 10;
    ROM usage 1 byte
    RAM usage 1 byte

    Is it correct?

    Also please tell for my other query - How can we calculate the total Flash size by seeing the build in IDE?
    say after build in keil IDE:
    Program Size: Code=37300 RO-data=1476 RW-data=516 ZI-data=1748

Reply
  • So it means for the below condition say:
    Condition 1: char a;
    ROM usage 0 byte
    RAM usage 1 byte

    Condition 2: char a = 10;
    ROM usage 1 byte
    RAM usage 1 byte

    Is it correct?

    Also please tell for my other query - How can we calculate the total Flash size by seeing the build in IDE?
    say after build in keil IDE:
    Program Size: Code=37300 RO-data=1476 RW-data=516 ZI-data=1748

Children
  • Static initialization data will be in ROM. You should add everything except ZI (Zero Initialize)

    Need more information or confirmation, then look at what is decribed in .HEX output, or size of sections in .AXF file.with FromELF.

    Review also the concept of a Load Region, like unpacking a box with all the pieces need for.running your code.