[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Strings in flash

From: Kitts
Subject: Re: [avr-gcc-list] Strings in flash
Date: Mon, 1 Aug 2005 22:58:27 +0530
User-agent: KMail/1.8

On Monday 01 Aug 2005 12:42 pm IST, Ron wrote:

Ro> However, when the strings are a variety of sizes, space is wasted. Is
Ro> there some way to declare the array instance so I can use the type
Ro> definition one would normally use in ram, ie:
Ro> typedef struct
Ro> {
Ro>     char*   text;

I had faced a similar problem in my work. I then worked around it by making 
a spread sheet. I would then input the strings in one column and it would 
generate the C initializing code in another column. I would then simply 
copy all the rows in that column into my C code.

I had both the table and the strings in ROM. This method helped me plenty as 
i would repeatedly chance the strings during development. It also helped me 
document it more easily! :-)

Hope this helps.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]