From f469634c0c72abb1af790b4ed43aae756d333412 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Tue, 17 Sep 2019 11:50:31 +1000 Subject: [PATCH] esp32: Add check to Makefile that the toolchain is in PATH. --- ports/esp32/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile index bb25477444..85eebb3f54 100644 --- a/ports/esp32/Makefile +++ b/ports/esp32/Makefile @@ -103,6 +103,13 @@ endif # pretty format of ESP IDF version, used internally by the IDF IDF_VER := $(shell git -C $(ESPIDF) describe) +ifeq ($(shell which $(CC) 2> /dev/null),) +$(info ** ERROR **) +$(info Cannot find C compiler $(CC)) +$(info Add the xtensa toolchain to your PATH. See README.md) +$(error C compiler missing) +endif + # include sdkconfig to get needed configuration values include $(SDKCONFIG)