File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,12 @@ ifndef ESP_ROOT
94
94
ifeq ($(ESP_ROOT),)
95
95
$(error No installed version of $(CHIP) Arduino found)
96
96
endif
97
- ARDUINO_LIBS ?= $(shell grep -o "sketchbook.path=.* " $(ARDUINO_ROOT ) /preferences.txt 2>/dev/null | cut -f2- -d=) /libraries
97
+ ARDUINO_PREFS = $(wildcard $(ARDUINO_ROOT ) /preferences.txt)
98
+ ifeq ($(ARDUINO_PREFS),)
99
+ ARDUINO_LIBS ?= $(ARDUINO_ROOT ) /libraries $(HOME ) /Arduino/libraries
100
+ else
101
+ ARDUINO_LIBS ?= $(shell grep -o "sketchbook.path=.* " $(ARDUINO_PREFS ) 2>/dev/null | cut -f2- -d=) /libraries
102
+ endif
98
103
ESP_ARDUINO_VERSION := $(notdir $(ESP_ROOT ) )
99
104
# Find used version of compiler and tools
100
105
COMP_PATH := $(lastword $(wildcard $(ARDUINO_ESP_ROOT ) /tools/xtensa-* /* ) )
@@ -137,7 +142,9 @@ endif
137
142
138
143
# Handle esptool variants
139
144
MCU ?= $(CHIP )
140
- ESPTOOL_FILE = $(firstword $(wildcard $(ESP_ROOT ) /tools/esptool/esptool.py) $(ESP_ROOT ) /tools/esptool/esptool )
145
+ ESPTOOL_FILE = $(firstword $(wildcard $(ESP_ROOT ) /tools/esptool/esptool.py) \
146
+ $(wildcard $(ARDUINO_ESP_ROOT ) /tools/esptool_py/* /esptool.py) \
147
+ $(ESP_ROOT ) /tools/esptool/esptool)
141
148
ESPTOOL ?= $(if $(NO_PY_WRAP ) ,$(ESPTOOL_FILE ) ,$(PY_WRAP ) esptool)
142
149
ESPTOOL_COM ?= $(ESPTOOL ) --baud=$(UPLOAD_SPEED ) --port $(UPLOAD_PORT ) --chip $(MCU )
143
150
ifeq ($(IS_ESP32 ) ,)
You can’t perform that action at this time.
0 commit comments