esp32/Makefile: Support using IDF_PATH as the env var to the IDF source.
@@ -23,8 +23,12 @@ CROSS_COMPILE ?= xtensa-esp32-elf-
# paths to ESP IDF and its components
ifeq ($(ESPIDF),)
+ifneq ($(IDF_PATH),)
+ESPIDF = $(IDF_PATH)
+else
$(error Please configure the ESPIDF variable)
endif
+endif
ESPCOMP = $(ESPIDF)/components
ESPTOOL ?= $(ESPCOMP)/esptool_py/esptool/esptool.py
