zephyrproject-rtos / meta-zephyr-sdk

Zephyr SDK (obsolete)
MIT License
44 stars 29 forks source link

Newlib addition to zephyr #77

Closed zephyrbot closed 7 years ago

zephyrbot commented 7 years ago

Reported by Jie Zhou:

Hi all,

I am trying to create some applications in zephyr where i need signal.h and time.h as well as other common C dependencies. I know there is a way to add the newlib into zephyr but I can't figure out how to add the library. There is a newlib directory in zephyr and it is mostly empty except the libc-hooks.c and makefile. Is there no other way than to physically import newlib files and reference them into the zephyr environment? Has anyone been using the newlib in zephyr. I'll really appreciated for anyone can give me some pointers.

Sincerely, Jie

(Imported from Jira SDK-61)

zephyrbot commented 7 years ago

by Anas Nashif:

newlib is already part of the SDK, when you build with newlib, the version available in the SDK is referenced and used, no need to integrate this into Zephyr

zephyrbot commented 7 years ago

by Jie Zhou:

Solution: to enable newlib, add CONFIG_NEWLI_LIBC=y to prj.conf