Hi Yannick,
uups, sorry.
The fprintf_P() in avr-libc-1.0.4 supports only near progmem.
Look at avr-libc-1.0.4/libc/stdio/vfprintf.c line 141:
The old style macro PRG_RDB() is used there.
This is defined as the near version of pgm_read_byte() instead of the
far version you need to access the upper memory.
Wolfgang
On Fri, 19 Nov 2004, Yannick PODGORSKI wrote:
Hi Wolfgang,
thanks for your answer but it doesn't work
with "RAMPZ = 1" or "RAMPZ = 0".
I try this before but nothing.
I try again to put the section .text at the address 0x0
and it works with "RAMPZ = 1" AND "RAMPZ = 0".
It's strange because this bit allow me to access to upper
or lower flash and I can access whatever the RAMPZ is.
Thanks.
Yannick
> On Fri, 19 Nov 2004, Wolfgang Quack wrote
> Hi Yannick,
>
> Just put "RAMPZ = 1;" in front of fprintf_P(...)
>
> You need this, because the const's are now in the upper space or flash.
>
> Wolfgang