espressif / newlib-esp32

Version of newlib used in ESP32 ROM and ESP-IDF
GNU General Public License v2.0
31 stars 18 forks source link

Include released version in espidf #4

Closed dhaval2017 closed 4 years ago

dhaval2017 commented 4 years ago

How to include this in existing espidf version?

antmak commented 4 years ago

Hi @dhaval2017 !

This new newlib (to be exact, esp32-2019r1_newlib-3_0_0 branch of it) was included into the new toolchain esp32-2019r1 directly. It's used in the latest master branch of IDF already. Please see https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html#step-3-set-up-the-tools for more details how to install a modern toolchain (based on gcc8.2) to using with the modern IDF.

The old newlib in idf's components/newlib is still left for compatibity with an old toolchain (gcc5.2 based)

dhaval2017 commented 4 years ago

esp32-2019r1 has regex library?

antmak commented 4 years ago

It has C++'s <regex>. Unfortunately, C's <regex.h> doesn't work for now ( https://github.com/espressif/esp-idf/issues/2407 )

dhaval2017 commented 4 years ago

So no chance to use regex in c with espidf?

antmak commented 4 years ago

Please try to take some 3rdparty lib like as https://github.com/kokke/tiny-regex-c for now.

regex.h will be fixed in the next toolchain release. The problem is we don't build newlib/libc/posix/* properly for the toolchain now.

igrr commented 4 years ago

regex functions are available in esp-2019r2 toolchain release, which comes with IDF 4.1-dev (current master branch) (https://github.com/espressif/esp-idf/commit/c2db6a14c4404c6f50e096df459a096b47253f4a)