aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared2020-02-03 16:08:30 +1100
committerDamien George2020-02-04 18:06:14 +1100
commit0645478475d886e3dd958c2c2ae71fe66813c8f8 (patch)
treeaddaf66e182fed14833ead01e3debb1120e2062d
parent74106757ac4f78609f71083a6452ce5ba7edb3c2 (diff)
esp32/Makefile: Reorder includes to build with latest toolchain.
Tested on: - IDF3.3.1 (old toolchain) - IDF4.0-beta1 (old toolchain) - IDF4.0-beta1 (new toolchain from install.sh / export.sh)
-rw-r--r--ports/esp32/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/ports/esp32/Makefile b/ports/esp32/Makefile
index 65907a3ee..e8db3da9a 100644
--- a/ports/esp32/Makefile
+++ b/ports/esp32/Makefile
@@ -147,8 +147,6 @@ INC_ESPCOMP += -I$(ESPCOMP)/soc/include
INC_ESPCOMP += -I$(ESPCOMP)/soc/esp32/include
INC_ESPCOMP += -I$(ESPCOMP)/heap/include
INC_ESPCOMP += -I$(ESPCOMP)/log/include
-INC_ESPCOMP += -I$(ESPCOMP)/newlib/platform_include
-INC_ESPCOMP += -I$(ESPCOMP)/newlib/include
INC_ESPCOMP += -I$(ESPCOMP)/nvs_flash/include
INC_ESPCOMP += -I$(ESPCOMP)/freertos/include
INC_ESPCOMP += -I$(ESPCOMP)/esp_ringbuf/include
@@ -240,6 +238,9 @@ INC_ESPCOMP += -I$(ESPCOMP)/nimble/esp-hci/include
endif
endif
+INC_NEWLIB += -I$(ESPCOMP)/newlib/platform_include
+INC_NEWLIB += -I$(ESPCOMP)/newlib/include
+
ifeq ($(MICROPY_PY_BLUETOOTH),1)
CFLAGS_MOD += -DMICROPY_PY_BLUETOOTH=1
CFLAGS_MOD += -DMICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE=1
@@ -257,7 +258,7 @@ CFLAGS_COMMON = -Os -ffunction-sections -fdata-sections -fstrict-volatile-bitfie
-DESP_PLATFORM
CFLAGS_BASE = -std=gnu99 $(CFLAGS_COMMON) -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H
-CFLAGS = $(CFLAGS_BASE) $(INC) $(INC_ESPCOMP)
+CFLAGS = $(CFLAGS_BASE) $(INC) $(INC_ESPCOMP) $(INC_NEWLIB)
CFLAGS += -DIDF_VER=\"$(IDF_VER)\"
CFLAGS += $(CFLAGS_MOD) $(CFLAGS_EXTRA)
CFLAGS += -I$(BOARD_DIR)
@@ -458,7 +459,7 @@ $(BUILD)/$(ESPCOMP)/freertos/xtensa_context.o: CFLAGS = $(CFLAGS_ASM)
$(BUILD)/$(ESPCOMP)/freertos/xtensa_intr_asm.o: CFLAGS = $(CFLAGS_ASM)
$(BUILD)/$(ESPCOMP)/freertos/xtensa_vectors.o: CFLAGS = $(CFLAGS_ASM)
$(BUILD)/$(ESPCOMP)/freertos/xtensa_vector_defaults.o: CFLAGS = $(CFLAGS_ASM)
-$(BUILD)/$(ESPCOMP)/freertos/%.o: CFLAGS = $(CFLAGS_BASE) -I. -I$(BUILD) $(INC_ESPCOMP) -I$(ESPCOMP)/freertos/include/freertos -D_ESP_FREERTOS_INTERNAL
+$(BUILD)/$(ESPCOMP)/freertos/%.o: CFLAGS = $(CFLAGS_BASE) -I. -I$(BUILD) $(INC_ESPCOMP) $(INC_NEWLIB) -I$(ESPCOMP)/freertos/include/freertos -D_ESP_FREERTOS_INTERNAL
ESPIDF_FREERTOS_O = \
$(patsubst %.c,%.o,$(wildcard $(ESPCOMP)/freertos/*.c)) \
$(patsubst %.S,%.o,$(wildcard $(ESPCOMP)/freertos/*.S)) \