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

Hex file size

HI,
From forum i came to know that

1. ZI Data: Zero Initialized Data

2. RO Data are the constants.

Total RAM Size = RW Data + ZI Data
Total ROM Size = Code + RO Data + RW Data

so size of hex file generated after succesfull compilation should size of ROM size.

am I correct? If not correct me please.

Rajbabu.

Parents
  • Apparently you didn't!

    "For example my ROM size is 490KB after compilation of code and at the same time size of .HEX can be 800KB"

    As Per explained, each byte to be programmed is represented by two characters in the Hex file.
    So you should expect that the Hex file will be at least twice the size of the code - shouldn't you?!

    Again, a Hex file is just a means of conveying the data - the Hex file itself is not put into the Flash!

    For a detailed picture of a program's memory usage, look in the Map file...

Reply
  • Apparently you didn't!

    "For example my ROM size is 490KB after compilation of code and at the same time size of .HEX can be 800KB"

    As Per explained, each byte to be programmed is represented by two characters in the Hex file.
    So you should expect that the Hex file will be at least twice the size of the code - shouldn't you?!

    Again, a Hex file is just a means of conveying the data - the Hex file itself is not put into the Flash!

    For a detailed picture of a program's memory usage, look in the Map file...

Children
  • Thanks Neil,

    "Again, a Hex file is just a means of conveying the data - the Hex file itself is not put into the Flash! "

    Now i got it after after reading link provided by you.

    Once i will repeat what i understood for confirmation.

    "HEX file only envelope for our data to understand by programmer what type of data it is.
    So programmer will remove this envelope during programming( writing into flash) and it will write only data into flash."
    Is it correct.

    Rajbabu

  • "HEX file only envelope for our data"

    Correct.

    "to understand by programmer what type of data it is"

    Not really.

    To the programmer, it's just data - the programmer has no "understanding" of what the data represents.

    "So programmer will remove this envelope during programming (writing into flash) and it will write only data into flash."

    Yes.

  • Thanks you very much Neil for your suggestions and support.

    Rajbabu