Hi, the problem is that the compiler uses MOVX instead of MOVC when I'm reading the rom, of course it doesn't work. There's no problem to write the flash. I don't want to add an assembly routine. Is there any other solution? I'm using Silabs C8051F020.
Thanks.
You do it by originally storing the value 0xff in the variables while flashing the program. Then the program may replace these 0xff with other values.