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

Total ROM Size in -map file doesn't include last byte of ROM, why?

Hello,

for crc calculation, I'm using the total ROM size out of the .map file.

To check, all code is included, I've added the total ROM size to my start address.

Then I saw, that I only get the address of the first byte of my last word, half word ....

I would expect to get the address of the last byte or the last byte plus some stuffing bytes to get an alignment of 4.

Do you know, why I get the address of the first byte (of my last word/half word....) if I'm adding the total ROM size to my start address?

Best regards,
klaus

Parents
  • Hello Klaus,

    I'm not sure I understand where you are deriving your data. Could you add an output file or similar so that I can understand it better? Please also confirm which compiler version, and which processor you are using.

    Looking at the .map output of an example project, I see something like this:

    Memory Map of the image
    
      Image Entry point : 0x00000401
    
      Load Region LR_ROM (Base: 0x00000000, Size: 0x00005354, Max: 0x00080000, ABSOLUTE)
    
        Execution Region ER_ROM (Exec base: 0x00000000, Load base: 0x00000000, Size: 0x00005348, Max: 0x00080000, ABSOLUTE)
    ...

    This says the size of the execution region is 0x5348 bytes. The last filled byte of this section would therefore be 0x5347.

    This matches the last entry in this section (0x5328+0x20):

    ...
      0x00005328   0x00005328   0x00000020   Data   RO          578    Region$$Table       anon$$obj.o

    However the load region is size 0x5354, as it also contains some RW data which is to be placed in a subsequent execution region.

    I believe all the information output is correct?

Reply
  • Hello Klaus,

    I'm not sure I understand where you are deriving your data. Could you add an output file or similar so that I can understand it better? Please also confirm which compiler version, and which processor you are using.

    Looking at the .map output of an example project, I see something like this:

    Memory Map of the image
    
      Image Entry point : 0x00000401
    
      Load Region LR_ROM (Base: 0x00000000, Size: 0x00005354, Max: 0x00080000, ABSOLUTE)
    
        Execution Region ER_ROM (Exec base: 0x00000000, Load base: 0x00000000, Size: 0x00005348, Max: 0x00080000, ABSOLUTE)
    ...

    This says the size of the execution region is 0x5348 bytes. The last filled byte of this section would therefore be 0x5347.

    This matches the last entry in this section (0x5328+0x20):

    ...
      0x00005328   0x00005328   0x00000020   Data   RO          578    Region$$Table       anon$$obj.o

    However the load region is size 0x5354, as it also contains some RW data which is to be placed in a subsequent execution region.

    I believe all the information output is correct?

Children