[En-Nut-Discussion] newLib integration

athomi at bluewin.ch athomi at bluewin.ch
Sat Jun 13 17:14:12 CEST 2009


Hi

I'm quite new to the "world of Ethernut" and doing my first steps with the examples provided on the ethernut 
homepage.
The troubles started with the "Output Format Specifiers" Example (as described in the NutWiki: http://www.ethernut.de/nutwiki/Output_Format_Specifiers
, where the following compiler errors occured:

... mallocr.c:3326: undefined reference to `_sbrk_r` (serveral times)

I'm using the following setup:
- Windows XP
- Latests YAGARTO GNU Toolchain (29.03.2009)
- Ethernut 4.8.2 (with Nut/OS Configurator 2.0.8)

After some Googling i have found, that the newlib (1.17.0) used by 
YAGARTO has been build to support reentrant stubs.

Some more googling later, i think that newlib (resp. its build options) are the key problems. Newlib seems to expect 
some functions provided by the OS (like a "glue-layer" between the newlib and the OS).

Also called as "syscalls.c", which a haven't found within the Nut/OS sources.



Now my Questions:

- Does anybody have managed to compile the example Output Format Specifiers with the latest YAGARTO GNU Toolchain?

- Does Nut/OS provide such an newlib "integration" (like syscalls.c)?

- Has anybody already written such an newlib "integration" for Nut/OS?

  (i'm too new to the Nut/OS so i haven't got the necessary knowledge for such an "integration")

- Generally spoken, how can i compile this example with that YAGARTO version?



And an additional question related to a compiler warning in front of the compiler errros:

- " implicit declaration of function '_ioctl' ", i know its only a warning but i think this warning should not occur.



Thanks for any hint



Regards,

Aurel Thomi



More information about the En-Nut-Discussion mailing list