From 9afba2abf53f4dbd761a601ccf9c0266fdfad67a Mon Sep 17 00:00:00 2001 From: Xia Xiaotian Date: Tue, 29 Oct 2019 15:16:32 +0800 Subject: [PATCH] esp_wifi: merge esp32s2beta WiFi library to master branch --- .gitmodules | 11 +++-------- .../bootloader/subproject/main/Makefile.projbuild | 2 +- components/esp_wifi/CMakeLists.txt | 4 ++-- components/esp_wifi/component.mk | 6 +++--- components/esp_wifi/lib | 1 + components/esp_wifi/lib_esp32 | 1 - components/esp_wifi/lib_esp32s2beta | 1 - tools/ci/config/build.yml | 6 +++--- 8 files changed, 13 insertions(+), 19 deletions(-) create mode 160000 components/esp_wifi/lib delete mode 160000 components/esp_wifi/lib_esp32 delete mode 160000 components/esp_wifi/lib_esp32s2beta diff --git a/.gitmodules b/.gitmodules index f054087dd0..53315b72d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -67,14 +67,6 @@ path = examples/build_system/cmake/import_lib/main/lib/tinyxml2 url = ../../leethomason/tinyxml2.git -[submodule "components/esp_wifi/lib_esp32"] - path = components/esp_wifi/lib_esp32 - url = ../../espressif/esp32-wifi-lib.git - -[submodule "components/esp_wifi/lib_esp32s2beta"] - path = components/esp_wifi/lib_esp32s2beta - url = ../../espressif/esp32-wifi-lib.git - [submodule "components/bt/host/nimble/nimble"] path = components/bt/host/nimble/nimble url = ../../espressif/esp-nimble.git @@ -83,3 +75,6 @@ path = components/cbor/tinycbor url = ../../intel/tinycbor.git +[submodule "components/esp_wifi/lib"] + path = components/esp_wifi/lib + url = ../../espressif/esp32-wifi-lib.git diff --git a/components/bootloader/subproject/main/Makefile.projbuild b/components/bootloader/subproject/main/Makefile.projbuild index 2e628b6d55..92ecc49340 100644 --- a/components/bootloader/subproject/main/Makefile.projbuild +++ b/components/bootloader/subproject/main/Makefile.projbuild @@ -1,4 +1,4 @@ # Submodules normally added in component.mk, but fully qualified # paths can be added at this level (we need binary librtc to be # available to link bootloader). -COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp_wifi/lib_esp32 +COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp_wifi/lib diff --git a/components/esp_wifi/CMakeLists.txt b/components/esp_wifi/CMakeLists.txt index f852a2095a..e1478a3a22 100644 --- a/components/esp_wifi/CMakeLists.txt +++ b/components/esp_wifi/CMakeLists.txt @@ -20,7 +20,7 @@ idf_component_register(SRCS "src/coexist.c" LDFRAGMENTS "${ldfragments}") idf_build_get_property(build_dir BUILD_DIR) -target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib_${idf_target}") +target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}") if(link_binary_libs) if(CONFIG_IDF_TARGET_ESP32) @@ -39,7 +39,7 @@ if(link_binary_libs) foreach(blob ${blobs}) add_library(${blob} STATIC IMPORTED) - set_property(TARGET ${blob} PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib_${idf_target}/lib${blob}.a) + set_property(TARGET ${blob} PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/lib${blob}.a) target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob}) foreach(_blob ${blobs}) diff --git a/components/esp_wifi/component.mk b/components/esp_wifi/component.mk index aa196fd4ff..578041750f 100644 --- a/components/esp_wifi/component.mk +++ b/components/esp_wifi/component.mk @@ -7,14 +7,14 @@ COMPONENT_SRCDIRS := src ifndef CONFIG_ESP32_NO_BLOBS LIBS := core rtc net80211 pp smartconfig coexist espnow phy mesh - COMPONENT_ADD_LDFLAGS += -L$(COMPONENT_PATH)/lib_$(IDF_TARGET) \ + COMPONENT_ADD_LDFLAGS += -L$(COMPONENT_PATH)/lib/$(IDF_TARGET) \ $(addprefix -l,$(LIBS)) COMPONENT_ADD_LDFRAGMENTS += linker.lf - COMPONENT_SUBMODULES += lib_$(IDF_TARGET) + COMPONENT_SUBMODULES += lib - ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib_$(IDF_TARGET)/lib%.a,$(LIBS)) + ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/$(IDF_TARGET)/lib%.a,$(LIBS)) COMPONENT_ADD_LINKER_DEPS += $(ALL_LIB_FILES) endif diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib new file mode 160000 index 0000000000..4a7e5493e7 --- /dev/null +++ b/components/esp_wifi/lib @@ -0,0 +1 @@ +Subproject commit 4a7e5493e7af7eb9785baf5f5d55fa12f23155c4 diff --git a/components/esp_wifi/lib_esp32 b/components/esp_wifi/lib_esp32 deleted file mode 160000 index 1d830bc243..0000000000 --- a/components/esp_wifi/lib_esp32 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1d830bc2433b6e166d23329c612db6b86aabc59b diff --git a/components/esp_wifi/lib_esp32s2beta b/components/esp_wifi/lib_esp32s2beta deleted file mode 160000 index 8ea1c65125..0000000000 --- a/components/esp_wifi/lib_esp32s2beta +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8ea1c651254560c59f816c9d16aa71322dcd15e5 diff --git a/tools/ci/config/build.yml b/tools/ci/config/build.yml index 6fb4c5e4ac..51fd84c98d 100644 --- a/tools/ci/config/build.yml +++ b/tools/ci/config/build.yml @@ -83,9 +83,9 @@ build_template_app: - export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS} # Check if there are any stray printf/ets_printf references in WiFi libs - - pushd ../components/esp_wifi/lib_esp32 - - test $(xtensa-esp32-elf-nm *.a | grep -w printf | wc -l) -eq 0 - - test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0 + - pushd ../components/esp_wifi/lib + - for dir in esp32 esp32s2beta; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w printf | wc -l) -eq 0; done; + - for dir in esp32 esp32s2beta; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w ets_printf | wc -l) -eq 0; done; - popd build_ssc: