Quote:
|
Originally Posted by Rickertsen2
you CAN write to ROM at runtime but its difficult and i wouldnt' advise it.
|
Yes. I'm guilty of posting the "accepted" techniques rather than what is potentially possible. I've done my experimenting with self-modifying code, but I don't believe it has a place on FIRST robots, so I advise against it as well.
The big issue isn't how to do the physical write, but how to avoid clobbering your code while doing so. Your code changes size and placement in memory every time you modify it. Even if you place the bytes to be modified at the high-end of memory there is no self protect mechanism that will prevent the linker from claiming that space for code on some future date. Just wait until you try executing your variables!
