avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Space optimisation for PSTR()


From: Bernard Fouché
Subject: RE: [avr-gcc-list] Space optimisation for PSTR()
Date: Fri, 27 Aug 2004 19:42:44 +0200

Thanks a lot for all these details.

I used a system like you described in your two previous emails for
internationalization on previous projects and I'm used to it, it figures to
add a few macros to spare the space.

Thanks again for your explanations and time.

 Bernard

-----Message d'origine-----
De : E. Weddington [mailto:address@hidden
Envoyé : vendredi 27 août 2004 19:24
À : Bernard Fouché
Cc : address@hidden
Objet : Re: [avr-gcc-list] Space optimisation for PSTR()


Bernard Fouché wrote:

>Yeah I was wrong in the parenthesis places but you got the point.
>
>I asked this question because I thought that compilers were used to
optimise
>strings that way.
>
>Thanks for your answer
>
>
>

Yes compilers *can* be used in this way, and certain compilers (most) do
this.

The main problem here is that the AVR is a Harvard Architecutre device,
with separate Program Address Space and Data Address Space. The current
C Standard does not have anything to account for different address
spaces, and consequently GCC does not know anything about it either.
 From what I understand, is that there are drafts out there that will
correct the C Standard to help address this issue. We know of one AVR
developer (Svein Seldal) who is trying to patch GCC to get it to know
about different address spaces. This is a very huge task. Probably when
this happens then additional opimisation can be added to combine
references to identical strings that reside in the program space. Until
this happens, you'll have to manage your own strings. Sorry. :-(

Eric



reply via email to

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