Page 1 of 1
esp32 newlib migration or access via Arduino ide
Posted: Mon Feb 03, 2020 2:11 pm
by comperem
Hello,
The ESP32 devices are outstanding. I'm using the Arduino IDE but can also see some interesting code in the newlib github respository here:
Code: Select all
https://github.com/espressif/esp-idf/tree/master/components/newlib
Is this going to be integrated into the Arduino ide library? Is there a (simple) way to access this code through Arduino IDE now?
Re: esp32 newlib migration or access via Arduino ide
Posted: Mon Feb 03, 2020 3:51 pm
by ESP_Sprite
Newlib already is part of ESP-IDF, and as the ESP32 Arduino environment is built on top of that, you should be able to use it straight out of the box.
Re: esp32 newlib migration or access via Arduino ide
Posted: Mon Feb 03, 2020 4:07 pm
by comperem
Ok, this is somewhat good news but I don't have any of the `newlib` files, for example `test_newlib.c` and friends.
I've used the Arduino IDE instructions using the Board Manager and the Stable Release link:
https://github.com/espressif/arduino-es ... manager.md
This works and provides basic functionality and I can program the ESP32 using the Arduino IDE but only the basic esp32 library is installed.
Do you have a recommendation on these two options?
(1) reinstall using the
Board Manager and
Development release link
(2) reinstall using the detailed steps in '
Using Arduino IDE with the development repository'
I'll continue investigating.
Re: esp32 newlib migration or access via Arduino ide
Posted: Mon Feb 03, 2020 5:49 pm
by ESP_krzychb
Hi comperem,
With arduino-esp32 installation you are getting compiled newlib binary (not individual .c files) + headers.
/home/user-name/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools/sdk/lib/libnewlib.a (compiled binary)
/home/user-name/.arduino15/packages/esp32/hardware/esp32/1.0.4/tools/sdk/include/newlib (headers)
You should have all you need to use newlib already (plus several other libraries compiled from "esp-idf/components"), no need to redo the installation steps, or do it in an alternate way.
Re: esp32 newlib migration or access via Arduino ide
Posted: Tue Feb 04, 2020 3:36 am
by comperem
Ok, if the newlib .a library is there (I checked - it is) and the headers are there (I checked, time.h and others are there), then something in the `#define`'s are not triggering `clock_gettime()`.
I'm getting: `'clock_gettime' was not declared in this scope`
I need a `clock_gettime()` example that works. There's no example in the Arduino examples with `clock_gettime()`
What is the proper approach to getting the `#defines` to trigger `clock_gettime()`?