[En-Nut-Discussion] Nut/OS port for H8/300H.
Harald Kipp
harald.kipp at egnite.de
Wed Mar 17 17:28:23 CET 2004
Jan,
>For example there is following code in heap.c (line 205) :
>
>#ifdef NUTDEBUG
> if (__heap_trf)
> fprintf(__heap_trs, "\n[H%x,A%04d/%d] ", (u_int) fit, ((HEAPNODE
> *) (((u_short *) fit) - 1))->hn_size, size);
>#endif
>
>As far as I understand, this is a bug on AVRs because fprintf_P should
>be used here.
No, string constants are placed in RAM by default.
Actually in the data segment, which contains all
pre-initialized RAM.
In the other very long posting I gave a detailed
explanation.
ICCAVR got a compile switch to place string
constants in program space. I'd recommend to
remove such an option, it's completely weird.
The application should have the freedom to
use variables or constants as parameters on
the same function.
Some compilers automatically copy the string
parameter from ROM to RAM upon calling a function.
This is the same crap, IMHO. But that's another
story.
Harald
More information about the En-Nut-Discussion
mailing list