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?
The linker has the right to do optimizations like replacing absolute jumps with relative ones, reorder sections as it sees fit and so on. You have to keep an eye on those. But with some luck you could get away with it. someone please confirm/define: with optimization set no higher than x, the linker will not replace opcodes. You don't have to use assembler to locate your variables at fixed addresses. Read my post, I said the same just that using assembler is a whole lot easier (you do not have to define the location of each and every) Erik
"(you do not have to define the location of each and every)" Each and every what?
Each and every what? Variable sorry, got a phone call Erik
"Each and every what? Variable" You don't need to with 'C' either. Take a look at the "ORDER" directive.
OK, ORDER and specify the addr of the 1st should do it. Erik