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

assign value to flash memory

Hi Guys

How am i able to assign values to a variable i have stored in flash so that it is included in the hex file?

For example: i have declared a variable
volatile unsigned char code err_msgs[10][20] _at_ FLASHSTART;

but cannot assign an initial value to it and have to write it's value to flash when my program starts.

Xarion

Parents
  • Don't you believe in the compiler being capable enough to zero-terminate your strings for you?

    The only time the compiler will not zero-terminate a string, is if you assign to a fixed-size array, and the string has as many characters as the array - but then, no "\0" will help you since there are no room for that character...

Reply
  • Don't you believe in the compiler being capable enough to zero-terminate your strings for you?

    The only time the compiler will not zero-terminate a string, is if you assign to a fixed-size array, and the string has as many characters as the array - but then, no "\0" will help you since there are no room for that character...

Children