We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have several constant strings that I defined as follows:
const u8 *Stringname = "StringContent";
At some stage if I add one more string, the uC stops working. I have more than enough code memory left so it is not a memory problem.
What could be the problem? Am I doing this the wrong way? Should I put the strings in a different memory space?
At least in principle,
u8 *Stringname = "StringContent";
requires the compiler to allocate memory to store the string itself, plus more memory to store the pointer to the string.
On the other hand,
u8 String[] = "StringContent";
only requires storage for the text.
The question is: for a pointer to a const string, is the compiler smart enough to do away with the separate pointer...?