[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] strlen() returns erroneous values
From: |
Kitts |
Subject: |
Re: [avr-gcc-list] strlen() returns erroneous values |
Date: |
Sun, 5 Jun 2005 00:56:11 +0530 |
User-agent: |
KMail/1.8 |
On Sunday 05 Jun 2005 12:09 am IST, you wrote:
> Yes constant strings are copied from ROM to RAM at
> startup and indeed RAM is consumed at this point.
> Therefore is it better to use strings in ROM/FLASH as
> this would save RAM.
Would it be possible to declare a string to be in flash memory? I can
modify my functions to accept strings from flash.
While i know that i can save strings during declaration itself to stay
within flash, can i do the same at the time of the function call?
Something like this...
length = strlen_P(PSTR("some string"));
Sorry for these silly questions. I am not used to this separation of
flash and RAM. My previously used compiler handled flash strings in a
different way.
--
Cheers!
Kitts