Page 1 of 1

Cross compile Mongo C Driver for xtensa-esp32-elf Toolchain

Posted: Fri Jun 16, 2017 11:55 am
by mistersakai
Hi,

I am trying cross compile mongo C driver to ESP32 platform on Ubuntu OS, which uses the xtensa-esp32-elf-gcc toolchain (gcc 5.2.0 based, compiled from crossNg tools). The toolchain has its own sysroot, which has an incomplete glibc library built-in.

After numerous tries on the compilation, I finally managed to run the ./configure command successfully, along with lots of LDFLAGS and CPPFLAGS. But I still unable to "make" the source because there are lack of glibc headers and library on the xtensa-esp32 toolchain, such as poll.h, sys/uio.h and etc.

Is there any possible way to build the mongo C driver for xtensa-esp32 toolchain? Or it is not possible at all.

Your suggestions and help is very much appreciated!

Regards,
Peter

Re: Cross compile Mongo C Driver for xtensa-esp32-elf Toolchain

Posted: Fri Jun 16, 2017 4:07 pm
by ESP_igrr
Xtensa toolchain for ESP32 doesn't come with glibc; we use newlib as our C library. For this reason some facilities you mention (poll, sys/uio) are not provided. Glibc is not easy to port to an RTOS, for this reason most MCU toolchains use newlib, musl, or some other stripped down standard library implementation.

I haven't found any mentions or ports of Mongo C driver for microcontrollers. The project page lists a number of supported platforms, but all of them are fully featured OSes, not RTOSes.