Heltec-Aaron-Lee / WiFi_Kit_series

Arduino source codes and toolchain for WiFi_Kit_series made by HelTecAutomation.
GNU Lesser General Public License v2.1
781 stars 310 forks source link

using as esp-idf component workaround #15

Open iho77 opened 6 years ago

iho77 commented 6 years ago

So, to compile this SDK as component of esp-idf you have to:

  1. Clone to some esp32 and all subdirs (for example ~/heltec/esp32
  2. Rename it to for example esp32-arduino ~/heltec/esp32-arduino
  3. Edit Makefile on blank esp-idf project (may use hello-world)

    PROJECT_NAME := esp32_arduino_hello_world_template COMPONENT_ADD_INCLUDEDIRS := components/include EXTRA_COMPONENT_DIRS := $(IDF_PATH)/../heltec include $(IDF_PATH)/make/project.mk

  4. Edit component.mk in ~/heltec/esp32-arduino

    ARDUINO_CORE_LIBS := $(patsubst $(COMPONENT_PATH)/%,%,$(sort $(dir $(wildcard $(COMPONENT_PATH)/libraries///))))

COMPONENT_ADD_INCLUDEDIRS := cores/esp32 variants/wifi_lora_32 $(ARDUINO_CORE_LIBS) COMPONENT_PRIV_INCLUDEDIRS := cores/esp32/libb64 tools/sdk/include/mdns tools/sdk/include/fatfs tools/sdk/include/lwip COMPONENT_SRCDIRS := cores/esp32/libb64 cores/esp32 variants/wifi_lora_32 $(ARDUINO_CORE_LIBS) CXXFLAGS += -fno-rtti CPPFLAGS += -Wno-error=switch -Wno-error=maybe-uninitialized -Wno-error=return-type

  1. make menucnfig; make flash

it works