After the RAM-Tests are done now I want to check the ROM :) After converting the HEX-File "project.h86" to a BIN-File I have calculated and appended a CRC-Checksum to it and re-converted the BIN-File into the Intel-Hex-Format and downloaded this File into the Flash-ROM. And now my question is: Is there an easy way to get the USED Flash-Size and so to locate the stored CRC-Checksum (in Keil uVision2, Assembler or C)? I don't want to store the checksum at a fixed position as it is possible in here: http://www.keil.com/support/docs/494.htm . It should be located at the end of the used Flash-ROM. Thanks Torsten
Hi, for example, in ASM:
; all your program and data are placed before this point ROMCRC: DW 0xXXXX END
MOV DPTR,#ROMCRC+1 ; <- it loads last used byte address
a much simpler way is to test the whole s*** and shebang, non-programmed bytes read 0xff and most programmers will, if set to do, include that in the checksum. Erik
@Oleg: And how do I place all my code (several c-, h- and asm-files before this point? Is it possible to link this specified line at the "last position" (not at the end of the possible FLASH-Memory (1MB), just at the and of the USED FLASH-Memory ...)? Torsten
Open your Tools manual, find the linker directives, and learn how to use the one that places a specific segment as the last of all...
@Hans: That's, what I wanted to know! Thanks to all of you, now it works fine! Torsten