This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Initialie ROM CRC byte

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

Parents
  • I think the easiest way to do this is to place the 'variable' in a source file on its own, then direct the linker to place the resulting segment at the correct address.

    Isn't it a shame that Keil doesn't allow initialisers with the _at_ keyword?

    Stefan

Reply
  • I think the easiest way to do this is to place the 'variable' in a source file on its own, then direct the linker to place the resulting segment at the correct address.

    Isn't it a shame that Keil doesn't allow initialisers with the _at_ keyword?

    Stefan

Children