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
  • The hex file is a file in ASCII. So every byte in the ROM is represented by two ASCII characters.

    And the hex file also contains checksum information, and address information.

    So in the general case, the hex file will be more than twice as large as the ROM image.

    Just that in case there is a hole in the ROM image, then a binary file may contain filler data for that gap, while the hex file may instead just contain an address reference to inform where the rest of the data should be placed. So a hex file can in that case be smaller than a binary file.

    In short - you shouldn't draw too large conclusions from the size of a hex file.

Reply
  • The hex file is a file in ASCII. So every byte in the ROM is represented by two ASCII characters.

    And the hex file also contains checksum information, and address information.

    So in the general case, the hex file will be more than twice as large as the ROM image.

    Just that in case there is a hole in the ROM image, then a binary file may contain filler data for that gap, while the hex file may instead just contain an address reference to inform where the rest of the data should be placed. So a hex file can in that case be smaller than a binary file.

    In short - you shouldn't draw too large conclusions from the size of a hex file.

Children
More questions in this forum