-
Notifications
You must be signed in to change notification settings - Fork 490
libc configuration
Espressif's RTOS SDK provides libc functions as part of binary libmain.
esp-open-rtos replaces these with a newlib libc compiled from source.
crosstool-NG as used in esp-open-sdk provides a newlib 2.0 implementation. However it isn't thread-safe when used with FreeRTOS' preemptive threading model.
For now we supply our own libc in the 'libc' directory. This is newlib 2.2.0 plus xtensa patches and a locking implementation patch. Using newlib 2.2.0 also allows pulling in the "nano" features for smaller malloc and I/O format implementation.
Source: https://github.com/projectgus/newlib-xtensa
Any commits that update the 'libc' directory list the newlib commit that the library was built from, as well as the configure and compile arguments.
Look through the commit history of the libc directory to see the configure/make statements needed to build. (Look at the full commit message to see the arguments.)
To update the headers and libraries already in the esp-open-rtos tree, configure with --prefix=/patho/to/esp-open-rtos/libc
and do a 'make install'.
Pass OWN_LIBC=0 to make (see Build Process) to compile & link with the toolchain-provided "system" libc instead of the esp-open-rtos libc.