Hi,
Can anyone tell me how my code can know what size the image is in FLASH ? Is there a symbol that I can reference that shows how much space the image occupies ?
I know this information is obvious from the generated .HEX file (and it may be possible to work it out from the .MAP file). I currently have to post-process the .HEX file and patch it (updating the relevant line's checksum accordingly).
Surely there is an easier way to do this !
Note that I'm not looking for the size of the CODE segment, just the overall image size.
Any ideas ?
Thanks,
David.
Nothing patronizing about my answer, and I have read the full thread.
I have not said that you are trying to use the FLASH for writeable variables. I am saying that your compiler specifically knows that it can't put variables there, and that I belive that is the reason why the symbols are zero.
And I'm trying to suggest that your R/W data is only represented by the IRAM1 symbols.
It is not an explanation why the compiler doesn't emit enough information to add upp to the total used space in the FLASH, but a suggestion why your IROM1 symbols shows zero for RW and ZI, while your IRAM1 symbols for RW and ZI are not zero.
Thanks for the reply Per, and my apologies if I misinterpreted the intention of your comment.
Believe me, with 20+ years embedded experience, I do know the difference between non-volatile/persistent and volatile storage media. I understand what you are suggesting and even agree that it makes some sense. However, it brings me back to the unanswered question of what is the point of the linker emitting symbols that, if you are completely correct, are ALWAYS going to be 0 ?
Regards,
PS: While I would certainly appreciate any comment you may have on my question above, I think this thread has probably started to outlive its usefulness. I'll look forward to the relevant information being made available by the linker some time soon.
Thanks to everyone who has contributed.