avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] PSTR() in static initialisers


From: Georg-Johann Lay
Subject: Re: [avr-libc-dev] PSTR() in static initialisers
Date: Fri, 09 Feb 2018 22:26:37 +0100
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

Joerg Wunsch schrieb:
As Georg-Johann Lay wrote:

If that static is not function-static, then __flash can be used:

Thanks for that, Johann.

I tried to come up with a __flash-based implementation myself,
but didn't get it to work.

Maybe your "recipe" would be worth an entry into the avr-libc FAQ?

Dunno if that's actually specified or just works by accident. What's really strange is that it doesn't work for locals, and there is no technical reason for that.

https://gcc.gnu.org/PR84163

Maybe it had just been overlooked when ASes were added to gcc, as the first AS targets didn't go as far as avr (iirc they didn't even need statics as it was all about using specific instructions for memory-mapped I/O).

FWIF there's also a mention at
https://www.mikrocontroller.net/articles/AVR-GCC-Tutorial#Flash_mit_flash_und_Embedded-C

Johann




reply via email to

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