I can set a variable in the ROM area as following: #define END_CODE_SIZE 0x3FFF char code CRCbyte _at_ END_CODE_SIZE How do I set its value to says 0xAA? I can do this: char code CRCbyte = 0xAA; Then The variable is not allocated to the END_OF_CODE. Thanks for reading this. HN
The following knowledgebase article describes how to do this for a ROM checksum. It will work for a ROM CRC as well. http://www.keil.com/support/docs/494.htm One problem with doing this all within your C program is that your program does not know the correct CRC/checksum value. Jon
"One problem with doing this all within your C program is that your program does not know the correct CRC/checksum value." Yes, but many of us want to store compile time constants at specific addresses for a variety of reasons. We don't want to run separate utilities after the build, muck about with linker directives or resort to assembler. We just want to write: unsigned char code somebyte=0xaa _at_ 0x3fff; Please? Stefan
That's a good idea. It's not that the keil software guys can not do it or it is too hard. It's just that they may never think about it and how convenient for us to use it in whatever way we want to. I hope the Keil technical supports monitor these mails let their software gurus know. HN
Don't worry, Keil are well aware that a lot of people want this facility. They don't seem keen to implement it though. This subject has come up time and again on this forum. Stefan