That's the ticket!
How can you tell the compiler to put the string in flash?
Glen
Guillermo Prandi wrote:
> Hi, Sean. From tests I did with GCC 4.0.1, I came into the conclusion
> that:
>
> char* test1 = "TEST1"; <--- doesn't get copied to RAM
> char test2[] = {'T','E','S','T','2'}; <--- does get copied to RAM.
>
> i.e., omiting the const modifier is not enough to make strings be
> copied to RAM. Strings declared with double quotes are considered
> const whether we say so or not. There are options to explore besides
> this. For instance, you can specify the section where you want your
> variable placed (.text, .data, etc.); I did no tests with that.
>
> Guille
>Message
Re: [lpc2000] Re: gnuarm question
2006-02-11 by G B
Attachments
- No local attachments were found for this message.