Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
Offline
Gender: 
Last Login: Today at 05:42:54
Date Registered: 02 July, 2009, 06:38:05
Posts: 1679
Total Post Ratings: +492
|
I'm guessing you are defining Str0 to be a pointer to a block of data set aside inside of your executable, perhaps like this:
Buff(10)→Str0
This works fine for programs, as they are run from RAM so the 10-byte block of data is contained inside of the program in RAM. But applications are run from ROM, which you probably know stands for read-only memory. And as the name suggests, you cannot* write data to ROM, so attempting to write data back to Str0, which is part of your application in ROM, will fail.
The solution for applications is to use a section of safe RAM or an appvar to hold any data that will be modified.
* Data can be written to ROM, but it's through a complicated method of interfacing with the flash chip that usually involves backing up a whole 64KB of data, erasing the original 64KB of data, and then copying the 64KB back to its original location with the desired changes made.
|
|
|
|
« Last Edit: 07 May, 2012, 22:02:21 by Runer112 »
|
Logged
|
|
|
|
|