diff --git a/platform.txt b/platform.txt index 9c18453d..dd74d89f 100644 --- a/platform.txt +++ b/platform.txt @@ -22,7 +22,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/ compiler.sdk.path={runtime.platform.path}/tools/sdk -compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp32-camera" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/fb_gfx" +compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/esp32-camera" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/fb_gfx" compiler.c.cmd=xtensa-esp32-elf-gcc compiler.c.flags=-std=gnu99 -Os -g3 -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c @@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls compiler.c.elf.cmd=xtensa-esp32-elf-gcc compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception -compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lesp32-camera -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lfb_gfx -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -limage_util -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lface_recognition -lapp_update -lnghttp -lspiffs -lface_detection -lespnow -lnvs_flash -lesp_adc_cal -llog -ldl_lib -lsmartconfig_ack -lexpat -lm -lfr -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lfd -lstdc++ +compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lesp-face -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lesp32-camera -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lfb_gfx -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -limage_util -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lface_recognition -lapp_update -lnghttp -lspiffs -lface_detection -lespnow -lnvs_flash -lesp_adc_cal -llog -ldl_lib -lsmartconfig_ack -lexpat -lm -lfr -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lfd -lstdc++ compiler.as.cmd=xtensa-esp32-elf-as diff --git a/tools/platformio-build.py b/tools/platformio-build.py index dd54d8fe..54b086ed 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -152,6 +152,7 @@ env.Append( join(FRAMEWORK_DIR, "tools", "sdk", "include", "wifi_provisioning"), join(FRAMEWORK_DIR, "tools", "sdk", "include", "wpa_supplicant"), join(FRAMEWORK_DIR, "tools", "sdk", "include", "xtensa-debug-module"), + join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp-face"), join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp32-camera"), join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp-face"), join(FRAMEWORK_DIR, "tools", "sdk", "include", "fb_gfx"), @@ -164,7 +165,7 @@ env.Append( ], LIBS=[ - "-lgcc", "-lopenssl", "-lbtdm_app", "-lfatfs", "-lwps", "-lcoexist", "-lwear_levelling", "-lesp_http_client", "-lprotobuf-c", "-lhal", "-lnewlib", "-ldriver", "-lbootloader_support", "-lpp", "-lfreemodbus", "-lmesh", "-lsmartconfig", "-ljsmn", "-lwpa", "-lethernet", "-lphy", "-lapp_trace", "-lconsole", "-lulp", "-lwpa_supplicant", "-lfreertos", "-lbt", "-lmicro-ecc", "-lesp32-camera", "-lcxx", "-lxtensa-debug-module", "-ltcp_transport", "-lmdns", "-lvfs", "-lesp_ringbuf", "-lsoc", "-lcore", "-lfb_gfx", "-lsdmmc", "-llibsodium", "-lcoap", "-ltcpip_adapter", "-lprotocomm", "-lesp_event", "-limage_util", "-lc_nano", "-lesp-tls", "-lasio", "-lrtc", "-lspi_flash", "-lwpa2", "-lwifi_provisioning", "-lesp32", "-lface_recognition", "-lapp_update", "-lnghttp", "-lspiffs", "-lface_detection", "-lespnow", "-lnvs_flash", "-lesp_adc_cal", "-llog", "-ldl_lib", "-lsmartconfig_ack", "-lexpat", "-lm", "-lfr", "-lmqtt", "-lc", "-lheap", "-lmbedtls", "-llwip", "-lnet80211", "-lesp_http_server", "-lpthread", "-ljson", "-lesp_https_ota", "-lfd", "-lstdc++" + "-lgcc", "-lopenssl", "-lbtdm_app", "-lfatfs", "-lwps", "-lcoexist", "-lwear_levelling", "-lesp_http_client", "-lprotobuf-c", "-lhal", "-lnewlib", "-ldriver", "-lbootloader_support", "-lpp", "-lfreemodbus", "-lmesh", "-lsmartconfig", "-ljsmn", "-lwpa", "-lethernet", "-lphy", "-lesp-face", "-lapp_trace", "-lconsole", "-lulp", "-lwpa_supplicant", "-lfreertos", "-lbt", "-lmicro-ecc", "-lesp32-camera", "-lcxx", "-lxtensa-debug-module", "-ltcp_transport", "-lmdns", "-lvfs", "-lesp_ringbuf", "-lsoc", "-lcore", "-lfb_gfx", "-lsdmmc", "-llibsodium", "-lcoap", "-ltcpip_adapter", "-lprotocomm", "-lesp_event", "-limage_util", "-lc_nano", "-lesp-tls", "-lasio", "-lrtc", "-lspi_flash", "-lwpa2", "-lwifi_provisioning", "-lesp32", "-lface_recognition", "-lapp_update", "-lnghttp", "-lspiffs", "-lface_detection", "-lespnow", "-lnvs_flash", "-lesp_adc_cal", "-llog", "-ldl_lib", "-lsmartconfig_ack", "-lexpat", "-lm", "-lfr", "-lmqtt", "-lc", "-lheap", "-lmbedtls", "-llwip", "-lnet80211", "-lesp_http_server", "-lpthread", "-ljson", "-lesp_https_ota", "-lfd", "-lstdc++" ], LIBSOURCE_DIRS=[ diff --git a/tools/sdk/bin/bootloader_dio_40m.bin b/tools/sdk/bin/bootloader_dio_40m.bin index fbe60170..39c00ad7 100644 Binary files a/tools/sdk/bin/bootloader_dio_40m.bin and b/tools/sdk/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/bin/bootloader_dio_80m.bin b/tools/sdk/bin/bootloader_dio_80m.bin index db07616f..cbcc3f64 100644 Binary files a/tools/sdk/bin/bootloader_dio_80m.bin and b/tools/sdk/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/bin/bootloader_dout_40m.bin b/tools/sdk/bin/bootloader_dout_40m.bin index 426177f6..da1a2b77 100644 Binary files a/tools/sdk/bin/bootloader_dout_40m.bin and b/tools/sdk/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/bin/bootloader_dout_80m.bin b/tools/sdk/bin/bootloader_dout_80m.bin index 47a780e0..92ed2ca3 100644 Binary files a/tools/sdk/bin/bootloader_dout_80m.bin and b/tools/sdk/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/bin/bootloader_qio_40m.bin b/tools/sdk/bin/bootloader_qio_40m.bin index 26be1187..40f63f98 100644 Binary files a/tools/sdk/bin/bootloader_qio_40m.bin and b/tools/sdk/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/bin/bootloader_qio_80m.bin b/tools/sdk/bin/bootloader_qio_80m.bin index 12fc38c8..dee2fcf0 100644 Binary files a/tools/sdk/bin/bootloader_qio_80m.bin and b/tools/sdk/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/bin/bootloader_qout_40m.bin b/tools/sdk/bin/bootloader_qout_40m.bin index 26be1187..40f63f98 100644 Binary files a/tools/sdk/bin/bootloader_qout_40m.bin and b/tools/sdk/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/bin/bootloader_qout_80m.bin b/tools/sdk/bin/bootloader_qout_80m.bin index 1b6e4846..390ce20d 100644 Binary files a/tools/sdk/bin/bootloader_qout_80m.bin and b/tools/sdk/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/include/bootloader_support/bootloader_common.h b/tools/sdk/include/bootloader_support/bootloader_common.h index d5a92cc7..f184ef5c 100644 --- a/tools/sdk/include/bootloader_support/bootloader_common.h +++ b/tools/sdk/include/bootloader_support/bootloader_common.h @@ -91,3 +91,8 @@ bool bootloader_common_label_search(const char *list, char *label); * - ESP_FAIL: An allocation error occurred. */ esp_err_t bootloader_common_get_sha256_of_partition(uint32_t address, uint32_t size, int type, uint8_t *out_sha_256); + +/** + * @brief Configure VDDSDIO, call this API to rise VDDSDIO to 1.9V when VDDSDIO regulator is enabled as 1.8V mode. + */ +void bootloader_common_vddsdio_configure(); diff --git a/tools/sdk/include/bt/esp_bt.h b/tools/sdk/include/bt/esp_bt.h index b098c133..a0648645 100644 --- a/tools/sdk/include/bt/esp_bt.h +++ b/tools/sdk/include/bt/esp_bt.h @@ -25,7 +25,7 @@ extern "C" { #endif -#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x5A5AA5A5 +#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20190506 /** * @brief Bluetooth mode for controller enable/disable @@ -100,6 +100,9 @@ the adv packet will be discarded until the memory is restored. */ #define BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_LIMIT 7 //Maximum ACL connection limitation #define BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_LIMIT 3 //Maximum SCO/eSCO connection limitation +#define BTDM_CONTROLLER_SCO_DATA_PATH_HCI 0 // SCO data is routed to HCI +#define BTDM_CONTROLLER_SCO_DATA_PATH_PCM 1 // SCO data path is PCM + #define BT_CONTROLLER_INIT_CONFIG_DEFAULT() { \ .controller_task_stack_size = ESP_TASK_BT_CONTROLLER_STACK, \ .controller_task_prio = ESP_TASK_BT_CONTROLLER_PRIO, \ @@ -114,6 +117,7 @@ the adv packet will be discarded until the memory is restored. */ .mode = BTDM_CONTROLLER_MODE_EFF, \ .ble_max_conn = CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF, \ .bt_max_acl_conn = CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF, \ + .bt_sco_datapath = CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF, \ .bt_max_sync_conn = CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF, \ .magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL, \ }; @@ -144,6 +148,7 @@ typedef struct { uint8_t mode; /*!< Controller mode: BR/EDR, BLE or Dual Mode */ uint8_t ble_max_conn; /*!< BLE maximum connection numbers */ uint8_t bt_max_acl_conn; /*!< BR/EDR maximum ACL connection numbers */ + uint8_t bt_sco_datapath; /*!< SCO data path, i.e. HCI or PCM module */ /* * Following parameters can not be configured runtime when call esp_bt_controller_init() * It will be overwrite with a constant value which in menuconfig or from a macro. diff --git a/tools/sdk/include/config/sdkconfig.h b/tools/sdk/include/config/sdkconfig.h index 4d5b5d68..ebfe44ef 100644 --- a/tools/sdk/include/config/sdkconfig.h +++ b/tools/sdk/include/config/sdkconfig.h @@ -40,6 +40,7 @@ #define CONFIG_SPIFFS_CACHE_WR 1 #define CONFIG_SPIRAM_CACHE_WORKAROUND 1 #define CONFIG_BROWNOUT_DET_LVL_SEL_0 1 +#define CONFIG_D0WD_PSRAM_CS_IO 16 #define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER 1 #define CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE 1 #define CONFIG_BTDM_CONTROLLER_MODEM_SLEEP 1 @@ -57,6 +58,7 @@ #define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 #define CONFIG_MBEDTLS_ECDH_C 1 #define CONFIG_SPIRAM_USE_CAPS_ALLOC 1 +#define CONFIG_FRMN1_QUANT 1 #define CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE 1 #define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 10 #define CONFIG_MBEDTLS_SSL_ALPN 1 @@ -64,6 +66,7 @@ #define CONFIG_BT_SPP_ENABLED 1 #define CONFIG_BT_RESERVE_DRAM 0xdb5c #define CONFIG_CXX_EXCEPTIONS 1 +#define CONFIG_D2WD_PSRAM_CLK_IO 9 #define CONFIG_FATFS_FS_LOCK 0 #define CONFIG_IP_LOST_TIMER_INTERVAL 120 #define CONFIG_SPIFFS_META_LENGTH 4 @@ -85,6 +88,7 @@ #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF 3 #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 1 #define CONFIG_FATFS_CODEPAGE 850 +#define CONFIG_SPIRAM_SPIWP_SD3_PIN 7 #define CONFIG_ULP_COPROC_RESERVE_MEM 512 #define CONFIG_LWIP_MAX_UDP_PCBS 16 #define CONFIG_ESPTOOLPY_BAUD 921600 @@ -119,6 +123,7 @@ #define CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE 1 #define CONFIG_SPIRAM_BANKSWITCH_ENABLE 1 #define CONFIG_MBEDTLS_X509_CRL_PARSE_C 1 +#define CONFIG_HTTPD_PURGE_BUF_LEN 32 #define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR 1 #define CONFIG_MB_SERIAL_TASK_STACK_SIZE 2048 #define CONFIG_MBEDTLS_PSK_MODES 1 @@ -129,6 +134,7 @@ #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 1 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_TASK_WDT 1 +#define CONFIG_MTMN_LITE_QUANT 1 #define CONFIG_MAIN_TASK_STACK_SIZE 4096 #define CONFIG_SPIFFS_PAGE_CHECK 1 #define CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 1 @@ -192,7 +198,8 @@ #define CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT 20 #define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32 #define CONFIG_PARTITION_TABLE_SINGLE_APP 1 -#define CONFIG_ESP32_WIFI_RX_BA_WIN 6 +#define CONFIG_XTENSA_IMPL 1 +#define CONFIG_ESP32_WIFI_RX_BA_WIN 16 #define CONFIG_MBEDTLS_X509_CSR_PARSE_C 1 #define CONFIG_SPIFFS_USE_MTIME 1 #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN 0 @@ -212,6 +219,7 @@ #define CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V 1 #define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000 #define CONFIG_BROWNOUT_DET_LVL 0 +#define CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_PCM 1 #define CONFIG_MBEDTLS_PEM_PARSE_C 1 #define CONFIG_SPIFFS_GC_MAX_RUNS 10 #define CONFIG_ARDUINO_RUN_CORE1 1 @@ -234,6 +242,7 @@ #define CONFIG_ESP32_XTAL_FREQ 0 #define CONFIG_MONITOR_BAUD_115200B 1 #define CONFIG_LOG_BOOTLOADER_LEVEL 0 +#define CONFIG_D2WD_PSRAM_CS_IO 10 #define CONFIG_MBEDTLS_TLS_ENABLED 1 #define CONFIG_LWIP_MAX_RAW_PCBS 16 #define CONFIG_SMP_ENABLE 1 @@ -273,7 +282,9 @@ #define CONFIG_PPP_PAP_SUPPORT 1 #define CONFIG_MBEDTLS_TLS_CLIENT 1 #define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI 1 +#define CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF 1 #define CONFIG_BT_ENABLED 1 +#define CONFIG_D0WD_PSRAM_CLK_IO 17 #define CONFIG_SW_COEXIST_PREFERENCE_BALANCE 1 #define CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED 1 #define CONFIG_MONITOR_BAUD 115200 diff --git a/tools/sdk/include/esp-face/dl_lib_matrix3d.h b/tools/sdk/include/esp-face/dl_lib_matrix3d.h index d88c7bfc..82e671f8 100644 --- a/tools/sdk/include/esp-face/dl_lib_matrix3d.h +++ b/tools/sdk/include/esp-face/dl_lib_matrix3d.h @@ -1,20 +1,19 @@ #pragma once #include +#include +#include +#include +#include + typedef float fptp_t; typedef uint8_t uc_t; typedef enum { - DL_C_IMPL = 0, - DL_XTENSA_IMPL = 1 -} dl_conv_mode; - -typedef enum -{ - INPUT_UINT8 = 0, - INPUT_FLOAT = 1, -} dl_op_type; + DL_SUCCESS = 0, + DL_FAIL = 1, +} dl_error_type; typedef enum { @@ -53,9 +52,7 @@ typedef struct int stride_x; int stride_y; dl_padding_type padding; - dl_conv_mode mode; - dl_op_type type; -} dl_matrix3d_conv_config_t; +} dl_matrix3d_mobilenet_config_t; /* * @brief Allocate a 3D matrix with float items, the access sequence is NHWC @@ -93,7 +90,6 @@ void dl_matrix3d_free(dl_matrix3d_t *m); */ void dl_matrix3du_free(dl_matrix3du_t *m); - /* * @brief Dot product with a vector and matrix * @@ -101,24 +97,7 @@ void dl_matrix3du_free(dl_matrix3du_t *m); * @param in input vector * @param f filter matrix */ -void dl_matrix3d_dot_product(dl_matrix3d_t *out, dl_matrix3d_t *in, dl_matrix3d_t *f); - -/** - * @brief Do a relu (Rectifier Linear Unit) operation, update the input matrix3d - * - * @param in Floating point input matrix3d - * @param clip If value is higher than this, it will be clipped to this value - */ -void dl_matrix3d_relu(dl_matrix3d_t *m, fptp_t clip); - -/** - * @brief Do a leaky relu (Rectifier Linear Unit) operation, update the input matrix3d - * - * @param in Floating point input matrix3d - * @param clip If value is higher than this, it will be clipped to this value - * @param alpha If value is less than zero, it will be updated by multiplying this factor - */ -void dl_matrix3d_leaky_relu(dl_matrix3d_t *m, fptp_t clip, fptp_t alpha); +void dl_matrix3dff_dot_product(dl_matrix3d_t *out, dl_matrix3d_t *in, dl_matrix3d_t *f); /** * @brief Do a softmax operation on a matrix3d @@ -127,18 +106,6 @@ void dl_matrix3d_leaky_relu(dl_matrix3d_t *m, fptp_t clip, fptp_t alpha); */ void dl_matrix3d_softmax(dl_matrix3d_t *m); -/** - * @brief Do a general fully connected layer pass, dimension is (number, width, height, channel) - * - * @param in Input matrix3d, size is (1, w, 1, 1) - * @param filter Weights of the neurons, size is (1, w, h, 1) - * @param bias Bias for the fc layer, size is (1, 1, 1, h) - * @return The result of fc layer, size is (1, 1, 1, h) - */ -dl_matrix3d_t *dl_matrix3d_fc(dl_matrix3d_t *in, - dl_matrix3d_t *filter, - dl_matrix3d_t *bias); - /** * @brief Copy a range of float items from an existing matrix to a preallocated matrix * @@ -173,9 +140,6 @@ void dl_matrix3du_slice_copy(dl_matrix3du_t *dst, int w, int h); - -void dl_matrix3d_conv_1x1 (dl_matrix3d_t *out, dl_matrix3d_t *in, dl_matrix3d_t *f); - /** * @brief Do a general CNN layer pass, dimension is (number, width, height, channel) * @@ -197,11 +161,6 @@ dl_matrix3d_t *dl_matrix3d_conv(dl_matrix3d_t *in, int padding, int mode); -void dl_matrix3d_conv_3x3_normal (dl_matrix3d_t *out, - dl_matrix3d_t *in, - dl_matrix3d_t *f, - int step_x, - int step_y); /** * @brief Do a general CNN layer pass, dimension is (number, width, height, channel) * @@ -215,57 +174,6 @@ void dl_matrix3d_conv_3x3_normal (dl_matrix3d_t *out, * If ESP_PLATFORM is not defined, this value is not used. Default is 0 * @return The result of CNN layer */ -dl_matrix3d_t *dl_matrix3du_conv(dl_matrix3du_t *in, - dl_matrix3d_t *filter, - dl_matrix3d_t *bias, - int stride_x, - int stride_y, - int padding, - int mode); - -/** - * @brief Do a depthwise CNN layer pass, dimension is (number, width, height, channel) - * - * @param in Input matrix3d - * @param filter Weights of the neurons - * @param stride_x The step length of the convolution window in x(width) direction - * @param stride_y The step length of the convolution window in y(height) direction - * @param padding One of VALID or SAME - * @param mode Do convolution using C implement or xtensa implement, 0 or 1, with respect - * If ESP_PLATFORM is not defined, this value is not used. Default is 0 - * @return The result of depthwise CNN layer - */ -dl_matrix3d_t *dl_matrix3d_depthwise_conv(dl_matrix3d_t *in, - dl_matrix3d_t *filter, - int stride_x, - int stride_y, - int padding, - int mode); - -void dl_matrix3d_depthwise_conv_3x3_normal(dl_matrix3d_t *out, - dl_matrix3d_t *in, - dl_matrix3d_t *f, - int step_x, - int step_y); -/** - * @brief Do a mobilenet block forward, dimension is (number, width, height, channel) - * - * @param in Input matrix3d - * @param filter Weights of the neurons - * @param stride_x The step length of the convolution window in x(width) direction - * @param stride_y The step length of the convolution window in y(height) direction - * @param padding One of VALID or SAME - * @param mode Do convolution using C implement or xtensa implement, 0 or 1, with respect - * If ESP_PLATFORM is not defined, this value is not used. Default is 0 - * @return The result of depthwise CNN layer - */ -dl_matrix3d_t *dl_matrix3d_mobilenet(void *in, - dl_matrix3d_t *dilate, - dl_matrix3d_t *depthwise, - dl_matrix3d_t *compress, - dl_matrix3d_t *bias, - dl_matrix3d_t *prelu, - dl_matrix3d_conv_config_t *config); /** * @brief Do a global average pooling layer pass, dimension is (number, width, height, channel) @@ -297,13 +205,6 @@ void dl_matrix3d_batch_normalize(dl_matrix3d_t *m, */ dl_matrix3d_t *dl_matrix3d_add(dl_matrix3d_t *in_1, dl_matrix3d_t *in_2); -/** - * @brief Do a standard relu operation, update the input matrix3d - * - * @param m Floating point input matrix3d - */ -void dl_matrix3d_relu_std(dl_matrix3d_t *m); - /** * @brief Concatenate the channels of two matrix3ds into a new matrix3d * @@ -372,7 +273,7 @@ dl_matrix3d_t *dl_matrix3d_concat_8(dl_matrix3d_t *in_1, * If ESP_PLATFORM is not defined, this value is not used. Default is 0 * @return The result of a mobilefacenet block */ -dl_matrix3d_t *dl_matrix3d_mobilefaceblock(void *in, +dl_matrix3d_t *dl_matrix3d_mobilefaceblock(dl_matrix3d_t *in, dl_matrix3d_t *pw, dl_matrix3d_t *pw_bn_scale, dl_matrix3d_t *pw_bn_offset, @@ -410,7 +311,7 @@ dl_matrix3d_t *dl_matrix3d_mobilefaceblock(void *in, * If ESP_PLATFORM is not defined, this value is not used. Default is 0 * @return The result of a mobilefacenet block */ -dl_matrix3d_t *dl_matrix3d_mobilefaceblock_split(void *in, +dl_matrix3d_t *dl_matrix3d_mobilefaceblock_split(dl_matrix3d_t *in, dl_matrix3d_t *pw_1, dl_matrix3d_t *pw_2, dl_matrix3d_t *pw_bn_scale, @@ -427,23 +328,200 @@ dl_matrix3d_t *dl_matrix3d_mobilefaceblock_split(void *in, int padding, int mode, int shortcut); -/** - * @brief Print the matrix3d items - * - * @param m dl_matrix3d_t to be printed - * @param message name of matrix - */ -void dl_matrix3d_print(dl_matrix3d_t *m, char *message); -/** - * @brief Print the matrix3du items - * - * @param m dl_matrix3du_t to be printed - * @param message name of matrix - */ -void dl_matrix3du_print(dl_matrix3du_t *m, char *message); - - -void dl_matrix3d_init_bias (dl_matrix3d_t *out, dl_matrix3d_t *bias); +void dl_matrix3d_init_bias(dl_matrix3d_t *out, dl_matrix3d_t *bias); void dl_matrix3d_multiply(dl_matrix3d_t *out, dl_matrix3d_t *in1, dl_matrix3d_t *in2); + +// +// Activation +// + +/** + * @brief Do a standard relu operation, update the input matrix3d + * + * @param m Floating point input matrix3d + */ +void dl_matrix3d_relu(dl_matrix3d_t *m); + +/** + * @brief Do a relu (Rectifier Linear Unit) operation, update the input matrix3d + * + * @param in Floating point input matrix3d + * @param clip If value is higher than this, it will be clipped to this value + */ +void dl_matrix3d_relu_clip(dl_matrix3d_t *m, fptp_t clip); + +/** + * @brief Do a Prelu (Rectifier Linear Unit) operation, update the input matrix3d + * + * @param in Floating point input matrix3d + * @param alpha If value is less than zero, it will be updated by multiplying this factor + */ +void dl_matrix3d_p_relu(dl_matrix3d_t *in, dl_matrix3d_t *alpha); + +/** + * @brief Do a leaky relu (Rectifier Linear Unit) operation, update the input matrix3d + * + * @param in Floating point input matrix3d + * @param alpha If value is less than zero, it will be updated by multiplying this factor + */ +void dl_matrix3d_leaky_relu(dl_matrix3d_t *m, fptp_t alpha); + +// +// Conv 1x1 +// +void dl_matrix3dff_conv_1x1(dl_matrix3d_t *out, + dl_matrix3d_t *in, + dl_matrix3d_t *filter); + +void dl_matrix3dff_conv_1x1_with_bias(dl_matrix3d_t *out, + dl_matrix3d_t *in, + dl_matrix3d_t *filter, + dl_matrix3d_t *bias); + +void dl_matrix3duf_conv_1x1(dl_matrix3d_t *out, + dl_matrix3du_t *in, + dl_matrix3d_t *filter); + +void dl_matrix3duf_conv_1x1_with_bias(dl_matrix3d_t *out, + dl_matrix3du_t *in, + dl_matrix3d_t *filter, + dl_matrix3d_t *bias); + +// +// Conv 3x3 +// +void dl_matrix3dff_conv_3x3_op(dl_matrix3d_t *out, + dl_matrix3d_t *in, + dl_matrix3d_t *f, + int step_x, + int step_y); + +dl_matrix3d_t *dl_matrix3dff_conv_3x3(dl_matrix3d_t *in, + dl_matrix3d_t *filter, + dl_matrix3d_t *bias, + int stride_x, + int stride_y, + dl_padding_type padding); + +// +// Conv Common +// + +dl_matrix3d_t *dl_matrix3duf_conv_common(dl_matrix3du_t *in, + dl_matrix3d_t *filter, + dl_matrix3d_t *bias, + int stride_x, + int stride_y, + dl_padding_type padding); + +// +// Depthwise 3x3 +// + +dl_matrix3d_t *dl_matrix3dff_depthwise_conv_3x3(dl_matrix3d_t *in, + dl_matrix3d_t *filter, + int stride_x, + int stride_y, + int padding); + +dl_matrix3d_t *dl_matrix3duf_depthwise_conv_3x3(dl_matrix3du_t *in, + dl_matrix3d_t *filter, + int stride_x, + int stride_y, + int padding); + +void dl_matrix3dff_depthwise_conv_3x3_op(dl_matrix3d_t *out, + dl_matrix3d_t *in, + dl_matrix3d_t *f, + int step_x, + int step_y); + +// +// Depthwise Common +// + +/** + * @brief Do a depthwise CNN layer pass, dimension is (number, width, height, channel) + * + * @param in Input matrix3d + * @param filter Weights of the neurons + * @param stride_x The step length of the convolution window in x(width) direction + * @param stride_y The step length of the convolution window in y(height) direction + * @param padding One of VALID or SAME + * @param mode Do convolution using C implement or xtensa implement, 0 or 1, with respect + * If ESP_PLATFORM is not defined, this value is not used. Default is 0 + * @return The result of depthwise CNN layer + */ +dl_matrix3d_t *dl_matrix3dff_depthwise_conv_common(dl_matrix3d_t *in, + dl_matrix3d_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding); + +// +// FC +// +/** + * @brief Do a general fully connected layer pass, dimension is (number, width, height, channel) + * + * @param in Input matrix3d, size is (1, w, 1, 1) + * @param filter Weights of the neurons, size is (1, w, h, 1) + * @param bias Bias for the fc layer, size is (1, 1, 1, h) + * @return The result of fc layer, size is (1, 1, 1, h) + */ +void dl_matrix3dff_fc(dl_matrix3d_t *out, + dl_matrix3d_t *in, + dl_matrix3d_t *filter); + +void dl_matrix3dff_fc_with_bias(dl_matrix3d_t *out, + dl_matrix3d_t *in, + dl_matrix3d_t *filter, + dl_matrix3d_t *bias); + +// +// Mobilenet +// + +/** + * @brief Do a mobilenet block forward, dimension is (number, width, height, channel) + * + * @param in Input matrix3d + * @param filter Weights of the neurons + * @param stride_x The step length of the convolution window in x(width) direction + * @param stride_y The step length of the convolution window in y(height) direction + * @param padding One of VALID or SAME + * @param mode Do convolution using C implement or xtensa implement, 0 or 1, with respect + * If ESP_PLATFORM is not defined, this value is not used. Default is 0 + * @return The result of depthwise CNN layer + */ +dl_matrix3d_t *dl_matrix3dff_mobilenet(dl_matrix3d_t *in, + dl_matrix3d_t *dilate_filter, + dl_matrix3d_t *dilate_prelu, + dl_matrix3d_t *depthwise_filter, + dl_matrix3d_t *depthwise_prelu, + dl_matrix3d_t *compress_filter, + dl_matrix3d_t *bias, + dl_matrix3d_mobilenet_config_t config); + +/** + * @brief Do a mobilenet block forward, dimension is (number, width, height, channel) + * + * @param in Input matrix3du + * @param filter Weights of the neurons + * @param stride_x The step length of the convolution window in x(width) direction + * @param stride_y The step length of the convolution window in y(height) direction + * @param padding One of VALID or SAME + * @param mode Do convolution using C implement or xtensa implement, 0 or 1, with respect + * If ESP_PLATFORM is not defined, this value is not used. Default is 0 + * @return The result of depthwise CNN layer + */ +dl_matrix3d_t *dl_matrix3duf_mobilenet(dl_matrix3du_t *in, + dl_matrix3d_t *dilate_filter, + dl_matrix3d_t *dilate_prelu, + dl_matrix3d_t *depthwise_filter, + dl_matrix3d_t *depthwise_prelu, + dl_matrix3d_t *compress_filter, + dl_matrix3d_t *bias, + dl_matrix3d_mobilenet_config_t config); diff --git a/tools/sdk/include/esp-face/dl_lib_matrix3dq.h b/tools/sdk/include/esp-face/dl_lib_matrix3dq.h index 1c84559d..31da2c05 100644 --- a/tools/sdk/include/esp-face/dl_lib_matrix3dq.h +++ b/tools/sdk/include/esp-face/dl_lib_matrix3dq.h @@ -10,22 +10,48 @@ typedef int16_t qtp_t; typedef struct { /******* fix start *******/ - int w; // Width - int h; // Height - int c; // Channel - int n; // Number, to record filter's out_channels. input and output must be 1 + int w; // Width + int h; // Height + int c; // Channel + int n; // Number, to record filter's out_channels. input and output must be 1 int stride; int exponent; qtp_t *item; /******* fix end *******/ } dl_matrix3dq_t; +#ifndef DL_QTP_SHIFT #define DL_QTP_SHIFT 15 -#define DL_QTP_RANGE ((1<itemq[(y)+(x)*m->stride] +#define DL_ITMQ(m, x, y) m->itemq[(y) + (x)*m->stride] +#define DL_QTP_RANGE ((1 << DL_QTP_SHIFT) - 1) +#define DL_QTP_MAX 32767 +#define DL_QTP_MIN -32768 + #define DL_QTP_EXP_NA 255 //non-applicable exponent because matrix is null #define DL_SHIFT_AUTO 32 +#endif + +typedef enum +{ + DL_C_IMPL = 0, + DL_XTENSA_IMPL = 1 +} dl_conv_mode; + +typedef struct +{ + int stride_x; + int stride_y; + dl_padding_type padding; + dl_conv_mode mode; + int dilate_exponent; + int depthwise_exponent; + int compress_exponent; +} dl_matrix3dq_mobilenet_config_t; + +// +// Utility +// /* * @brief Allocate a 3D matrix @@ -49,9 +75,6 @@ void dl_matrix3dq_free(dl_matrix3dq_t *m); * @param m Matrix to zero */ - dl_matrix3d_t *dl_matrix3d_from_matrixq(dl_matrix3dq_t *m); - dl_matrix3dq_t *dl_matrixq_from_matrix3d_qmf(dl_matrix3d_t *m,int exponent); - dl_matrix3dq_t *dl_matrixq_from_matrix3d(dl_matrix3d_t *m); /** * @brief Copy a range of items from an existing matrix to a preallocated matrix * @@ -62,8 +85,143 @@ void dl_matrix3dq_free(dl_matrix3dq_t *m); * @param h Height of the resulting matrix * @return The resulting slice matrix */ -void dl_matrix3dq_slice_copy (dl_matrix3dq_t *dst, dl_matrix3dq_t *src, int x, int y, int w, int h); +void dl_matrix3dq_slice_copy(dl_matrix3dq_t *dst, dl_matrix3dq_t *src, int x, int y, int w, int h); +dl_matrix3d_t *dl_matrix3d_from_matrixq(dl_matrix3dq_t *m); + +dl_matrix3dq_t *dl_matrixq_from_matrix3d_qmf(dl_matrix3d_t *m, int exponent); + +dl_matrix3dq_t *dl_matrixq_from_matrix3d(dl_matrix3d_t *m); + +qtp_t dl_matrix3dq_quant_range_exceeded_checking(int64_t value, char *location); + +void dl_matrix3dq_shift_exponent(dl_matrix3dq_t *out, dl_matrix3dq_t *in, int exponent); + +void dl_matrix3dq_batch_normalize(dl_matrix3dq_t *m, dl_matrix3dq_t *scale, dl_matrix3dq_t *offset); + +dl_matrix3dq_t *dl_matrix3dq_add(dl_matrix3dq_t *in_1, dl_matrix3dq_t *in_2, int exponent); + +// +// Activation +// +void dl_matrix3dq_relu(dl_matrix3dq_t *in); + +void dl_matrix3dq_relu_clip(dl_matrix3dq_t *in, fptp_t clip); + +void dl_matrix3dq_leaky_relu(dl_matrix3dq_t *in, fptp_t alpha, fptp_t clip); + +void dl_matrix3dq_p_relu(dl_matrix3dq_t *in, dl_matrix3dq_t *alpha); + +// +// Concat +// +dl_matrix3dq_t *dl_matrix3dq_concat(dl_matrix3dq_t *in_1, + dl_matrix3dq_t *in_2); + +dl_matrix3dq_t *dl_matrix3dq_concat_4(dl_matrix3dq_t *in_1, + dl_matrix3dq_t *in_2, + dl_matrix3dq_t *in_3, + dl_matrix3dq_t *in_4); + +dl_matrix3dq_t *dl_matrix3dq_concat_8(dl_matrix3dq_t *in_1, + dl_matrix3dq_t *in_2, + dl_matrix3dq_t *in_3, + dl_matrix3dq_t *in_4, + dl_matrix3dq_t *in_5, + dl_matrix3dq_t *in_6, + dl_matrix3dq_t *in_7, + dl_matrix3dq_t *in_8); + +// +// Conv 1x1 +// +void dl_matrix3dqq_conv_1x1(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_conv_mode mode); + +void dl_matrix3dqq_conv_1x1_with_relu(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_conv_mode mode); + +void dl_matrix3dqq_conv_1x1_with_bias(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + dl_conv_mode mode, + char *name); + +void dl_matrix3dqq_conv_1x1_with_prelu(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *prelu, + dl_conv_mode mode); + +void dl_matrix3dqq_conv_1x1_with_bias_relu(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + dl_conv_mode mode); + +void dl_matrix3duq_conv_1x1(dl_matrix3dq_t *out, + dl_matrix3du_t *in, + dl_matrix3dq_t *filter, + dl_conv_mode mode); + +void dl_matrix3duq_conv_1x1_with_bias(dl_matrix3dq_t *out, + dl_matrix3du_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + dl_conv_mode mode); + +// +// Conv 3x3 +// +void dl_matrix3dqq_conv_3x3_op(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *f, + int stride_x, + int stride_y); + +dl_matrix3dq_t *dl_matrix3dqq_conv_3x3(dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent); + +dl_matrix3dq_t *dl_matrix3dqq_conv_3x3_with_bias(dl_matrix3dq_t *in, + dl_matrix3dq_t *f, + dl_matrix3dq_t *bias, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + int relu); + +dl_matrix3dq_t *dl_matrix3duq_conv_3x3_with_bias(dl_matrix3du_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + char *name); + +dl_matrix3dq_t *dl_matrix3duq_conv_3x3_with_bias_prelu(dl_matrix3du_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + dl_matrix3dq_t *prelu, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + char *name); + +// +// Conv common +// /** * @brief Do a general CNN layer pass, dimension is (number, width, height, channel) @@ -78,67 +236,213 @@ void dl_matrix3dq_slice_copy (dl_matrix3dq_t *dst, dl_matrix3dq_t *src, int x, i * If ESP_PLATFORM is not defined, this value is not used. * @return The result of CNN layer. */ -dl_matrix3dq_t *dl_matrix3dq_fc (dl_matrix3dq_t *in, dl_matrix3dq_t *filter, dl_matrix3dq_t *bias, int exponent,int mode); +dl_matrix3dq_t *dl_matrix3dqq_conv_common(dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + dl_conv_mode mode); -dl_matrix3dq_t *dl_matrix3dq_conv (dl_matrix3dq_t *in, dl_matrix3dq_t *filter, dl_matrix3dq_t *bias, - int stride_x, int stride_y, int padding, int exponent, int mode); -dl_matrix3dq_t *dl_matrix3dq_conv_normal (dl_matrix3dq_t *in, dl_matrix3dq_t *filter, dl_matrix3dq_t *bias, - int stride_x, int stride_y, int padding, int exponent, int mode); +dl_matrix3dq_t *dl_matrix3duq_conv_common(dl_matrix3du_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + dl_conv_mode mode); -void dl_matrix3dq_conv_1x1 (dl_matrix3dq_t *out, dl_matrix3dq_t *in, dl_matrix3dq_t *f, dl_conv_mode mode); +// +// Depthwise 3x3 +// +dl_matrix3dq_t *dl_matrix3duq_depthwise_conv_3x3(dl_matrix3du_t *in, + dl_matrix3dq_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent); -void dl_matrix3dq_conv_3x3_normal (dl_matrix3dq_t *out, +dl_matrix3dq_t *dl_matrix3dqq_depthwise_conv_3x3(dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent); + +#if CONFIG_DEVELOPING_CODE +dl_matrix3dq_t *dl_matrix3dqq_depthwise_conv_3x3_2(dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent); + +dl_matrix3dq_t *dl_matrix3dqq_depthwise_conv_3x3_3(dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent); +#endif + +dl_matrix3dq_t *dl_matrix3dqq_depthwise_conv_3x3_with_bias(dl_matrix3dq_t *in, + dl_matrix3dq_t *f, + dl_matrix3dq_t *bias, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + int relu); + +dl_matrix3dq_t *dl_matrix3dqq_depthwise_conv_3x3_with_prelu(dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *prelu, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent); + +dl_matrix3dq_t *dl_matrix3dqq_depthwise_conv_3x3s1_with_bias(dl_matrix3dq_t *in, + dl_matrix3dq_t *f, + dl_matrix3dq_t *bias, + dl_padding_type padding, + int exponent, + int relu); + +// +// Depthwise Common +// +#if CONFIG_DEVELOPING_CODE +dl_matrix3dq_t *dl_matrix3dqq_depthwise_conv_common(dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + dl_conv_mode mode); + +dl_matrix3dq_t *dl_matrix3duq_depthwise_conv_common(dl_matrix3du_t *in, + dl_matrix3dq_t *filter, + int stride_x, + int stride_y, + dl_padding_type padding, + int exponent, + dl_conv_mode mode); +#endif + +// +// Dot Product +// + +void dl_matrix3dqq_dot_product(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_conv_mode mode); + +// +// FC +// + +void dl_matrix3dqq_fc(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_conv_mode mode); + +void dl_matrix3dqq_fc_with_bias(dl_matrix3dq_t *out, + dl_matrix3dq_t *in, + dl_matrix3dq_t *filter, + dl_matrix3dq_t *bias, + dl_conv_mode mode, + char *name); + +// +// Mobilefaceblock +// + +dl_matrix3dq_t *dl_matrix3dqq_mobilefaceblock_split(dl_matrix3dq_t *in, + dl_matrix3dq_t *pw_1, + dl_matrix3dq_t *pw_2, + dl_matrix3dq_t *pw_bias, + dl_matrix3dq_t *dw, + dl_matrix3dq_t *dw_bias, + dl_matrix3dq_t *pw_linear_1, + dl_matrix3dq_t *pw_linear_2, + dl_matrix3dq_t *pw_linear_bias, + int pw_exponent, + int dw_exponent, + int pw_linear_exponent, + int stride_x, + int stride_y, + dl_padding_type padding, + dl_conv_mode mode, + int shortcut); + +dl_matrix3dq_t *dl_matrix3dqq_mobilefaceblock(dl_matrix3dq_t *in, + dl_matrix3dq_t *pw, + dl_matrix3dq_t *pw_bias, + dl_matrix3dq_t *dw, + dl_matrix3dq_t *dw_bias, + dl_matrix3dq_t *pw_linear, + dl_matrix3dq_t *pw_linear_bias, + int pw_exponent, + int dw_exponent, + int pw_linear_exponent, + int stride_x, + int stride_y, + dl_padding_type padding, + dl_conv_mode mode, + int shortcut); + +// +// Mobilenet +// + +dl_matrix3dq_t *dl_matrix3dqq_mobilenet(dl_matrix3dq_t *in, + dl_matrix3dq_t *dilate, + dl_matrix3dq_t *dilate_prelu, + dl_matrix3dq_t *depthwise, + dl_matrix3dq_t *depth_prelu, + dl_matrix3dq_t *compress, + dl_matrix3dq_t *bias, + dl_matrix3dq_mobilenet_config_t config, + char *name); + +dl_matrix3dq_t *dl_matrix3duq_mobilenet(dl_matrix3du_t *in, + dl_matrix3dq_t *dilate, + dl_matrix3dq_t *dilate_prelu, + dl_matrix3dq_t *depthwise, + dl_matrix3dq_t *depth_prelu, + dl_matrix3dq_t *compress, + dl_matrix3dq_t *bias, + dl_matrix3dq_mobilenet_config_t config, + char *name); + +// +// Padding +// + +dl_error_type dl_matrix3dqq_padding(dl_matrix3dq_t **padded_in, + dl_matrix3dq_t **out, dl_matrix3dq_t *in, - dl_matrix3dq_t *f, - int step_x, - int step_y); -dl_matrix3dq_t *dl_matrix3dq_conv_3x3_with_bn (dl_matrix3dq_t *in, - dl_matrix3dq_t *f, - dl_matrix3dq_t *scale, - dl_matrix3dq_t *offset, - int step_x, - int step_y, + int out_c, + int stride_x, + int stride_y, int padding, - int exponent, - int relu); -/** - * @brief Print the matrix3d items - * - * @param m dl_matrix3d_t to be printed - * @param message name of matrix - */ -void dl_matrix3dq_print (dl_matrix3dq_t *m, char *message); + int exponent); -dl_matrix3dq_t *dl_matrix3dq_depthwise_conv (dl_matrix3dq_t *in, dl_matrix3dq_t *filter, - int stride_x, int stride_y, int padding, int exponent, int mode); -dl_matrix3dq_t *dl_matrix3dq_depthwise_conv_3x3_with_bn(dl_matrix3dq_t *in, - dl_matrix3dq_t *f, - dl_matrix3dq_t *scale, - dl_matrix3dq_t *offset, - int step_x, - int step_y, - int padding, - int exponent, - int relu); +dl_error_type dl_matrix3duq_padding(dl_matrix3du_t **padded_in, + dl_matrix3dq_t **out, + dl_matrix3du_t *in, + int out_c, + int stride_x, + int stride_y, + int padding, + int exponent); -void dl_matrix3dq_relu (dl_matrix3dq_t *m, fptp_t clip); +// +// Pooling +// - - -dl_matrix3dq_t *dl_matrix3dq_global_pool (dl_matrix3dq_t *in); -void dl_matrix3dq_batch_normalize (dl_matrix3dq_t *m, dl_matrix3dq_t *scale, dl_matrix3dq_t *offset); -dl_matrix3dq_t *dl_matrix3dq_add (dl_matrix3dq_t *in_1, dl_matrix3dq_t *in_2, int exponent); -void dl_matrix3dq_relu_std (dl_matrix3dq_t *m); -dl_matrix3dq_t *dl_matrix3dq_mobilefaceblock (void *in, dl_matrix3dq_t *pw, dl_matrix3dq_t *pw_bn_scale,dl_matrix3dq_t *pw_bn_offset, - dl_matrix3dq_t *dw, dl_matrix3dq_t *dw_bn_scale,dl_matrix3dq_t *dw_bn_offset, - dl_matrix3dq_t *pw_linear, dl_matrix3dq_t *pw_linear_bn_scale,dl_matrix3dq_t *pw_linear_bn_offset, - int pw_exponent,int dw_exponent,int pw_linear_exponent,int stride_x, int stride_y, int padding, int mode, int shortcut); - -dl_matrix3dq_t *dl_matrix3dq_concat(dl_matrix3dq_t *in_1, dl_matrix3dq_t *in_2); -dl_matrix3dq_t *dl_matrix3dq_concat_4(dl_matrix3dq_t *in_1, dl_matrix3dq_t *in_2, dl_matrix3dq_t *in_3, dl_matrix3dq_t *in_4); -dl_matrix3dq_t *dl_matrix3dq_concat_8(dl_matrix3dq_t *in_1, dl_matrix3dq_t *in_2, dl_matrix3dq_t *in_3, dl_matrix3dq_t *in_4, dl_matrix3dq_t *in_5, dl_matrix3dq_t *in_6, dl_matrix3dq_t *in_7, dl_matrix3dq_t *in_8); - -dl_matrix3dq_t *dl_matrix3dq_mobilefaceblock_split (void *in, dl_matrix3dq_t *pw_1, dl_matrix3dq_t *pw_2, dl_matrix3dq_t *pw_bn_scale,dl_matrix3dq_t *pw_bn_offset, - dl_matrix3dq_t *dw, dl_matrix3dq_t *dw_bn_scale,dl_matrix3dq_t *dw_bn_offset, - dl_matrix3dq_t *pw_linear_1, dl_matrix3dq_t *pw_linear_2, dl_matrix3dq_t *pw_linear_bn_scale,dl_matrix3dq_t *pw_linear_bn_offset, - int pw_exponent,int dw_exponent,int pw_linear_exponent,int stride_x, int stride_y, int padding, int mode, int shortcut); +dl_matrix3dq_t *dl_matrix3dq_global_pool(dl_matrix3dq_t *in); diff --git a/tools/sdk/include/esp-face/fd_forward.h b/tools/sdk/include/esp-face/fd_forward.h index dc719e9e..12db168f 100644 --- a/tools/sdk/include/esp-face/fd_forward.h +++ b/tools/sdk/include/esp-face/fd_forward.h @@ -40,13 +40,27 @@ extern "C" typedef struct { - float min_face; /// the minimum size of face can be detected - float pyramid; /// the pyramid scale - int pyramid_times; /// the pyramid resizing times - threshold_config_t p_threshold; /// score, nms and candidate threshold of pnet - threshold_config_t r_threshold; /// score, nms and candidate threshold of rnet - threshold_config_t o_threshold; /// score, nms and candidate threshold of onet - mtmn_resize_type type; /// image resize type. 'pyramid' will lose efficacy, when 'type'==FAST. + float score; /// score threshold for filter candidates by score + float nms; /// nms threshold for nms process + int candidate_number; /// candidate number limitation for each net + } threshold_config_t; + + typedef struct + { + int w; /// net width + int h; /// net height + threshold_config_t threshold; /// threshold of net + } net_config_t; + + typedef struct + { + float min_face; /// The minimum size of a detectable face + float pyramid; /// The scale of the gradient scaling for the input images + int pyramid_times; /// The pyramid resizing times + threshold_config_t p_threshold; /// The thresholds for P-Net. For details, see the definition of threshold_config_t + threshold_config_t r_threshold; /// The thresholds for R-Net. For details, see the definition of threshold_config_t + threshold_config_t o_threshold; /// The thresholds for O-Net. For details, see the definition of threshold_config_t + mtmn_resize_type type; /// The image resize type. 'pyramid' will lose efficacy, when 'type'==FAST. } mtmn_config_t; static inline mtmn_config_t mtmn_init_config() diff --git a/tools/sdk/include/esp-face/fr_forward.h b/tools/sdk/include/esp-face/fr_forward.h index 2551d1e9..e3234a6c 100644 --- a/tools/sdk/include/esp-face/fr_forward.h +++ b/tools/sdk/include/esp-face/fr_forward.h @@ -135,6 +135,7 @@ extern "C" uint8_t delete_face(face_id_list *l); int8_t delete_face_with_name(face_id_name_list *l, char *name); void delete_face_all_with_name(face_id_name_list *l); + dl_matrix3d_t *get_face_id(dl_matrix3du_t *aligned_face); #if __cplusplus } #endif diff --git a/tools/sdk/include/esp-face/frmn.h b/tools/sdk/include/esp-face/frmn.h index 9c55410a..afdd253a 100644 --- a/tools/sdk/include/esp-face/frmn.h +++ b/tools/sdk/include/esp-face/frmn.h @@ -24,6 +24,10 @@ extern "C" */ dl_matrix3dq_t *frmn_q(dl_matrix3dq_t *in, dl_conv_mode mode); + dl_matrix3dq_t *frmn2_q(dl_matrix3dq_t *in, dl_conv_mode mode); + dl_matrix3dq_t *frmn2p_q(dl_matrix3dq_t *in, dl_conv_mode mode); + dl_matrix3dq_t *frmn2c_q(dl_matrix3dq_t *in, dl_conv_mode mode); + #if __cplusplus } #endif diff --git a/tools/sdk/include/esp-face/mtmn.h b/tools/sdk/include/esp-face/mtmn.h index 4f4906b7..144a5b97 100644 --- a/tools/sdk/include/esp-face/mtmn.h +++ b/tools/sdk/include/esp-face/mtmn.h @@ -28,20 +28,7 @@ extern "C" { #endif #include "dl_lib_matrix3d.h" - - typedef struct - { - float score; /// score threshold for filter candidates by score - float nms; /// nms threshold for nms process - int candidate_number; /// candidate number limitation for each net - } threshold_config_t; - - typedef struct - { - int w; /// net width - int h; /// net height - threshold_config_t threshold; /// threshold of net - } net_config_t; +#include "dl_lib_matrix3dq.h" typedef struct { @@ -51,30 +38,89 @@ extern "C" } mtmn_net_t; /** - * @brief Forward the pnet process, coarse detection + * @brief Free a mtmn_net_t + * + * @param p A mtmn_net_t pointer + */ + void mtmn_net_t_free(mtmn_net_t *p); + + /** + * @brief Forward the pnet process, coarse detection. Calculate in float. * * @param in Image matrix, rgb888 format, size is 320x240 * @return Scores for every pixel, and box offset with respect. */ - mtmn_net_t *pnet(dl_matrix3du_t *in); + mtmn_net_t *pnet_lite_f(dl_matrix3du_t *in); /** - * @brief Forward the rnet process, fine determine the boxes from pnet + * @brief Forward the rnet process, fine determine the boxes from pnet. Calculate in float. * * @param in Image matrix, rgb888 format * @param threshold Score threshold to detect human face * @return Scores for every box, and box offset with respect. */ - mtmn_net_t *rnet_with_score_verify(dl_matrix3du_t *in, float threshold); + mtmn_net_t *rnet_lite_f_with_score_verify(dl_matrix3du_t *in, float threshold); /** - * @brief Forward the onet process, fine determine the boxes from rnet + * @brief Forward the onet process, fine determine the boxes from rnet. Calculate in float. * * @param in Image matrix, rgb888 format * @param threshold Score threshold to detect human face * @return Scores for every box, box offset, and landmark with respect. */ - mtmn_net_t *onet_with_score_verify(dl_matrix3du_t *in, float threshold); + mtmn_net_t *onet_lite_f_with_score_verify(dl_matrix3du_t *in, float threshold); + + /** + * @brief Forward the pnet process, coarse detection. Calculate in quantization. + * + * @param in Image matrix, rgb888 format, size is 320x240 + * @return Scores for every pixel, and box offset with respect. + */ + mtmn_net_t *pnet_lite_q(dl_matrix3du_t *in, dl_conv_mode mode); + + /** + * @brief Forward the rnet process, fine determine the boxes from pnet. Calculate in quantization. + * + * @param in Image matrix, rgb888 format + * @param threshold Score threshold to detect human face + * @return Scores for every box, and box offset with respect. + */ + mtmn_net_t *rnet_lite_q_with_score_verify(dl_matrix3du_t *in, float threshold, dl_conv_mode mode); + + /** + * @brief Forward the onet process, fine determine the boxes from rnet. Calculate in quantization. + * + * @param in Image matrix, rgb888 format + * @param threshold Score threshold to detect human face + * @return Scores for every box, box offset, and landmark with respect. + */ + mtmn_net_t *onet_lite_q_with_score_verify(dl_matrix3du_t *in, float threshold, dl_conv_mode mode); + + /** + * @brief Forward the pnet process, coarse detection. Calculate in quantization. + * + * @param in Image matrix, rgb888 format, size is 320x240 + * @return Scores for every pixel, and box offset with respect. + */ + mtmn_net_t *pnet_heavy_q(dl_matrix3du_t *in, dl_conv_mode mode); + + /** + * @brief Forward the rnet process, fine determine the boxes from pnet. Calculate in quantization. + * + * @param in Image matrix, rgb888 format + * @param threshold Score threshold to detect human face + * @return Scores for every box, and box offset with respect. + */ + mtmn_net_t *rnet_heavy_q_with_score_verify(dl_matrix3du_t *in, float threshold, dl_conv_mode mode); + + /** + * @brief Forward the onet process, fine determine the boxes from rnet. Calculate in quantization. + * + * @param in Image matrix, rgb888 format + * @param threshold Score threshold to detect human face + * @return Scores for every box, box offset, and landmark with respect. + */ + mtmn_net_t *onet_heavy_q_with_score_verify(dl_matrix3du_t *in, float threshold, dl_conv_mode mode); #ifdef __cplusplus } diff --git a/tools/sdk/include/esp32/esp_mesh.h b/tools/sdk/include/esp32/esp_mesh.h index a5321175..e52e541f 100644 --- a/tools/sdk/include/esp32/esp_mesh.h +++ b/tools/sdk/include/esp32/esp_mesh.h @@ -1479,6 +1479,13 @@ esp_err_t esp_mesh_switch_channel(const uint8_t *new_bssid, int csa_newchan, int */ esp_err_t esp_mesh_get_router_bssid(uint8_t *router_bssid); +/** + * @brief Get the TSF time + * + * @return the TSF time + */ +int64_t esp_mesh_get_tsf_time(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/include/esp32/esp_wifi_os_adapter.h b/tools/sdk/include/esp32/esp_wifi_os_adapter.h index 752ccf99..165caa6e 100644 --- a/tools/sdk/include/esp32/esp_wifi_os_adapter.h +++ b/tools/sdk/include/esp32/esp_wifi_os_adapter.h @@ -44,6 +44,7 @@ typedef struct { void (*_semphr_delete)(void *semphr); int32_t (*_semphr_take)(void *semphr, uint32_t block_time_tick); int32_t (*_semphr_give)(void *semphr); + void *(*_wifi_thread_semphr_get)(void); void *(*_mutex_create)(void); void *(*_recursive_mutex_create)(void); void (*_mutex_delete)(void *mutex); diff --git a/tools/sdk/include/esp32/rom/spi_flash.h b/tools/sdk/include/esp32/rom/spi_flash.h index cc9856f4..165aaefe 100644 --- a/tools/sdk/include/esp32/rom/spi_flash.h +++ b/tools/sdk/include/esp32/rom/spi_flash.h @@ -86,7 +86,8 @@ extern "C" { #define SPI0_R_QIO_DUMMY_CYCLELEN 3 #define SPI0_R_QIO_ADDR_BITSLEN 31 #define SPI0_R_FAST_DUMMY_CYCLELEN 7 -#define SPI0_R_DIO_DUMMY_CYCLELEN 3 +#define SPI0_R_DIO_DUMMY_CYCLELEN 1 +#define SPI0_R_DIO_ADDR_BITSLEN 27 #define SPI0_R_FAST_ADDR_BITSLEN 23 #define SPI0_R_SIO_ADDR_BITSLEN 23 diff --git a/tools/sdk/include/esp_http_client/esp_http_client.h b/tools/sdk/include/esp_http_client/esp_http_client.h index 0929e4d7..18b68b88 100644 --- a/tools/sdk/include/esp_http_client/esp_http_client.h +++ b/tools/sdk/include/esp_http_client/esp_http_client.h @@ -105,7 +105,9 @@ typedef struct { esp_http_client_auth_type_t auth_type; /*!< Http authentication type, see `esp_http_client_auth_type_t` */ const char *path; /*!< HTTP Path, if not set, default is `/` */ const char *query; /*!< HTTP query */ - const char *cert_pem; /*!< SSL Certification, PEM format as string, if the client requires to verify server */ + const char *cert_pem; /*!< SSL server certification, PEM format as string, if the client requires to verify server */ + const char *client_cert_pem; /*!< SSL client certification, PEM format as string, if the server requires to verify client */ + const char *client_key_pem; /*!< SSL client key, PEM format as string, if the server requires to verify client */ esp_http_client_method_t method; /*!< HTTP Method */ int timeout_ms; /*!< Network timeout in milliseconds */ bool disable_auto_redirect; /*!< Disable HTTP automatic redirects */ diff --git a/tools/sdk/include/esp_http_server/esp_http_server.h b/tools/sdk/include/esp_http_server/esp_http_server.h index 29d9b302..7d4b1a63 100644 --- a/tools/sdk/include/esp_http_server/esp_http_server.h +++ b/tools/sdk/include/esp_http_server/esp_http_server.h @@ -716,7 +716,10 @@ size_t httpd_req_get_url_query_len(httpd_req_t *r); * a URI handler where httpd_req_t* request pointer is valid * - If output size is greater than input, then the value is truncated, * accompanied by truncation error as return value - * - Use httpd_req_get_url_query_len() to know the right buffer length + * - Prior to calling this function, one can use httpd_req_get_url_query_len() + * to know the query string length beforehand and hence allocate the buffer + * of right size (usually query string length + 1 for null termination) + * for storing the query string * * @param[in] r The request being responded to * @param[out] buf Pointer to the buffer into which the query string will be copied (if found) diff --git a/tools/sdk/include/ethernet/esp_eth.h b/tools/sdk/include/ethernet/esp_eth.h index ccbc59d0..f22cf4f7 100644 --- a/tools/sdk/include/ethernet/esp_eth.h +++ b/tools/sdk/include/ethernet/esp_eth.h @@ -128,6 +128,7 @@ typedef struct { eth_phy_get_partner_pause_enable_func phy_get_partner_pause_enable; /*!< get partner pause enable */ eth_phy_power_enable_func phy_power_enable; /*!< enable or disable phy power */ uint32_t reset_timeout_ms; /*!< timeout value for reset emac */ + bool promiscuous_enable; /*!< set true to enable promiscuous mode */ } eth_config_t; /** diff --git a/tools/sdk/include/lwip/lwipopts.h b/tools/sdk/include/lwip/lwipopts.h index 53b59860..13a3632d 100644 --- a/tools/sdk/include/lwip/lwipopts.h +++ b/tools/sdk/include/lwip/lwipopts.h @@ -363,6 +363,19 @@ #error "One of CONFIG_TCP_OVERSIZE_xxx options should be set by sdkconfig" #endif +/** + * LWIP_WND_SCALE and TCP_RCV_SCALE: + * Set LWIP_WND_SCALE to 1 to enable window scaling. + * Set TCP_RCV_SCALE to the desired scaling factor (shift count in the + * range of [0..14]). + * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large + * send window while having a small receive window only. + */ +#ifdef CONFIG_LWIP_WND_SCALE +#define LWIP_WND_SCALE 1 +#define TCP_RCV_SCALE CONFIG_TCP_RCV_SCALE +#endif + /* ---------------------------------- ---------- Pbuf options ---------- diff --git a/tools/sdk/include/protocomm/protocomm_ble.h b/tools/sdk/include/protocomm/protocomm_ble.h index 562ea608..92714444 100644 --- a/tools/sdk/include/protocomm/protocomm_ble.h +++ b/tools/sdk/include/protocomm/protocomm_ble.h @@ -14,6 +14,8 @@ #pragma once +#include + #include #ifdef __cplusplus @@ -22,8 +24,9 @@ extern "C" { /** * BLE device name cannot be larger than this value + * 31 bytes (max scan response size) - 1 byte (length) - 1 byte (type) = 29 bytes */ -#define MAX_BLE_DEVNAME_LEN 13 +#define MAX_BLE_DEVNAME_LEN (ESP_BLE_SCAN_RSP_DATA_LEN_MAX - 2) /** * @brief This structure maps handler required by protocomm layer to @@ -51,8 +54,16 @@ typedef struct { * BLE device name being broadcast at the time of provisioning */ char device_name[MAX_BLE_DEVNAME_LEN]; - uint8_t service_uuid[16]; /*!< SSID of the provisioning service */ - ssize_t nu_lookup_count; /*!< Number of entries in the Name-UUID lookup table */ + + /** + * 128 bit UUID of the provisioning service + */ + uint8_t service_uuid[ESP_UUID_LEN_128]; + + /** + * Number of entries in the Name-UUID lookup table + */ + ssize_t nu_lookup_count; /** * Pointer to the Name-UUID lookup table diff --git a/tools/sdk/include/soc/soc/gpio_periph.h b/tools/sdk/include/soc/soc/gpio_periph.h index 59ccee56..93b23f42 100644 --- a/tools/sdk/include/soc/soc/gpio_periph.h +++ b/tools/sdk/include/soc/soc/gpio_periph.h @@ -17,6 +17,10 @@ #include "stdint.h" #include "soc/gpio_pins.h" #include "soc/io_mux_reg.h" +#include "soc/gpio_struct.h" +#include "soc/gpio_reg.h" +#include "soc/gpio_sig_map.h" + #ifdef __cplusplus extern "C" { diff --git a/tools/sdk/include/spi_flash/esp_spi_flash.h b/tools/sdk/include/spi_flash/esp_spi_flash.h index aa6eeea7..254e4089 100644 --- a/tools/sdk/include/spi_flash/esp_spi_flash.h +++ b/tools/sdk/include/spi_flash/esp_spi_flash.h @@ -313,6 +313,10 @@ typedef void (*spi_flash_op_lock_func_t)(void); * @brief SPI flash operation unlock function. */ typedef void (*spi_flash_op_unlock_func_t)(void); +/** + * @brief Function to protect SPI flash critical regions corruption. + */ +typedef bool (*spi_flash_is_safe_write_address_t)(size_t addr, size_t size); /** * Structure holding SPI flash access critical sections management functions. @@ -332,6 +336,9 @@ typedef void (*spi_flash_op_unlock_func_t)(void); * - 'op_unlock' unlocks access to flash API internal data. * These two functions are recursive and can be used around the outside of multiple calls to * 'start' & 'end', in order to create atomic multi-part flash operations. + * 3) When CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is disabled, flash writing/erasing + * API checks for addresses provided by user to avoid corruption of critical flash regions + * (bootloader, partition table, running application etc.). * * Different versions of the guarding functions should be used depending on the context of * execution (with or without functional OS). In normal conditions when flash API is called @@ -343,10 +350,13 @@ typedef void (*spi_flash_op_unlock_func_t)(void); * For example structure can be placed in DRAM and functions in IRAM sections. */ typedef struct { - spi_flash_guard_start_func_t start; /**< critical section start function. */ - spi_flash_guard_end_func_t end; /**< critical section end function. */ - spi_flash_op_lock_func_t op_lock; /**< flash access API lock function.*/ - spi_flash_op_unlock_func_t op_unlock; /**< flash access API unlock function.*/ + spi_flash_guard_start_func_t start; /**< critical section start function. */ + spi_flash_guard_end_func_t end; /**< critical section end function. */ + spi_flash_op_lock_func_t op_lock; /**< flash access API lock function.*/ + spi_flash_op_unlock_func_t op_unlock; /**< flash access API unlock function.*/ +#if !CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED + spi_flash_is_safe_write_address_t is_safe_write_address; /**< checks flash write addresses.*/ +#endif } spi_flash_guard_funcs_t; /** @@ -359,7 +369,6 @@ typedef struct { */ void spi_flash_guard_set(const spi_flash_guard_funcs_t* funcs); - /** * @brief Get the guard functions used for flash access * diff --git a/tools/sdk/include/wifi_provisioning/wifi_provisioning/wifi_config.h b/tools/sdk/include/wifi_provisioning/wifi_provisioning/wifi_config.h index 4058540a..2fa64448 100644 --- a/tools/sdk/include/wifi_provisioning/wifi_provisioning/wifi_config.h +++ b/tools/sdk/include/wifi_provisioning/wifi_provisioning/wifi_config.h @@ -76,7 +76,7 @@ typedef struct { */ typedef struct { char ssid[33]; /*!< SSID of the AP to which the slave is to be connected */ - char password[65]; /*!< Password of the AP */ + char password[64]; /*!< Password of the AP */ char bssid[6]; /*!< BSSID of the AP */ uint8_t channel; /*!< Channel of the AP */ } wifi_prov_config_set_data_t; diff --git a/tools/sdk/lib/libapp_trace.a b/tools/sdk/lib/libapp_trace.a index 02d98405..4085e474 100644 Binary files a/tools/sdk/lib/libapp_trace.a and b/tools/sdk/lib/libapp_trace.a differ diff --git a/tools/sdk/lib/libapp_update.a b/tools/sdk/lib/libapp_update.a index 347497f8..402e10f2 100644 Binary files a/tools/sdk/lib/libapp_update.a and b/tools/sdk/lib/libapp_update.a differ diff --git a/tools/sdk/lib/libasio.a b/tools/sdk/lib/libasio.a index ffb74873..c819a65d 100644 Binary files a/tools/sdk/lib/libasio.a and b/tools/sdk/lib/libasio.a differ diff --git a/tools/sdk/lib/libbootloader_support.a b/tools/sdk/lib/libbootloader_support.a index f638cacf..94efe27b 100644 Binary files a/tools/sdk/lib/libbootloader_support.a and b/tools/sdk/lib/libbootloader_support.a differ diff --git a/tools/sdk/lib/libbt.a b/tools/sdk/lib/libbt.a index fbf5693d..30481116 100644 Binary files a/tools/sdk/lib/libbt.a and b/tools/sdk/lib/libbt.a differ diff --git a/tools/sdk/lib/libbtdm_app.a b/tools/sdk/lib/libbtdm_app.a old mode 100644 new mode 100755 index f2b6cc17..79f1d0d9 Binary files a/tools/sdk/lib/libbtdm_app.a and b/tools/sdk/lib/libbtdm_app.a differ diff --git a/tools/sdk/lib/libcoap.a b/tools/sdk/lib/libcoap.a index 71dc10d8..24f4f691 100644 Binary files a/tools/sdk/lib/libcoap.a and b/tools/sdk/lib/libcoap.a differ diff --git a/tools/sdk/lib/libcoexist.a b/tools/sdk/lib/libcoexist.a index 9ef80903..1172048c 100644 Binary files a/tools/sdk/lib/libcoexist.a and b/tools/sdk/lib/libcoexist.a differ diff --git a/tools/sdk/lib/libconsole.a b/tools/sdk/lib/libconsole.a index 202c8624..8f026635 100644 Binary files a/tools/sdk/lib/libconsole.a and b/tools/sdk/lib/libconsole.a differ diff --git a/tools/sdk/lib/libcore.a b/tools/sdk/lib/libcore.a index 066760e8..10ef3c1d 100644 Binary files a/tools/sdk/lib/libcore.a and b/tools/sdk/lib/libcore.a differ diff --git a/tools/sdk/lib/libcxx.a b/tools/sdk/lib/libcxx.a index a3119171..8bede9c8 100644 Binary files a/tools/sdk/lib/libcxx.a and b/tools/sdk/lib/libcxx.a differ diff --git a/tools/sdk/lib/libdl_lib.a b/tools/sdk/lib/libdl_lib.a index df99a227..3bb38779 100644 Binary files a/tools/sdk/lib/libdl_lib.a and b/tools/sdk/lib/libdl_lib.a differ diff --git a/tools/sdk/lib/libdriver.a b/tools/sdk/lib/libdriver.a index 010dec80..78b7f828 100644 Binary files a/tools/sdk/lib/libdriver.a and b/tools/sdk/lib/libdriver.a differ diff --git a/tools/sdk/lib/libesp-face.a b/tools/sdk/lib/libesp-face.a new file mode 100644 index 00000000..8b277f0d --- /dev/null +++ b/tools/sdk/lib/libesp-face.a @@ -0,0 +1 @@ +! diff --git a/tools/sdk/lib/libesp-tls.a b/tools/sdk/lib/libesp-tls.a index 382f7911..e345215b 100644 Binary files a/tools/sdk/lib/libesp-tls.a and b/tools/sdk/lib/libesp-tls.a differ diff --git a/tools/sdk/lib/libesp32-camera.a b/tools/sdk/lib/libesp32-camera.a index a99f4b5b..2a067ce0 100644 Binary files a/tools/sdk/lib/libesp32-camera.a and b/tools/sdk/lib/libesp32-camera.a differ diff --git a/tools/sdk/lib/libesp32.a b/tools/sdk/lib/libesp32.a index 3b02574f..86618f88 100644 Binary files a/tools/sdk/lib/libesp32.a and b/tools/sdk/lib/libesp32.a differ diff --git a/tools/sdk/lib/libesp_adc_cal.a b/tools/sdk/lib/libesp_adc_cal.a index a14fb4b8..14a6f3c2 100644 Binary files a/tools/sdk/lib/libesp_adc_cal.a and b/tools/sdk/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/lib/libesp_event.a b/tools/sdk/lib/libesp_event.a index 7c16f991..6589916e 100644 Binary files a/tools/sdk/lib/libesp_event.a and b/tools/sdk/lib/libesp_event.a differ diff --git a/tools/sdk/lib/libesp_http_client.a b/tools/sdk/lib/libesp_http_client.a index f58bf4cd..343c3f78 100644 Binary files a/tools/sdk/lib/libesp_http_client.a and b/tools/sdk/lib/libesp_http_client.a differ diff --git a/tools/sdk/lib/libesp_http_server.a b/tools/sdk/lib/libesp_http_server.a index 4bc32d88..c37067bf 100644 Binary files a/tools/sdk/lib/libesp_http_server.a and b/tools/sdk/lib/libesp_http_server.a differ diff --git a/tools/sdk/lib/libesp_https_ota.a b/tools/sdk/lib/libesp_https_ota.a index fd5669dc..423633e4 100644 Binary files a/tools/sdk/lib/libesp_https_ota.a and b/tools/sdk/lib/libesp_https_ota.a differ diff --git a/tools/sdk/lib/libesp_ringbuf.a b/tools/sdk/lib/libesp_ringbuf.a index 64ff77ca..ef446609 100644 Binary files a/tools/sdk/lib/libesp_ringbuf.a and b/tools/sdk/lib/libesp_ringbuf.a differ diff --git a/tools/sdk/lib/libespnow.a b/tools/sdk/lib/libespnow.a index 1292cc38..78616d02 100644 Binary files a/tools/sdk/lib/libespnow.a and b/tools/sdk/lib/libespnow.a differ diff --git a/tools/sdk/lib/libethernet.a b/tools/sdk/lib/libethernet.a index a64cd5f2..e0ea570b 100644 Binary files a/tools/sdk/lib/libethernet.a and b/tools/sdk/lib/libethernet.a differ diff --git a/tools/sdk/lib/libexpat.a b/tools/sdk/lib/libexpat.a index 839085fc..550571d0 100644 Binary files a/tools/sdk/lib/libexpat.a and b/tools/sdk/lib/libexpat.a differ diff --git a/tools/sdk/lib/libface_detection.a b/tools/sdk/lib/libface_detection.a index 2c0f4960..0b40a086 100644 Binary files a/tools/sdk/lib/libface_detection.a and b/tools/sdk/lib/libface_detection.a differ diff --git a/tools/sdk/lib/libface_recognition.a b/tools/sdk/lib/libface_recognition.a index ef9ce28c..6c61b35e 100644 Binary files a/tools/sdk/lib/libface_recognition.a and b/tools/sdk/lib/libface_recognition.a differ diff --git a/tools/sdk/lib/libfatfs.a b/tools/sdk/lib/libfatfs.a index 4b149774..d0622cfb 100644 Binary files a/tools/sdk/lib/libfatfs.a and b/tools/sdk/lib/libfatfs.a differ diff --git a/tools/sdk/lib/libfd.a b/tools/sdk/lib/libfd.a index 631229f8..9195fc55 100644 Binary files a/tools/sdk/lib/libfd.a and b/tools/sdk/lib/libfd.a differ diff --git a/tools/sdk/lib/libfr.a b/tools/sdk/lib/libfr.a index 3e2064ca..0c1b76b7 100644 Binary files a/tools/sdk/lib/libfr.a and b/tools/sdk/lib/libfr.a differ diff --git a/tools/sdk/lib/libfreemodbus.a b/tools/sdk/lib/libfreemodbus.a index fbc330aa..c3daa527 100644 Binary files a/tools/sdk/lib/libfreemodbus.a and b/tools/sdk/lib/libfreemodbus.a differ diff --git a/tools/sdk/lib/libfreertos.a b/tools/sdk/lib/libfreertos.a index b70fc815..933805b1 100644 Binary files a/tools/sdk/lib/libfreertos.a and b/tools/sdk/lib/libfreertos.a differ diff --git a/tools/sdk/lib/libheap.a b/tools/sdk/lib/libheap.a index 37007736..103431f3 100644 Binary files a/tools/sdk/lib/libheap.a and b/tools/sdk/lib/libheap.a differ diff --git a/tools/sdk/lib/libimage_util.a b/tools/sdk/lib/libimage_util.a index dd95648c..df122860 100644 Binary files a/tools/sdk/lib/libimage_util.a and b/tools/sdk/lib/libimage_util.a differ diff --git a/tools/sdk/lib/libjson.a b/tools/sdk/lib/libjson.a index 27a2435c..8df52eb7 100644 Binary files a/tools/sdk/lib/libjson.a and b/tools/sdk/lib/libjson.a differ diff --git a/tools/sdk/lib/liblibsodium.a b/tools/sdk/lib/liblibsodium.a index ceffc08d..69b8bee6 100644 Binary files a/tools/sdk/lib/liblibsodium.a and b/tools/sdk/lib/liblibsodium.a differ diff --git a/tools/sdk/lib/liblog.a b/tools/sdk/lib/liblog.a index bb4c09d1..e0021056 100644 Binary files a/tools/sdk/lib/liblog.a and b/tools/sdk/lib/liblog.a differ diff --git a/tools/sdk/lib/liblwip.a b/tools/sdk/lib/liblwip.a index 133ea798..06fe6ca3 100644 Binary files a/tools/sdk/lib/liblwip.a and b/tools/sdk/lib/liblwip.a differ diff --git a/tools/sdk/lib/libmbedtls.a b/tools/sdk/lib/libmbedtls.a index 71f9d7e8..ef987630 100644 Binary files a/tools/sdk/lib/libmbedtls.a and b/tools/sdk/lib/libmbedtls.a differ diff --git a/tools/sdk/lib/libmdns.a b/tools/sdk/lib/libmdns.a index 3a7f074a..e0142e54 100644 Binary files a/tools/sdk/lib/libmdns.a and b/tools/sdk/lib/libmdns.a differ diff --git a/tools/sdk/lib/libmesh.a b/tools/sdk/lib/libmesh.a index ea1c67f2..9fd0dbfe 100644 Binary files a/tools/sdk/lib/libmesh.a and b/tools/sdk/lib/libmesh.a differ diff --git a/tools/sdk/lib/libmqtt.a b/tools/sdk/lib/libmqtt.a index 0c750f97..55cad97a 100644 Binary files a/tools/sdk/lib/libmqtt.a and b/tools/sdk/lib/libmqtt.a differ diff --git a/tools/sdk/lib/libnet80211.a b/tools/sdk/lib/libnet80211.a index 6735928a..cbe2ea2c 100644 Binary files a/tools/sdk/lib/libnet80211.a and b/tools/sdk/lib/libnet80211.a differ diff --git a/tools/sdk/lib/libnewlib.a b/tools/sdk/lib/libnewlib.a index 407f02ce..e1bd7036 100644 Binary files a/tools/sdk/lib/libnewlib.a and b/tools/sdk/lib/libnewlib.a differ diff --git a/tools/sdk/lib/libnghttp.a b/tools/sdk/lib/libnghttp.a index a9106c84..6071e00b 100644 Binary files a/tools/sdk/lib/libnghttp.a and b/tools/sdk/lib/libnghttp.a differ diff --git a/tools/sdk/lib/libnvs_flash.a b/tools/sdk/lib/libnvs_flash.a index 4e1e0fc2..dbc0374e 100644 Binary files a/tools/sdk/lib/libnvs_flash.a and b/tools/sdk/lib/libnvs_flash.a differ diff --git a/tools/sdk/lib/libopenssl.a b/tools/sdk/lib/libopenssl.a index 9c393105..76b4cec5 100644 Binary files a/tools/sdk/lib/libopenssl.a and b/tools/sdk/lib/libopenssl.a differ diff --git a/tools/sdk/lib/libpp.a b/tools/sdk/lib/libpp.a index 440066f5..eeffe0a1 100644 Binary files a/tools/sdk/lib/libpp.a and b/tools/sdk/lib/libpp.a differ diff --git a/tools/sdk/lib/libprotobuf-c.a b/tools/sdk/lib/libprotobuf-c.a index 7704e15c..02a46d21 100644 Binary files a/tools/sdk/lib/libprotobuf-c.a and b/tools/sdk/lib/libprotobuf-c.a differ diff --git a/tools/sdk/lib/libprotocomm.a b/tools/sdk/lib/libprotocomm.a index c3da55ed..8ec864fc 100644 Binary files a/tools/sdk/lib/libprotocomm.a and b/tools/sdk/lib/libprotocomm.a differ diff --git a/tools/sdk/lib/libpthread.a b/tools/sdk/lib/libpthread.a index 04d8f980..6319764d 100644 Binary files a/tools/sdk/lib/libpthread.a and b/tools/sdk/lib/libpthread.a differ diff --git a/tools/sdk/lib/libsdmmc.a b/tools/sdk/lib/libsdmmc.a index 1adf583a..ddbc5d09 100644 Binary files a/tools/sdk/lib/libsdmmc.a and b/tools/sdk/lib/libsdmmc.a differ diff --git a/tools/sdk/lib/libsmartconfig.a b/tools/sdk/lib/libsmartconfig.a index 5e1dfd8c..f948e370 100644 Binary files a/tools/sdk/lib/libsmartconfig.a and b/tools/sdk/lib/libsmartconfig.a differ diff --git a/tools/sdk/lib/libsmartconfig_ack.a b/tools/sdk/lib/libsmartconfig_ack.a index 5f9be26a..45b506bc 100644 Binary files a/tools/sdk/lib/libsmartconfig_ack.a and b/tools/sdk/lib/libsmartconfig_ack.a differ diff --git a/tools/sdk/lib/libsoc.a b/tools/sdk/lib/libsoc.a index 1865433f..df0dff54 100644 Binary files a/tools/sdk/lib/libsoc.a and b/tools/sdk/lib/libsoc.a differ diff --git a/tools/sdk/lib/libspi_flash.a b/tools/sdk/lib/libspi_flash.a index 82f10c98..a2f2f929 100644 Binary files a/tools/sdk/lib/libspi_flash.a and b/tools/sdk/lib/libspi_flash.a differ diff --git a/tools/sdk/lib/libspiffs.a b/tools/sdk/lib/libspiffs.a index a04cda06..e4d5a5cf 100644 Binary files a/tools/sdk/lib/libspiffs.a and b/tools/sdk/lib/libspiffs.a differ diff --git a/tools/sdk/lib/libtcp_transport.a b/tools/sdk/lib/libtcp_transport.a index d4b83188..95dc940d 100644 Binary files a/tools/sdk/lib/libtcp_transport.a and b/tools/sdk/lib/libtcp_transport.a differ diff --git a/tools/sdk/lib/libtcpip_adapter.a b/tools/sdk/lib/libtcpip_adapter.a index d585b797..c17cd230 100644 Binary files a/tools/sdk/lib/libtcpip_adapter.a and b/tools/sdk/lib/libtcpip_adapter.a differ diff --git a/tools/sdk/lib/libulp.a b/tools/sdk/lib/libulp.a index a71e6d5b..932c8272 100644 Binary files a/tools/sdk/lib/libulp.a and b/tools/sdk/lib/libulp.a differ diff --git a/tools/sdk/lib/libvfs.a b/tools/sdk/lib/libvfs.a index 544f28bd..781d9ebb 100644 Binary files a/tools/sdk/lib/libvfs.a and b/tools/sdk/lib/libvfs.a differ diff --git a/tools/sdk/lib/libwear_levelling.a b/tools/sdk/lib/libwear_levelling.a index 88a34dcf..a99ffc3f 100644 Binary files a/tools/sdk/lib/libwear_levelling.a and b/tools/sdk/lib/libwear_levelling.a differ diff --git a/tools/sdk/lib/libwifi_provisioning.a b/tools/sdk/lib/libwifi_provisioning.a index 87e1d20f..5fcf3cdd 100644 Binary files a/tools/sdk/lib/libwifi_provisioning.a and b/tools/sdk/lib/libwifi_provisioning.a differ diff --git a/tools/sdk/lib/libwpa.a b/tools/sdk/lib/libwpa.a index dab425ba..5660fb99 100644 Binary files a/tools/sdk/lib/libwpa.a and b/tools/sdk/lib/libwpa.a differ diff --git a/tools/sdk/lib/libwpa2.a b/tools/sdk/lib/libwpa2.a index 72e66afd..b2b1cef1 100644 Binary files a/tools/sdk/lib/libwpa2.a and b/tools/sdk/lib/libwpa2.a differ diff --git a/tools/sdk/lib/libwpa_supplicant.a b/tools/sdk/lib/libwpa_supplicant.a index 46151990..22b4b2e9 100644 Binary files a/tools/sdk/lib/libwpa_supplicant.a and b/tools/sdk/lib/libwpa_supplicant.a differ diff --git a/tools/sdk/lib/libwps.a b/tools/sdk/lib/libwps.a index 7541de51..99ab2928 100644 Binary files a/tools/sdk/lib/libwps.a and b/tools/sdk/lib/libwps.a differ diff --git a/tools/sdk/lib/libxtensa-debug-module.a b/tools/sdk/lib/libxtensa-debug-module.a index 36004835..9db6e667 100644 Binary files a/tools/sdk/lib/libxtensa-debug-module.a and b/tools/sdk/lib/libxtensa-debug-module.a differ diff --git a/tools/sdk/sdkconfig b/tools/sdk/sdkconfig index 2fdaa2f1..8eba3aab 100644 --- a/tools/sdk/sdkconfig +++ b/tools/sdk/sdkconfig @@ -176,6 +176,9 @@ CONFIG_BTDM_CONTROLLER_MODE_BTDM=y CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN=2 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_HCI= +CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_PCM=y +CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF=1 CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=2 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 @@ -252,6 +255,19 @@ CONFIG_SPI_MASTER_IN_IRAM= CONFIG_SPI_MASTER_ISR_IN_IRAM=y CONFIG_SPI_SLAVE_IN_IRAM= CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +CONFIG_C_IMPL= +CONFIG_XTENSA_IMPL=y + +# +# ESP-FACE Configuration +# +CONFIG_MTMN_LITE_QUANT=y +CONFIG_MTMN_LITE_FLOAT= +CONFIG_MTMN_HEAVY_QUANT= +CONFIG_FRMN1_QUANT=y +CONFIG_FRMN2_QUANT= +CONFIG_FRMN2P_QUANT= +CONFIG_FRMN2C_QUANT= # # ESP32-specific @@ -279,7 +295,24 @@ CONFIG_SPIRAM_BANKSWITCH_ENABLE=y CONFIG_SPIRAM_BANKSWITCH_RESERVE=8 CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=y CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY= + +# +# PSRAM clock and cs IO for ESP32-DOWD +# +CONFIG_D0WD_PSRAM_CLK_IO=17 +CONFIG_D0WD_PSRAM_CS_IO=16 + +# +# PSRAM clock and cs IO for ESP32-D2WD +# +CONFIG_D2WD_PSRAM_CLK_IO=9 +CONFIG_D2WD_PSRAM_CS_IO=10 + +# +# PSRAM clock and cs IO for ESP32-PICO +# CONFIG_PICO_PSRAM_CS_IO=10 +CONFIG_SPIRAM_SPIWP_SD3_PIN=7 CONFIG_MEMMAP_TRACEMEM= CONFIG_MEMMAP_TRACEMEM_TWOBANKS= CONFIG_ESP32_TRAX= @@ -372,7 +405,7 @@ CONFIG_ESP32_WIFI_CSI_ENABLED= CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y CONFIG_ESP32_WIFI_TX_BA_WIN=6 CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_RX_BA_WIN=16 CONFIG_ESP32_WIFI_NVS_ENABLED=y CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1= @@ -426,6 +459,8 @@ CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y # CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_PURGE_BUF_LEN=32 +CONFIG_HTTPD_LOG_PURGE_DATA= # # Ethernet @@ -595,6 +630,7 @@ CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= CONFIG_TCP_OVERSIZE_MSS=y CONFIG_TCP_OVERSIZE_QUARTER_MSS= CONFIG_TCP_OVERSIZE_DISABLE= +CONFIG_LWIP_WND_SCALE= # # UDP