Skip to content

Commit

Permalink
esp8266: work with latest ESP8266_RTOS_SDK #51
Browse files Browse the repository at this point in the history
  • Loading branch information
mkellner committed Jan 28, 2019
1 parent 7e12798 commit 0abc246
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/mcconfig/make.esp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ comma := ,
NET_CONFIG_FLAGS += -DDEBUG_IP=$(subst .,$(comma),$(DEBUG_IP))
endif

ifneq ("$(wildcard $(ESPRESSIF_SDK_ROOT)/components/esp8266/lib/libcirom.a)", "")
LIBCIROM_PATH = $(ESPRESSIF_SDK_ROOT)/components/esp8266/lib/libcirom.a
else
LIBCIROM_PATH = $(ESPRESSIF_SDK_ROOT)/lib/libcirom.a
endif

CORE_DIR = $(ARDUINO_ROOT)/cores/esp8266
INC_DIRS = \
$(ESP_TOOLS_SDK_ROOT)/include \
Expand Down Expand Up @@ -322,9 +328,9 @@ $(BIN_DIR)/main.bin: $(SDK_OBJ) $(LIB_DIR)/lib_a-setjmp.o $(XS_OBJ) $(TMP_DIR)/m
@echo "# XS: $(XS_GIT_VERSION)"
@$(TOOLS_BIN)/xtensa-lx106-elf-size -A $(TMP_DIR)/main.elf | perl -e $(MEM_USAGE)

$(LIB_DIR)/lib_a-setjmp.o: $(ESPRESSIF_SDK_ROOT)/lib/libcirom.a
$(LIB_DIR)/lib_a-setjmp.o: $(LIBCIROM_PATH)
@echo "# ar" $(<F)
(cd $(LIB_DIR) && $(AR) -xv $(ESPRESSIF_SDK_ROOT)/lib/libcirom.a lib_a-setjmp.o)
(cd $(LIB_DIR) && $(AR) -xv $< lib_a-setjmp.o)

$(XS_OBJ): $(XS_HEADERS)
$(LIB_DIR)/xs%.c.o: xs%.c
Expand Down

0 comments on commit 0abc246

Please sign in to comment.