unable to include .h files from ESP-IDF components directory

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Patrice
Posts: 3
Joined: Mon Feb 10, 2020 3:34 am

unable to include .h files from ESP-IDF components directory

Post by Patrice » Tue Feb 11, 2020 1:14 am

Hi,

I would like to add among other new ADC functions in the machine_adc.c. For that, I want to use esp_adc_cal.h include in my esp-idf/components directory.
If I build the Micropython for ESP32 without modifications, everything is OK, it works.
But as soos as I add the line #include "esp_adc_cal.h" in the machine_adc.c file, the build doesn't work. Make command return : fatal error: esp_adc_cal.h: No such file or directory. It's the same with all other files includes in my components directory.

IDF_PATH is well declared.
Is there something else to do for that ?

Many thanks

User avatar
jimmo
Posts: 1435
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: unable to include .h files from ESP-IDF components directory

Post by jimmo » Tue Feb 11, 2020 10:11 pm

You need to add the additional include dirs -- if you look in ports/esp32/Makefile you can see the big list of -I flags that get created.

Patrice
Posts: 3
Joined: Mon Feb 10, 2020 3:34 am

Re: unable to include .h files from ESP-IDF components directory

Post by Patrice » Wed Feb 12, 2020 4:05 am

Pefect, it works !
Thank you so much.

Post Reply