mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
derive esp_wifi from esp32 component
This commit is contained in:
parent
5b2247df2d
commit
79bb5de426
@ -163,7 +163,7 @@ build_template_app:
|
|||||||
- sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
|
- sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
|
||||||
- make all V=1
|
- make all V=1
|
||||||
# Check if there are any stray printf/ets_printf references in WiFi libs
|
# Check if there are any stray printf/ets_printf references in WiFi libs
|
||||||
- cd ../components/esp32/lib
|
- cd ../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 printf | wc -l) -eq 0
|
||||||
- test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
|
- test $(xtensa-esp32-elf-nm *.a | grep -w ets_printf | wc -l) -eq 0
|
||||||
|
|
||||||
|
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -1,7 +1,3 @@
|
|||||||
[submodule "components/esp32/lib"]
|
|
||||||
path = components/esp32/lib
|
|
||||||
url = https://github.com/espressif/esp32-wifi-lib.git
|
|
||||||
|
|
||||||
[submodule "components/esptool_py/esptool"]
|
[submodule "components/esptool_py/esptool"]
|
||||||
path = components/esptool_py/esptool
|
path = components/esptool_py/esptool
|
||||||
url = https://github.com/espressif/esptool.git
|
url = https://github.com/espressif/esptool.git
|
||||||
@ -69,3 +65,7 @@
|
|||||||
[submodule "examples/build_system/cmake/import_lib/main/lib/tinyxml2"]
|
[submodule "examples/build_system/cmake/import_lib/main/lib/tinyxml2"]
|
||||||
path = examples/build_system/cmake/import_lib/main/lib/tinyxml2
|
path = examples/build_system/cmake/import_lib/main/lib/tinyxml2
|
||||||
url = https://github.com/leethomason/tinyxml2
|
url = https://github.com/leethomason/tinyxml2
|
||||||
|
|
||||||
|
[submodule "components/esp_wifi/lib_esp32"]
|
||||||
|
path = components/esp_wifi/lib_esp32
|
||||||
|
url = https://github.com/espressif/esp32-wifi-lib.git
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Submodules normally added in component.mk, but fully qualified
|
# Submodules normally added in component.mk, but fully qualified
|
||||||
# paths can be added at this level (we need binary librtc to be
|
# paths can be added at this level (we need binary librtc to be
|
||||||
# available to link bootloader).
|
# available to link bootloader).
|
||||||
COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp32/lib
|
COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp_wifi/lib_esp32
|
||||||
|
@ -13,7 +13,6 @@ else()
|
|||||||
"cache_err_int.c"
|
"cache_err_int.c"
|
||||||
"cache_sram_mmu.c"
|
"cache_sram_mmu.c"
|
||||||
"clk.c"
|
"clk.c"
|
||||||
"coexist.c"
|
|
||||||
"cpu_start.c"
|
"cpu_start.c"
|
||||||
"crosscore_int.c"
|
"crosscore_int.c"
|
||||||
"dport_access.c"
|
"dport_access.c"
|
||||||
@ -21,26 +20,21 @@ else()
|
|||||||
"esp_adapter.c"
|
"esp_adapter.c"
|
||||||
"esp_timer_esp32.c"
|
"esp_timer_esp32.c"
|
||||||
"esp_himem.c"
|
"esp_himem.c"
|
||||||
"fast_crypto_ops.c"
|
|
||||||
"freertos_hooks.c"
|
"freertos_hooks.c"
|
||||||
"gdbstub.c"
|
"gdbstub.c"
|
||||||
"hw_random.c"
|
"hw_random.c"
|
||||||
"int_wdt.c"
|
"int_wdt.c"
|
||||||
"intr_alloc.c"
|
"intr_alloc.c"
|
||||||
"ipc.c"
|
"ipc.c"
|
||||||
"lib_printf.c"
|
|
||||||
"panic.c"
|
"panic.c"
|
||||||
"phy_init.c"
|
|
||||||
"pm_esp32.c"
|
"pm_esp32.c"
|
||||||
"pm_trace.c"
|
"pm_trace.c"
|
||||||
"reset_reason.c"
|
"reset_reason.c"
|
||||||
"restore.c"
|
|
||||||
"sleep_modes.c"
|
"sleep_modes.c"
|
||||||
"spiram.c"
|
"spiram.c"
|
||||||
"spiram_psram.c"
|
"spiram_psram.c"
|
||||||
"system_api.c"
|
"system_api.c"
|
||||||
"task_wdt.c"
|
"task_wdt.c")
|
||||||
"wifi_init.c")
|
|
||||||
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES driver esp_event efuse)
|
set(COMPONENT_REQUIRES driver esp_event efuse)
|
||||||
@ -48,16 +42,12 @@ else()
|
|||||||
# app_update is added here because cpu_start.c uses esp_ota_get_app_description() function.
|
# app_update is added here because cpu_start.c uses esp_ota_get_app_description() function.
|
||||||
set(COMPONENT_PRIV_REQUIRES
|
set(COMPONENT_PRIV_REQUIRES
|
||||||
app_trace app_update bootloader_support log mbedtls nvs_flash
|
app_trace app_update bootloader_support log mbedtls nvs_flash
|
||||||
pthread smartconfig_ack spi_flash vfs wpa_supplicant espcoredump esp_common)
|
pthread smartconfig_ack spi_flash vfs wpa_supplicant espcoredump esp_common esp_wifi)
|
||||||
|
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf ld/esp32_fragments.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf ld/esp32_fragments.lf)
|
||||||
|
|
||||||
register_component()
|
register_component()
|
||||||
|
|
||||||
target_link_libraries(${COMPONENT_TARGET} "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
|
||||||
if(NOT CONFIG_NO_BLOBS)
|
|
||||||
target_link_libraries(${COMPONENT_TARGET} coexist core espnow mesh net80211 phy pp rtc smartconfig wpa2 wpa wps)
|
|
||||||
endif()
|
|
||||||
target_linker_script(${COMPONENT_TARGET} "${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld")
|
target_linker_script(${COMPONENT_TARGET} "${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld")
|
||||||
|
|
||||||
if(CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY)
|
if(CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY)
|
||||||
@ -101,27 +91,6 @@ else()
|
|||||||
add_custom_target(esp32_linker_script DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld)
|
add_custom_target(esp32_linker_script DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/esp32_out.ld)
|
||||||
add_dependencies(${COMPONENT_TARGET} esp32_linker_script)
|
add_dependencies(${COMPONENT_TARGET} esp32_linker_script)
|
||||||
|
|
||||||
if(CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION AND IDF_BUILD_ARTIFACTS)
|
|
||||||
partition_table_get_partition_info(phy_partition_offset "--partition-type data --partition-subtype phy" "offset")
|
|
||||||
set(phy_init_data_bin "${IDF_BUILD_ARTIFACTS_DIR}/phy_init_data.bin")
|
|
||||||
|
|
||||||
# To get the phy_init_data.bin file, compile phy_init_data.h as a C file and then objcopy
|
|
||||||
# the object file to a raw binary
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT ${phy_init_data_bin}
|
|
||||||
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/phy_init_data.h
|
|
||||||
COMMAND ${CMAKE_C_COMPILER} -x c -c
|
|
||||||
-I ${CMAKE_CURRENT_LIST_DIR} -I ${CMAKE_CURRENT_LIST_DIR}/include -I ${IDF_BUILD_ARTIFACTS_DIR}
|
|
||||||
-o phy_init_data.obj
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/phy_init_data.h
|
|
||||||
COMMAND ${CMAKE_OBJCOPY} -O binary phy_init_data.obj ${phy_init_data_bin}
|
|
||||||
)
|
|
||||||
add_custom_target(phy_init_data ALL DEPENDS ${phy_init_data_bin})
|
|
||||||
add_dependencies(flash phy_init_data)
|
|
||||||
|
|
||||||
esptool_py_flash_project_args(phy ${phy_partition_offset} ${phy_init_data_bin} FLASH_IN_PROJECT)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Enable dynamic esp_timer overflow value if building unit tests
|
# Enable dynamic esp_timer overflow value if building unit tests
|
||||||
if(esp32_test IN_LIST BUILD_TEST_COMPONENTS)
|
if(esp32_test IN_LIST BUILD_TEST_COMPONENTS)
|
||||||
add_definitions(-DESP_TIMER_DYNAMIC_OVERFLOW_VAL)
|
add_definitions(-DESP_TIMER_DYNAMIC_OVERFLOW_VAL)
|
||||||
|
@ -3,10 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
COMPONENT_SRCDIRS := .
|
COMPONENT_SRCDIRS := .
|
||||||
LIBS ?=
|
|
||||||
ifndef CONFIG_NO_BLOBS
|
|
||||||
LIBS += core rtc net80211 pp wpa smartconfig coexist wps wpa2 espnow phy mesh
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
|
ifdef CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
|
||||||
# This linker script must come before esp32.project.ld
|
# This linker script must come before esp32.project.ld
|
||||||
@ -22,8 +18,6 @@ LINKER_SCRIPTS += $(COMPONENT_BUILD_DIR)/esp32.project.ld esp32.peripherals.ld
|
|||||||
#linker will ignore panic_highint_hdl.S as it has no other files depending on any
|
#linker will ignore panic_highint_hdl.S as it has no other files depending on any
|
||||||
#symbols in it.
|
#symbols in it.
|
||||||
COMPONENT_ADD_LDFLAGS += $(COMPONENT_PATH)/libhal.a \
|
COMPONENT_ADD_LDFLAGS += $(COMPONENT_PATH)/libhal.a \
|
||||||
-L$(COMPONENT_PATH)/lib \
|
|
||||||
$(addprefix -l,$(LIBS)) \
|
|
||||||
-L $(COMPONENT_PATH)/ld \
|
-L $(COMPONENT_PATH)/ld \
|
||||||
-T esp32_out.ld \
|
-T esp32_out.ld \
|
||||||
-u ld_include_panic_highint_hdl \
|
-u ld_include_panic_highint_hdl \
|
||||||
@ -31,14 +25,9 @@ COMPONENT_ADD_LDFLAGS += $(COMPONENT_PATH)/libhal.a \
|
|||||||
|
|
||||||
COMPONENT_ADD_LDFRAGMENTS += ld/esp32_fragments.lf linker.lf
|
COMPONENT_ADD_LDFRAGMENTS += ld/esp32_fragments.lf linker.lf
|
||||||
|
|
||||||
ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
|
|
||||||
|
|
||||||
COMPONENT_SUBMODULES += lib
|
|
||||||
|
|
||||||
# final linking of project ELF depends on all binary libraries, and
|
# final linking of project ELF depends on all binary libraries, and
|
||||||
# all linker scripts (except esp32_out.ld, as this is code generated here.)
|
# all linker scripts (except esp32_out.ld, as this is code generated here.)
|
||||||
COMPONENT_ADD_LINKER_DEPS := $(ALL_LIB_FILES) \
|
COMPONENT_ADD_LINKER_DEPS := $(addprefix ld/, $(filter-out $(COMPONENT_BUILD_DIR)/esp32.project.ld, $(LINKER_SCRIPTS))) \
|
||||||
$(addprefix ld/, $(filter-out $(COMPONENT_BUILD_DIR)/esp32.project.ld, $(LINKER_SCRIPTS))) \
|
|
||||||
$(COMPONENT_BUILD_DIR)/esp32.project.ld
|
$(COMPONENT_BUILD_DIR)/esp32.project.ld
|
||||||
|
|
||||||
# Preprocess esp32.ld linker script into esp32_out.ld
|
# Preprocess esp32.ld linker script into esp32_out.ld
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_heap_caps.h"
|
#include "esp_heap_caps.h"
|
||||||
#include "esp_wifi_os_adapter.h"
|
#include "esp_private/wifi_os_adapter.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
#include "esp_phy_init.h"
|
#include "esp_phy_init.h"
|
||||||
#include "crypto/md5.h"
|
#include "crypto/md5.h"
|
||||||
#include "crypto/sha1.h"
|
#include "crypto/sha1.h"
|
||||||
|
@ -3,21 +3,11 @@ archive: libesp32.a
|
|||||||
entries:
|
entries:
|
||||||
panic (noflash)
|
panic (noflash)
|
||||||
|
|
||||||
[mapping]
|
|
||||||
archive: libphy.a
|
|
||||||
entries:
|
|
||||||
* (noflash_data)
|
|
||||||
|
|
||||||
[mapping]
|
[mapping]
|
||||||
archive: libhal.a
|
archive: libhal.a
|
||||||
entries:
|
entries:
|
||||||
* (noflash_text)
|
* (noflash_text)
|
||||||
|
|
||||||
[mapping]
|
|
||||||
archive: librtc.a
|
|
||||||
entries:
|
|
||||||
* (noflash_text)
|
|
||||||
|
|
||||||
[mapping]
|
[mapping]
|
||||||
archive: libgcc.a
|
archive: libgcc.a
|
||||||
entries:
|
entries:
|
||||||
@ -27,16 +17,3 @@ entries:
|
|||||||
archive: libgcov.a
|
archive: libgcov.a
|
||||||
entries:
|
entries:
|
||||||
* (noflash)
|
* (noflash)
|
||||||
|
|
||||||
[mapping]
|
|
||||||
archive: libpp.a
|
|
||||||
entries:
|
|
||||||
: ESP32_WIFI_IRAM_OPT = y
|
|
||||||
* (wifi_iram)
|
|
||||||
|
|
||||||
[mapping]
|
|
||||||
archive: libnet80211.a
|
|
||||||
entries:
|
|
||||||
: ESP32_WIFI_IRAM_OPT = y
|
|
||||||
* (wifi_iram)
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "esp_system.h"
|
#include "esp_system.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "esp32/rom/efuse.h"
|
#include "esp32/rom/efuse.h"
|
||||||
|
@ -10,28 +10,6 @@ add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test_tjpgd_logo.h"
|
|||||||
WORKING_DIRECTORY ${COMPONENT_PATH}
|
WORKING_DIRECTORY ${COMPONENT_PATH}
|
||||||
DEPENDS "${CMAKE_CURRENT_LIST_DIR}/logo.jpg")
|
DEPENDS "${CMAKE_CURRENT_LIST_DIR}/logo.jpg")
|
||||||
|
|
||||||
# Calculate MD5 value of header file esp_wifi_os_adapter.h
|
|
||||||
execute_process(COMMAND md5sum ${IDF_PATH}/components/esp32/include/esp_wifi_os_adapter.h
|
|
||||||
COMMAND cut -c 1-7
|
|
||||||
OUTPUT_VARIABLE WIFI_OS_ADAPTER_MD5
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
# Calculate MD5 value of header file esp_wifi_crypto_types.h
|
|
||||||
execute_process(COMMAND md5sum ${IDF_PATH}/components/esp32/include/esp_wifi_crypto_types.h
|
|
||||||
COMMAND cut -c 1-7
|
|
||||||
OUTPUT_VARIABLE WIFI_CRYPTO_MD5
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
# Calculate MD5 value of header file esp_coexist_adapter.h
|
|
||||||
execute_process(COMMAND md5sum ${IDF_PATH}/components/esp32/include/esp_coexist_adapter.h
|
|
||||||
COMMAND cut -c 1-7
|
|
||||||
OUTPUT_VARIABLE COEX_ADAPTER_MD5
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
add_definitions(-DWIFI_OS_ADAPTER_MD5=\"${WIFI_OS_ADAPTER_MD5}\")
|
|
||||||
add_definitions(-DWIFI_CRYPTO_MD5=\"${WIFI_CRYPTO_MD5}\")
|
|
||||||
add_definitions(-DCOEX_ADAPTER_MD5=\"${COEX_ADAPTER_MD5}\")
|
|
||||||
|
|
||||||
add_custom_target(esp32_test_logo DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/test_tjpgd_logo.h")
|
add_custom_target(esp32_test_logo DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/test_tjpgd_logo.h")
|
||||||
|
|
||||||
add_dependencies(${COMPONENT_TARGET} esp32_test_logo)
|
add_dependencies(${COMPONENT_TARGET} esp32_test_logo)
|
||||||
|
@ -8,18 +8,6 @@ COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-a
|
|||||||
|
|
||||||
COMPONENT_SRCDIRS := .
|
COMPONENT_SRCDIRS := .
|
||||||
|
|
||||||
# Calculate MD5 value of header file esp_wifi_os_adapter.h
|
|
||||||
WIFI_OS_ADAPTER_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp32/include/esp_wifi_os_adapter.h | cut -c 1-7)\"
|
|
||||||
CFLAGS+=-DWIFI_OS_ADAPTER_MD5=$(WIFI_OS_ADAPTER_MD5_VAL)
|
|
||||||
|
|
||||||
# Calculate MD5 value of header file esp_wifi_crypto_types.h
|
|
||||||
WIFI_CRYPTO_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp32/include/esp_wifi_crypto_types.h | cut -c 1-7)\"
|
|
||||||
CFLAGS+=-DWIFI_CRYPTO_MD5=$(WIFI_CRYPTO_MD5_VAL)
|
|
||||||
|
|
||||||
# Calculate MD5 value of header file esp_coexist_adapter.h
|
|
||||||
COEX_ADAPTER_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp32/include/esp_coexist_adapter.h | cut -c 1-7)\"
|
|
||||||
CFLAGS+=-DCOEX_ADAPTER_MD5=$(COEX_ADAPTER_MD5_VAL)
|
|
||||||
|
|
||||||
test_tjpgd.o: test_tjpgd_logo.h
|
test_tjpgd.o: test_tjpgd_logo.h
|
||||||
|
|
||||||
test_tjpgd_logo.h: $(COMPONENT_PATH)/logo.jpg
|
test_tjpgd_logo.h: $(COMPONENT_PATH)/logo.jpg
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_event_loop.h"
|
#include "esp_event_loop.h"
|
||||||
#include "esp_task.h"
|
#include "esp_task.h"
|
||||||
|
41
components/esp_wifi/CMakeLists.txt
Normal file
41
components/esp_wifi/CMakeLists.txt
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
set(COMPONENT_SRCS
|
||||||
|
"src/coexist.c"
|
||||||
|
"src/fast_crypto_ops.c"
|
||||||
|
"src/lib_printf.c"
|
||||||
|
"src/phy_init.c"
|
||||||
|
"src/restore.c"
|
||||||
|
"src/wifi_init.c")
|
||||||
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
||||||
|
set(COMPONENT_PRIV_INCLUDEDIRS)
|
||||||
|
set(COMPONENT_REQUIRES)
|
||||||
|
set(COMPONENT_PRIV_REQUIRES "wpa_supplicant" "nvs_flash")
|
||||||
|
set(COMPONENT_ADD_LDFRAGMENTS "linker.lf")
|
||||||
|
|
||||||
|
register_component()
|
||||||
|
|
||||||
|
target_link_libraries(${COMPONENT_TARGET} "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib_${IDF_TARGET}")
|
||||||
|
|
||||||
|
if(NOT CONFIG_NO_BLOBS)
|
||||||
|
target_link_libraries(${COMPONENT_TARGET} coexist core espnow mesh net80211 phy pp rtc smartconfig wpa2 wpa wps)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION AND IDF_BUILD_ARTIFACTS)
|
||||||
|
partition_table_get_partition_info(phy_partition_offset "--partition-type data --partition-subtype phy" "offset")
|
||||||
|
set(phy_init_data_bin "${IDF_BUILD_ARTIFACTS_DIR}/phy_init_data.bin")
|
||||||
|
# To get the phy_init_data.bin file, compile phy_init_data.h as a C file and then objcopy
|
||||||
|
# the object file to a raw binary
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${phy_init_data_bin}
|
||||||
|
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/include/phy_init_data.h
|
||||||
|
COMMAND ${CMAKE_C_COMPILER} -x c -c
|
||||||
|
-I ${CMAKE_CURRENT_LIST_DIR} -I ${CMAKE_CURRENT_LIST_DIR}/include -I ${IDF_BUILD_ARTIFACTS_DIR}
|
||||||
|
-o phy_init_data.obj
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/include/phy_init_data.h
|
||||||
|
COMMAND ${CMAKE_OBJCOPY} -O binary phy_init_data.obj ${phy_init_data_bin}
|
||||||
|
)
|
||||||
|
add_custom_target(phy_init_data ALL DEPENDS ${phy_init_data_bin})
|
||||||
|
add_dependencies(flash phy_init_data)
|
||||||
|
|
||||||
|
esptool_py_flash_project_args(phy ${phy_partition_offset} ${phy_init_data_bin} FLASH_IN_PROJECT)
|
||||||
|
|
||||||
|
endif()
|
21
components/esp_wifi/component.mk
Normal file
21
components/esp_wifi/component.mk
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#
|
||||||
|
# Component Makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
COMPONENT_ADD_INCLUDEDIRS := include
|
||||||
|
COMPONENT_SRCDIRS := src
|
||||||
|
|
||||||
|
LIBS ?=
|
||||||
|
ifndef CONFIG_NO_BLOBS
|
||||||
|
LIBS += core rtc net80211 pp wpa smartconfig coexist wps wpa2 espnow phy mesh
|
||||||
|
endif
|
||||||
|
|
||||||
|
COMPONENT_ADD_LDFLAGS += -L$(COMPONENT_PATH)/lib_esp32 \
|
||||||
|
$(addprefix -l,$(LIBS)) \
|
||||||
|
|
||||||
|
COMPONENT_ADD_LDFRAGMENTS += linker.lf
|
||||||
|
|
||||||
|
COMPONENT_SUBMODULES += lib_esp32
|
||||||
|
|
||||||
|
ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib_esp32/lib%.a,$(LIBS))
|
||||||
|
COMPONENT_ADD_LINKER_DEPS += $(ALL_LIB_FILES)
|
@ -18,7 +18,7 @@
|
|||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_wifi_types.h"
|
#include "esp_wifi_types.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
#include "esp_wifi_crypto_types.h"
|
#include "esp_wifi_crypto_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
@ -67,7 +67,7 @@
|
|||||||
#include "esp_wifi_types.h"
|
#include "esp_wifi_types.h"
|
||||||
#include "esp_wifi_crypto_types.h"
|
#include "esp_wifi_crypto_types.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_wifi_os_adapter.h"
|
#include "esp_private/wifi_os_adapter.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
22
components/esp_wifi/linker.lf
Normal file
22
components/esp_wifi/linker.lf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[mapping]
|
||||||
|
archive: libphy.a
|
||||||
|
entries:
|
||||||
|
* (noflash_data)
|
||||||
|
|
||||||
|
[mapping]
|
||||||
|
archive: librtc.a
|
||||||
|
entries:
|
||||||
|
* (noflash_text)
|
||||||
|
|
||||||
|
[mapping]
|
||||||
|
archive: libpp.a
|
||||||
|
entries:
|
||||||
|
: ESP32_WIFI_IRAM_OPT = y
|
||||||
|
* (wifi_iram)
|
||||||
|
|
||||||
|
[mapping]
|
||||||
|
archive: libnet80211.a
|
||||||
|
entries:
|
||||||
|
: ESP32_WIFI_IRAM_OPT = y
|
||||||
|
* (wifi_iram)
|
||||||
|
|
@ -38,7 +38,7 @@
|
|||||||
#include "phy_init_data.h"
|
#include "phy_init_data.h"
|
||||||
#include "esp_coexist_internal.h"
|
#include "esp_coexist_internal.h"
|
||||||
#include "driver/periph_ctrl.h"
|
#include "driver/periph_ctrl.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
|
|
||||||
extern wifi_mac_time_update_cb_t s_wifi_mac_time_update_cb;
|
extern wifi_mac_time_update_cb_t s_wifi_mac_time_update_cb;
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
#include <esp_event.h>
|
#include <esp_event.h>
|
||||||
#include <esp_wifi.h>
|
#include <esp_wifi.h>
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
#include "esp_pm.h"
|
#include "esp_pm.h"
|
||||||
#include "soc/rtc.h"
|
#include "soc/rtc.h"
|
||||||
#include "esp_mesh.h"
|
#include "esp_mesh.h"
|
28
components/esp_wifi/test/CMakeLists.txt
Normal file
28
components/esp_wifi/test/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
set(COMPONENT_SRCDIRS ".")
|
||||||
|
set(COMPONENT_ADD_INCLUDEDIRS ". ${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
set(COMPONENT_REQUIRES unity test_utils nvs_flash ulp esp_common)
|
||||||
|
|
||||||
|
register_component()
|
||||||
|
|
||||||
|
# Calculate MD5 value of header file esp_wifi_os_adapter.h
|
||||||
|
execute_process(COMMAND md5sum ${IDF_PATH}/components/esp_wifi/include/esp_private/wifi_os_adapter.h
|
||||||
|
COMMAND cut -c 1-7
|
||||||
|
OUTPUT_VARIABLE WIFI_OS_ADAPTER_MD5
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
# Calculate MD5 value of header file esp_wifi_crypto_types.h
|
||||||
|
execute_process(COMMAND md5sum ${IDF_PATH}/components/esp_wifi/include/esp_wifi_crypto_types.h
|
||||||
|
COMMAND cut -c 1-7
|
||||||
|
OUTPUT_VARIABLE WIFI_CRYPTO_MD5
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
# Calculate MD5 value of header file esp_coexist_adapter.h
|
||||||
|
execute_process(COMMAND md5sum ${IDF_PATH}/components/esp_wifi/include/esp_coexist_adapter.h
|
||||||
|
COMMAND cut -c 1-7
|
||||||
|
OUTPUT_VARIABLE COEX_ADAPTER_MD5
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
add_definitions(-DWIFI_OS_ADAPTER_MD5=\"${WIFI_OS_ADAPTER_MD5}\")
|
||||||
|
add_definitions(-DWIFI_CRYPTO_MD5=\"${WIFI_CRYPTO_MD5}\")
|
||||||
|
add_definitions(-DCOEX_ADAPTER_MD5=\"${COEX_ADAPTER_MD5}\")
|
19
components/esp_wifi/test/component.mk
Normal file
19
components/esp_wifi/test/component.mk
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
#Component Makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive
|
||||||
|
|
||||||
|
COMPONENT_SRCDIRS := .
|
||||||
|
|
||||||
|
# Calculate MD5 value of header file esp_wifi_os_adapter.h
|
||||||
|
WIFI_OS_ADAPTER_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_private/wifi_os_adapter.h | cut -c 1-7)\"
|
||||||
|
CFLAGS+=-DWIFI_OS_ADAPTER_MD5=$(WIFI_OS_ADAPTER_MD5_VAL)
|
||||||
|
|
||||||
|
# Calculate MD5 value of header file esp_wifi_crypto_types.h
|
||||||
|
WIFI_CRYPTO_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_wifi_crypto_types.h | cut -c 1-7)\"
|
||||||
|
CFLAGS+=-DWIFI_CRYPTO_MD5=$(WIFI_CRYPTO_MD5_VAL)
|
||||||
|
|
||||||
|
# Calculate MD5 value of header file esp_coexist_adapter.h
|
||||||
|
COEX_ADAPTER_MD5_VAL=\"$(shell md5sum $(IDF_PATH)/components/esp_wifi/include/esp_coexist_adapter.h | cut -c 1-7)\"
|
||||||
|
CFLAGS+=-DCOEX_ADAPTER_MD5=$(COEX_ADAPTER_MD5_VAL)
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
#include "esp_coexist_internal.h"
|
#include "esp_coexist_internal.h"
|
||||||
|
|
||||||
static const char* TAG = "test_header_files_md5";
|
static const char* TAG = "test_header_files_md5";
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
|
|
||||||
TEST_CASE("wifi lib git commit id","[wifi]")
|
TEST_CASE("wifi lib git commit id","[wifi]")
|
||||||
{
|
{
|
@ -121,7 +121,7 @@ if(CONFIG_PPP_SUPPORT)
|
|||||||
"lwip/src/netif/ppp/polarssl/sha1.c")
|
"lwip/src/netif/ppp/polarssl/sha1.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(COMPONENT_REQUIRES vfs)
|
set(COMPONENT_REQUIRES vfs esp_wifi)
|
||||||
set(COMPONENT_PRIV_REQUIRES ethernet tcpip_adapter nvs_flash)
|
set(COMPONENT_PRIV_REQUIRES ethernet tcpip_adapter nvs_flash)
|
||||||
|
|
||||||
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
|
|
||||||
#include "esp_wifi_internal.h"
|
#include "esp_private/wifi.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
|
||||||
|
@ -24,12 +24,12 @@ INPUT = \
|
|||||||
##
|
##
|
||||||
## Wi-Fi - API Reference
|
## Wi-Fi - API Reference
|
||||||
##
|
##
|
||||||
../../components/esp32/include/esp_wifi.h \
|
../../components/esp_wifi/include/esp_wifi.h \
|
||||||
../../components/esp32/include/esp_wifi_types.h \
|
../../components/esp_wifi/include/esp_wifi_types.h \
|
||||||
../../components/esp32/include/esp_smartconfig.h \
|
../../components/esp_wifi/include/esp_smartconfig.h \
|
||||||
../../components/esp32/include/esp_now.h \
|
../../components/esp_wifi/include/esp_now.h \
|
||||||
## Mesh - API Reference
|
## Mesh - API Reference
|
||||||
../../components/esp32/include/esp_mesh.h \
|
../../components/esp_wifi/include/esp_mesh.h \
|
||||||
## Bluetooth - API Reference
|
## Bluetooth - API Reference
|
||||||
## Controller && VHCI
|
## Controller && VHCI
|
||||||
../../components/bt/include/esp_bt.h \
|
../../components/bt/include/esp_bt.h \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
components/esp32/lib @GENERAL_MIRROR_SERVER@/idf/esp32-wifi-lib.git
|
components/esp_wifi/lib_esp32 @GENERAL_MIRROR_SERVER@/idf/esp32-wifi-lib.git
|
||||||
components/bt/lib @GENERAL_MIRROR_SERVER@/idf/esp32-bt-lib.git
|
components/bt/lib @GENERAL_MIRROR_SERVER@/idf/esp32-bt-lib.git
|
||||||
components/esptool_py/esptool @GENERAL_MIRROR_SERVER@/idf/esptool.git
|
components/esptool_py/esptool @GENERAL_MIRROR_SERVER@/idf/esptool.git
|
||||||
components/aws_iot/aws-iot-device-sdk-embedded-C @GENERAL_MIRROR_SERVER@/idf/aws-iot-device-sdk-embedded-C.git ALLOW_TO_SYNC_FROM_PUBLIC
|
components/aws_iot/aws-iot-device-sdk-embedded-C @GENERAL_MIRROR_SERVER@/idf/aws-iot-device-sdk-embedded-C.git ALLOW_TO_SYNC_FROM_PUBLIC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user