Hi all,
I want to place a library in to a specific section in flash using a scatter file. then i want to do CRC check of the library file at runtime. Can any body help me in this. I need to know the lenght of the library image at runtime, to know data length on which the CRC is to be calculated.
ER_IROM2 0x801F0000 0x1000 { TestLib*.o (+RO) }
i am using a scatter file. all the .O in the library start with name TestLib. Because of this the object files in the library get placed in the section starting from 0x801F0000. The problem is the library may change later times, and so i need to find the length of the library at runtime, i.e. the end address at which the scatter file places the last byte of the code in the library. Can you please help me in this.
Thanks and regards Rohit
I need to know the lenght of the library image at runtime, to know data length on which the CRC is to be calculated.
Actually you don't. You don't need to know how much of that block is used by the library. Just calculate the CRC of the whole section, regardless of how much of it is used. For good measure you could change the scatter file to make the linker fill up the unused part of that section with a known value.
See this:
http://www.keil.com/support/man/docs/armlink/armlink_cacbddde.htm