I had thought that the const would put everything into Flash, however
according to the .map file it appears that the strings are in Flash, but
the pointers to each of the 10 strings are being placed into RAM. It's
using 40 bytes of RAM: 32 bit micro, 4bytes * 10 strings = 40.
How do I put everything into Flash? I'm not even sure what to search
for to answer this myself. My guess is the answer is easy if you know!
Rolf Magnus wrote:>> Do you actually need the pointers? If all arrays are the same size, you> can also make it an array of arrays and save the pointers.
That's true. I have another array similar to this one, but the strings
are different sizes, so I sort of copied and pasted and modified. But
>> Btw: Why unsigned char? There is no such thing as signedness for> characters, so if those are strings, the element type should be char.
The only answer I can give is because I'm a novice :)
I've occasionally wondered about this but just kept going as long as it
worked and I had no warnings. After initially shunning C, I decided to
teach it to myself and have learned the hard way. I was one of those in
college who said "I don't want to do any programming". Now I use all of
it for hobbies and none for my real job.