[En-Nut-Discussion] XRAMEND and strtok_r

Harald Kipp harald.kipp at egnite.de
Mon Sep 29 09:24:55 CEST 2003


Hi Oliver,


>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?

XRAMEND re-appeared in the latest WinAVR.


>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.

strtok_r has been added to WinAVR recently. Nut/OS uses
a different, incompatible call



>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?

I'll commit these and other fixes to the repository soon. It will
use strtok_r which come with WinAVR.

Thanks for your comments,
Harald




More information about the En-Nut-Discussion mailing list