Is it possible to force the compiler (with a directive or something) to store a specific part of the code in a predefined area in the memory? What I want to do is to be able to calculate a checksum of some specific functions in my code, so I later can prove that they are unchanged since the last build. My thought is that if I know in which memory area these functions are located then I can simply calculate a checksum of this area. Any ideas, someone?
Remember that a checksum is a weak form of error detection. It detects single bit errors and half the double bit errors. EDAC schemes use syndromes and they usually use any apriori knowledge of the input data and error sources. Your testing integrity of a function. Why not define all(some?) possible inputs tablualte the correct outputs and write a test fumction which calls the function under test using those test vectors and checks the outputs against the table. It's a weird idea, there are a lot of weird ideas. My point is to not just blindly apply some device like a checksum, think specifically about your problem and use your imagination.
Remember that a checksum is a weak form of error detection. It detects single bit errors and half the double bit errors. The OP is not concerned with errors (I hope he is, but that is not what his post is about), but with changes. I guess chanage control that fail 1/256th of the time is good enough, so what if now and then you do not record a change. Erik