strcpy_P does not seem to work to copy a string


This works:
const char abcdef = "ABCDEF";
strcpy(s, abcdef);

But this doesn't:

const char PROGMEM abcdef = "ABCDEF";
strcpy_P(s, abcdef);

So, in other words, when I store the string in program memory, the code fails, although reading through previous posts, it's my understanding it should work.

Does someone have any ideas ? Where am I wrong ?


OK ... I was a little too fast ...
The doc. clearly states that the const char needs to be global ...
Case solved ...

…which is why we ask you to post ALL your code.

Yes Sir
Next time I will post 850 lines
Happy reading
Who is "we" by the way ?

Next time I will post 850 lines

Or, an MCVE.

Constructive and useful reply - thanks

Who is "we" by the way ?

Anyone trying to provide help

Anyone trying to provide free help