[En-Nut-Discussion] XRAMEND and strtok_r
Oliver Schulz
olischulz at web.de
Sun Sep 28 13:36:33 CEST 2003
Hello all together,
I'm very new to the ethernut development, so be a little bit patient if I
ask stupid questions...
Yesterday I installed the current HEAD of the CVS repository and the newest
release of WinAVR (20030913), which includes the gcc 3.3.1 and the avr-libc
0.99.90.20030829.
First Problem:
The first try to compile the Nut/OS there was an error because XRAMEND was
defined twice. First time in iom128.h to 0xFFFF (64KB) and second at
netinit.c to 0x7FFF (32KB). After simple #ifdef .. #undef .. statements in
netinit.c this error was fixed.
I wonder whether I did something wrong in general, because everybody else
must experience the same error, right?
Second Problem:
The current avr-libc comes with the function strtok_r (but it's not
mentioned in the docs), and the prototype is defined in string.h. Nut/OS has
its own implementation of strtok_r and the prototype is defined in
strtok_r.h. The problem is, that the implementations differ already in the
number of parameters, so for example the app httpd will not compile.
My workaround is to copy the string.h from the WinAVR\avr\include directory
to nut\include and comment out the line with the prototype to use the Nut/OS
implementation.
But will there be any fix in the CVS in the future? And what is the best
solution? Using the avr-libc or still Peter Scandrett's strtok_r? Is there
any ANSI C definition of strtok_r?
It would be fine, if anyone can answer my questions..
So long,
Oliver Schulz.
More information about the En-Nut-Discussion
mailing list