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
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
Hello Ronan,
here are our compiler and linker versions:
MDK Essential 5.37C Compiler: ArmClang.exe V6.18Assembler: Armasm.exe V6.18Linker/Locator: ArmLink.exe V6.18Library Manager: ArmAr.exe V6.18
Now I'm totally confused....
here is my map. file output:
============================================================================== Code (inc. data) RO Data RW Data ZI Data Debug 120140 2874 26472 4496 16316 1308369 Grand Totals 120140 2874 26472 296 16316 1308369 ELF Image Totals (compressed) 120140 2874 26472 296 0 0 ROM Totals ============================================================================== Total RO Size (Code + RO Data) 146612 ( 143.18kB) Total RW Size (RW Data + ZI Data) 20812 ( 20.32kB) Total ROM Size (Code + RO Data + RW Data) 146908 ( 143.46kB) ==============================================================================
and fromelf-z tells me:
======================================================================== ** Object/Image Component Sizes Code (inc. data) RO Data RW Data ZI Data Debug Object Name 120140 2874 28504 4496 16316 1308369 C:... (uncompressed) 120140 2874 28504 296 16316 1308369 C:... (compressed) 0 0 2032 0 0 0 (incl. padding) 120140 2874 28504 296 0 0 ROM Totals for C:...
There are the same size for code, rw and zi data, but different size for ro data....
Hmm... the difference is the 2032 bytes of padding (26472+2032=28504).
Is the "ROM Totals" from fromelf correct?
Yes, if I add the ROM totals from fromelf (Code + ro data + rw data) I'll get the expected result.
Thanks for confirming. I'll flag this up internally.
thank you very much.
It seems like the output of the fromelf is the same as the compressed size, we've talked about several days ago...