diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile index 48d4b9d5cd..3f0e47c178 100644 --- a/ports/esp32/Makefile +++ b/ports/esp32/Makefile @@ -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