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: 13
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: 2754
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: 13
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.

dvrhax
Posts: 16
Joined: Fri Jul 07, 2017 11:13 pm

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

Post by dvrhax » Fri Dec 03, 2021 2:49 pm

Running into the same issue however my makefile has no reference to -I and idf.py doesn't show it as an option and when I try to execute it anyway, I receive:
Error: No such option: -I
Any insight would be appreciated.

Thank you

dvrhax
Posts: 16
Joined: Fri Jul 07, 2017 11:13 pm

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

Post by dvrhax » Tue Dec 07, 2021 4:46 pm

Nevermind I figured it out. I must have flubbed the git checkout back to 4.2 and was working with 5.0 which through all the logic off in main/CMakeLists.txt

Post Reply