File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change
1
+ ifndef PROJECT_PATH
2
+ PROJECT_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST ) ) ) /../..)
3
+ export PROJECT_PATH
4
+ endif
5
+
6
+ ifndef IDF_PATH
7
+ IDF_PATH := $(PROJECT_PATH ) /esp-idf
8
+ export IDF_PATH
9
+ endif
10
+
1
11
include ../py/mkenv.mk
2
12
3
13
# qstr definitions (must come before including py.mk)
@@ -23,13 +33,9 @@ FLASH_SIZE ?= 16MB
23
33
CROSS_COMPILE ?= xtensa-esp32-elf-
24
34
25
35
# paths to ESP IDF and its components
26
- ifeq ($(IDF_PATH ) ,)
27
- $(error Please configure the ESPIDF variable)
28
- endif
29
36
ESPIDF = $(IDF_PATH )
30
37
ESPCOMP = $(ESPIDF ) /components
31
38
ESPTOOL ?= $(ESPCOMP ) /esptool_py/esptool/esptool.py
32
- BADGE = $(IDF_PATH ) /..
33
39
34
40
# verify the ESP IDF version
35
41
ESPIDF_SUPHASH := 8b274cd5a5d193a82b49aef384c303b105eda700
@@ -658,7 +664,7 @@ OBJ_ESPIDF += $(addprefix $(BUILD)/, $(ESPIDF_SDMMC_O))
658
664
# Badge magic
659
665
660
666
$(BUILD ) /components/% .o :
661
- BADGE_COMPONENTS_O = $(addprefix $(BADGE ) /components/,\
667
+ BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH ) /components/,\
662
668
badge/badge_base.o \
663
669
badge/badge_eink.o \
664
670
badge/badge_i2c.o \
You can’t perform that action at this time.
0 commit comments