Migration from Arduino IDE to ESP-IDF
Posted: Thu Jul 27, 2017 9:24 am
Arduino IDE for ESP32 has some important limitations. So I decided to migrate to ESP-IDF.
I installed Arduino as ESP-IDF component as first step for this purpose:
https://github.com/espressif/arduino-es ... -component
But this solution was not completely successful. I got some troubles when I tried to define a custom partition table and with the integration of components written in C and C++ (for example, spiffs).
So, I would like to move my project to ESP-IDF with no Arduino components.
But this is easy so say but difficult to do. My main problem is the lack of documentation. A lot of time is lost trying to find useful information.
I need to develop a couple of routines for the measurement of microseconds and milliseconds similar to the Arduino functions micros() and millis(). I suppose that these functions are not available in ESP-IDF. Therefore, I have to write my own functions.
I believe that I have to use one or two hardware timers:
https://esp-idf.readthedocs.io/en/lates ... timer.html
But I ignore if some of those timers are being used by the ESP-IDF system ( RTOS, tick, etc). I would like to know which ESP32 hardware resources are assigned to ESP-IDF and which others are available for apps.
My particular question is simple: which timer(s) should I use for programing my functions millis() and micros()?.
My current problem is related to timers but probably this is not the only case where the system is allocating hardware resources that are not available for apps.
Thanks in advance for your help.
I installed Arduino as ESP-IDF component as first step for this purpose:
https://github.com/espressif/arduino-es ... -component
But this solution was not completely successful. I got some troubles when I tried to define a custom partition table and with the integration of components written in C and C++ (for example, spiffs).
So, I would like to move my project to ESP-IDF with no Arduino components.
But this is easy so say but difficult to do. My main problem is the lack of documentation. A lot of time is lost trying to find useful information.
I need to develop a couple of routines for the measurement of microseconds and milliseconds similar to the Arduino functions micros() and millis(). I suppose that these functions are not available in ESP-IDF. Therefore, I have to write my own functions.
I believe that I have to use one or two hardware timers:
https://esp-idf.readthedocs.io/en/lates ... timer.html
But I ignore if some of those timers are being used by the ESP-IDF system ( RTOS, tick, etc). I would like to know which ESP32 hardware resources are assigned to ESP-IDF and which others are available for apps.
My particular question is simple: which timer(s) should I use for programing my functions millis() and micros()?.
My current problem is related to timers but probably this is not the only case where the system is allocating hardware resources that are not available for apps.
Thanks in advance for your help.