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
  • Hi again Klaus,

    I have been discussing this internally.

    Can you confirm which version of the compiler you are using? I wonder if this is an issue with an older toolchain.

    It would also be good to use "fromelf -z" on the generated executable. What does that report, and does it match the linker output?

    > fromelf -z Blinky.axf
    
    ========================================================================
    
    ** Object/Image Component Sizes
    
          Code (inc. data)   RO Data    RW Data    ZI Data      Debug   Object Name
    
         14712        202       6608         12       3652      87147   Blinky.axf
         14712        202       6608         12          0          0   ROM Totals for Blinky.axf

Reply
  • Hi again Klaus,

    I have been discussing this internally.

    Can you confirm which version of the compiler you are using? I wonder if this is an issue with an older toolchain.

    It would also be good to use "fromelf -z" on the generated executable. What does that report, and does it match the linker output?

    > fromelf -z Blinky.axf
    
    ========================================================================
    
    ** Object/Image Component Sizes
    
          Code (inc. data)   RO Data    RW Data    ZI Data      Debug   Object Name
    
         14712        202       6608         12       3652      87147   Blinky.axf
         14712        202       6608         12          0          0   ROM Totals for Blinky.axf

Children