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

Const data changes during program execution

hi,

(lpc1317-64P)
during execution of my code const data changes. I don't know how.
I have used
const uint8_t *p[] = { "", "abcd", };

I have checked by adding the array in watch. At one point randomly data in null type gets changed to some long garbage data..

I need null character at 0 th places because I have made logic in that way.
Also I don't think how const data can get changed randomly.I have also monitired VCC during program its 3.3V. No glitch.

is this due to because I am using 36KB of 64K byte flash & 6KB ram out of 8KB available or due to optimization as compiler stores null character in RAM for faster exceution or something

As in smaller module this code works fine without any problem. Problem come when I club the module.

However const data shouldn't be changed.

0