Does the scatter loading file mechanism have some method of adding a checksum to a rom region? And, most of all, if this exist: Can the checksum be reproduced by the target? Doing this manually for each release firmware is possible, but not preferred.
There is the ElfDwt tool, but I cannot find the method used to create the checksum. And this only seems to apply to the vector table to have NXP bootloaders accept the code.
I'd like to continuously check the startup file .o integrity and a one time boot .ANY ROM check. This since the product is placed in some hotter environments, which can cause issues.
The build step just links, and no load is performed.
But when your program is booting, the startup code can perform scatter-loading of content from flash into RAM. This may include initialized variables but also copying of some code functions into RAM for faster execution.
Note that there are not really any "less important" part of the flash. One single bit of corruption within the code space can be enough to send the program flying anywhere - or to produce an incorrect result. So there really are no good reasons to sometimes only scan a limited part of the flash. Note that except for the bootup, it really doesn't matter much how long a flash scan takes. A flash scan can be performed piece-wise as time is available. So a number of ms of scanning at a time and maybe a final result after 10 minutes.