diff --git a/platform.txt b/platform.txt index e7b595b58d2..18a12709c72 100644 --- a/platform.txt +++ b/platform.txt @@ -23,12 +23,12 @@ compiler.prefix={build.tarch}-{build.target}-elf- # # ESP32 Support Start # -compiler.cpreprocessor.flags.esp32=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-dev-3703-gddc44956bf" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32" "-I{compiler.sdk.path}/include/soc/esp32/include" "-I{compiler.sdk.path}/include/hal/esp32/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32" "-I{compiler.sdk.path}/include/esp_rom/esp32" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/json_parser" "-I{compiler.sdk.path}/include/json_parser/jsmn/include" "-I{compiler.sdk.path}/include/json_generator" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.cpreprocessor.flags.esp32=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-beta1-183-gf23dcd3555" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32" "-I{compiler.sdk.path}/include/soc/esp32/include" "-I{compiler.sdk.path}/include/hal/esp32/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32" "-I{compiler.sdk.path}/include/esp_rom/esp32" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/button/button/include" "-I{compiler.sdk.path}/include/json_parser" "-I{compiler.sdk.path}/include/json_parser/jsmn/include" "-I{compiler.sdk.path}/include/json_generator" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" compiler.c.elf.libs.esp32=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lulp -lwifi_provisioning -lbutton -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lqrcode -lws2812_led -lesp-dsp -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_local_ctrl -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lesp_rainmaker -lmqtt -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lrtc -lesp_phy -lphy -lrtc -lesp_phy -lphy -lrtc -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32=-T esp32.rom.redefined.ld -T memory.ld -T sections.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.peripherals.ld -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u ld_include_hli_vectors_bt -u _Z5setupv -u _Z4loopv -Wl,--wrap=mbedtls_mpi_exp_mod -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy +compiler.c.elf.flags.esp32=-T esp32.rom.redefined.ld -T memory.ld -T sections.ld -T esp32.rom.ld -T esp32.rom.api.ld -T esp32.rom.libgcc.ld -T esp32.rom.newlib-data.ld -T esp32.rom.syscalls.ld -T esp32.peripherals.ld -mlongcalls -Wno-frame-address -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u ld_include_hli_vectors_bt -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u ld_include_highint_hdl -u start_app -u start_app_other_cores -u __ubsan_include -Wl,--wrap=longjmp -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -u __cxa_guard_dummy compiler.ar.flags.esp32=cr build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0 # @@ -38,7 +38,7 @@ build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0 # # ESP32S2 Support Start # -compiler.cpreprocessor.flags.esp32s2=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-dev-3703-gddc44956bf" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/esp32s2/include" "-I{compiler.sdk.path}/include/hal/esp32s2/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s2" "-I{compiler.sdk.path}/include/esp_rom/esp32s2" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s2/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s2/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s2" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s2" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/touch_element/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.cpreprocessor.flags.esp32s2=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-beta1-183-gf23dcd3555" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/xtensa/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s2/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/esp32s2/include" "-I{compiler.sdk.path}/include/hal/esp32s2/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32s2" "-I{compiler.sdk.path}/include/esp_rom/esp32s2" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32s2/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32s2/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/xtensa" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32s2" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/xtensa" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s2" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/usb/include" "-I{compiler.sdk.path}/include/touch_element/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/freertos/include/freertos" "-I{compiler.sdk.path}/include/arduino_tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/arduino_tinyusb/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/fb_gfx/include" compiler.c.elf.libs.esp32s2=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lperfmon -lspiffs -lusb -ltouch_element -lulp -lwifi_provisioning -lesp-dsp -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_local_ctrl -lesp_https_server -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lperfmon -lusb -ltouch_element -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lwifi_provisioning -lprotocomm -lprotobuf-c -lmdns -ljson -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lxtensa -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lesp_phy -lphy -lesp_phy -lphy -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Os -freorder-blocks -Wwrite-strings -fstack-protector -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fexceptions -fno-rtti -MMD -c @@ -53,12 +53,12 @@ build.extra_flags.esp32s2=-DARDUINO_USB_CDC_ON_BOOT={build.cdc_on_boot} -DARDUIN # # ESP32C3 Support Start # -compiler.cpreprocessor.flags.esp32c3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-dev-3703-gddc44956bf" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/riscv/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32c3" "-I{compiler.sdk.path}/include/soc/esp32c3/include" "-I{compiler.sdk.path}/include/hal/esp32c3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32c3" "-I{compiler.sdk.path}/include/esp_rom/esp32c3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/include/riscv" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/riscv/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32c3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32c3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32c3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/riscv" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32c3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/riscv" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32c3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32c3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.cpreprocessor.flags.esp32c3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4-beta1-183-gf23dcd3555" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions/freertos" "-I{compiler.sdk.path}/include/freertos/port/riscv/include" "-I{compiler.sdk.path}/include/freertos/include/esp_additions" "-I{compiler.sdk.path}/include/esp_hw_support/include" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc" "-I{compiler.sdk.path}/include/esp_hw_support/include/soc/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32c3/private_include" "-I{compiler.sdk.path}/include/heap/include" "-I{compiler.sdk.path}/include/log/include" "-I{compiler.sdk.path}/include/lwip/include/apps" "-I{compiler.sdk.path}/include/lwip/include/apps/sntp" "-I{compiler.sdk.path}/include/lwip/lwip/src/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include" "-I{compiler.sdk.path}/include/lwip/port/esp32/include/arch" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/soc/esp32c3" "-I{compiler.sdk.path}/include/soc/esp32c3/include" "-I{compiler.sdk.path}/include/hal/esp32c3/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/hal/platform_port/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_rom/include/esp32c3" "-I{compiler.sdk.path}/include/esp_rom/esp32c3" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/esp_system/port/soc" "-I{compiler.sdk.path}/include/esp_system/port/include/riscv" "-I{compiler.sdk.path}/include/esp_system/port/public_compat" "-I{compiler.sdk.path}/include/riscv/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32c3/include" "-I{compiler.sdk.path}/include/esp_pm/include" "-I{compiler.sdk.path}/include/esp_ringbuf/include" "-I{compiler.sdk.path}/include/efuse/include" "-I{compiler.sdk.path}/include/efuse/esp32c3/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_event/include" "-I{compiler.sdk.path}/include/esp_netif/include" "-I{compiler.sdk.path}/include/esp_eth/include" "-I{compiler.sdk.path}/include/tcpip_adapter/include" "-I{compiler.sdk.path}/include/esp_phy/include" "-I{compiler.sdk.path}/include/esp_phy/esp32c3/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/app_trace/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/mbedtls/port/include" "-I{compiler.sdk.path}/include/mbedtls/mbedtls/include" "-I{compiler.sdk.path}/include/mbedtls/esp_crt_bundle/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/bootloader_support/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/esp_gdbstub/include" "-I{compiler.sdk.path}/include/esp_gdbstub/riscv" "-I{compiler.sdk.path}/include/esp_gdbstub/esp32c3" "-I{compiler.sdk.path}/include/espcoredump/include" "-I{compiler.sdk.path}/include/espcoredump/include/port/riscv" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/esp_supplicant/include" "-I{compiler.sdk.path}/include/ieee802154/include" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/include/esp32c3/include" "-I{compiler.sdk.path}/include/bt/common/api/include/api" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/blufi/include" "-I{compiler.sdk.path}/include/bt/common/btc/profile/esp/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/nghttp/port/include" "-I{compiler.sdk.path}/include/nghttp/nghttp2/lib/includes" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp-tls/esp-tls-crypto" "-I{compiler.sdk.path}/include/esp_adc_cal/include" "-I{compiler.sdk.path}/include/esp_hid/include" "-I{compiler.sdk.path}/include/tcp_transport/include" "-I{compiler.sdk.path}/include/esp_http_client/include" "-I{compiler.sdk.path}/include/esp_http_server/include" "-I{compiler.sdk.path}/include/esp_https_ota/include" "-I{compiler.sdk.path}/include/esp_https_server/include" "-I{compiler.sdk.path}/include/esp_lcd/include" "-I{compiler.sdk.path}/include/esp_lcd/interface" "-I{compiler.sdk.path}/include/protobuf-c/protobuf-c" "-I{compiler.sdk.path}/include/protocomm/include/common" "-I{compiler.sdk.path}/include/protocomm/include/security" "-I{compiler.sdk.path}/include/protocomm/include/transports" "-I{compiler.sdk.path}/include/mdns/include" "-I{compiler.sdk.path}/include/esp_local_ctrl/include" "-I{compiler.sdk.path}/include/sdmmc/include" "-I{compiler.sdk.path}/include/esp_serial_slave_link/include" "-I{compiler.sdk.path}/include/esp_websocket_client/include" "-I{compiler.sdk.path}/include/expat/expat/expat/lib" "-I{compiler.sdk.path}/include/expat/port/include" "-I{compiler.sdk.path}/include/wear_levelling/include" "-I{compiler.sdk.path}/include/fatfs/diskio" "-I{compiler.sdk.path}/include/fatfs/vfs" "-I{compiler.sdk.path}/include/fatfs/src" "-I{compiler.sdk.path}/include/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32c3" "-I{compiler.sdk.path}/include/jsmn/include" "-I{compiler.sdk.path}/include/json/cJSON" "-I{compiler.sdk.path}/include/libsodium/libsodium/src/libsodium/include" "-I{compiler.sdk.path}/include/libsodium/port_include" "-I{compiler.sdk.path}/include/mqtt/esp-mqtt/include" "-I{compiler.sdk.path}/include/openssl/include" "-I{compiler.sdk.path}/include/spiffs/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp_littlefs/src" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-face/include" "-I{compiler.sdk.path}/include/esp-face/include/tool" "-I{compiler.sdk.path}/include/esp-face/include/typedef" "-I{compiler.sdk.path}/include/esp-face/include/image" "-I{compiler.sdk.path}/include/esp-face/include/math" "-I{compiler.sdk.path}/include/esp-face/include/nn" "-I{compiler.sdk.path}/include/esp-face/include/layer" "-I{compiler.sdk.path}/include/esp-face/include/detect" "-I{compiler.sdk.path}/include/esp-face/include/model_zoo" "-I{compiler.sdk.path}/include/fb_gfx/include" compiler.c.elf.libs.esp32c3=-lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lnghttp -lesp-tls -lesp_adc_cal -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_lcd -lprotobuf-c -lprotocomm -lmdns -lesp_local_ctrl -lsdmmc -lesp_serial_slave_link -lesp_websocket_client -lexpat -lwear_levelling -lfatfs -lfreemodbus -ljsmn -ljson -llibsodium -lmqtt -lopenssl -lspiffs -lwifi_provisioning -lesp_littlefs -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_lcd -lesp_local_ctrl -lesp_https_server -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lesp_ringbuf -lefuse -lesp_ipc -ldriver -lesp_pm -lmbedtls -lapp_update -lbootloader_support -lspi_flash -lnvs_flash -lpthread -lesp_gdbstub -lespcoredump -lesp_phy -lesp_system -lesp_rom -lhal -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -lconsole -llwip -llog -lheap -lsoc -lesp_hw_support -lriscv -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lmbedtls -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32c3=-march=rv32imc -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -std=gnu++11 -fno-exceptions -fno-rtti -MMD -c compiler.S.flags.esp32c3=-ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -Wno-error=format= -nostartfiles -Wno-format -Os -freorder-blocks -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -x assembler-with-cpp -MMD -c -compiler.c.elf.flags.esp32c3=-T memory.ld -T sections.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T esp32c3.peripherals.ld -nostartfiles -march=rv32imc --specs=nosys.specs -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -Wl,--wrap=mbedtls_mpi_exp_mod -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u start_app -u __ubsan_include -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting -Wl,--wrap=__register_frame_info_bases -Wl,--wrap=__register_frame_info -Wl,--wrap=__register_frame -Wl,--wrap=__register_frame_info_table_bases -Wl,--wrap=__register_frame_info_table -Wl,--wrap=__register_frame_table -Wl,--wrap=__deregister_frame_info_bases -Wl,--wrap=__deregister_frame_info -Wl,--wrap=_Unwind_Find_FDE -Wl,--wrap=_Unwind_GetGR -Wl,--wrap=_Unwind_GetCFA -Wl,--wrap=_Unwind_GetIP -Wl,--wrap=_Unwind_GetIPInfo -Wl,--wrap=_Unwind_GetRegionStart -Wl,--wrap=_Unwind_GetDataRelBase -Wl,--wrap=_Unwind_GetTextRelBase -Wl,--wrap=_Unwind_SetIP -Wl,--wrap=_Unwind_SetGR -Wl,--wrap=_Unwind_GetLanguageSpecificData -Wl,--wrap=_Unwind_FindEnclosingFunction -Wl,--wrap=_Unwind_Resume -Wl,--wrap=_Unwind_RaiseException -Wl,--wrap=_Unwind_DeleteException -Wl,--wrap=_Unwind_ForcedUnwind -Wl,--wrap=_Unwind_Resume_or_Rethrow -Wl,--wrap=_Unwind_Backtrace -Wl,--wrap=__cxa_call_unexpected -Wl,--wrap=__gxx_personality_v0 -u __cxa_guard_dummy -u __cxx_fatal_exception +compiler.c.elf.flags.esp32c3=-T memory.ld -T sections.ld -T esp32c3.rom.ld -T esp32c3.rom.api.ld -T esp32c3.rom.libgcc.ld -T esp32c3.rom.newlib.ld -T esp32c3.rom.version.ld -T esp32c3.rom.eco3.ld -T esp32c3.peripherals.ld -nostartfiles -march=rv32imc --specs=nosys.specs -Wl,--cref -Wl,--gc-sections -fno-rtti -fno-lto -u _Z5setupv -u _Z4loopv -u esp_app_desc -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -u pthread_include_pthread_rwlock_impl -u start_app -u __ubsan_include -u __assert_func -u vfs_include_syscalls_impl -Wl,--undefined=uxTopUsedPriority -u app_main -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -u newlib_include_assert_impl -Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting -Wl,--wrap=__register_frame_info_bases -Wl,--wrap=__register_frame_info -Wl,--wrap=__register_frame -Wl,--wrap=__register_frame_info_table_bases -Wl,--wrap=__register_frame_info_table -Wl,--wrap=__register_frame_table -Wl,--wrap=__deregister_frame_info_bases -Wl,--wrap=__deregister_frame_info -Wl,--wrap=_Unwind_Find_FDE -Wl,--wrap=_Unwind_GetGR -Wl,--wrap=_Unwind_GetCFA -Wl,--wrap=_Unwind_GetIP -Wl,--wrap=_Unwind_GetIPInfo -Wl,--wrap=_Unwind_GetRegionStart -Wl,--wrap=_Unwind_GetDataRelBase -Wl,--wrap=_Unwind_GetTextRelBase -Wl,--wrap=_Unwind_SetIP -Wl,--wrap=_Unwind_SetGR -Wl,--wrap=_Unwind_GetLanguageSpecificData -Wl,--wrap=_Unwind_FindEnclosingFunction -Wl,--wrap=_Unwind_Resume -Wl,--wrap=_Unwind_RaiseException -Wl,--wrap=_Unwind_DeleteException -Wl,--wrap=_Unwind_ForcedUnwind -Wl,--wrap=_Unwind_Resume_or_Rethrow -Wl,--wrap=_Unwind_Backtrace -Wl,--wrap=__cxa_call_unexpected -Wl,--wrap=__gxx_personality_v0 -u __cxa_guard_dummy -u __cxx_fatal_exception compiler.ar.flags.esp32c3=cr build.extra_flags.esp32c3=-DARDUINO_HW_CDC_ON_BOOT={build.cdc_on_boot} # diff --git a/tools/platformio-build-esp32.py b/tools/platformio-build-esp32.py index 10de78cbc04..4a186894eac 100644 --- a/tools/platformio-build-esp32.py +++ b/tools/platformio-build-esp32.py @@ -81,7 +81,6 @@ "-Wl,--gc-sections", "-fno-rtti", "-fno-lto", - "-Wl,--wrap=mbedtls_mpi_exp_mod", "-Wl,--wrap=longjmp", "-Wl,--undefined=uxTopUsedPriority", "-T", "esp32.rom.redefined.ld", @@ -304,7 +303,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-dev-3703-gddc44956bf\\"'), + ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32c3.py b/tools/platformio-build-esp32c3.py index 58e8de28c71..1c9273ffe4d 100644 --- a/tools/platformio-build-esp32c3.py +++ b/tools/platformio-build-esp32c3.py @@ -81,7 +81,6 @@ "-Wl,--gc-sections", "-fno-rtti", "-fno-lto", - "-Wl,--wrap=mbedtls_mpi_exp_mod", "-Wl,--undefined=uxTopUsedPriority", "-Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting", "-Wl,--wrap=__register_frame_info_bases", @@ -294,7 +293,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-dev-3703-gddc44956bf\\"'), + ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s2.py b/tools/platformio-build-esp32s2.py index 60737637723..cee6d54292d 100644 --- a/tools/platformio-build-esp32s2.py +++ b/tools/platformio-build-esp32s2.py @@ -290,7 +290,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4-dev-3703-gddc44956bf\\"'), + ("IDF_VER", '\\"v4.4-beta1-183-gf23dcd3555\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/sdk/esp32/bin/bootloader_dio_40m.bin b/tools/sdk/esp32/bin/bootloader_dio_40m.bin index 97c4c99695b..ee6d1d320b2 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dio_40m.bin and b/tools/sdk/esp32/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dio_80m.bin b/tools/sdk/esp32/bin/bootloader_dio_80m.bin index 30a2681f021..238c5578b7b 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dio_80m.bin and b/tools/sdk/esp32/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_40m.bin b/tools/sdk/esp32/bin/bootloader_dout_40m.bin index bd7c316fcd2..488a7bbb3fe 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dout_40m.bin and b/tools/sdk/esp32/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_80m.bin b/tools/sdk/esp32/bin/bootloader_dout_80m.bin index 44ee9d6cfc9..77ed1d3e630 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dout_80m.bin and b/tools/sdk/esp32/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_40m.bin b/tools/sdk/esp32/bin/bootloader_qio_40m.bin index 958ddfe8135..59b2b6e4413 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qio_40m.bin and b/tools/sdk/esp32/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_80m.bin b/tools/sdk/esp32/bin/bootloader_qio_80m.bin index bf18af59925..15bf321d2ca 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qio_80m.bin and b/tools/sdk/esp32/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_40m.bin b/tools/sdk/esp32/bin/bootloader_qout_40m.bin index 93d6ff461aa..27f59601fc6 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qout_40m.bin and b/tools/sdk/esp32/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_80m.bin b/tools/sdk/esp32/bin/bootloader_qout_80m.bin index 1edaf34822d..2af6988c83c 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qout_80m.bin and b/tools/sdk/esp32/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/esp32/include/app_trace/include/esp_app_trace_util.h b/tools/sdk/esp32/include/app_trace/include/esp_app_trace_util.h index 0ee501b27fa..96595c69827 100644 --- a/tools/sdk/esp32/include/app_trace/include/esp_app_trace_util.h +++ b/tools/sdk/esp32/include/app_trace/include/esp_app_trace_util.h @@ -68,7 +68,7 @@ typedef struct { */ static inline void esp_apptrace_lock_init(esp_apptrace_lock_t *lock) { - vPortCPUInitializeMutex(&lock->mux); + portMUX_INITIALIZE(&lock->mux); lock->int_state = 0; } diff --git a/tools/sdk/esp32/include/config/sdkconfig.h b/tools/sdk/esp32/include/config/sdkconfig.h index 2de31d635f6..fbafe0602ba 100644 --- a/tools/sdk/esp32/include/config/sdkconfig.h +++ b/tools/sdk/esp32/include/config/sdkconfig.h @@ -291,6 +291,7 @@ #define CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 1 #define CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN 752 #define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32 +#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1 #define CONFIG_ESP_COREDUMP_ENABLE_TO_NONE 1 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 @@ -676,5 +677,5 @@ #define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS #define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP -#define CONFIG_ARDUINO_IDF_COMMIT "ddc44956bf" +#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32/include/esp-face/include/image/dl_image.hpp b/tools/sdk/esp32/include/esp-face/include/image/dl_image.hpp index 4a974df063a..8e8a4df705b 100644 --- a/tools/sdk/esp32/include/esp-face/include/image/dl_image.hpp +++ b/tools/sdk/esp32/include/esp-face/include/image/dl_image.hpp @@ -48,6 +48,15 @@ namespace dl output[2] = input & 0xF8; // red } + /** + * @brief Convert RGB565 image to RGB888 image. + * + * @param image ptr of RGB565 image + * @param image_shape shape of the input image + * @return Tensor* output RGB88 image + */ + Tensor *convert_image_rgb565_to_rgb888(uint16_t *image, std::vector &image_shape); + /** * @brief Convert RGB565 pixel to Gray. * @@ -435,5 +444,48 @@ namespace dl */ Tensor *rgb2hsv(Tensor &image, bool bgr = false, bool fast = true); + /** + * @brief resize an image to the target shape. + * + * @param image the input image Tensor + * @param target_shape the target shape of the resized image. + * @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST + * @return Tensor* the pointer of the resized image Tensor + */ + Tensor *resize_image(Tensor &image, std::vector target_shape, resize_type_t resize_type); + + /** + * @brief resize an image to the target shape. + * + * @param image the input image Tensor + * @param resized_image the resized image Tensor + * @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST + */ + void resize_image(Tensor &image, Tensor &resized_image, resize_type_t resize_type); + + /** + * @brief resize an image to the target shape with nearest method. + * + * @tparam T + * @param image the pointer of the input image + * @param input_shape the input shape of the image + * @param target_shape the target shape of the resized image + * @return T* the pointer of the resized image + */ + template + T *resize_image_nearest(T *image, std::vector input_shape, std::vector target_shape); + + /** + * @brief resize an image to the target shape with nearest method. + * + * @tparam T + * @param image the pointer of the input image + * @param input_shape the input shape of the image + * @param resized_image the pointer of the resized image + * @param target_shape the target shape of the resized image + */ + template + void resize_image_nearest(T *image, std::vector input_shape, T *resized_image, std::vector target_shape); + } // namespace image } // namespace dl diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp index 8a9aaa8dfbe..57c7fb64a9a 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp @@ -57,10 +57,10 @@ namespace dl const char *name = "AvgPool2D") : Layer(name), output_exponent(output_exponent), filter_shape(filter_shape), - padding_type(padding_type), - padding(padding), stride_y(stride_y), stride_x(stride_x), + padding_type(padding_type), + padding(padding), output_shape({}) { this->output = new Tensor; diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp index a59bed183fb..c5b5bf02dfc 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp @@ -36,7 +36,10 @@ namespace dl * false: the output will store to a separate memory */ ExpandDims(std::vector axis, const char *name = "ExpandDims", bool inplace = false) : Layer(name), - axis(axis), inplace(inplace), output_shape({}) + output_shape({}), + axis(axis), + output(NULL), + inplace(inplace) { } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp index 70ae483a07f..3d96fa1f042 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp @@ -32,7 +32,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), inplace(inplace), output_shape({}) + Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), output(NULL), inplace(inplace), output_shape({}) {} /** diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max_pool2d.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max_pool2d.hpp index 629aa87f515..7c7fc69fa71 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max_pool2d.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max_pool2d.hpp @@ -53,10 +53,10 @@ namespace dl const int stride_x = 1, const char *name = "MaxPool2D") : Layer(name), filter_shape(filter_shape), - padding_type(padding_type), - padding(padding), stride_y(stride_y), stride_x(stride_x), + padding_type(padding_type), + padding(padding), output_shape({}) { this->output = new Tensor; diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp index 7dd29d4a178..1a7a40c5856 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp @@ -18,7 +18,7 @@ namespace dl * - int8_t: stands for operation in int8_t quantize */ template - class ReLU : public Layer + class Relu : public Layer { private: Tensor *output; /**/ @@ -33,7 +33,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - ReLU(const char *name = "ReLU", bool inplace = false) : Layer(name), + Relu(const char *name = "Relu", bool inplace = false) : Layer(name), output(NULL), inplace(inplace), output_shape({}) { } @@ -42,7 +42,7 @@ namespace dl * @brief Destroy the ReLU object * */ - ~ReLU() + ~Relu() { if ((!this->inplace) && (this->output != NULL)) { diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp index 3f2ed72b6e0..d800c17fa71 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp @@ -35,7 +35,9 @@ namespace dl * false: the output will store to a separate memory */ Reshape(std::vector shape, const char *name = "Reshape", bool inplace = false) : Layer(name), - output_shape(shape), inplace(inplace) + output(NULL), + inplace(inplace), + output_shape(shape) { } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp index cee92f22764..7e692aa1cd8 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp @@ -35,7 +35,11 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name), axis(axis), inplace(inplace), output_shape({}) + Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name), + output(NULL), + inplace(inplace), + axis(axis), + output_shape({}) { } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp index da03b4aad85..47f39c5674a 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp @@ -38,7 +38,11 @@ namespace dl * false: the output will store to a separate memory */ Sub2D(const int output_exponent, const Activation *activation = NULL, const char *name = "Sub2D", bool inplace = false) : Layer(name), - output_exponent(output_exponent), activation(activation), output(NULL), inplace(inplace), output_shape({}) + output_exponent(output_exponent), + activation(activation), + output(NULL), + inplace(inplace), + output_shape({}) { } diff --git a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp index d89ba8daed5..dab9addf678 100644 --- a/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp +++ b/tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp @@ -33,7 +33,11 @@ namespace dl * @param inplace true: the output will store to input * false: the output will store to a separate memory */ - Transpose(std::vector perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name), perm(perm), inplace(inplace), output_shape({}) + Transpose(std::vector perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name), + output(NULL), + inplace(inplace), + perm(perm), + output_shape({}) { } diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/color_detector.hpp b/tools/sdk/esp32/include/esp-face/include/model_zoo/color_detector.hpp index 063ab20b34a..f79f98c0fd2 100644 --- a/tools/sdk/esp32/include/esp-face/include/model_zoo/color_detector.hpp +++ b/tools/sdk/esp32/include/esp-face/include/model_zoo/color_detector.hpp @@ -7,46 +7,143 @@ typedef struct int area; /*!< Area of connected domains >*/ std::vector center; /**/ std::vector box; /**/ -} components_stats_t; +} color_detect_result_t; + +typedef struct +{ + std::vector start_col; + std::vector end_col; + std::vector row; + std::vector index; + std::vector area; +} color_segment_result_t; + +typedef struct +{ + std::vector color_thresh; /*!< threshold of colors, The threshold of each color is composed of 6 numbers >*/ + int area_thresh; /*!< the area threshold of each color, + the area that is smaller than the threshold is filtered >*/ + std::string name; /*!*/ +} color_info_t; class ColorDetector { private: - std::vector> results; /*!< detection results >*/ - -public: - std::vector> color_thresh; /*!< threshold of colors, The threshold of each color is composed of 6 numbers >*/ - std::vector area_thresh; /*!< the area threshold of each color, - the area that is smaller than the threshold is filtered >*/ - bool bgr; /*!< true: the input image is in BGR format + std::vector> detection_results; /*!< detection results >*/ + std::vector segmentation_results; /*!< segmentation results >*/ + std::vector registered_colors; /*!< the infomation of registered colors >*/ + std::vector color_thresh_offset; /*!< HSV offset of the registered colors>*/ + std::vector detection_shape; /*!< the inference shape of images, the input image will be resized to this shape. + if the shape == {}, the input image will not be resized >*/ + bool bgr; /*!< true: the input image is in BGR format false: the input image is in RGB format >*/ + int id_nums; /*!< the number of registered colors in history>*/ + float h_ratio; + float w_ratio; + void color_detection_forward(dl::Tensor &bin, int area_thresh); +public: /** * @brief get the color threshold of rectangular region in the image * - * @param image the input image + * @param image the input image in RGB888 format. * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] * @return std::vector the threshold. */ std::vector cal_color_thresh(dl::Tensor &image, std::vector box); + /** + * @brief get the color threshold of rectangular region in the image + * + * @param input the ptr of RGB565 image. + * @param input_shape shape of the input image. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @return std::vector the threshold. + */ + std::vector cal_color_thresh(uint16_t *input, std::vector input_shape, std::vector box); + + /** + * @brief register a new color to the color detector + * + * @param image the input image in RGB888 format. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(dl::Tensor &image, std::vector box, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief register a new color to the color detector + * + * @param input the ptr of RGB565 image. + * @param input_shape shape of the input image. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(uint16_t *input, std::vector input_shape, std::vector box, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief register a new color to the color detector + * + * @param color_thresh the color threshold + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(std::vector color_thresh, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief delete a registered color + * + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int delete_color(int id = -1); + + /** + * @brief delete a registered color + * + * @param color_name name of the registered_color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int delete_color(std::string color_name); + + /** + * @brief delete all the registered colors + * + */ + void clear_color(); + /** * @brief detect the colors based on the color thresholds * * @param image the input image. - * @return std::vector>& detection result. + * @return std::vector>& detection result. + */ + std::vector> &detect(dl::Tensor &image, std::vector color_ids = {}); + + /** + * @brief + * + * @param input + * @param input_shape + * @return std::vector>& */ - std::vector> &detect(dl::Tensor &image); + std::vector> &detect(uint16_t *input_shape, std::vector shape, std::vector color_ids = {}); /** * @brief Construct a new Color Detector object * - * @param color_thresh threshold of colors, The threshold of each color is composed of 6 numbers - * @param area_thresh the area threshold of each color,the area that is smaller than the threshold is filtered + * @param color_thresh_offset HSV offset of the registered colors> + * @param detection_shape the inference shape of images, the input image will be resized to this shape * @param bgr true: the input image is in BGR format * false: the input image is in RGB format */ - ColorDetector(std::vector> color_thresh, std::vector area_thresh, bool bgr = false) : color_thresh(color_thresh), area_thresh(area_thresh), bgr(bgr) + ColorDetector(std::vector color_thresh_offset = {}, std::vector detection_shape = {}, bool bgr = true) : color_thresh_offset(color_thresh_offset), + detection_shape(detection_shape), bgr(bgr), id_nums(0) { } @@ -57,12 +154,213 @@ class ColorDetector ~ColorDetector() {} /** - * @brief Get the results object + * @brief Get the detection results object + * + * @return std::vector>& the detection result. + */ + std::vector> &get_detection_results() + { + return this->detection_results; + } + + /** + * @brief Get the segmentation results object * - * @return std::vector>& the detection result. + * @return std::vector& the segmentation result. */ - std::vector> &get_results() + std::vector &get_segmentation_results() { - return this->results; + return this->segmentation_results; } + + /** + * @brief Get the registered colors object + * + * @return std::vector the information of resgistered colors + */ + std::vector get_registered_colors() + { + return this->registered_colors; + } + + /** + * @brief Set the color thresh offset object + * + * @param color_thresh_offset the offset of color thresh for registered colors + * @return ColorDetector& + */ + ColorDetector &set_color_thresh_offset(std::vector color_thresh_offset) + { + assert(color_thresh_offset.size() == 3); + this->color_thresh_offset = color_thresh_offset; + return *this; + } + + /** + * @brief Get the color thresh offset object + * + * @return std::vector color_thresh_offset + */ + std::vector get_color_thresh_offset() + { + return this->color_thresh_offset; + } + + /** + * @brief Set the area thresh object + * + * @param area_thresh the area thresh for each registered colors + * @return ColorDetector& + */ + ColorDetector &set_area_thresh(std::vector area_thresh) + { + assert((area_thresh.size() == this->registered_colors.size()) || (area_thresh.size() == 1)); + if (area_thresh.size() == 1) + { + for (int i = 0; i < this->registered_colors.size(); ++i) + { + this->registered_colors[i].area_thresh = area_thresh[0]; + } + } + else + { + for (int i = 0; i < this->registered_colors.size(); ++i) + { + this->registered_colors[i].area_thresh = area_thresh[i]; + } + } + return *this; + } + + /** + * @brief Set the area thresh object + * + * @param area_thresh the area thresh for each registered colors + * @param id index of the registered color + * @return ColorDetector& + */ + ColorDetector &set_area_thresh(int area_thresh, int id) + { + assert((id >= 0) && (id < this->registered_colors.size())); + this->registered_colors[id].area_thresh = area_thresh; + return *this; + } + + /** + * @brief Set the bgr object + * + * @param bgr + * @return ColorDetector& + */ + ColorDetector &set_bgr(bool bgr) + { + this->bgr = bgr; + return *this; + } + + /** + * @brief Get the bgr object + * + * @return bool bgr flag + */ + bool get_bgr() + { + return this->bgr; + } + + /** + * @brief Get the detection shape object + * + * @return std::vector + */ + std::vector get_detection_shape() + { + return this->detection_shape; + } + + /** + * @brief Set the detection shape object + * + * @param detection_shape the inference shape of images, the input image will be resized to this shape + * @return ColorDetector& + */ + ColorDetector &set_detection_shape(std::vector detection_shape) + { + assert(detection_shape.size() == 3); + this->detection_shape = detection_shape; + return *this; + } + + /** + * @brief Get the registered colors num + * + * @return int the registered colors num + */ + int get_registered_colors_num() + { + return this->registered_colors.size(); + } + + /** + * @brief print the detection detection results + * + * @param tag + */ + void print_detection_results(const char *tag = "RGB") + { + printf("\n%s | color detection result:\n", tag); + for (int i = 0; i < this->detection_results.size(); ++i) + { + printf("color %d: detected box :%d\n", i, this->detection_results[i].size()); + for (int j = 0; j < this->detection_results[i].size(); ++j) + { + printf("center: (%d, %d)\n", this->detection_results[i][j].center[0], this->detection_results[i][j].center[1]); + printf("box: (%d, %d), (%d, %d)\n", this->detection_results[i][j].box[0], this->detection_results[i][j].box[1], this->detection_results[i][j].box[2], this->detection_results[i][j].box[3]); + printf("area: %d\n", this->detection_results[i][j].area); + } + printf("\n"); + } + } + + /** + * @brief print the segmentation results + * + * @param tag + */ + void print_segmentation_results(const char *tag = "RGB") + { + printf("\n%s | color segmentation result:\n", tag); + for (int i = 0; i < this->segmentation_results.size(); ++i) + { + printf("color %d: detected box :%d\n", i, this->detection_results[i].size()); + for (int j = 0; j < this->segmentation_results[i].index.size(); ++j) + { + printf("box_index: %d, start col: %d, end col: %d, row: %d, area: %d\n", + this->segmentation_results[i].index[j], this->segmentation_results[i].start_col[j], this->segmentation_results[i].end_col[j], + this->segmentation_results[i].row[j], this->segmentation_results[i].area[j]); + } + printf("\n"); + } + } + + /** + * @brief draw the color segmentation result on the input image + * + * @param image the input RGB image + * @param draw_colors RGB values for each detected colors + * @param draw_backgound draw the background if it is true + * @param background_color RGB values for the background color + */ + void draw_segmentation_results(dl::Tensor &image, std::vector> draw_colors, bool draw_backgound = true, std::vector background_color = {0, 0, 0}); + + /** + * @brief draw the color segmentation result on the input image + * + * @param image the pointer of the input RGB565 image + * @param image_shape the shape of the input image + * @param draw_colors RGB565 values for each detected colors + * @param draw_backgound draw the background if it is true + * @param background_color RGB565 values for the background color + */ + void draw_segmentation_results(uint16_t *image, std::vector image_shape, std::vector draw_colors, bool draw_backgound = true, uint16_t background_color = 0x0000); }; \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_tool.hpp b/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_tool.hpp index 2226d32daf9..3adf1f62f72 100644 --- a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_tool.hpp +++ b/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognition_tool.hpp @@ -10,6 +10,7 @@ #include #include #include +#include "esp_partition.h" /** * @brief struct of face similarity @@ -45,6 +46,13 @@ class FaceID */ FaceID(int id, dl::Tensor &id_emb, std::string name = ""); + /** + * @brief Construct a new Face ID which is same as input face_id + * + * @param face_id input face_id + */ + FaceID(FaceID &face_id); + /** * @brief Destroy the Face ID object * diff --git a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognizer.hpp b/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognizer.hpp index 864881c984a..0f6b854118b 100644 --- a/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognizer.hpp +++ b/tools/sdk/esp32/include/esp-face/include/model_zoo/face_recognizer.hpp @@ -148,7 +148,7 @@ class FaceRecognizer * @param name name of the face id. * @return int the face id index of the enrolled embedding. */ - int enroll_id(uint16_t *image_input, std::vector shape, std::vector &landmarks, std::string name=""); + int enroll_id(uint16_t *image_input, std::vector shape, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -158,9 +158,11 @@ class FaceRecognizer * @param aligned_face the Tensor to store the intermeidate aligned face. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(uint16_t *image_input, std::vector shape, Tensor &aligned_face, std::vector &landmarks, std::string name=""); + int enroll_id(uint16_t *image_input, std::vector shape, Tensor &aligned_face, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -168,9 +170,11 @@ class FaceRecognizer * @param image_input the Tensor of input image with format bgr888. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &image_input, std::vector &landmarks, std::string name=""); + int enroll_id(Tensor &image_input, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -179,42 +183,114 @@ class FaceRecognizer * @param aligned_face the Tensor to store the intermeidate aligned face. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &image_input, Tensor &aligned_face, std::vector &landmarks, std::string name=""); + int enroll_id(Tensor &image_input, Tensor &aligned_face, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id * * @param aligned_face the Tensor of the input aligned face with format bgr888. * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &aligned_face, std::string name=""); + int enroll_id(Tensor &aligned_face, std::string name="", bool update_flash = false); /** * @brief enroll the normalzied face embedding. * - * @param emb the normalized face embbeding. - * @param name name of the face id. - * @return int the face id index of the enrolled embedding. + * @param emb the normalized face embbeding. + * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash + * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &emb, std::string name=""); + int enroll_id(Tensor &emb, std::string name="", bool update_flash = false); /** - * @brief delete the last enrolled face id. + * @brief delete the last enrolled face id. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash * * @return int the number of remained face ids. * if the face ids list is empty, return -1 */ - int delete_id(); + int delete_id(bool update_flash = false); /** - * @brief delete the face id with id index. + * @brief delete the face id with id index. * - * @param id face id index. - * @return int the number of remained face ids. - * if there is no matched id return -1 + * @param id face id index. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * @return int the number of remained face ids. + * if there is no matched id return -1 + */ + int delete_id(int id, bool update_flash = false); + + /** + * @brief Set the enrolled ids + * + * @param ids the ids to be set + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * @return int the number of enrolled ids. + */ + int set_ids(std::vector *> &ids, bool update_flash = false); + + /** + * @brief Set the enrolled ids from flash + * + * @return int the number of enrolled ids. + */ + int set_ids_from_flash(); + + /** + * @brief write the enrolled ids to flash + * + * @return int the number of enrolled ids. */ - int delete_id(int id); + int write_ids_to_flash(); + + /** + * @brief Get the enrolled ids with name object + * + * @param name + * @return std::vector + */ + std::vector get_enrolled_ids_with_name(std::string name); + + /** + * @brief Check whether the Flash partition is available + * + * @return int -2: the partition has not been set + * -1: the data in the flash does not match the current model. + * model_check_code: the Flash partition is available. + * number of ids in flash: The IDs in Flash and RAM does not sync. + */ + int check_partition(); + + /** + * @brief delete all the enrolled face ids. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * + */ + void clear_id(bool update_flash = false); + + /** + * @brief Set the partition for saving face ids to flash or reading face ids from flash. + * + * @param type esp_partition_type + * @param subtype esp_partition_subtype + * @param label the partition label + * @return int 0: set the partition failed + * 1: set the partition successfully + */ + int set_partition(esp_partition_type_t type, esp_partition_subtype_t subtype, const char *label); + }; \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-face/include/typedef/dl_constant.hpp b/tools/sdk/esp32/include/esp-face/include/typedef/dl_constant.hpp index 07b2dd24ee1..a111817e3d6 100644 --- a/tools/sdk/esp32/include/esp-face/include/typedef/dl_constant.hpp +++ b/tools/sdk/esp32/include/esp-face/include/typedef/dl_constant.hpp @@ -2,6 +2,7 @@ #include "dl_define.hpp" #include +#include namespace dl { @@ -48,10 +49,11 @@ namespace dl /**/ std::vector shape_with_dilation; /**/ /**/ - std::vector channel_exponent; /**/ + const int8_t* channel_exponent; /**/ + const int channel_exponent_size; /** - * @brief Construct a new Filter object. + * @brief Construct a new Filter object. * * @param element point to element * @param exponent exponent of element @@ -66,16 +68,17 @@ namespace dl Filter(const T *element, const int exponent, const std::vector shape, const std::vector dilation = {1, 1}); /** - * @brief Construct a new Filter object. + * @brief Construct a new Filter object. it is only avaliable to int16_t * - * @param element point to element - * @param channel_exponent exponent for per-channel - * @param shape shape of element - * @param dilation dilation of Filter - * - 1D: reserved - * - 2D: [dilation_in_height, dilation_in_width] + * @param element point to element + * @param channel_exponent exponent for per-channel + * @param channel_exponent_size size of exponent + * @param shape shape of element + * @param dilation dilation of Filter + * - 1D: reserved + * - 2D: [dilation_in_height, dilation_in_width] */ - Filter(const T *element, const std::vector channel_exponent, const std::vector shape, const std::vector dilation = {1, 1}); + Filter(const T *element, const int8_t* channel_exponent, const int channel_exponent_size, const std::vector shape, const std::vector dilation = {1, 1}); /** * @brief Print the n-th filter. @@ -98,9 +101,6 @@ namespace dl { public: using Constant::Constant; - std::vector channel_exponent; /**/ - - Bias(const T *element, const std::vector channel_exponent, const std::vector shape); }; /** diff --git a/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h b/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h index 820c4168f66..d1b530a42e3 100644 --- a/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h +++ b/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h @@ -344,6 +344,17 @@ esp_err_t esp_http_client_set_password(esp_http_client_handle_t client, const ch */ esp_err_t esp_http_client_set_authtype(esp_http_client_handle_t client, esp_http_client_auth_type_t auth_type); +/** + * @brief Get HTTP client session errno + * + * @param[in] client The esp_http_client handle + * + * @return + * - (-1) if invalid argument + * - errno + */ +int esp_http_client_get_errno(esp_http_client_handle_t client); + /** * @brief Set http request method * diff --git a/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h b/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h index 97cc9e514ab..fbeff5054b4 100644 --- a/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h +++ b/tools/sdk/esp32/include/esp_hw_support/include/soc/spinlock.h @@ -52,6 +52,15 @@ static inline void __attribute__((always_inline)) spinlock_initialize(spinlock_t /** * @brief Top level spinlock acquire function, spins until get the lock + * + * This function will: + * - Save current interrupt state, then disable interrupts + * - Spin until lock is acquired or until timeout occurs + * - Restore interrupt state + * + * @note Spinlocks alone do no constitute true critical sections (as this + * function reenables interrupts once the spinlock is acquired). For critical + * sections, use the interface provided by the operating system. * @param lock - target spinlock object * @param timeout - cycles to wait, passing SPINLOCK_WAIT_FOREVER blocs indefinitely */ @@ -125,6 +134,15 @@ static inline bool __attribute__((always_inline)) spinlock_acquire(spinlock_t *l /** * @brief Top level spinlock unlock function, unlocks a previously locked spinlock + * + * This function will: + * - Save current interrupt state, then disable interrupts + * - Release the spinlock + * - Restore interrupt state + * + * @note Spinlocks alone do no constitute true critical sections (as this + * function reenables interrupts once the spinlock is acquired). For critical + * sections, use the interface provided by the operating system. * @param lock - target, locked before, spinlock object */ static inline void __attribute__((always_inline)) spinlock_release(spinlock_t *lock) diff --git a/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_commands.h b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_commands.h new file mode 100644 index 00000000000..091ef1cffef --- /dev/null +++ b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_commands.h @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +/* Common LCD panel commands */ +#define LCD_CMD_NOP 0x00 // This command is empty command +#define LCD_CMD_SWRESET 0x01 // Software reset registers (the built-in frame buffer is not affected) +#define LCD_CMD_RDDID 0x04 // Read 24-bit display ID +#define LCD_CMD_RDDST 0x09 // Read display status +#define LCD_CMD_RDDPM 0x0A // Read display power mode +#define LCD_CMD_RDD_MADCTL 0x0B // Read display MADCTL +#define LCD_CMD_RDD_COLMOD 0x0C // Read display pixel format +#define LCD_CMD_RDDIM 0x0D // Read display image mode +#define LCD_CMD_RDDSM 0x0E // Read display signal mode +#define LCD_CMD_RDDSR 0x0F // Read display self-diagnostic result +#define LCD_CMD_SLPIN 0x10 // Go into sleep mode (DC/DC, oscillator, scanning stopped, but memory keeps content) +#define LCD_CMD_SLPOUT 0x11 // Exit sleep mode +#define LCD_CMD_PTLON 0x12 // Turns on partial display mode +#define LCD_CMD_NORON 0x13 // Turns on normal display mode +#define LCD_CMD_INVOFF 0x20 // Recover from display inversion mode +#define LCD_CMD_INVON 0x21 // Go into display inversion mode +#define LCD_CMD_GAMSET 0x26 // Select Gamma curve for current display +#define LCD_CMD_DISPOFF 0x28 // Display off (disable frame buffer output) +#define LCD_CMD_DISPON 0x29 // Display on (enable frame buffer output) +#define LCD_CMD_CASET 0x2A // Set column address +#define LCD_CMD_RASET 0x2B // Set row address +#define LCD_CMD_RAMWR 0x2C // Write frame memory +#define LCD_CMD_RAMRD 0x2E // Read frame memory +#define LCD_CMD_PTLAR 0x30 // Define the partial area +#define LCD_CMD_VSCRDEF 0x33 // Vertical scrolling definition +#define LCD_CMD_TEOFF 0x34 // Turns of tearing effect +#define LCD_CMD_TEON 0x35 // Turns on tearing effect + +#define LCD_CMD_MADCTL 0x36 // Memory data access control +#define LCD_CMD_MH_BIT (1 << 2) // Display data latch order, 0: refresh left to right, 1: refresh right to left +#define LCD_CMD_BGR_BIT (1 << 3) // RGB/BGR order, 0: RGB, 1: BGR +#define LCD_CMD_ML_BIT (1 << 4) // Line address order, 0: refresh top to bottom, 1: refresh bottom to top +#define LCD_CMD_MV_BIT (1 << 5) // Row/Column order, 0: normal mode, 1: reverse mode +#define LCD_CMD_MX_BIT (1 << 6) // Column address order, 0: left to right, 1: right to left +#define LCD_CMD_MY_BIT (1 << 7) // Row address order, 0: top to bottom, 1: bottom to top + +#define LCD_CMD_VSCSAD 0x37 // Vertical scroll start address +#define LCD_CMD_IDMOFF 0x38 // Recover from IDLE mode +#define LCD_CMD_IDMON 0x39 // Fall into IDLE mode (8 color depth is displayed) +#define LCD_CMD_COLMOD 0x3A // Defines the format of RGB picture data +#define LCD_CMD_RAMWRC 0x3C // Memory write continue +#define LCD_CMD_RAMRDC 0x3E // Memory read continue +#define LCD_CMD_STE 0x44 // Set tear scanline, tearing effect output signal when display module reaches line N +#define LCD_CMD_GDCAN 0x45 // Get scanline +#define LCD_CMD_WRDISBV 0x51 // Write display brightness +#define LCD_CMD_RDDISBV 0x52 // Read display brightness value diff --git a/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_rgb.h b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_rgb.h index 1368bb787f6..0c264545ee2 100644 --- a/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_rgb.h +++ b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_rgb.h @@ -18,10 +18,10 @@ extern "C" { #if SOC_LCD_RGB_SUPPORTED /** * @brief LCD RGB timing structure - * + * @verbatim * Total Width * <---------------------------------------------------> - * Hsync width HBP Active Width HFP + * HSYNC width HBP Active Width HFP * <---><--><--------------------------------------><---> * ____ ____|_______________________________________|____| * |___| | | | @@ -36,7 +36,7 @@ extern "C" { * | /|\ | | / / / / / / / / / / / / / / / / / / / | | * | | | |/ / / / / / / / / / / / / / / / / / / /| | * Total | | | |/ / / / / / / / / / / / / / / / / / / /| | - * Heigh | | | |/ / / / / / / / / / / / / / / / / / / /| | + * Height | | | |/ / / / / / / / / / / / / / / / / / / /| | * |Active| | |/ / / / / / / / / / / / / / / / / / / /| | * |Heigh | | |/ / / / / / Active Display Area / / / /| | * | | | |/ / / / / / / / / / / / / / / / / / / /| | @@ -48,7 +48,7 @@ extern "C" { * | /|\ | | * | VFP | | | * \|/ \|/_____|______________________________________________________| - * + * @endverbatim */ typedef struct { unsigned int pclk_hz; /*!< Frequency of pixel clock */ @@ -65,7 +65,7 @@ typedef struct { unsigned int vsync_idle_low: 1; /*!< The vsync signal is low in IDLE state */ unsigned int de_idle_high: 1; /*!< The de signal is high in IDLE state */ unsigned int pclk_active_neg: 1; /*!< The display will write data lines when there's a falling edge on PCLK */ - unsigned int pclk_idle_low: 1; /*!< The PCLK stays at low level in IDLE phase */ + unsigned int pclk_idle_high: 1; /*!< The PCLK stays at high level in IDLE phase */ } flags; } esp_lcd_rgb_timing_t; diff --git a/tools/sdk/esp32/include/esp_netif/include/esp_netif_defaults.h b/tools/sdk/esp32/include/esp_netif/include/esp_netif_defaults.h index da01500db1c..b8276068e9a 100644 --- a/tools/sdk/esp32/include/esp_netif/include/esp_netif_defaults.h +++ b/tools/sdk/esp32/include/esp_netif/include/esp_netif_defaults.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ESP_NETIF_DEFAULTS_H #define _ESP_NETIF_DEFAULTS_H @@ -37,6 +29,7 @@ extern "C" { .route_prio = 100 \ } \ +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT #define ESP_NETIF_INHERENT_DEFAULT_WIFI_AP() \ { \ .flags = (esp_netif_flags_t)(ESP_NETIF_DHCP_SERVER | ESP_NETIF_FLAG_AUTOUP), \ @@ -48,6 +41,7 @@ extern "C" { .if_desc = "ap", \ .route_prio = 10 \ }; +#endif #define ESP_NETIF_INHERENT_DEFAULT_ETH() \ { \ @@ -108,6 +102,7 @@ extern "C" { .stack = ESP_NETIF_NETSTACK_DEFAULT_ETH, \ } +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT /** * @brief Default configuration reference of WIFI AP */ @@ -117,6 +112,7 @@ extern "C" { .driver = NULL, \ .stack = ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP, \ } +#endif /** * @brief Default configuration reference of WIFI STA @@ -154,10 +150,12 @@ extern "C" { */ #define ESP_NETIF_BASE_DEFAULT_WIFI_STA &_g_esp_netif_inherent_sta_config +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT /** * @brief Default base config (esp-netif inherent) of WIFI AP */ #define ESP_NETIF_BASE_DEFAULT_WIFI_AP &_g_esp_netif_inherent_ap_config +#endif /** * @brief Default base config (esp-netif inherent) of ethernet interface @@ -177,7 +175,9 @@ extern "C" { #define ESP_NETIF_NETSTACK_DEFAULT_ETH _g_esp_netif_netstack_default_eth #define ESP_NETIF_NETSTACK_DEFAULT_WIFI_STA _g_esp_netif_netstack_default_wifi_sta +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT #define ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP _g_esp_netif_netstack_default_wifi_ap +#endif #define ESP_NETIF_NETSTACK_DEFAULT_PPP _g_esp_netif_netstack_default_ppp #define ESP_NETIF_NETSTACK_DEFAULT_SLIP _g_esp_netif_netstack_default_slip #define ESP_NETIF_NETSTACK_DEFAULT_OPENTHREAD _g_esp_netif_netstack_default_openthread @@ -190,7 +190,9 @@ extern "C" { // extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_eth; extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_sta; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_ap; +#endif extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_ppp; extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_slip; @@ -200,12 +202,16 @@ extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_slip; // common behavioural patterns for common interfaces such as STA, AP, ETH, PPP // extern const esp_netif_inherent_config_t _g_esp_netif_inherent_sta_config; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ap_config; +#endif extern const esp_netif_inherent_config_t _g_esp_netif_inherent_eth_config; extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ppp_config; extern const esp_netif_inherent_config_t _g_esp_netif_inherent_slip_config; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_ip_info_t _g_esp_netif_soft_ap_ip; +#endif #if CONFIG_OPENTHREAD_ENABLED /** diff --git a/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi_os_adapter.h b/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi_os_adapter.h index b583e916267..88d0ee54029 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi_os_adapter.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi_os_adapter.h @@ -1,16 +1,8 @@ -// Copyright 2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef ESP_WIFI_OS_ADAPTER_H_ #define ESP_WIFI_OS_ADAPTER_H_ diff --git a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi.h b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi.h index 51e03234841..2d671591765 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* Notes about WiFi Programming @@ -275,7 +267,7 @@ esp_err_t esp_wifi_deinit(void); * @brief Set the WiFi operating mode * * Set the WiFi operating mode as station, soft-AP or station+soft-AP, - * The default mode is soft-AP mode. + * The default mode is station mode. * * @param mode WiFi operating mode * diff --git a/tools/sdk/esp32/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h b/tools/sdk/esp32/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h index 675af141ebc..aa87e1b4db2 100644 --- a/tools/sdk/esp32/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h +++ b/tools/sdk/esp32/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h @@ -166,10 +166,19 @@ #define configSTACK_OVERHEAD_APPTRACE 0 #endif +/* Stack watchpoint decreases minimum usable stack size by up to 60 bytes. + See FreeRTOS FREERTOS_WATCHPOINT_END_OF_STACK option in Kconfig. */ +#if CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK +#define configSTACK_OVERHEAD_WATCHPOINT 60 +#else +#define configSTACK_OVERHEAD_WATCHPOINT 0 +#endif + #define configSTACK_OVERHEAD_TOTAL ( \ configSTACK_OVERHEAD_CHECKER + \ configSTACK_OVERHEAD_OPTIMIZATION + \ - configSTACK_OVERHEAD_APPTRACE \ + configSTACK_OVERHEAD_APPTRACE + \ + configSTACK_OVERHEAD_WATCHPOINT \ ) #define configMINIMAL_STACK_SIZE (768 + configSTACK_OVERHEAD_TOTAL) diff --git a/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro.h b/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro.h index f3efcbfdba1..934f056816c 100644 --- a/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro.h +++ b/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro.h @@ -179,128 +179,112 @@ static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level); * @note [refactor-todo] Check if these comments are still true * ------------------------------------------------------ */ -typedef spinlock_t portMUX_TYPE; /**< Spinlock type used by FreeRTOS critical sections */ -#define portMUX_INITIALIZER_UNLOCKED SPINLOCK_INITIALIZER /**< Spinlock initializer */ -#define portMUX_FREE_VAL SPINLOCK_FREE /**< Spinlock is free. [refactor-todo] check if this is still required */ -#define portMUX_NO_TIMEOUT SPINLOCK_WAIT_FOREVER /**< When passed for 'timeout_cycles', spin forever if necessary. [refactor-todo] check if this is still required */ -#define portMUX_TRY_LOCK SPINLOCK_NO_WAIT /**< Try to acquire the spinlock a single time only. [refactor-todo] check if this is still required */ +typedef spinlock_t portMUX_TYPE; /**< Spinlock type used by FreeRTOS critical sections */ +#define portMUX_INITIALIZER_UNLOCKED SPINLOCK_INITIALIZER /**< Spinlock initializer */ +#define portMUX_FREE_VAL SPINLOCK_FREE /**< Spinlock is free. [refactor-todo] check if this is still required */ +#define portMUX_NO_TIMEOUT SPINLOCK_WAIT_FOREVER /**< When passed for 'timeout_cycles', spin forever if necessary. [refactor-todo] check if this is still required */ +#define portMUX_TRY_LOCK SPINLOCK_NO_WAIT /**< Try to acquire the spinlock a single time only. [refactor-todo] check if this is still required */ +#define portMUX_INITIALIZE(mux) spinlock_initialize(mux) /*< Initialize a spinlock to its unlocked state */ -/** - * @brief Initialize a spinlock - * - * - Initializes a spinlock that is used by FreeRTOS SMP critical sections - * - * @param[in] mux Spinlock - */ -static inline void __attribute__((always_inline)) vPortCPUInitializeMutex(portMUX_TYPE *mux); +// ------------------ Critical Sections -------------------- /** - * @brief Acquire a spinlock + * @brief Enter a SMP critical section with a timeout * - * @note [refactor-todo] check if we still need this + * This function enters an SMP critical section by disabling interrupts then + * taking a spinlock with a specified timeout. * - * @param[in] mux Spinlock - */ -static inline void __attribute__((always_inline)) vPortCPUAcquireMutex(portMUX_TYPE *mux); - -/** - * @brief Acquire a spinlock but with a specified timeout + * This function can be called in a nested manner. * - * @note [refactor-todo] check if we still need this - * @note [refactor-todo] Check if this function should be renamed (due to bool return type) - * - * @param[in] mux Spinlock - * @param timeout - * @return true Spinlock acquired - * @return false Timed out + * @note This function is made non-inline on purpose to reduce code size + * @param mux Spinlock + * @param timeout Timeout to wait for spinlock in number of CPU cycles. + * Use portMUX_NO_TIMEOUT to wait indefinitely + * Use portMUX_TRY_LOCK to only getting the spinlock a single time + * @retval pdPASS Critical section entered (spinlock taken) + * @retval pdFAIL If timed out waiting for spinlock (will not occur if using portMUX_NO_TIMEOUT) */ -static inline bool __attribute__((always_inline)) vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout); +BaseType_t xPortEnterCriticalTimeout(portMUX_TYPE *mux, BaseType_t timeout); /** - * @brief Release a spinlock + * @brief Enter a SMP critical section + * + * This function enters an SMP critical section by disabling interrupts then + * taking a spinlock with an unlimited timeout. * - * @note [refactor-todo] check if we still need this + * This function can be called in a nested manner * * @param[in] mux Spinlock */ -static inline void __attribute__((always_inline)) vPortCPUReleaseMutex(portMUX_TYPE *mux); +static inline void __attribute__((always_inline)) vPortEnterCritical(portMUX_TYPE *mux); /** - * @brief Wrapper for atomic compare-and-set instruction + * @brief Exit a SMP critical section * - * This subroutine will atomically compare *addr to 'compare'. If *addr == compare, *addr is set to *set. *set is - * updated with the previous value of *addr (either 'compare' or some other value.) + * This function can be called in a nested manner. On the outer most level of nesting, this function will: * - * @warning From the ISA docs: in some (unspecified) cases, the s32c1i instruction may return the "bitwise inverse" of - * the old mem if the mem wasn't written. This doesn't seem to happen on the ESP32 (portMUX assertions would - * fail). + * - Release the spinlock + * - Restore the previous interrupt level before the critical section was entered * - * @note [refactor-todo] check if we still need this - * @note [refactor-todo] Check if this function should be renamed (due to void return type) + * If still nesting, this function simply decrements a critical nesting count * - * @param[inout] addr Pointer to target address - * @param[in] compare Compare value - * @param[inout] set Pointer to set value + * @note This function is made non-inline on purpose to reduce code size + * @param[in] mux Spinlock */ -static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set); +void vPortExitCritical(portMUX_TYPE *mux); /** - * @brief Wrapper for atomic compare-and-set instruction in external RAM + * @brief FreeRTOS Compliant version of xPortEnterCriticalTimeout() * - * Atomic compare-and-set but the target address is placed in external RAM + * Compliant version of xPortEnterCriticalTimeout() will ensure that this is + * called from a task context only. An abort is called otherwise. * - * @note [refactor-todo] check if we still need this + * @note This function is made non-inline on purpose to reduce code size * - * @param[inout] addr Pointer to target address - * @param[in] compare Compare value - * @param[inout] set Pointer to set value + * @param mux Spinlock + * @param timeout Timeout + * @return BaseType_t */ -static inline void uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set); - -// ------------------ Critical Sections -------------------- +BaseType_t xPortEnterCriticalTimeoutCompliance(portMUX_TYPE *mux, BaseType_t timeout); /** - * @brief Enter a SMP critical section + * @brief FreeRTOS compliant version of vPortEnterCritical() * - * - Disable interrupts - * - Takes spinlock - * - Can be nested + * Compliant version of vPortEnterCritical() will ensure that this is + * called from a task context only. An abort is called otherwise. * * @param[in] mux Spinlock */ -void vPortEnterCritical(portMUX_TYPE *mux); +static inline void __attribute__((always_inline)) vPortEnterCriticalCompliance(portMUX_TYPE *mux); /** - * @brief Exit a SMP critical section + * @brief FreeRTOS compliant version of vPortExitCritical() * - * - Releases spinlock - * - Reenables interrupts - * - Can be nested + * Compliant version of vPortExitCritical() will ensure that this is + * called from a task context only. An abort is called otherwise. * + * @note This function is made non-inline on purpose to reduce code size * @param[in] mux Spinlock */ -void vPortExitCritical(portMUX_TYPE *mux); +void vPortExitCriticalCompliance(portMUX_TYPE *mux); /** - * @brief FreeRTOS compliant version of enter critical - * - * - Ensures that critical section is only entered from task context + * @brief Safe version of enter critical timeout * - * @param[in] mux Spinlock - */ -static inline void __attribute__((always_inline)) vPortEnterCriticalCompliance(portMUX_TYPE *mux); - -/** - * @brief FreeRTOS compliant version of exit critical + * Safe version of enter critical will automatically select between + * portTRY_ENTER_CRITICAL() and portTRY_ENTER_CRITICAL_ISR() * - * @param[in] mux Spinlock + * @param mux Spinlock + * @param timeout Timeout + * @return BaseType_t */ -static inline void __attribute__((always_inline)) vPortExitCriticalCompliance(portMUX_TYPE *mux); +static inline BaseType_t __attribute__((always_inline)) xPortEnterCriticalTimeoutSafe(portMUX_TYPE *mux, BaseType_t timeout); /** * @brief Safe version of enter critical * - * - This function can be used to enter a critical section from both task and ISR contexts + * Safe version of enter critical will automatically select between + * portENTER_CRITICAL() and portENTER_CRITICAL_ISR() * * @param[in] mux Spinlock */ @@ -309,6 +293,9 @@ static inline void __attribute__((always_inline)) vPortEnterCriticalSafe(portMUX /** * @brief Safe version of exit critical * + * Safe version of enter critical will automatically select between + * portEXIT_CRITICAL() and portEXIT_CRITICAL_ISR() + * * @param[in] mux Spinlock */ static inline void __attribute__((always_inline)) vPortExitCriticalSafe(portMUX_TYPE *mux); @@ -397,6 +384,38 @@ void vPortSetStackWatchpoint( void *pxStackStart ); */ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void); +/** + * @brief Wrapper for atomic compare-and-set instruction + * + * This subroutine will atomically compare *addr to 'compare'. If *addr == compare, *addr is set to *set. *set is + * updated with the previous value of *addr (either 'compare' or some other value.) + * + * @warning From the ISA docs: in some (unspecified) cases, the s32c1i instruction may return the "bitwise inverse" of + * the old mem if the mem wasn't written. This doesn't seem to happen on the ESP32 (portMUX assertions would + * fail). + * + * @note [refactor-todo] Check if this can be deprecated + * @note [refactor-todo] Check if this function should be renamed (due to void return type) + * + * @param[inout] addr Pointer to target address + * @param[in] compare Compare value + * @param[inout] set Pointer to set value + */ +static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set); + +/** + * @brief Wrapper for atomic compare-and-set instruction in external RAM + * + * Atomic compare-and-set but the target address is placed in external RAM + * + * @note [refactor-todo] Check if this can be deprecated + * + * @param[inout] addr Pointer to target address + * @param[in] compare Compare value + * @param[inout] set Pointer to set value + */ +static inline void __attribute__((always_inline)) uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set); + /* ------------------------------------------- FreeRTOS Porting Interface ---------------------------------------------- @@ -449,16 +468,22 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void); * - Safe versions can be called from either contexts */ #ifdef CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE -#define portENTER_CRITICAL(mux) vPortEnterCriticalCompliance(mux) -#define portEXIT_CRITICAL(mux) vPortExitCriticalCompliance(mux) +#define portTRY_ENTER_CRITICAL(mux, timeout) xPortEnterCriticalTimeoutCompliance(mux, timeout) +#define portENTER_CRITICAL(mux) vPortEnterCriticalCompliance(mux) +#define portEXIT_CRITICAL(mux) vPortExitCriticalCompliance(mux) #else -#define portENTER_CRITICAL(mux) vPortEnterCritical(mux) -#define portEXIT_CRITICAL(mux) vPortExitCritical(mux) +#define portTRY_ENTER_CRITICAL(mux, timeout) xPortEnterCriticalTimeout(mux, timeout) +#define portENTER_CRITICAL(mux) vPortEnterCritical(mux) +#define portEXIT_CRITICAL(mux) vPortExitCritical(mux) #endif /* CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE */ -#define portENTER_CRITICAL_ISR(mux) vPortEnterCritical(mux) -#define portEXIT_CRITICAL_ISR(mux) vPortExitCritical(mux) -#define portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux) -#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux) + +#define portTRY_ENTER_CRITICAL_ISR(mux, timeout) xPortEnterCriticalTimeout(mux, timeout) +#define portENTER_CRITICAL_ISR(mux) vPortEnterCritical(mux) +#define portEXIT_CRITICAL_ISR(mux) vPortExitCritical(mux) + +#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) xPortEnterCriticalTimeoutSafe(mux) +#define portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux) +#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux) // ---------------------- Yielding ------------------------- @@ -546,71 +571,32 @@ static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level) XTOS_RESTORE_JUST_INTLEVEL(prev_level); } -// ---------------------- Spinlocks ------------------------ - -static inline void __attribute__((always_inline)) vPortCPUInitializeMutex(portMUX_TYPE *mux) -{ - spinlock_initialize(mux); -} - -static inline void __attribute__((always_inline)) vPortCPUAcquireMutex(portMUX_TYPE *mux) -{ - spinlock_acquire(mux, portMUX_NO_TIMEOUT); -} - -static inline bool __attribute__((always_inline)) vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout) -{ - return (spinlock_acquire(mux, timeout)); -} - -static inline void __attribute__((always_inline)) vPortCPUReleaseMutex(portMUX_TYPE *mux) -{ - spinlock_release(mux); -} +// ------------------ Critical Sections -------------------- -static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set) +static inline void __attribute__((always_inline)) vPortEnterCritical(portMUX_TYPE *mux) { - compare_and_set_native(addr, compare, set); + xPortEnterCriticalTimeout(mux, portMUX_NO_TIMEOUT); } -static inline void uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set) -{ -#ifdef CONFIG_SPIRAM - compare_and_set_extram(addr, compare, set); -#endif -} - -// ------------------ Critical Sections -------------------- - static inline void __attribute__((always_inline)) vPortEnterCriticalCompliance(portMUX_TYPE *mux) { - if (!xPortInIsrContext()) { - vPortEnterCritical(mux); - } else { - esp_rom_printf("%s:%d (%s)- port*_CRITICAL called from ISR context!\n", - __FILE__, __LINE__, __FUNCTION__); - abort(); - } + xPortEnterCriticalTimeoutCompliance(mux, portMUX_NO_TIMEOUT); } -static inline void __attribute__((always_inline)) vPortExitCriticalCompliance(portMUX_TYPE *mux) +static inline BaseType_t __attribute__((always_inline)) xPortEnterCriticalTimeoutSafe(portMUX_TYPE *mux, BaseType_t timeout) { - if (!xPortInIsrContext()) { - vPortExitCritical(mux); + BaseType_t ret; + if (xPortInIsrContext()) { + ret = portTRY_ENTER_CRITICAL_ISR(mux, timeout); } else { - esp_rom_printf("%s:%d (%s)- port*_CRITICAL called from ISR context!\n", - __FILE__, __LINE__, __FUNCTION__); - abort(); + ret = portTRY_ENTER_CRITICAL(mux, timeout); } + return ret; } static inline void __attribute__((always_inline)) vPortEnterCriticalSafe(portMUX_TYPE *mux) { - if (xPortInIsrContext()) { - portENTER_CRITICAL_ISR(mux); - } else { - portENTER_CRITICAL(mux); - } + xPortEnterCriticalTimeoutSafe(mux, portMUX_NO_TIMEOUT); } static inline void __attribute__((always_inline)) vPortExitCriticalSafe(portMUX_TYPE *mux) @@ -648,6 +634,18 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void) return (uint32_t) cpu_hal_get_core_id(); } +static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set) +{ + compare_and_set_native(addr, compare, set); +} + +static inline void __attribute__((always_inline)) uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set) +{ +#ifdef CONFIG_SPIRAM + compare_and_set_extram(addr, compare, set); +#endif +} + /* ------------------------------------------------------ Misc --------------------------------------------------------- diff --git a/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h b/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h index 4f0e3fe1d99..378617c73aa 100644 --- a/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h +++ b/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h @@ -32,3 +32,62 @@ static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseTyp { portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level); } + +/* ---------------------- Spinlocks --------------------- */ + +/** + * @brief Initialize a spinlock + * + * Does the exact same thing as spinlock_initialize(); + * + * @deprecated This function is deprecated. Call spinlock_initialize() instead + * @param[in] mux Spinlock + */ +static inline void __attribute__((deprecated)) __attribute__((always_inline)) vPortCPUInitializeMutex(portMUX_TYPE *mux) +{ + spinlock_initialize(mux); +} + +/** + * @brief Acquire a spinlock + * + * Does the exact same thing as spinlock_acquire() with unlimited timeout + * + * @deprecated This function is deprecated. Call spinlock_acquire() instead + * @param[in] mux Spinlock + */ +static inline void __attribute__((deprecated)) __attribute__((always_inline)) vPortCPUAcquireMutex(portMUX_TYPE *mux) +{ + spinlock_acquire(mux, portMUX_NO_TIMEOUT); +} + +/** + * @brief Acquire a spinlock + * + * Does the exact same thing as spinlock_acquire() with a specified timeout + * + * @deprecated This function is deprecated. Call spinlock_acquire() instead + * @note Does not have deprecated attribute due to usage in app_trace_util.c + * @param[in] mux Spinlock + * @param timeout + * @return true Spinlock acquired + * @return false Timed out + */ +static inline bool __attribute__((always_inline)) vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout) +{ + return (spinlock_acquire(mux, timeout)); +} + +/** + * @brief Release a spinlock + * + * Does the exact same thing as spinlock_release() + * + * @deprecated This function is deprecated. Call spinlock_release() instead + * @note Does not have deprecated attribute due to usage in app_trace_util.c + * @param[in] mux Spinlock + */ +static inline void __attribute__((always_inline)) vPortCPUReleaseMutex(portMUX_TYPE *mux) +{ + spinlock_release(mux); +} diff --git a/tools/sdk/esp32/include/hal/include/hal/lcd_types.h b/tools/sdk/esp32/include/hal/include/hal/lcd_types.h index 01e6d0c2949..1a62d8f8eb4 100644 --- a/tools/sdk/esp32/include/hal/include/hal/lcd_types.h +++ b/tools/sdk/esp32/include/hal/include/hal/lcd_types.h @@ -13,12 +13,17 @@ extern "C" { /** * @brief LCD clock source * @note User should select the clock source based on the real requirement: - * - * | LCD clock source | Features | Power Management | - * |---------------------|--------------------------|----------------------------| - * | LCD_CLK_SRC_PLL160M | High resolution, fixed | ESP_PM_APB_FREQ_MAX lock | - * | LCD_CLK_SRC_APLL | Configurable resolution | ESP_PM_NO_LIGHT_SLEEP lock | - * | LCD_CLK_SRC_XTAL | Medium resolution, fixed | No PM lock | + * @verbatim embed:rst:leading-asterisk + * +---------------------+-------------------------+----------------------------+ + * | LCD clock source | Features | Power Management | + * +=====================+=========================+============================+ + * | LCD_CLK_SRC_PLL160M | High resolution | ESP_PM_APB_FREQ_MAX lock | + * +---------------------+-------------------------+----------------------------+ + * | LCD_CLK_SRC_APLL | Configurable resolution | ESP_PM_NO_LIGHT_SLEEP lock | + * +---------------------+-------------------------+----------------------------+ + * | LCD_CLK_SRC_XTAL | Medium resolution | No PM lock | + * +---------------------+-------------------------+----------------------------+ + * @endverbatim */ typedef enum { LCD_CLK_SRC_PLL160M, /*!< Select PLL160M as the source clock */ diff --git a/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h b/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h index f37c2a9e00f..dc8a060f54b 100644 --- a/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h +++ b/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h @@ -1,16 +1,8 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/tools/sdk/esp32/include/idf_test/include/esp32s3/idf_performance_target.h b/tools/sdk/esp32/include/idf_test/include/esp32s3/idf_performance_target.h index 62f996fc658..b744cda8fa0 100644 --- a/tools/sdk/esp32/include/idf_test/include/esp32s3/idf_performance_target.h +++ b/tools/sdk/esp32/include/idf_test/include/esp32s3/idf_performance_target.h @@ -1,23 +1,15 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #define IDF_PERFORMANCE_MIN_AES_CBC_THROUGHPUT_MBSEC 43 // SHA256 hardware throughput at 240MHz, threshold set lower than worst case -#define IDF_PERFORMANCE_MIN_SHA256_THROUGHPUT_MBSEC 19.8 +#define IDF_PERFORMANCE_MIN_SHA256_THROUGHPUT_MBSEC 90 // esp_sha() time to process 32KB of input data from RAM #define IDF_PERFORMANCE_MAX_TIME_SHA1_32KB 1000 #define IDF_PERFORMANCE_MAX_TIME_SHA512_32KB 900 diff --git a/tools/sdk/esp32/include/idf_test/include/idf_performance.h b/tools/sdk/esp32/include/idf_test/include/idf_performance.h index 9d99070b953..b558feb4ca3 100644 --- a/tools/sdk/esp32/include/idf_test/include/idf_performance.h +++ b/tools/sdk/esp32/include/idf_test/include/idf_performance.h @@ -8,7 +8,7 @@ */ #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP -#define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP 200 +#define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP 250 #endif #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM #define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM 300 diff --git a/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/bignum.h b/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/bignum.h index a317c456060..4f84bed7407 100644 --- a/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/bignum.h +++ b/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/bignum.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #include_next "mbedtls/bignum.h" @@ -77,4 +69,31 @@ void esp_mpi_release_hardware(void); */ int esp_mpi_mul_mpi_mod(mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi *Y, const mbedtls_mpi *M); +#if CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + +/** + * @brief Perform a sliding-window exponentiation: X = A^E mod N + * + * @param X The destination MPI. This must point to an initialized MPI. + * @param A The base of the exponentiation. + * This must point to an initialized MPI. + * @param E The exponent MPI. This must point to an initialized MPI. + * @param N The base for the modular reduction. This must point to an + * initialized MPI. + * @param _RR A helper MPI depending solely on \p N which can be used to + * speed-up multiple modular exponentiations for the same value + * of \p N. This may be \c NULL. If it is not \c NULL, it must + * point to an initialized MPI. + * + * @return \c 0 if successful. + * @return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed. + * @return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \c N is negative or + * even, or if \c E is negative. + * @return Another negative error code on different kinds of failures. + * + */ +int mbedtls_mpi_exp_mod_soft(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR); + +#endif // CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + #endif // CONFIG_MBEDTLS_HARDWARE_MPI diff --git a/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/esp_config.h b/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/esp_config.h index f36ebf9bc75..9c63118eb57 100644 --- a/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/esp_config.h +++ b/tools/sdk/esp32/include/mbedtls/port/include/mbedtls/esp_config.h @@ -153,15 +153,22 @@ #undef MBEDTLS_MD5_ALT #endif -/* The following MPI (bignum) functions have ESP32 hardware support. - For exponential mod, both software and hardware implementation - will be compiled. If CONFIG_MBEDTLS_HARDWARE_MPI is enabled, mod APIs - will be wrapped to use hardware implementation. -*/ -#undef MBEDTLS_MPI_EXP_MOD_ALT +/* The following MPI (bignum) functions have hardware support. + * Uncommenting these macros will use the hardware-accelerated + * implementations. + */ #ifdef CONFIG_MBEDTLS_HARDWARE_MPI +#ifdef CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + /* Prefer hardware and fallback to software */ + #define MBEDTLS_MPI_EXP_MOD_ALT_FALLBACK +#else + /* Hardware only mode */ + #define MBEDTLS_MPI_EXP_MOD_ALT +#endif #define MBEDTLS_MPI_MUL_MPI_ALT #else +#undef MBEDTLS_MPI_EXP_MOD_ALT_FALLBACK +#undef MBEDTLS_MPI_EXP_MOD_ALT #undef MBEDTLS_MPI_MUL_MPI_ALT #endif diff --git a/tools/sdk/esp32/include/vfs/include/esp_vfs.h b/tools/sdk/esp32/include/vfs/include/esp_vfs.h index 2bc8c77fd2b..0498a3aa59b 100644 --- a/tools/sdk/esp32/include/vfs/include/esp_vfs.h +++ b/tools/sdk/esp32/include/vfs/include/esp_vfs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __ESP_VFS_H__ #define __ESP_VFS_H__ @@ -410,7 +402,8 @@ int esp_vfs_utime(const char *path, const struct utimbuf *times); * @param timeout If not NULL, then points to timeval structure which * specifies the time period after which the functions should * time-out and return. If it is NULL, then the function will - * not time-out. + * not time-out. Note that the timeout period is rounded up to + * the system tick and incremented by one. * * @return The number of descriptors set in the descriptor sets, or -1 * when an error (specified by errno) have occurred. diff --git a/tools/sdk/esp32/ld/libbtdm_app.a b/tools/sdk/esp32/ld/libbtdm_app.a index ce79d992250..beeef6cd169 100644 Binary files a/tools/sdk/esp32/ld/libbtdm_app.a and b/tools/sdk/esp32/ld/libbtdm_app.a differ diff --git a/tools/sdk/esp32/ld/libcat_face_detect.a b/tools/sdk/esp32/ld/libcat_face_detect.a index 04377a9d8d8..6962cd06027 100644 Binary files a/tools/sdk/esp32/ld/libcat_face_detect.a and b/tools/sdk/esp32/ld/libcat_face_detect.a differ diff --git a/tools/sdk/esp32/ld/libcolor_detect.a b/tools/sdk/esp32/ld/libcolor_detect.a index e03e142ec20..4e3e520507c 100644 Binary files a/tools/sdk/esp32/ld/libcolor_detect.a and b/tools/sdk/esp32/ld/libcolor_detect.a differ diff --git a/tools/sdk/esp32/ld/libdl.a b/tools/sdk/esp32/ld/libdl.a index 87f5037101b..d0951c92ac8 100644 Binary files a/tools/sdk/esp32/ld/libdl.a and b/tools/sdk/esp32/ld/libdl.a differ diff --git a/tools/sdk/esp32/ld/libhuman_face_detect.a b/tools/sdk/esp32/ld/libhuman_face_detect.a index a471b47c0bf..aae3e51eb07 100644 Binary files a/tools/sdk/esp32/ld/libhuman_face_detect.a and b/tools/sdk/esp32/ld/libhuman_face_detect.a differ diff --git a/tools/sdk/esp32/ld/libmfn.a b/tools/sdk/esp32/ld/libmfn.a index 5cffd5cb576..123df59825a 100644 Binary files a/tools/sdk/esp32/ld/libmfn.a and b/tools/sdk/esp32/ld/libmfn.a differ diff --git a/tools/sdk/esp32/ld/sections.ld b/tools/sdk/esp32/ld/sections.ld index 8aad74e818c..40feea9f011 100644 --- a/tools/sdk/esp32/ld/sections.ld +++ b/tools/sdk/esp32/ld/sections.ld @@ -322,7 +322,7 @@ SECTIONS *libesp_system.a:esp_system.*(.literal.esp_system_abort .text.esp_system_abort) *libesp_system.a:ubsan.*(.literal .literal.* .text .text.*) *libfreertos.a:(EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .literal EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .literal.* EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .text EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .text.*) - *libfreertos.a:port.*(.literal.pxPortInitialiseStack .literal.unlikely.vPortEndScheduler .literal.vApplicationStackOverflowHook .literal.vPortAssertIfInISR .literal.vPortEnterCritical .literal.vPortExitCritical .literal.vPortReleaseTaskMPUSettings .literal.vPortSetStackWatchpoint .literal.vPortYieldOtherCore .literal.xPortInIsrContext .literal.xPortStartScheduler .text .text.pxPortInitialiseStack .text.unlikely.vPortEndScheduler .text.vApplicationStackOverflowHook .text.vPortAssertIfInISR .text.vPortEnterCritical .text.vPortExitCritical .text.vPortReleaseTaskMPUSettings .text.vPortSetStackWatchpoint .text.vPortStoreTaskMPUSettings .text.vPortYieldOtherCore .text.xPortGetTickRateHz .text.xPortInIsrContext .text.xPortStartScheduler) + *libfreertos.a:port.*(.literal.pxPortInitialiseStack .literal.unlikely.vPortEndScheduler .literal.vApplicationStackOverflowHook .literal.vPortAssertIfInISR .literal.vPortExitCritical .literal.vPortExitCriticalCompliance .literal.vPortReleaseTaskMPUSettings .literal.vPortSetStackWatchpoint .literal.vPortYieldOtherCore .literal.xPortEnterCriticalTimeout .literal.xPortEnterCriticalTimeoutCompliance .literal.xPortInIsrContext .literal.xPortStartScheduler .text .text.pxPortInitialiseStack .text.unlikely.vPortEndScheduler .text.vApplicationStackOverflowHook .text.vPortAssertIfInISR .text.vPortExitCritical .text.vPortExitCriticalCompliance .text.vPortReleaseTaskMPUSettings .text.vPortSetStackWatchpoint .text.vPortStoreTaskMPUSettings .text.vPortYieldOtherCore .text.xPortEnterCriticalTimeout .text.xPortEnterCriticalTimeoutCompliance .text.xPortGetTickRateHz .text.xPortInIsrContext .text.xPortStartScheduler) *libfreertos.a:port_common.*(.literal.esp_startup_start_app_common .literal.vApplicationGetIdleTaskMemory .literal.vApplicationGetTimerTaskMemory .literal.xPortCheckValidTCBMem .literal.xPortcheckValidStackMem .text .text.esp_startup_start_app_common .text.vApplicationGetIdleTaskMemory .text.vApplicationGetTimerTaskMemory .text.xPortCheckValidTCBMem .text.xPortcheckValidStackMem) *libgcc.a:lib2funcs.*(.literal .literal.* .text .text.*) *libgcov.a:(.literal .literal.* .text .text.*) diff --git a/tools/sdk/esp32/lib/libapp_trace.a b/tools/sdk/esp32/lib/libapp_trace.a index 82fe311aaa5..148e16886d3 100644 Binary files a/tools/sdk/esp32/lib/libapp_trace.a and b/tools/sdk/esp32/lib/libapp_trace.a differ diff --git a/tools/sdk/esp32/lib/libapp_update.a b/tools/sdk/esp32/lib/libapp_update.a index 7abf88d4dc1..a17117e3b5a 100644 Binary files a/tools/sdk/esp32/lib/libapp_update.a and b/tools/sdk/esp32/lib/libapp_update.a differ diff --git a/tools/sdk/esp32/lib/libasio.a b/tools/sdk/esp32/lib/libasio.a index 807ad3cc985..62911b4fa6e 100644 Binary files a/tools/sdk/esp32/lib/libasio.a and b/tools/sdk/esp32/lib/libasio.a differ diff --git a/tools/sdk/esp32/lib/libbootloader_support.a b/tools/sdk/esp32/lib/libbootloader_support.a index 66d5c8d7185..c94a3429142 100644 Binary files a/tools/sdk/esp32/lib/libbootloader_support.a and b/tools/sdk/esp32/lib/libbootloader_support.a differ diff --git a/tools/sdk/esp32/lib/libbt.a b/tools/sdk/esp32/lib/libbt.a index b3c4c0bde4b..7f819f94986 100644 Binary files a/tools/sdk/esp32/lib/libbt.a and b/tools/sdk/esp32/lib/libbt.a differ diff --git a/tools/sdk/esp32/lib/libbutton.a b/tools/sdk/esp32/lib/libbutton.a index d591f4767c1..9c64e6bcda2 100644 Binary files a/tools/sdk/esp32/lib/libbutton.a and b/tools/sdk/esp32/lib/libbutton.a differ diff --git a/tools/sdk/esp32/lib/libcoap.a b/tools/sdk/esp32/lib/libcoap.a index 3efe42c09f2..577c42f675b 100644 Binary files a/tools/sdk/esp32/lib/libcoap.a and b/tools/sdk/esp32/lib/libcoap.a differ diff --git a/tools/sdk/esp32/lib/libcoexist.a b/tools/sdk/esp32/lib/libcoexist.a index c646358914a..e264552b613 100644 Binary files a/tools/sdk/esp32/lib/libcoexist.a and b/tools/sdk/esp32/lib/libcoexist.a differ diff --git a/tools/sdk/esp32/lib/libcore.a b/tools/sdk/esp32/lib/libcore.a index 34fa3951f34..ff041c7699d 100644 Binary files a/tools/sdk/esp32/lib/libcore.a and b/tools/sdk/esp32/lib/libcore.a differ diff --git a/tools/sdk/esp32/lib/libcxx.a b/tools/sdk/esp32/lib/libcxx.a index df11dcaffa5..cea577ffba2 100644 Binary files a/tools/sdk/esp32/lib/libcxx.a and b/tools/sdk/esp32/lib/libcxx.a differ diff --git a/tools/sdk/esp32/lib/libdriver.a b/tools/sdk/esp32/lib/libdriver.a index a3c796cb407..86d3a749119 100644 Binary files a/tools/sdk/esp32/lib/libdriver.a and b/tools/sdk/esp32/lib/libdriver.a differ diff --git a/tools/sdk/esp32/lib/libefuse.a b/tools/sdk/esp32/lib/libefuse.a index 788b4c410ec..cc38c1b835d 100644 Binary files a/tools/sdk/esp32/lib/libefuse.a and b/tools/sdk/esp32/lib/libefuse.a differ diff --git a/tools/sdk/esp32/lib/libesp-tls.a b/tools/sdk/esp32/lib/libesp-tls.a index 16d8e4d3207..47011e74b98 100644 Binary files a/tools/sdk/esp32/lib/libesp-tls.a and b/tools/sdk/esp32/lib/libesp-tls.a differ diff --git a/tools/sdk/esp32/lib/libesp32-camera.a b/tools/sdk/esp32/lib/libesp32-camera.a index cc341da1540..186ff1de743 100644 Binary files a/tools/sdk/esp32/lib/libesp32-camera.a and b/tools/sdk/esp32/lib/libesp32-camera.a differ diff --git a/tools/sdk/esp32/lib/libesp_common.a b/tools/sdk/esp32/lib/libesp_common.a index e2725c09600..bf9014aa2ff 100644 Binary files a/tools/sdk/esp32/lib/libesp_common.a and b/tools/sdk/esp32/lib/libesp_common.a differ diff --git a/tools/sdk/esp32/lib/libesp_eth.a b/tools/sdk/esp32/lib/libesp_eth.a index 87b24e3be81..73e5ab542d8 100644 Binary files a/tools/sdk/esp32/lib/libesp_eth.a and b/tools/sdk/esp32/lib/libesp_eth.a differ diff --git a/tools/sdk/esp32/lib/libesp_event.a b/tools/sdk/esp32/lib/libesp_event.a index e679e9e07c6..6887ef71156 100644 Binary files a/tools/sdk/esp32/lib/libesp_event.a and b/tools/sdk/esp32/lib/libesp_event.a differ diff --git a/tools/sdk/esp32/lib/libesp_hid.a b/tools/sdk/esp32/lib/libesp_hid.a index f9cf117e5b8..43a36ad8280 100644 Binary files a/tools/sdk/esp32/lib/libesp_hid.a and b/tools/sdk/esp32/lib/libesp_hid.a differ diff --git a/tools/sdk/esp32/lib/libesp_http_client.a b/tools/sdk/esp32/lib/libesp_http_client.a index 63a0333df10..85d98c486d1 100644 Binary files a/tools/sdk/esp32/lib/libesp_http_client.a and b/tools/sdk/esp32/lib/libesp_http_client.a differ diff --git a/tools/sdk/esp32/lib/libesp_http_server.a b/tools/sdk/esp32/lib/libesp_http_server.a index 7d344fa196b..e004e4f4ad2 100644 Binary files a/tools/sdk/esp32/lib/libesp_http_server.a and b/tools/sdk/esp32/lib/libesp_http_server.a differ diff --git a/tools/sdk/esp32/lib/libesp_https_ota.a b/tools/sdk/esp32/lib/libesp_https_ota.a index 9419e08692f..91c7a1edcd8 100644 Binary files a/tools/sdk/esp32/lib/libesp_https_ota.a and b/tools/sdk/esp32/lib/libesp_https_ota.a differ diff --git a/tools/sdk/esp32/lib/libesp_hw_support.a b/tools/sdk/esp32/lib/libesp_hw_support.a index 9e4728d96aa..199a74d0543 100644 Binary files a/tools/sdk/esp32/lib/libesp_hw_support.a and b/tools/sdk/esp32/lib/libesp_hw_support.a differ diff --git a/tools/sdk/esp32/lib/libesp_ipc.a b/tools/sdk/esp32/lib/libesp_ipc.a index e25be09dab2..ced6b39cf53 100644 Binary files a/tools/sdk/esp32/lib/libesp_ipc.a and b/tools/sdk/esp32/lib/libesp_ipc.a differ diff --git a/tools/sdk/esp32/lib/libesp_lcd.a b/tools/sdk/esp32/lib/libesp_lcd.a index 1eecfe717b1..5e7ade52bf6 100644 Binary files a/tools/sdk/esp32/lib/libesp_lcd.a and b/tools/sdk/esp32/lib/libesp_lcd.a differ diff --git a/tools/sdk/esp32/lib/libesp_littlefs.a b/tools/sdk/esp32/lib/libesp_littlefs.a index a1ed361f03c..596e551e9b5 100644 Binary files a/tools/sdk/esp32/lib/libesp_littlefs.a and b/tools/sdk/esp32/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32/lib/libesp_netif.a b/tools/sdk/esp32/lib/libesp_netif.a index 46e2e54eca0..189978f19c8 100644 Binary files a/tools/sdk/esp32/lib/libesp_netif.a and b/tools/sdk/esp32/lib/libesp_netif.a differ diff --git a/tools/sdk/esp32/lib/libesp_phy.a b/tools/sdk/esp32/lib/libesp_phy.a index 2e8cc46a5b0..438d0c001d2 100644 Binary files a/tools/sdk/esp32/lib/libesp_phy.a and b/tools/sdk/esp32/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32/lib/libesp_pm.a b/tools/sdk/esp32/lib/libesp_pm.a index bf7f72b924e..411672cd44b 100644 Binary files a/tools/sdk/esp32/lib/libesp_pm.a and b/tools/sdk/esp32/lib/libesp_pm.a differ diff --git a/tools/sdk/esp32/lib/libesp_rainmaker.a b/tools/sdk/esp32/lib/libesp_rainmaker.a index 9a6eec8e703..cc0c1d16456 100644 Binary files a/tools/sdk/esp32/lib/libesp_rainmaker.a and b/tools/sdk/esp32/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32/lib/libesp_ringbuf.a b/tools/sdk/esp32/lib/libesp_ringbuf.a index 25fbaef5c1d..7d52bcc2570 100644 Binary files a/tools/sdk/esp32/lib/libesp_ringbuf.a and b/tools/sdk/esp32/lib/libesp_ringbuf.a differ diff --git a/tools/sdk/esp32/lib/libesp_serial_slave_link.a b/tools/sdk/esp32/lib/libesp_serial_slave_link.a index 99344b7dfe3..082a41ac404 100644 Binary files a/tools/sdk/esp32/lib/libesp_serial_slave_link.a and b/tools/sdk/esp32/lib/libesp_serial_slave_link.a differ diff --git a/tools/sdk/esp32/lib/libesp_system.a b/tools/sdk/esp32/lib/libesp_system.a index 48f13abbc45..ffefbac7751 100644 Binary files a/tools/sdk/esp32/lib/libesp_system.a and b/tools/sdk/esp32/lib/libesp_system.a differ diff --git a/tools/sdk/esp32/lib/libesp_timer.a b/tools/sdk/esp32/lib/libesp_timer.a index ffb82989345..8182f0920b6 100644 Binary files a/tools/sdk/esp32/lib/libesp_timer.a and b/tools/sdk/esp32/lib/libesp_timer.a differ diff --git a/tools/sdk/esp32/lib/libesp_websocket_client.a b/tools/sdk/esp32/lib/libesp_websocket_client.a index 598a4e69aa1..7b9c9295e86 100644 Binary files a/tools/sdk/esp32/lib/libesp_websocket_client.a and b/tools/sdk/esp32/lib/libesp_websocket_client.a differ diff --git a/tools/sdk/esp32/lib/libesp_wifi.a b/tools/sdk/esp32/lib/libesp_wifi.a index 46ba3f405e3..d1175bbaa61 100644 Binary files a/tools/sdk/esp32/lib/libesp_wifi.a and b/tools/sdk/esp32/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32/lib/libespcoredump.a b/tools/sdk/esp32/lib/libespcoredump.a index 6c875e744cc..8e6bff5b97e 100644 Binary files a/tools/sdk/esp32/lib/libespcoredump.a and b/tools/sdk/esp32/lib/libespcoredump.a differ diff --git a/tools/sdk/esp32/lib/libespnow.a b/tools/sdk/esp32/lib/libespnow.a index 23b681bbcb2..6b059b57334 100644 Binary files a/tools/sdk/esp32/lib/libespnow.a and b/tools/sdk/esp32/lib/libespnow.a differ diff --git a/tools/sdk/esp32/lib/libfatfs.a b/tools/sdk/esp32/lib/libfatfs.a index fc7edde31a2..a3d4d23e72c 100644 Binary files a/tools/sdk/esp32/lib/libfatfs.a and b/tools/sdk/esp32/lib/libfatfs.a differ diff --git a/tools/sdk/esp32/lib/libfreemodbus.a b/tools/sdk/esp32/lib/libfreemodbus.a index f1714df153c..6179afed0b4 100644 Binary files a/tools/sdk/esp32/lib/libfreemodbus.a and b/tools/sdk/esp32/lib/libfreemodbus.a differ diff --git a/tools/sdk/esp32/lib/libfreertos.a b/tools/sdk/esp32/lib/libfreertos.a index 6520f2f6a31..ab471d6d58d 100644 Binary files a/tools/sdk/esp32/lib/libfreertos.a and b/tools/sdk/esp32/lib/libfreertos.a differ diff --git a/tools/sdk/esp32/lib/libhal.a b/tools/sdk/esp32/lib/libhal.a index 8e314fda6be..29c32dc7249 100644 Binary files a/tools/sdk/esp32/lib/libhal.a and b/tools/sdk/esp32/lib/libhal.a differ diff --git a/tools/sdk/esp32/lib/libheap.a b/tools/sdk/esp32/lib/libheap.a index b9847b519a9..cfe17cb2c24 100644 Binary files a/tools/sdk/esp32/lib/libheap.a and b/tools/sdk/esp32/lib/libheap.a differ diff --git a/tools/sdk/esp32/lib/liblog.a b/tools/sdk/esp32/lib/liblog.a index cb739cdca02..88fdc988177 100644 Binary files a/tools/sdk/esp32/lib/liblog.a and b/tools/sdk/esp32/lib/liblog.a differ diff --git a/tools/sdk/esp32/lib/liblwip.a b/tools/sdk/esp32/lib/liblwip.a index 3d7a8c89f30..15636acadb5 100644 Binary files a/tools/sdk/esp32/lib/liblwip.a and b/tools/sdk/esp32/lib/liblwip.a differ diff --git a/tools/sdk/esp32/lib/libmbedcrypto.a b/tools/sdk/esp32/lib/libmbedcrypto.a index 4fe7b4ea4ef..eb815d40b37 100644 Binary files a/tools/sdk/esp32/lib/libmbedcrypto.a and b/tools/sdk/esp32/lib/libmbedcrypto.a differ diff --git a/tools/sdk/esp32/lib/libmdns.a b/tools/sdk/esp32/lib/libmdns.a index 9dc7e446dc6..3da44bdf276 100644 Binary files a/tools/sdk/esp32/lib/libmdns.a and b/tools/sdk/esp32/lib/libmdns.a differ diff --git a/tools/sdk/esp32/lib/libmesh.a b/tools/sdk/esp32/lib/libmesh.a index 2996463b120..6316c346889 100644 Binary files a/tools/sdk/esp32/lib/libmesh.a and b/tools/sdk/esp32/lib/libmesh.a differ diff --git a/tools/sdk/esp32/lib/libmqtt.a b/tools/sdk/esp32/lib/libmqtt.a index b77ab9fead7..003a9f65a1f 100644 Binary files a/tools/sdk/esp32/lib/libmqtt.a and b/tools/sdk/esp32/lib/libmqtt.a differ diff --git a/tools/sdk/esp32/lib/libnet80211.a b/tools/sdk/esp32/lib/libnet80211.a index 35fab3d86d7..a3720ee9f58 100644 Binary files a/tools/sdk/esp32/lib/libnet80211.a and b/tools/sdk/esp32/lib/libnet80211.a differ diff --git a/tools/sdk/esp32/lib/libnewlib.a b/tools/sdk/esp32/lib/libnewlib.a index ffce18c5d3a..9b8f2a12373 100644 Binary files a/tools/sdk/esp32/lib/libnewlib.a and b/tools/sdk/esp32/lib/libnewlib.a differ diff --git a/tools/sdk/esp32/lib/libpp.a b/tools/sdk/esp32/lib/libpp.a index ebb3f20319d..56c3c8a99a9 100644 Binary files a/tools/sdk/esp32/lib/libpp.a and b/tools/sdk/esp32/lib/libpp.a differ diff --git a/tools/sdk/esp32/lib/libprotocomm.a b/tools/sdk/esp32/lib/libprotocomm.a index ed64a147566..58c3bc21e83 100644 Binary files a/tools/sdk/esp32/lib/libprotocomm.a and b/tools/sdk/esp32/lib/libprotocomm.a differ diff --git a/tools/sdk/esp32/lib/libpthread.a b/tools/sdk/esp32/lib/libpthread.a index 0550271ef82..6b0507564d5 100644 Binary files a/tools/sdk/esp32/lib/libpthread.a and b/tools/sdk/esp32/lib/libpthread.a differ diff --git a/tools/sdk/esp32/lib/libsdmmc.a b/tools/sdk/esp32/lib/libsdmmc.a index dacaa253c53..d15d743f3fe 100644 Binary files a/tools/sdk/esp32/lib/libsdmmc.a and b/tools/sdk/esp32/lib/libsdmmc.a differ diff --git a/tools/sdk/esp32/lib/libsmartconfig.a b/tools/sdk/esp32/lib/libsmartconfig.a index 20cd2c1b880..3fa3d0b2119 100644 Binary files a/tools/sdk/esp32/lib/libsmartconfig.a and b/tools/sdk/esp32/lib/libsmartconfig.a differ diff --git a/tools/sdk/esp32/lib/libspi_flash.a b/tools/sdk/esp32/lib/libspi_flash.a index 327b5504104..26be7244e85 100644 Binary files a/tools/sdk/esp32/lib/libspi_flash.a and b/tools/sdk/esp32/lib/libspi_flash.a differ diff --git a/tools/sdk/esp32/lib/libspiffs.a b/tools/sdk/esp32/lib/libspiffs.a index f051e41a910..cdcfe9ef7d7 100644 Binary files a/tools/sdk/esp32/lib/libspiffs.a and b/tools/sdk/esp32/lib/libspiffs.a differ diff --git a/tools/sdk/esp32/lib/libtcp_transport.a b/tools/sdk/esp32/lib/libtcp_transport.a index a7f123de2ca..c194e2ab0c8 100644 Binary files a/tools/sdk/esp32/lib/libtcp_transport.a and b/tools/sdk/esp32/lib/libtcp_transport.a differ diff --git a/tools/sdk/esp32/lib/libtcpip_adapter.a b/tools/sdk/esp32/lib/libtcpip_adapter.a index 2f696aefeea..4dc14d4b148 100644 Binary files a/tools/sdk/esp32/lib/libtcpip_adapter.a and b/tools/sdk/esp32/lib/libtcpip_adapter.a differ diff --git a/tools/sdk/esp32/lib/libvfs.a b/tools/sdk/esp32/lib/libvfs.a index 3fe30c8b9b8..b45487e710d 100644 Binary files a/tools/sdk/esp32/lib/libvfs.a and b/tools/sdk/esp32/lib/libvfs.a differ diff --git a/tools/sdk/esp32/lib/libwapi.a b/tools/sdk/esp32/lib/libwapi.a index 2ee4b914e46..88f106bf99c 100644 Binary files a/tools/sdk/esp32/lib/libwapi.a and b/tools/sdk/esp32/lib/libwapi.a differ diff --git a/tools/sdk/esp32/lib/libwifi_provisioning.a b/tools/sdk/esp32/lib/libwifi_provisioning.a index 3f4e8956b04..4dde5382266 100644 Binary files a/tools/sdk/esp32/lib/libwifi_provisioning.a and b/tools/sdk/esp32/lib/libwifi_provisioning.a differ diff --git a/tools/sdk/esp32/lib/libwpa_supplicant.a b/tools/sdk/esp32/lib/libwpa_supplicant.a index b8ef0555949..364019779c4 100644 Binary files a/tools/sdk/esp32/lib/libwpa_supplicant.a and b/tools/sdk/esp32/lib/libwpa_supplicant.a differ diff --git a/tools/sdk/esp32/lib/libxtensa.a b/tools/sdk/esp32/lib/libxtensa.a index 33f5cd9ad49..e632b5d01c1 100644 Binary files a/tools/sdk/esp32/lib/libxtensa.a and b/tools/sdk/esp32/lib/libxtensa.a differ diff --git a/tools/sdk/esp32/sdkconfig b/tools/sdk/esp32/sdkconfig index f2b58c3c28f..00535a1125f 100644 --- a/tools/sdk/esp32/sdkconfig +++ b/tools/sdk/esp32/sdkconfig @@ -816,6 +816,7 @@ CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 # CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # end of Wi-Fi # diff --git a/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin b/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin index fab20f1e4ae..43c0ae0dbe6 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin b/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin index 77ff47eff01..b45224a6717 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin b/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin index 019833db136..295483bda5e 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin b/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin index 163c933bf7e..0dc8cd77d92 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin b/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin index 9ce756cc786..68436175ca9 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin b/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin index b0b2c663c17..f00c99359c6 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin b/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin index cfee2de0241..2c937b5ebc9 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin and b/tools/sdk/esp32c3/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin b/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin index 9969fd07bca..de08fd6a52c 100644 Binary files a/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin and b/tools/sdk/esp32c3/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/esp32c3/include/app_trace/include/esp_app_trace_util.h b/tools/sdk/esp32c3/include/app_trace/include/esp_app_trace_util.h index 0ee501b27fa..96595c69827 100644 --- a/tools/sdk/esp32c3/include/app_trace/include/esp_app_trace_util.h +++ b/tools/sdk/esp32c3/include/app_trace/include/esp_app_trace_util.h @@ -68,7 +68,7 @@ typedef struct { */ static inline void esp_apptrace_lock_init(esp_apptrace_lock_t *lock) { - vPortCPUInitializeMutex(&lock->mux); + portMUX_INITIALIZE(&lock->mux); lock->int_state = 0; } diff --git a/tools/sdk/esp32c3/include/config/sdkconfig.h b/tools/sdk/esp32c3/include/config/sdkconfig.h index 7191bda7946..5a1722d2c3a 100644 --- a/tools/sdk/esp32c3/include/config/sdkconfig.h +++ b/tools/sdk/esp32c3/include/config/sdkconfig.h @@ -261,6 +261,7 @@ #define CONFIG_ESP_WIFI_FTM_ENABLE 1 #define CONFIG_ESP_WIFI_FTM_INITIATOR_SUPPORT 1 #define CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT 1 +#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1 #define CONFIG_ESP_COREDUMP_ENABLE_TO_NONE 1 #define CONFIG_FATFS_CODEPAGE_437 1 #define CONFIG_FATFS_CODEPAGE 437 @@ -629,5 +630,5 @@ #define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE -#define CONFIG_ARDUINO_IDF_COMMIT "ddc44956bf" +#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32c3/include/esp-face/include/image/dl_image.hpp b/tools/sdk/esp32c3/include/esp-face/include/image/dl_image.hpp index 4a974df063a..8e8a4df705b 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/image/dl_image.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/image/dl_image.hpp @@ -48,6 +48,15 @@ namespace dl output[2] = input & 0xF8; // red } + /** + * @brief Convert RGB565 image to RGB888 image. + * + * @param image ptr of RGB565 image + * @param image_shape shape of the input image + * @return Tensor* output RGB88 image + */ + Tensor *convert_image_rgb565_to_rgb888(uint16_t *image, std::vector &image_shape); + /** * @brief Convert RGB565 pixel to Gray. * @@ -435,5 +444,48 @@ namespace dl */ Tensor *rgb2hsv(Tensor &image, bool bgr = false, bool fast = true); + /** + * @brief resize an image to the target shape. + * + * @param image the input image Tensor + * @param target_shape the target shape of the resized image. + * @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST + * @return Tensor* the pointer of the resized image Tensor + */ + Tensor *resize_image(Tensor &image, std::vector target_shape, resize_type_t resize_type); + + /** + * @brief resize an image to the target shape. + * + * @param image the input image Tensor + * @param resized_image the resized image Tensor + * @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST + */ + void resize_image(Tensor &image, Tensor &resized_image, resize_type_t resize_type); + + /** + * @brief resize an image to the target shape with nearest method. + * + * @tparam T + * @param image the pointer of the input image + * @param input_shape the input shape of the image + * @param target_shape the target shape of the resized image + * @return T* the pointer of the resized image + */ + template + T *resize_image_nearest(T *image, std::vector input_shape, std::vector target_shape); + + /** + * @brief resize an image to the target shape with nearest method. + * + * @tparam T + * @param image the pointer of the input image + * @param input_shape the input shape of the image + * @param resized_image the pointer of the resized image + * @param target_shape the target shape of the resized image + */ + template + void resize_image_nearest(T *image, std::vector input_shape, T *resized_image, std::vector target_shape); + } // namespace image } // namespace dl diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp index 8a9aaa8dfbe..57c7fb64a9a 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp @@ -57,10 +57,10 @@ namespace dl const char *name = "AvgPool2D") : Layer(name), output_exponent(output_exponent), filter_shape(filter_shape), - padding_type(padding_type), - padding(padding), stride_y(stride_y), stride_x(stride_x), + padding_type(padding_type), + padding(padding), output_shape({}) { this->output = new Tensor; diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp index a59bed183fb..c5b5bf02dfc 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp @@ -36,7 +36,10 @@ namespace dl * false: the output will store to a separate memory */ ExpandDims(std::vector axis, const char *name = "ExpandDims", bool inplace = false) : Layer(name), - axis(axis), inplace(inplace), output_shape({}) + output_shape({}), + axis(axis), + output(NULL), + inplace(inplace) { } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp index 70ae483a07f..3d96fa1f042 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp @@ -32,7 +32,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), inplace(inplace), output_shape({}) + Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), output(NULL), inplace(inplace), output_shape({}) {} /** diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max_pool2d.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max_pool2d.hpp index 629aa87f515..7c7fc69fa71 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max_pool2d.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max_pool2d.hpp @@ -53,10 +53,10 @@ namespace dl const int stride_x = 1, const char *name = "MaxPool2D") : Layer(name), filter_shape(filter_shape), - padding_type(padding_type), - padding(padding), stride_y(stride_y), stride_x(stride_x), + padding_type(padding_type), + padding(padding), output_shape({}) { this->output = new Tensor; diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp index 7dd29d4a178..1a7a40c5856 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp @@ -18,7 +18,7 @@ namespace dl * - int8_t: stands for operation in int8_t quantize */ template - class ReLU : public Layer + class Relu : public Layer { private: Tensor *output; /**/ @@ -33,7 +33,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - ReLU(const char *name = "ReLU", bool inplace = false) : Layer(name), + Relu(const char *name = "Relu", bool inplace = false) : Layer(name), output(NULL), inplace(inplace), output_shape({}) { } @@ -42,7 +42,7 @@ namespace dl * @brief Destroy the ReLU object * */ - ~ReLU() + ~Relu() { if ((!this->inplace) && (this->output != NULL)) { diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp index 3f2ed72b6e0..d800c17fa71 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp @@ -35,7 +35,9 @@ namespace dl * false: the output will store to a separate memory */ Reshape(std::vector shape, const char *name = "Reshape", bool inplace = false) : Layer(name), - output_shape(shape), inplace(inplace) + output(NULL), + inplace(inplace), + output_shape(shape) { } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp index cee92f22764..7e692aa1cd8 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp @@ -35,7 +35,11 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name), axis(axis), inplace(inplace), output_shape({}) + Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name), + output(NULL), + inplace(inplace), + axis(axis), + output_shape({}) { } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp index da03b4aad85..47f39c5674a 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp @@ -38,7 +38,11 @@ namespace dl * false: the output will store to a separate memory */ Sub2D(const int output_exponent, const Activation *activation = NULL, const char *name = "Sub2D", bool inplace = false) : Layer(name), - output_exponent(output_exponent), activation(activation), output(NULL), inplace(inplace), output_shape({}) + output_exponent(output_exponent), + activation(activation), + output(NULL), + inplace(inplace), + output_shape({}) { } diff --git a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp index d89ba8daed5..dab9addf678 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp @@ -33,7 +33,11 @@ namespace dl * @param inplace true: the output will store to input * false: the output will store to a separate memory */ - Transpose(std::vector perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name), perm(perm), inplace(inplace), output_shape({}) + Transpose(std::vector perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name), + output(NULL), + inplace(inplace), + perm(perm), + output_shape({}) { } diff --git a/tools/sdk/esp32c3/include/esp-face/include/model_zoo/color_detector.hpp b/tools/sdk/esp32c3/include/esp-face/include/model_zoo/color_detector.hpp index 063ab20b34a..f79f98c0fd2 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/model_zoo/color_detector.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/model_zoo/color_detector.hpp @@ -7,46 +7,143 @@ typedef struct int area; /*!< Area of connected domains >*/ std::vector center; /**/ std::vector box; /**/ -} components_stats_t; +} color_detect_result_t; + +typedef struct +{ + std::vector start_col; + std::vector end_col; + std::vector row; + std::vector index; + std::vector area; +} color_segment_result_t; + +typedef struct +{ + std::vector color_thresh; /*!< threshold of colors, The threshold of each color is composed of 6 numbers >*/ + int area_thresh; /*!< the area threshold of each color, + the area that is smaller than the threshold is filtered >*/ + std::string name; /*!*/ +} color_info_t; class ColorDetector { private: - std::vector> results; /*!< detection results >*/ - -public: - std::vector> color_thresh; /*!< threshold of colors, The threshold of each color is composed of 6 numbers >*/ - std::vector area_thresh; /*!< the area threshold of each color, - the area that is smaller than the threshold is filtered >*/ - bool bgr; /*!< true: the input image is in BGR format + std::vector> detection_results; /*!< detection results >*/ + std::vector segmentation_results; /*!< segmentation results >*/ + std::vector registered_colors; /*!< the infomation of registered colors >*/ + std::vector color_thresh_offset; /*!< HSV offset of the registered colors>*/ + std::vector detection_shape; /*!< the inference shape of images, the input image will be resized to this shape. + if the shape == {}, the input image will not be resized >*/ + bool bgr; /*!< true: the input image is in BGR format false: the input image is in RGB format >*/ + int id_nums; /*!< the number of registered colors in history>*/ + float h_ratio; + float w_ratio; + void color_detection_forward(dl::Tensor &bin, int area_thresh); +public: /** * @brief get the color threshold of rectangular region in the image * - * @param image the input image + * @param image the input image in RGB888 format. * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] * @return std::vector the threshold. */ std::vector cal_color_thresh(dl::Tensor &image, std::vector box); + /** + * @brief get the color threshold of rectangular region in the image + * + * @param input the ptr of RGB565 image. + * @param input_shape shape of the input image. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @return std::vector the threshold. + */ + std::vector cal_color_thresh(uint16_t *input, std::vector input_shape, std::vector box); + + /** + * @brief register a new color to the color detector + * + * @param image the input image in RGB888 format. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(dl::Tensor &image, std::vector box, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief register a new color to the color detector + * + * @param input the ptr of RGB565 image. + * @param input_shape shape of the input image. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(uint16_t *input, std::vector input_shape, std::vector box, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief register a new color to the color detector + * + * @param color_thresh the color threshold + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(std::vector color_thresh, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief delete a registered color + * + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int delete_color(int id = -1); + + /** + * @brief delete a registered color + * + * @param color_name name of the registered_color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int delete_color(std::string color_name); + + /** + * @brief delete all the registered colors + * + */ + void clear_color(); + /** * @brief detect the colors based on the color thresholds * * @param image the input image. - * @return std::vector>& detection result. + * @return std::vector>& detection result. + */ + std::vector> &detect(dl::Tensor &image, std::vector color_ids = {}); + + /** + * @brief + * + * @param input + * @param input_shape + * @return std::vector>& */ - std::vector> &detect(dl::Tensor &image); + std::vector> &detect(uint16_t *input_shape, std::vector shape, std::vector color_ids = {}); /** * @brief Construct a new Color Detector object * - * @param color_thresh threshold of colors, The threshold of each color is composed of 6 numbers - * @param area_thresh the area threshold of each color,the area that is smaller than the threshold is filtered + * @param color_thresh_offset HSV offset of the registered colors> + * @param detection_shape the inference shape of images, the input image will be resized to this shape * @param bgr true: the input image is in BGR format * false: the input image is in RGB format */ - ColorDetector(std::vector> color_thresh, std::vector area_thresh, bool bgr = false) : color_thresh(color_thresh), area_thresh(area_thresh), bgr(bgr) + ColorDetector(std::vector color_thresh_offset = {}, std::vector detection_shape = {}, bool bgr = true) : color_thresh_offset(color_thresh_offset), + detection_shape(detection_shape), bgr(bgr), id_nums(0) { } @@ -57,12 +154,213 @@ class ColorDetector ~ColorDetector() {} /** - * @brief Get the results object + * @brief Get the detection results object + * + * @return std::vector>& the detection result. + */ + std::vector> &get_detection_results() + { + return this->detection_results; + } + + /** + * @brief Get the segmentation results object * - * @return std::vector>& the detection result. + * @return std::vector& the segmentation result. */ - std::vector> &get_results() + std::vector &get_segmentation_results() { - return this->results; + return this->segmentation_results; } + + /** + * @brief Get the registered colors object + * + * @return std::vector the information of resgistered colors + */ + std::vector get_registered_colors() + { + return this->registered_colors; + } + + /** + * @brief Set the color thresh offset object + * + * @param color_thresh_offset the offset of color thresh for registered colors + * @return ColorDetector& + */ + ColorDetector &set_color_thresh_offset(std::vector color_thresh_offset) + { + assert(color_thresh_offset.size() == 3); + this->color_thresh_offset = color_thresh_offset; + return *this; + } + + /** + * @brief Get the color thresh offset object + * + * @return std::vector color_thresh_offset + */ + std::vector get_color_thresh_offset() + { + return this->color_thresh_offset; + } + + /** + * @brief Set the area thresh object + * + * @param area_thresh the area thresh for each registered colors + * @return ColorDetector& + */ + ColorDetector &set_area_thresh(std::vector area_thresh) + { + assert((area_thresh.size() == this->registered_colors.size()) || (area_thresh.size() == 1)); + if (area_thresh.size() == 1) + { + for (int i = 0; i < this->registered_colors.size(); ++i) + { + this->registered_colors[i].area_thresh = area_thresh[0]; + } + } + else + { + for (int i = 0; i < this->registered_colors.size(); ++i) + { + this->registered_colors[i].area_thresh = area_thresh[i]; + } + } + return *this; + } + + /** + * @brief Set the area thresh object + * + * @param area_thresh the area thresh for each registered colors + * @param id index of the registered color + * @return ColorDetector& + */ + ColorDetector &set_area_thresh(int area_thresh, int id) + { + assert((id >= 0) && (id < this->registered_colors.size())); + this->registered_colors[id].area_thresh = area_thresh; + return *this; + } + + /** + * @brief Set the bgr object + * + * @param bgr + * @return ColorDetector& + */ + ColorDetector &set_bgr(bool bgr) + { + this->bgr = bgr; + return *this; + } + + /** + * @brief Get the bgr object + * + * @return bool bgr flag + */ + bool get_bgr() + { + return this->bgr; + } + + /** + * @brief Get the detection shape object + * + * @return std::vector + */ + std::vector get_detection_shape() + { + return this->detection_shape; + } + + /** + * @brief Set the detection shape object + * + * @param detection_shape the inference shape of images, the input image will be resized to this shape + * @return ColorDetector& + */ + ColorDetector &set_detection_shape(std::vector detection_shape) + { + assert(detection_shape.size() == 3); + this->detection_shape = detection_shape; + return *this; + } + + /** + * @brief Get the registered colors num + * + * @return int the registered colors num + */ + int get_registered_colors_num() + { + return this->registered_colors.size(); + } + + /** + * @brief print the detection detection results + * + * @param tag + */ + void print_detection_results(const char *tag = "RGB") + { + printf("\n%s | color detection result:\n", tag); + for (int i = 0; i < this->detection_results.size(); ++i) + { + printf("color %d: detected box :%d\n", i, this->detection_results[i].size()); + for (int j = 0; j < this->detection_results[i].size(); ++j) + { + printf("center: (%d, %d)\n", this->detection_results[i][j].center[0], this->detection_results[i][j].center[1]); + printf("box: (%d, %d), (%d, %d)\n", this->detection_results[i][j].box[0], this->detection_results[i][j].box[1], this->detection_results[i][j].box[2], this->detection_results[i][j].box[3]); + printf("area: %d\n", this->detection_results[i][j].area); + } + printf("\n"); + } + } + + /** + * @brief print the segmentation results + * + * @param tag + */ + void print_segmentation_results(const char *tag = "RGB") + { + printf("\n%s | color segmentation result:\n", tag); + for (int i = 0; i < this->segmentation_results.size(); ++i) + { + printf("color %d: detected box :%d\n", i, this->detection_results[i].size()); + for (int j = 0; j < this->segmentation_results[i].index.size(); ++j) + { + printf("box_index: %d, start col: %d, end col: %d, row: %d, area: %d\n", + this->segmentation_results[i].index[j], this->segmentation_results[i].start_col[j], this->segmentation_results[i].end_col[j], + this->segmentation_results[i].row[j], this->segmentation_results[i].area[j]); + } + printf("\n"); + } + } + + /** + * @brief draw the color segmentation result on the input image + * + * @param image the input RGB image + * @param draw_colors RGB values for each detected colors + * @param draw_backgound draw the background if it is true + * @param background_color RGB values for the background color + */ + void draw_segmentation_results(dl::Tensor &image, std::vector> draw_colors, bool draw_backgound = true, std::vector background_color = {0, 0, 0}); + + /** + * @brief draw the color segmentation result on the input image + * + * @param image the pointer of the input RGB565 image + * @param image_shape the shape of the input image + * @param draw_colors RGB565 values for each detected colors + * @param draw_backgound draw the background if it is true + * @param background_color RGB565 values for the background color + */ + void draw_segmentation_results(uint16_t *image, std::vector image_shape, std::vector draw_colors, bool draw_backgound = true, uint16_t background_color = 0x0000); }; \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognition_tool.hpp b/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognition_tool.hpp index 2226d32daf9..3adf1f62f72 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognition_tool.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognition_tool.hpp @@ -10,6 +10,7 @@ #include #include #include +#include "esp_partition.h" /** * @brief struct of face similarity @@ -45,6 +46,13 @@ class FaceID */ FaceID(int id, dl::Tensor &id_emb, std::string name = ""); + /** + * @brief Construct a new Face ID which is same as input face_id + * + * @param face_id input face_id + */ + FaceID(FaceID &face_id); + /** * @brief Destroy the Face ID object * diff --git a/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognizer.hpp b/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognizer.hpp index 864881c984a..0f6b854118b 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognizer.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/model_zoo/face_recognizer.hpp @@ -148,7 +148,7 @@ class FaceRecognizer * @param name name of the face id. * @return int the face id index of the enrolled embedding. */ - int enroll_id(uint16_t *image_input, std::vector shape, std::vector &landmarks, std::string name=""); + int enroll_id(uint16_t *image_input, std::vector shape, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -158,9 +158,11 @@ class FaceRecognizer * @param aligned_face the Tensor to store the intermeidate aligned face. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(uint16_t *image_input, std::vector shape, Tensor &aligned_face, std::vector &landmarks, std::string name=""); + int enroll_id(uint16_t *image_input, std::vector shape, Tensor &aligned_face, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -168,9 +170,11 @@ class FaceRecognizer * @param image_input the Tensor of input image with format bgr888. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &image_input, std::vector &landmarks, std::string name=""); + int enroll_id(Tensor &image_input, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -179,42 +183,114 @@ class FaceRecognizer * @param aligned_face the Tensor to store the intermeidate aligned face. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &image_input, Tensor &aligned_face, std::vector &landmarks, std::string name=""); + int enroll_id(Tensor &image_input, Tensor &aligned_face, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id * * @param aligned_face the Tensor of the input aligned face with format bgr888. * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &aligned_face, std::string name=""); + int enroll_id(Tensor &aligned_face, std::string name="", bool update_flash = false); /** * @brief enroll the normalzied face embedding. * - * @param emb the normalized face embbeding. - * @param name name of the face id. - * @return int the face id index of the enrolled embedding. + * @param emb the normalized face embbeding. + * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash + * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &emb, std::string name=""); + int enroll_id(Tensor &emb, std::string name="", bool update_flash = false); /** - * @brief delete the last enrolled face id. + * @brief delete the last enrolled face id. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash * * @return int the number of remained face ids. * if the face ids list is empty, return -1 */ - int delete_id(); + int delete_id(bool update_flash = false); /** - * @brief delete the face id with id index. + * @brief delete the face id with id index. * - * @param id face id index. - * @return int the number of remained face ids. - * if there is no matched id return -1 + * @param id face id index. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * @return int the number of remained face ids. + * if there is no matched id return -1 + */ + int delete_id(int id, bool update_flash = false); + + /** + * @brief Set the enrolled ids + * + * @param ids the ids to be set + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * @return int the number of enrolled ids. + */ + int set_ids(std::vector *> &ids, bool update_flash = false); + + /** + * @brief Set the enrolled ids from flash + * + * @return int the number of enrolled ids. + */ + int set_ids_from_flash(); + + /** + * @brief write the enrolled ids to flash + * + * @return int the number of enrolled ids. */ - int delete_id(int id); + int write_ids_to_flash(); + + /** + * @brief Get the enrolled ids with name object + * + * @param name + * @return std::vector + */ + std::vector get_enrolled_ids_with_name(std::string name); + + /** + * @brief Check whether the Flash partition is available + * + * @return int -2: the partition has not been set + * -1: the data in the flash does not match the current model. + * model_check_code: the Flash partition is available. + * number of ids in flash: The IDs in Flash and RAM does not sync. + */ + int check_partition(); + + /** + * @brief delete all the enrolled face ids. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * + */ + void clear_id(bool update_flash = false); + + /** + * @brief Set the partition for saving face ids to flash or reading face ids from flash. + * + * @param type esp_partition_type + * @param subtype esp_partition_subtype + * @param label the partition label + * @return int 0: set the partition failed + * 1: set the partition successfully + */ + int set_partition(esp_partition_type_t type, esp_partition_subtype_t subtype, const char *label); + }; \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_constant.hpp b/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_constant.hpp index 07b2dd24ee1..a111817e3d6 100644 --- a/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_constant.hpp +++ b/tools/sdk/esp32c3/include/esp-face/include/typedef/dl_constant.hpp @@ -2,6 +2,7 @@ #include "dl_define.hpp" #include +#include namespace dl { @@ -48,10 +49,11 @@ namespace dl /**/ std::vector shape_with_dilation; /**/ /**/ - std::vector channel_exponent; /**/ + const int8_t* channel_exponent; /**/ + const int channel_exponent_size; /** - * @brief Construct a new Filter object. + * @brief Construct a new Filter object. * * @param element point to element * @param exponent exponent of element @@ -66,16 +68,17 @@ namespace dl Filter(const T *element, const int exponent, const std::vector shape, const std::vector dilation = {1, 1}); /** - * @brief Construct a new Filter object. + * @brief Construct a new Filter object. it is only avaliable to int16_t * - * @param element point to element - * @param channel_exponent exponent for per-channel - * @param shape shape of element - * @param dilation dilation of Filter - * - 1D: reserved - * - 2D: [dilation_in_height, dilation_in_width] + * @param element point to element + * @param channel_exponent exponent for per-channel + * @param channel_exponent_size size of exponent + * @param shape shape of element + * @param dilation dilation of Filter + * - 1D: reserved + * - 2D: [dilation_in_height, dilation_in_width] */ - Filter(const T *element, const std::vector channel_exponent, const std::vector shape, const std::vector dilation = {1, 1}); + Filter(const T *element, const int8_t* channel_exponent, const int channel_exponent_size, const std::vector shape, const std::vector dilation = {1, 1}); /** * @brief Print the n-th filter. @@ -98,9 +101,6 @@ namespace dl { public: using Constant::Constant; - std::vector channel_exponent; /**/ - - Bias(const T *element, const std::vector channel_exponent, const std::vector shape); }; /** diff --git a/tools/sdk/esp32c3/include/esp_http_client/include/esp_http_client.h b/tools/sdk/esp32c3/include/esp_http_client/include/esp_http_client.h index 820c4168f66..d1b530a42e3 100644 --- a/tools/sdk/esp32c3/include/esp_http_client/include/esp_http_client.h +++ b/tools/sdk/esp32c3/include/esp_http_client/include/esp_http_client.h @@ -344,6 +344,17 @@ esp_err_t esp_http_client_set_password(esp_http_client_handle_t client, const ch */ esp_err_t esp_http_client_set_authtype(esp_http_client_handle_t client, esp_http_client_auth_type_t auth_type); +/** + * @brief Get HTTP client session errno + * + * @param[in] client The esp_http_client handle + * + * @return + * - (-1) if invalid argument + * - errno + */ +int esp_http_client_get_errno(esp_http_client_handle_t client); + /** * @brief Set http request method * diff --git a/tools/sdk/esp32c3/include/esp_hw_support/include/soc/spinlock.h b/tools/sdk/esp32c3/include/esp_hw_support/include/soc/spinlock.h index 97cc9e514ab..fbeff5054b4 100644 --- a/tools/sdk/esp32c3/include/esp_hw_support/include/soc/spinlock.h +++ b/tools/sdk/esp32c3/include/esp_hw_support/include/soc/spinlock.h @@ -52,6 +52,15 @@ static inline void __attribute__((always_inline)) spinlock_initialize(spinlock_t /** * @brief Top level spinlock acquire function, spins until get the lock + * + * This function will: + * - Save current interrupt state, then disable interrupts + * - Spin until lock is acquired or until timeout occurs + * - Restore interrupt state + * + * @note Spinlocks alone do no constitute true critical sections (as this + * function reenables interrupts once the spinlock is acquired). For critical + * sections, use the interface provided by the operating system. * @param lock - target spinlock object * @param timeout - cycles to wait, passing SPINLOCK_WAIT_FOREVER blocs indefinitely */ @@ -125,6 +134,15 @@ static inline bool __attribute__((always_inline)) spinlock_acquire(spinlock_t *l /** * @brief Top level spinlock unlock function, unlocks a previously locked spinlock + * + * This function will: + * - Save current interrupt state, then disable interrupts + * - Release the spinlock + * - Restore interrupt state + * + * @note Spinlocks alone do no constitute true critical sections (as this + * function reenables interrupts once the spinlock is acquired). For critical + * sections, use the interface provided by the operating system. * @param lock - target, locked before, spinlock object */ static inline void __attribute__((always_inline)) spinlock_release(spinlock_t *lock) diff --git a/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_commands.h b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_commands.h new file mode 100644 index 00000000000..091ef1cffef --- /dev/null +++ b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_commands.h @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +/* Common LCD panel commands */ +#define LCD_CMD_NOP 0x00 // This command is empty command +#define LCD_CMD_SWRESET 0x01 // Software reset registers (the built-in frame buffer is not affected) +#define LCD_CMD_RDDID 0x04 // Read 24-bit display ID +#define LCD_CMD_RDDST 0x09 // Read display status +#define LCD_CMD_RDDPM 0x0A // Read display power mode +#define LCD_CMD_RDD_MADCTL 0x0B // Read display MADCTL +#define LCD_CMD_RDD_COLMOD 0x0C // Read display pixel format +#define LCD_CMD_RDDIM 0x0D // Read display image mode +#define LCD_CMD_RDDSM 0x0E // Read display signal mode +#define LCD_CMD_RDDSR 0x0F // Read display self-diagnostic result +#define LCD_CMD_SLPIN 0x10 // Go into sleep mode (DC/DC, oscillator, scanning stopped, but memory keeps content) +#define LCD_CMD_SLPOUT 0x11 // Exit sleep mode +#define LCD_CMD_PTLON 0x12 // Turns on partial display mode +#define LCD_CMD_NORON 0x13 // Turns on normal display mode +#define LCD_CMD_INVOFF 0x20 // Recover from display inversion mode +#define LCD_CMD_INVON 0x21 // Go into display inversion mode +#define LCD_CMD_GAMSET 0x26 // Select Gamma curve for current display +#define LCD_CMD_DISPOFF 0x28 // Display off (disable frame buffer output) +#define LCD_CMD_DISPON 0x29 // Display on (enable frame buffer output) +#define LCD_CMD_CASET 0x2A // Set column address +#define LCD_CMD_RASET 0x2B // Set row address +#define LCD_CMD_RAMWR 0x2C // Write frame memory +#define LCD_CMD_RAMRD 0x2E // Read frame memory +#define LCD_CMD_PTLAR 0x30 // Define the partial area +#define LCD_CMD_VSCRDEF 0x33 // Vertical scrolling definition +#define LCD_CMD_TEOFF 0x34 // Turns of tearing effect +#define LCD_CMD_TEON 0x35 // Turns on tearing effect + +#define LCD_CMD_MADCTL 0x36 // Memory data access control +#define LCD_CMD_MH_BIT (1 << 2) // Display data latch order, 0: refresh left to right, 1: refresh right to left +#define LCD_CMD_BGR_BIT (1 << 3) // RGB/BGR order, 0: RGB, 1: BGR +#define LCD_CMD_ML_BIT (1 << 4) // Line address order, 0: refresh top to bottom, 1: refresh bottom to top +#define LCD_CMD_MV_BIT (1 << 5) // Row/Column order, 0: normal mode, 1: reverse mode +#define LCD_CMD_MX_BIT (1 << 6) // Column address order, 0: left to right, 1: right to left +#define LCD_CMD_MY_BIT (1 << 7) // Row address order, 0: top to bottom, 1: bottom to top + +#define LCD_CMD_VSCSAD 0x37 // Vertical scroll start address +#define LCD_CMD_IDMOFF 0x38 // Recover from IDLE mode +#define LCD_CMD_IDMON 0x39 // Fall into IDLE mode (8 color depth is displayed) +#define LCD_CMD_COLMOD 0x3A // Defines the format of RGB picture data +#define LCD_CMD_RAMWRC 0x3C // Memory write continue +#define LCD_CMD_RAMRDC 0x3E // Memory read continue +#define LCD_CMD_STE 0x44 // Set tear scanline, tearing effect output signal when display module reaches line N +#define LCD_CMD_GDCAN 0x45 // Get scanline +#define LCD_CMD_WRDISBV 0x51 // Write display brightness +#define LCD_CMD_RDDISBV 0x52 // Read display brightness value diff --git a/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_rgb.h b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_rgb.h index 1368bb787f6..0c264545ee2 100644 --- a/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_rgb.h +++ b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_rgb.h @@ -18,10 +18,10 @@ extern "C" { #if SOC_LCD_RGB_SUPPORTED /** * @brief LCD RGB timing structure - * + * @verbatim * Total Width * <---------------------------------------------------> - * Hsync width HBP Active Width HFP + * HSYNC width HBP Active Width HFP * <---><--><--------------------------------------><---> * ____ ____|_______________________________________|____| * |___| | | | @@ -36,7 +36,7 @@ extern "C" { * | /|\ | | / / / / / / / / / / / / / / / / / / / | | * | | | |/ / / / / / / / / / / / / / / / / / / /| | * Total | | | |/ / / / / / / / / / / / / / / / / / / /| | - * Heigh | | | |/ / / / / / / / / / / / / / / / / / / /| | + * Height | | | |/ / / / / / / / / / / / / / / / / / / /| | * |Active| | |/ / / / / / / / / / / / / / / / / / / /| | * |Heigh | | |/ / / / / / Active Display Area / / / /| | * | | | |/ / / / / / / / / / / / / / / / / / / /| | @@ -48,7 +48,7 @@ extern "C" { * | /|\ | | * | VFP | | | * \|/ \|/_____|______________________________________________________| - * + * @endverbatim */ typedef struct { unsigned int pclk_hz; /*!< Frequency of pixel clock */ @@ -65,7 +65,7 @@ typedef struct { unsigned int vsync_idle_low: 1; /*!< The vsync signal is low in IDLE state */ unsigned int de_idle_high: 1; /*!< The de signal is high in IDLE state */ unsigned int pclk_active_neg: 1; /*!< The display will write data lines when there's a falling edge on PCLK */ - unsigned int pclk_idle_low: 1; /*!< The PCLK stays at low level in IDLE phase */ + unsigned int pclk_idle_high: 1; /*!< The PCLK stays at high level in IDLE phase */ } flags; } esp_lcd_rgb_timing_t; diff --git a/tools/sdk/esp32c3/include/esp_netif/include/esp_netif_defaults.h b/tools/sdk/esp32c3/include/esp_netif/include/esp_netif_defaults.h index da01500db1c..b8276068e9a 100644 --- a/tools/sdk/esp32c3/include/esp_netif/include/esp_netif_defaults.h +++ b/tools/sdk/esp32c3/include/esp_netif/include/esp_netif_defaults.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ESP_NETIF_DEFAULTS_H #define _ESP_NETIF_DEFAULTS_H @@ -37,6 +29,7 @@ extern "C" { .route_prio = 100 \ } \ +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT #define ESP_NETIF_INHERENT_DEFAULT_WIFI_AP() \ { \ .flags = (esp_netif_flags_t)(ESP_NETIF_DHCP_SERVER | ESP_NETIF_FLAG_AUTOUP), \ @@ -48,6 +41,7 @@ extern "C" { .if_desc = "ap", \ .route_prio = 10 \ }; +#endif #define ESP_NETIF_INHERENT_DEFAULT_ETH() \ { \ @@ -108,6 +102,7 @@ extern "C" { .stack = ESP_NETIF_NETSTACK_DEFAULT_ETH, \ } +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT /** * @brief Default configuration reference of WIFI AP */ @@ -117,6 +112,7 @@ extern "C" { .driver = NULL, \ .stack = ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP, \ } +#endif /** * @brief Default configuration reference of WIFI STA @@ -154,10 +150,12 @@ extern "C" { */ #define ESP_NETIF_BASE_DEFAULT_WIFI_STA &_g_esp_netif_inherent_sta_config +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT /** * @brief Default base config (esp-netif inherent) of WIFI AP */ #define ESP_NETIF_BASE_DEFAULT_WIFI_AP &_g_esp_netif_inherent_ap_config +#endif /** * @brief Default base config (esp-netif inherent) of ethernet interface @@ -177,7 +175,9 @@ extern "C" { #define ESP_NETIF_NETSTACK_DEFAULT_ETH _g_esp_netif_netstack_default_eth #define ESP_NETIF_NETSTACK_DEFAULT_WIFI_STA _g_esp_netif_netstack_default_wifi_sta +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT #define ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP _g_esp_netif_netstack_default_wifi_ap +#endif #define ESP_NETIF_NETSTACK_DEFAULT_PPP _g_esp_netif_netstack_default_ppp #define ESP_NETIF_NETSTACK_DEFAULT_SLIP _g_esp_netif_netstack_default_slip #define ESP_NETIF_NETSTACK_DEFAULT_OPENTHREAD _g_esp_netif_netstack_default_openthread @@ -190,7 +190,9 @@ extern "C" { // extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_eth; extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_sta; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_ap; +#endif extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_ppp; extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_slip; @@ -200,12 +202,16 @@ extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_slip; // common behavioural patterns for common interfaces such as STA, AP, ETH, PPP // extern const esp_netif_inherent_config_t _g_esp_netif_inherent_sta_config; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ap_config; +#endif extern const esp_netif_inherent_config_t _g_esp_netif_inherent_eth_config; extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ppp_config; extern const esp_netif_inherent_config_t _g_esp_netif_inherent_slip_config; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_ip_info_t _g_esp_netif_soft_ap_ip; +#endif #if CONFIG_OPENTHREAD_ENABLED /** diff --git a/tools/sdk/esp32c3/include/esp_wifi/include/esp_private/wifi_os_adapter.h b/tools/sdk/esp32c3/include/esp_wifi/include/esp_private/wifi_os_adapter.h index b583e916267..88d0ee54029 100644 --- a/tools/sdk/esp32c3/include/esp_wifi/include/esp_private/wifi_os_adapter.h +++ b/tools/sdk/esp32c3/include/esp_wifi/include/esp_private/wifi_os_adapter.h @@ -1,16 +1,8 @@ -// Copyright 2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef ESP_WIFI_OS_ADAPTER_H_ #define ESP_WIFI_OS_ADAPTER_H_ diff --git a/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi.h b/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi.h index 51e03234841..2d671591765 100644 --- a/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi.h +++ b/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* Notes about WiFi Programming @@ -275,7 +267,7 @@ esp_err_t esp_wifi_deinit(void); * @brief Set the WiFi operating mode * * Set the WiFi operating mode as station, soft-AP or station+soft-AP, - * The default mode is soft-AP mode. + * The default mode is station mode. * * @param mode WiFi operating mode * diff --git a/tools/sdk/esp32c3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h b/tools/sdk/esp32c3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h index 675af141ebc..aa87e1b4db2 100644 --- a/tools/sdk/esp32c3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h +++ b/tools/sdk/esp32c3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h @@ -166,10 +166,19 @@ #define configSTACK_OVERHEAD_APPTRACE 0 #endif +/* Stack watchpoint decreases minimum usable stack size by up to 60 bytes. + See FreeRTOS FREERTOS_WATCHPOINT_END_OF_STACK option in Kconfig. */ +#if CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK +#define configSTACK_OVERHEAD_WATCHPOINT 60 +#else +#define configSTACK_OVERHEAD_WATCHPOINT 0 +#endif + #define configSTACK_OVERHEAD_TOTAL ( \ configSTACK_OVERHEAD_CHECKER + \ configSTACK_OVERHEAD_OPTIMIZATION + \ - configSTACK_OVERHEAD_APPTRACE \ + configSTACK_OVERHEAD_APPTRACE + \ + configSTACK_OVERHEAD_WATCHPOINT \ ) #define configMINIMAL_STACK_SIZE (768 + configSTACK_OVERHEAD_TOTAL) diff --git a/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro.h b/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro.h index 1cc0fb4e25f..e053e8219a5 100644 --- a/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro.h +++ b/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro.h @@ -162,69 +162,19 @@ BaseType_t xPortInterruptedFromISRContext(void); typedef struct { uint32_t owner; uint32_t count; -#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG - const char *lastLockedFn; - int lastLockedLine; -#endif } portMUX_TYPE; /**< Spinlock initializer */ -#ifndef CONFIG_FREERTOS_PORTMUX_DEBUG -#define portMUX_INITIALIZER_UNLOCKED { \ - .owner = portMUX_FREE_VAL, \ - .count = 0, \ - } -#else -#define portMUX_INITIALIZER_UNLOCKED { \ +#define portMUX_INITIALIZER_UNLOCKED { \ .owner = portMUX_FREE_VAL, \ .count = 0, \ - .lastLockedFn = "(never locked)", \ - .lastLockedLine = -1 \ } -#endif /* CONFIG_FREERTOS_PORTMUX_DEBUG */ -#define portMUX_FREE_VAL SPINLOCK_FREE /**< Spinlock is free. [refactor-todo] check if this is still required */ -#define portMUX_NO_TIMEOUT SPINLOCK_WAIT_FOREVER /**< When passed for 'timeout_cycles', spin forever if necessary. [refactor-todo] check if this is still required */ -#define portMUX_TRY_LOCK SPINLOCK_NO_WAIT /**< Try to acquire the spinlock a single time only. [refactor-todo] check if this is still required */ - -/** - * @brief Initialize a spinlock - * - * - Initializes a spinlock that is used by FreeRTOS SMP critical sections - * - * @note [refactor-todo] We can make this inline or consider making it a macro - * @param[in] mux Spinlock - */ -void vPortCPUInitializeMutex(portMUX_TYPE *mux); - -/** - * @brief Acquire a spinlock - * - * @note [refactor-todo] check if we still need this - * @note [refactor-todo] Check if this should be inlined - * @param[in] mux Spinlock - */ -void vPortCPUAcquireMutex(portMUX_TYPE *mux); - -/** - * @brief Acquire a spinlock but with a specified timeout - * - * @note [refactor-todo] Check if we still need this - * @note [refactor-todo] Check if this should be inlined - * @note [refactor-todo] Check if this function should be renamed (due to bool return type) - * @param[in] mux Spinlock - * @param[in] timeout Timeout in number of CPU cycles - * @return true Spinlock acquired - * @return false Timed out - */ -bool vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout_cycles); - -/** - * @brief Release a spinlock - * - * @note [refactor-todo] check if we still need this - * @note [refactor-todo] Check if this should be inlined - * @param[in] mux Spinlock - */ -void vPortCPUReleaseMutex(portMUX_TYPE *mux); +#define portMUX_FREE_VAL SPINLOCK_FREE /**< Spinlock is free. [refactor-todo] check if this is still required */ +#define portMUX_NO_TIMEOUT SPINLOCK_WAIT_FOREVER /**< When passed for 'timeout_cycles', spin forever if necessary. [refactor-todo] check if this is still required */ +#define portMUX_TRY_LOCK SPINLOCK_NO_WAIT /**< Try to acquire the spinlock a single time only. [refactor-todo] check if this is still required */ +#define portMUX_INITIALIZE(mux) ({ \ + (mux)->owner = portMUX_FREE_VAL; \ + (mux)->count = 0; \ +}) /** * @brief Wrapper for atomic compare-and-set instruction @@ -398,11 +348,19 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void) // ------------------ Critical Sections -------------------- -#define portENTER_CRITICAL(mux) {(void)mux; vPortEnterCritical();} -#define portEXIT_CRITICAL(mux) {(void)mux; vPortExitCritical();} +#define portENTER_CRITICAL(mux) {(void)mux; vPortEnterCritical();} +#define portEXIT_CRITICAL(mux) {(void)mux; vPortExitCritical();} +#define portTRY_ENTER_CRITICAL(mux, timeout) ({ \ + (void)mux; (void)timeout; \ + vPortEnterCritical(); \ + BaseType_t ret = pdPASS; \ + ret; \ +}) //In single-core RISC-V, we can use the same critical section API -#define portENTER_CRITICAL_ISR(mux) portENTER_CRITICAL(mux) -#define portEXIT_CRITICAL_ISR(mux) portEXIT_CRITICAL(mux) +#define portENTER_CRITICAL_ISR(mux) portENTER_CRITICAL(mux) +#define portEXIT_CRITICAL_ISR(mux) portEXIT_CRITICAL(mux) +#define portTRY_ENTER_CRITICAL_ISR(mux, timeout) portTRY_ENTER_CRITICAL(mux, timeout) + /* [refactor-todo] on RISC-V, both ISR and non-ISR cases result in the same call. We can redefine this macro */ #define portENTER_CRITICAL_SAFE(mux) ({ \ if (xPortInIsrContext()) { \ @@ -418,6 +376,7 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void) portEXIT_CRITICAL(mux); \ } \ }) +#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) portENTER_CRITICAL_SAFE(mux, timeout) // ---------------------- Yielding ------------------------- diff --git a/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro_deprecated.h b/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro_deprecated.h index 4f0e3fe1d99..597d99c3330 100644 --- a/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro_deprecated.h +++ b/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/portmacro_deprecated.h @@ -32,3 +32,63 @@ static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseTyp { portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level); } + +/* ---------------------- Spinlocks --------------------- */ + +/** + * @brief Deprecated placed holder function to initialize a spinlock + * + * Currently does nothing. + * + * @deprecated This function is deprecated. If on multi-core, use spinlock_initialize() instead + * @param[in] mux Spinlock + */ +static inline void __attribute__((deprecated)) __attribute__((always_inline)) vPortCPUInitializeMutex(portMUX_TYPE *mux) +{ + (void)mux; +} + +/** + * @brief Deprecated placed holder function to acquire a spinlock + * + * Currently does nothing. + * + * @deprecated This function is deprecated. If on multi-core, use spinlock_acquire() instead + * @param[in] mux Spinlock + */ +static inline void __attribute__((deprecated)) __attribute__((always_inline)) vPortCPUAcquireMutex(portMUX_TYPE *mux) +{ + (void)mux; +} + +/** + * @brief Deprecated placed holder function to acquire a spinlock but with a specified timeout + * + * Currently just returns true + * + * @deprecated This function is deprecated. If on multi-core, use spinlock_acquire() instead + * @note Does not have deprecated attribute due to usage in app_trace_util.c + * @param[in] mux Spinlock + * @param[in] timeout Timeout in number of CPU cycles + * @return true Always returns true + */ +static inline bool __attribute__((always_inline)) vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout_cycles) +{ + (void)mux; + (void)timeout_cycles; + return true; +} + +/** + * @brief Deprecated placed holder function to release a spinlock + * + * Currently does nothing. + * + * @deprecated This function is deprecated. If on multi-core, use spinlock_release() instead + * @note Does not have deprecated attribute due to usage in app_trace_util.c + * @param[in] mux Spinlock + */ +static inline void __attribute__((always_inline)) vPortCPUReleaseMutex(portMUX_TYPE *mux) +{ + (void)mux; +} diff --git a/tools/sdk/esp32c3/include/hal/include/hal/lcd_types.h b/tools/sdk/esp32c3/include/hal/include/hal/lcd_types.h index 01e6d0c2949..1a62d8f8eb4 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/lcd_types.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/lcd_types.h @@ -13,12 +13,17 @@ extern "C" { /** * @brief LCD clock source * @note User should select the clock source based on the real requirement: - * - * | LCD clock source | Features | Power Management | - * |---------------------|--------------------------|----------------------------| - * | LCD_CLK_SRC_PLL160M | High resolution, fixed | ESP_PM_APB_FREQ_MAX lock | - * | LCD_CLK_SRC_APLL | Configurable resolution | ESP_PM_NO_LIGHT_SLEEP lock | - * | LCD_CLK_SRC_XTAL | Medium resolution, fixed | No PM lock | + * @verbatim embed:rst:leading-asterisk + * +---------------------+-------------------------+----------------------------+ + * | LCD clock source | Features | Power Management | + * +=====================+=========================+============================+ + * | LCD_CLK_SRC_PLL160M | High resolution | ESP_PM_APB_FREQ_MAX lock | + * +---------------------+-------------------------+----------------------------+ + * | LCD_CLK_SRC_APLL | Configurable resolution | ESP_PM_NO_LIGHT_SLEEP lock | + * +---------------------+-------------------------+----------------------------+ + * | LCD_CLK_SRC_XTAL | Medium resolution | No PM lock | + * +---------------------+-------------------------+----------------------------+ + * @endverbatim */ typedef enum { LCD_CLK_SRC_PLL160M, /*!< Select PLL160M as the source clock */ diff --git a/tools/sdk/esp32c3/include/idf_test/include/esp32s2/idf_performance_target.h b/tools/sdk/esp32c3/include/idf_test/include/esp32s2/idf_performance_target.h index f37c2a9e00f..dc8a060f54b 100644 --- a/tools/sdk/esp32c3/include/idf_test/include/esp32s2/idf_performance_target.h +++ b/tools/sdk/esp32c3/include/idf_test/include/esp32s2/idf_performance_target.h @@ -1,16 +1,8 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/tools/sdk/esp32c3/include/idf_test/include/esp32s3/idf_performance_target.h b/tools/sdk/esp32c3/include/idf_test/include/esp32s3/idf_performance_target.h index 62f996fc658..b744cda8fa0 100644 --- a/tools/sdk/esp32c3/include/idf_test/include/esp32s3/idf_performance_target.h +++ b/tools/sdk/esp32c3/include/idf_test/include/esp32s3/idf_performance_target.h @@ -1,23 +1,15 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #define IDF_PERFORMANCE_MIN_AES_CBC_THROUGHPUT_MBSEC 43 // SHA256 hardware throughput at 240MHz, threshold set lower than worst case -#define IDF_PERFORMANCE_MIN_SHA256_THROUGHPUT_MBSEC 19.8 +#define IDF_PERFORMANCE_MIN_SHA256_THROUGHPUT_MBSEC 90 // esp_sha() time to process 32KB of input data from RAM #define IDF_PERFORMANCE_MAX_TIME_SHA1_32KB 1000 #define IDF_PERFORMANCE_MAX_TIME_SHA512_32KB 900 diff --git a/tools/sdk/esp32c3/include/idf_test/include/idf_performance.h b/tools/sdk/esp32c3/include/idf_test/include/idf_performance.h index 9d99070b953..b558feb4ca3 100644 --- a/tools/sdk/esp32c3/include/idf_test/include/idf_performance.h +++ b/tools/sdk/esp32c3/include/idf_test/include/idf_performance.h @@ -8,7 +8,7 @@ */ #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP -#define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP 200 +#define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP 250 #endif #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM #define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM 300 diff --git a/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/bignum.h b/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/bignum.h index a317c456060..4f84bed7407 100644 --- a/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/bignum.h +++ b/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/bignum.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #include_next "mbedtls/bignum.h" @@ -77,4 +69,31 @@ void esp_mpi_release_hardware(void); */ int esp_mpi_mul_mpi_mod(mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi *Y, const mbedtls_mpi *M); +#if CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + +/** + * @brief Perform a sliding-window exponentiation: X = A^E mod N + * + * @param X The destination MPI. This must point to an initialized MPI. + * @param A The base of the exponentiation. + * This must point to an initialized MPI. + * @param E The exponent MPI. This must point to an initialized MPI. + * @param N The base for the modular reduction. This must point to an + * initialized MPI. + * @param _RR A helper MPI depending solely on \p N which can be used to + * speed-up multiple modular exponentiations for the same value + * of \p N. This may be \c NULL. If it is not \c NULL, it must + * point to an initialized MPI. + * + * @return \c 0 if successful. + * @return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed. + * @return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \c N is negative or + * even, or if \c E is negative. + * @return Another negative error code on different kinds of failures. + * + */ +int mbedtls_mpi_exp_mod_soft(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR); + +#endif // CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + #endif // CONFIG_MBEDTLS_HARDWARE_MPI diff --git a/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/esp_config.h b/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/esp_config.h index f36ebf9bc75..9c63118eb57 100644 --- a/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/esp_config.h +++ b/tools/sdk/esp32c3/include/mbedtls/port/include/mbedtls/esp_config.h @@ -153,15 +153,22 @@ #undef MBEDTLS_MD5_ALT #endif -/* The following MPI (bignum) functions have ESP32 hardware support. - For exponential mod, both software and hardware implementation - will be compiled. If CONFIG_MBEDTLS_HARDWARE_MPI is enabled, mod APIs - will be wrapped to use hardware implementation. -*/ -#undef MBEDTLS_MPI_EXP_MOD_ALT +/* The following MPI (bignum) functions have hardware support. + * Uncommenting these macros will use the hardware-accelerated + * implementations. + */ #ifdef CONFIG_MBEDTLS_HARDWARE_MPI +#ifdef CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + /* Prefer hardware and fallback to software */ + #define MBEDTLS_MPI_EXP_MOD_ALT_FALLBACK +#else + /* Hardware only mode */ + #define MBEDTLS_MPI_EXP_MOD_ALT +#endif #define MBEDTLS_MPI_MUL_MPI_ALT #else +#undef MBEDTLS_MPI_EXP_MOD_ALT_FALLBACK +#undef MBEDTLS_MPI_EXP_MOD_ALT #undef MBEDTLS_MPI_MUL_MPI_ALT #endif diff --git a/tools/sdk/esp32c3/include/vfs/include/esp_vfs.h b/tools/sdk/esp32c3/include/vfs/include/esp_vfs.h index 2bc8c77fd2b..0498a3aa59b 100644 --- a/tools/sdk/esp32c3/include/vfs/include/esp_vfs.h +++ b/tools/sdk/esp32c3/include/vfs/include/esp_vfs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __ESP_VFS_H__ #define __ESP_VFS_H__ @@ -410,7 +402,8 @@ int esp_vfs_utime(const char *path, const struct utimbuf *times); * @param timeout If not NULL, then points to timeval structure which * specifies the time period after which the functions should * time-out and return. If it is NULL, then the function will - * not time-out. + * not time-out. Note that the timeout period is rounded up to + * the system tick and incremented by one. * * @return The number of descriptors set in the descriptor sets, or -1 * when an error (specified by errno) have occurred. diff --git a/tools/sdk/esp32c3/ld/libbtbb.a b/tools/sdk/esp32c3/ld/libbtbb.a index d10f306e5eb..8d30c9c167c 100644 Binary files a/tools/sdk/esp32c3/ld/libbtbb.a and b/tools/sdk/esp32c3/ld/libbtbb.a differ diff --git a/tools/sdk/esp32c3/ld/libcat_face_detect.a b/tools/sdk/esp32c3/ld/libcat_face_detect.a index 863bfe33d24..f8ca0cf2050 100644 Binary files a/tools/sdk/esp32c3/ld/libcat_face_detect.a and b/tools/sdk/esp32c3/ld/libcat_face_detect.a differ diff --git a/tools/sdk/esp32c3/ld/libcolor_detect.a b/tools/sdk/esp32c3/ld/libcolor_detect.a index 003fa239d6b..fe39eef8665 100644 Binary files a/tools/sdk/esp32c3/ld/libcolor_detect.a and b/tools/sdk/esp32c3/ld/libcolor_detect.a differ diff --git a/tools/sdk/esp32c3/ld/libdl.a b/tools/sdk/esp32c3/ld/libdl.a index 338f67096a2..2bfb232c32d 100644 Binary files a/tools/sdk/esp32c3/ld/libdl.a and b/tools/sdk/esp32c3/ld/libdl.a differ diff --git a/tools/sdk/esp32c3/ld/libhuman_face_detect.a b/tools/sdk/esp32c3/ld/libhuman_face_detect.a index 10e66b66293..a2968f9ea81 100644 Binary files a/tools/sdk/esp32c3/ld/libhuman_face_detect.a and b/tools/sdk/esp32c3/ld/libhuman_face_detect.a differ diff --git a/tools/sdk/esp32c3/ld/libmfn.a b/tools/sdk/esp32c3/ld/libmfn.a index 6c7b7179470..c976fa2a6be 100644 Binary files a/tools/sdk/esp32c3/ld/libmfn.a and b/tools/sdk/esp32c3/ld/libmfn.a differ diff --git a/tools/sdk/esp32c3/ld/libphy.a b/tools/sdk/esp32c3/ld/libphy.a index 25da8562b61..7f13bfbe5ed 100644 Binary files a/tools/sdk/esp32c3/ld/libphy.a and b/tools/sdk/esp32c3/ld/libphy.a differ diff --git a/tools/sdk/esp32c3/ld/sections.ld b/tools/sdk/esp32c3/ld/sections.ld index 76b32625036..2925ee3ad56 100644 --- a/tools/sdk/esp32c3/ld/sections.ld +++ b/tools/sdk/esp32c3/ld/sections.ld @@ -163,7 +163,7 @@ SECTIONS *libesp_system.a:esp_system.*(.literal.esp_system_abort .text.esp_system_abort) *libesp_system.a:ubsan.*(.literal .literal.* .text .text.*) *libfreertos.a:(EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .literal EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .literal.* EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .text EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .text.*) - *libfreertos.a:port.*(.text .text.prvTaskExitError .text.pxPortInitialiseStack .text.unlikely.vPortEndScheduler .text.vApplicationStackOverflowHook .text.vPortCPUAcquireMutex .text.vPortCPUAcquireMutexTimeout .text.vPortCPUInitializeMutex .text.vPortCPUReleaseMutex .text.vPortClearInterruptMask .text.vPortEnterCritical .text.vPortExitCritical .text.vPortSetInterruptMask .text.vPortSetStackWatchpoint .text.vPortYield .text.vPortYieldFromISR .text.vPortYieldOtherCore .text.xPortGetTickRateHz .text.xPortInIsrContext .text.xPortStartScheduler) + *libfreertos.a:port.*(.text .text.prvTaskExitError .text.pxPortInitialiseStack .text.unlikely.vPortEndScheduler .text.vApplicationStackOverflowHook .text.vPortClearInterruptMask .text.vPortEnterCritical .text.vPortExitCritical .text.vPortSetInterruptMask .text.vPortSetStackWatchpoint .text.vPortYield .text.vPortYieldFromISR .text.vPortYieldOtherCore .text.xPortGetTickRateHz .text.xPortInIsrContext .text.xPortStartScheduler) *libfreertos.a:port_common.*(.text .text.esp_startup_start_app_common .text.vApplicationGetIdleTaskMemory .text.vApplicationGetTimerTaskMemory .text.xPortCheckValidTCBMem .text.xPortcheckValidStackMem) *libgcc.a:_divsf3.*(.literal .literal.* .text .text.*) *libgcc.a:lib2funcs.*(.literal .literal.* .text .text.*) diff --git a/tools/sdk/esp32c3/lib/libapp_trace.a b/tools/sdk/esp32c3/lib/libapp_trace.a index b4e40929946..79a3016141f 100644 Binary files a/tools/sdk/esp32c3/lib/libapp_trace.a and b/tools/sdk/esp32c3/lib/libapp_trace.a differ diff --git a/tools/sdk/esp32c3/lib/libapp_update.a b/tools/sdk/esp32c3/lib/libapp_update.a index d80f7569955..e8ba38ee6d3 100644 Binary files a/tools/sdk/esp32c3/lib/libapp_update.a and b/tools/sdk/esp32c3/lib/libapp_update.a differ diff --git a/tools/sdk/esp32c3/lib/libasio.a b/tools/sdk/esp32c3/lib/libasio.a index 10a16baec08..cafe995246c 100644 Binary files a/tools/sdk/esp32c3/lib/libasio.a and b/tools/sdk/esp32c3/lib/libasio.a differ diff --git a/tools/sdk/esp32c3/lib/libbootloader_support.a b/tools/sdk/esp32c3/lib/libbootloader_support.a index a4da38d0d68..5117293f635 100644 Binary files a/tools/sdk/esp32c3/lib/libbootloader_support.a and b/tools/sdk/esp32c3/lib/libbootloader_support.a differ diff --git a/tools/sdk/esp32c3/lib/libbt.a b/tools/sdk/esp32c3/lib/libbt.a index 7d962c81f08..5e2ec2cddad 100644 Binary files a/tools/sdk/esp32c3/lib/libbt.a and b/tools/sdk/esp32c3/lib/libbt.a differ diff --git a/tools/sdk/esp32c3/lib/libcoap.a b/tools/sdk/esp32c3/lib/libcoap.a index d78b2d094d0..53bbbc81223 100644 Binary files a/tools/sdk/esp32c3/lib/libcoap.a and b/tools/sdk/esp32c3/lib/libcoap.a differ diff --git a/tools/sdk/esp32c3/lib/libcoexist.a b/tools/sdk/esp32c3/lib/libcoexist.a index 3b59719a8d4..1f7b6cc839b 100644 Binary files a/tools/sdk/esp32c3/lib/libcoexist.a and b/tools/sdk/esp32c3/lib/libcoexist.a differ diff --git a/tools/sdk/esp32c3/lib/libconsole.a b/tools/sdk/esp32c3/lib/libconsole.a index 07eb7e02d02..280fc8507ba 100644 Binary files a/tools/sdk/esp32c3/lib/libconsole.a and b/tools/sdk/esp32c3/lib/libconsole.a differ diff --git a/tools/sdk/esp32c3/lib/libcore.a b/tools/sdk/esp32c3/lib/libcore.a index a5cd3ef5edc..e9412d3973d 100644 Binary files a/tools/sdk/esp32c3/lib/libcore.a and b/tools/sdk/esp32c3/lib/libcore.a differ diff --git a/tools/sdk/esp32c3/lib/libcxx.a b/tools/sdk/esp32c3/lib/libcxx.a index 24361f6449d..fc3ff2e4887 100644 Binary files a/tools/sdk/esp32c3/lib/libcxx.a and b/tools/sdk/esp32c3/lib/libcxx.a differ diff --git a/tools/sdk/esp32c3/lib/libdriver.a b/tools/sdk/esp32c3/lib/libdriver.a index c1baccdd51f..75d49766f3d 100644 Binary files a/tools/sdk/esp32c3/lib/libdriver.a and b/tools/sdk/esp32c3/lib/libdriver.a differ diff --git a/tools/sdk/esp32c3/lib/libefuse.a b/tools/sdk/esp32c3/lib/libefuse.a index e486a059c61..b27dcefe316 100644 Binary files a/tools/sdk/esp32c3/lib/libefuse.a and b/tools/sdk/esp32c3/lib/libefuse.a differ diff --git a/tools/sdk/esp32c3/lib/libesp-tls.a b/tools/sdk/esp32c3/lib/libesp-tls.a index a2a26494965..67d44ecb154 100644 Binary files a/tools/sdk/esp32c3/lib/libesp-tls.a and b/tools/sdk/esp32c3/lib/libesp-tls.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_common.a b/tools/sdk/esp32c3/lib/libesp_common.a index d0c7e439a54..fff75528f5f 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_common.a and b/tools/sdk/esp32c3/lib/libesp_common.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_eth.a b/tools/sdk/esp32c3/lib/libesp_eth.a index a24848f3411..c8e5e70adf1 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_eth.a and b/tools/sdk/esp32c3/lib/libesp_eth.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_event.a b/tools/sdk/esp32c3/lib/libesp_event.a index c936bfc1cd6..4e4c5a28cfc 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_event.a and b/tools/sdk/esp32c3/lib/libesp_event.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_gdbstub.a b/tools/sdk/esp32c3/lib/libesp_gdbstub.a index d9ecacd5e67..7788ebb573f 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_gdbstub.a and b/tools/sdk/esp32c3/lib/libesp_gdbstub.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_hid.a b/tools/sdk/esp32c3/lib/libesp_hid.a index 9ceb273d6f4..56a41c5b6ff 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_hid.a and b/tools/sdk/esp32c3/lib/libesp_hid.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_http_client.a b/tools/sdk/esp32c3/lib/libesp_http_client.a index a51604c8ee7..8d2400f530c 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_http_client.a and b/tools/sdk/esp32c3/lib/libesp_http_client.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_http_server.a b/tools/sdk/esp32c3/lib/libesp_http_server.a index 57dce007cdd..011b4f5877a 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_http_server.a and b/tools/sdk/esp32c3/lib/libesp_http_server.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_https_ota.a b/tools/sdk/esp32c3/lib/libesp_https_ota.a index 3146d35a6e7..acac370de74 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_https_ota.a and b/tools/sdk/esp32c3/lib/libesp_https_ota.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_https_server.a b/tools/sdk/esp32c3/lib/libesp_https_server.a index fae86ae03f9..6609d04206b 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_https_server.a and b/tools/sdk/esp32c3/lib/libesp_https_server.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_hw_support.a b/tools/sdk/esp32c3/lib/libesp_hw_support.a index f9f07767d0d..f837f5aee0f 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_hw_support.a and b/tools/sdk/esp32c3/lib/libesp_hw_support.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_lcd.a b/tools/sdk/esp32c3/lib/libesp_lcd.a index 92002706f6e..07bd7d00ff3 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_lcd.a and b/tools/sdk/esp32c3/lib/libesp_lcd.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_littlefs.a b/tools/sdk/esp32c3/lib/libesp_littlefs.a index 09b940607a3..f99178b28fa 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_littlefs.a and b/tools/sdk/esp32c3/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_local_ctrl.a b/tools/sdk/esp32c3/lib/libesp_local_ctrl.a index 18a15346be6..f7418a24211 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_local_ctrl.a and b/tools/sdk/esp32c3/lib/libesp_local_ctrl.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_netif.a b/tools/sdk/esp32c3/lib/libesp_netif.a index f323446d664..f6718645dbf 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_netif.a and b/tools/sdk/esp32c3/lib/libesp_netif.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_phy.a b/tools/sdk/esp32c3/lib/libesp_phy.a index 8f8f33fe371..86a9a335af1 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_phy.a and b/tools/sdk/esp32c3/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_pm.a b/tools/sdk/esp32c3/lib/libesp_pm.a index fe488290fc6..484e55cd670 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_pm.a and b/tools/sdk/esp32c3/lib/libesp_pm.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_ringbuf.a b/tools/sdk/esp32c3/lib/libesp_ringbuf.a index 830fde2ec01..9a29937a0dd 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_ringbuf.a and b/tools/sdk/esp32c3/lib/libesp_ringbuf.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_serial_slave_link.a b/tools/sdk/esp32c3/lib/libesp_serial_slave_link.a index 73fbd787503..b797cdda3ef 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_serial_slave_link.a and b/tools/sdk/esp32c3/lib/libesp_serial_slave_link.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_system.a b/tools/sdk/esp32c3/lib/libesp_system.a index 12c546b747b..80f43e0fb88 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_system.a and b/tools/sdk/esp32c3/lib/libesp_system.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_timer.a b/tools/sdk/esp32c3/lib/libesp_timer.a index 3d22fb25d6a..2e39795a671 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_timer.a and b/tools/sdk/esp32c3/lib/libesp_timer.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_websocket_client.a b/tools/sdk/esp32c3/lib/libesp_websocket_client.a index 56639437889..66ecbb17c2a 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_websocket_client.a and b/tools/sdk/esp32c3/lib/libesp_websocket_client.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_wifi.a b/tools/sdk/esp32c3/lib/libesp_wifi.a index 83508128729..1886b62d933 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_wifi.a and b/tools/sdk/esp32c3/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32c3/lib/libespcoredump.a b/tools/sdk/esp32c3/lib/libespcoredump.a index 88d25ff077a..3b232cdf926 100644 Binary files a/tools/sdk/esp32c3/lib/libespcoredump.a and b/tools/sdk/esp32c3/lib/libespcoredump.a differ diff --git a/tools/sdk/esp32c3/lib/libespnow.a b/tools/sdk/esp32c3/lib/libespnow.a index 12a9b46563e..149e0b0b61a 100644 Binary files a/tools/sdk/esp32c3/lib/libespnow.a and b/tools/sdk/esp32c3/lib/libespnow.a differ diff --git a/tools/sdk/esp32c3/lib/libfatfs.a b/tools/sdk/esp32c3/lib/libfatfs.a index 962f9b47626..037fc6ee4d0 100644 Binary files a/tools/sdk/esp32c3/lib/libfatfs.a and b/tools/sdk/esp32c3/lib/libfatfs.a differ diff --git a/tools/sdk/esp32c3/lib/libfreemodbus.a b/tools/sdk/esp32c3/lib/libfreemodbus.a index 15ef18b17ef..80f9ee9e965 100644 Binary files a/tools/sdk/esp32c3/lib/libfreemodbus.a and b/tools/sdk/esp32c3/lib/libfreemodbus.a differ diff --git a/tools/sdk/esp32c3/lib/libfreertos.a b/tools/sdk/esp32c3/lib/libfreertos.a index 6d807b9a1fa..3b1bbf73caa 100644 Binary files a/tools/sdk/esp32c3/lib/libfreertos.a and b/tools/sdk/esp32c3/lib/libfreertos.a differ diff --git a/tools/sdk/esp32c3/lib/libheap.a b/tools/sdk/esp32c3/lib/libheap.a index bdfeacc0ef1..c0b1ec07680 100644 Binary files a/tools/sdk/esp32c3/lib/libheap.a and b/tools/sdk/esp32c3/lib/libheap.a differ diff --git a/tools/sdk/esp32c3/lib/liblog.a b/tools/sdk/esp32c3/lib/liblog.a index 537dfc378e9..ee9f212da40 100644 Binary files a/tools/sdk/esp32c3/lib/liblog.a and b/tools/sdk/esp32c3/lib/liblog.a differ diff --git a/tools/sdk/esp32c3/lib/liblwip.a b/tools/sdk/esp32c3/lib/liblwip.a index 50cf37d7452..bed10d7a7f5 100644 Binary files a/tools/sdk/esp32c3/lib/liblwip.a and b/tools/sdk/esp32c3/lib/liblwip.a differ diff --git a/tools/sdk/esp32c3/lib/libmbedcrypto.a b/tools/sdk/esp32c3/lib/libmbedcrypto.a index 76404d91127..41bdfb8fd42 100644 Binary files a/tools/sdk/esp32c3/lib/libmbedcrypto.a and b/tools/sdk/esp32c3/lib/libmbedcrypto.a differ diff --git a/tools/sdk/esp32c3/lib/libmbedtls.a b/tools/sdk/esp32c3/lib/libmbedtls.a index b9a48e4334e..75fe33d87b4 100644 Binary files a/tools/sdk/esp32c3/lib/libmbedtls.a and b/tools/sdk/esp32c3/lib/libmbedtls.a differ diff --git a/tools/sdk/esp32c3/lib/libmdns.a b/tools/sdk/esp32c3/lib/libmdns.a index ca8ab3f8dea..75d14aa4e1f 100644 Binary files a/tools/sdk/esp32c3/lib/libmdns.a and b/tools/sdk/esp32c3/lib/libmdns.a differ diff --git a/tools/sdk/esp32c3/lib/libmesh.a b/tools/sdk/esp32c3/lib/libmesh.a index 7ba6b82c8eb..c5a1c84d27a 100644 Binary files a/tools/sdk/esp32c3/lib/libmesh.a and b/tools/sdk/esp32c3/lib/libmesh.a differ diff --git a/tools/sdk/esp32c3/lib/libmqtt.a b/tools/sdk/esp32c3/lib/libmqtt.a index a5b997ef8d0..b09b65a5cfd 100644 Binary files a/tools/sdk/esp32c3/lib/libmqtt.a and b/tools/sdk/esp32c3/lib/libmqtt.a differ diff --git a/tools/sdk/esp32c3/lib/libnet80211.a b/tools/sdk/esp32c3/lib/libnet80211.a index 77e1dacb106..972d8440a2b 100644 Binary files a/tools/sdk/esp32c3/lib/libnet80211.a and b/tools/sdk/esp32c3/lib/libnet80211.a differ diff --git a/tools/sdk/esp32c3/lib/libnewlib.a b/tools/sdk/esp32c3/lib/libnewlib.a index 450f2cea1c6..4ba44f5ef8c 100644 Binary files a/tools/sdk/esp32c3/lib/libnewlib.a and b/tools/sdk/esp32c3/lib/libnewlib.a differ diff --git a/tools/sdk/esp32c3/lib/libnvs_flash.a b/tools/sdk/esp32c3/lib/libnvs_flash.a index 43b5636a09e..b425e4852df 100644 Binary files a/tools/sdk/esp32c3/lib/libnvs_flash.a and b/tools/sdk/esp32c3/lib/libnvs_flash.a differ diff --git a/tools/sdk/esp32c3/lib/libpp.a b/tools/sdk/esp32c3/lib/libpp.a index 242a07592c1..0ff92c9beb8 100644 Binary files a/tools/sdk/esp32c3/lib/libpp.a and b/tools/sdk/esp32c3/lib/libpp.a differ diff --git a/tools/sdk/esp32c3/lib/libprotocomm.a b/tools/sdk/esp32c3/lib/libprotocomm.a index 5f6a8e36aeb..3848a9b02e6 100644 Binary files a/tools/sdk/esp32c3/lib/libprotocomm.a and b/tools/sdk/esp32c3/lib/libprotocomm.a differ diff --git a/tools/sdk/esp32c3/lib/libpthread.a b/tools/sdk/esp32c3/lib/libpthread.a index 7b2f17b85e8..94d0af708e2 100644 Binary files a/tools/sdk/esp32c3/lib/libpthread.a and b/tools/sdk/esp32c3/lib/libpthread.a differ diff --git a/tools/sdk/esp32c3/lib/libriscv.a b/tools/sdk/esp32c3/lib/libriscv.a index c454ad5b5fb..c8ee9762f32 100644 Binary files a/tools/sdk/esp32c3/lib/libriscv.a and b/tools/sdk/esp32c3/lib/libriscv.a differ diff --git a/tools/sdk/esp32c3/lib/libsdmmc.a b/tools/sdk/esp32c3/lib/libsdmmc.a index 9e405c61d7a..2f33b9a9d5e 100644 Binary files a/tools/sdk/esp32c3/lib/libsdmmc.a and b/tools/sdk/esp32c3/lib/libsdmmc.a differ diff --git a/tools/sdk/esp32c3/lib/libsmartconfig.a b/tools/sdk/esp32c3/lib/libsmartconfig.a index d124c490bf8..52eb50f3847 100644 Binary files a/tools/sdk/esp32c3/lib/libsmartconfig.a and b/tools/sdk/esp32c3/lib/libsmartconfig.a differ diff --git a/tools/sdk/esp32c3/lib/libspi_flash.a b/tools/sdk/esp32c3/lib/libspi_flash.a index e23ecb9300a..2a0f65981fb 100644 Binary files a/tools/sdk/esp32c3/lib/libspi_flash.a and b/tools/sdk/esp32c3/lib/libspi_flash.a differ diff --git a/tools/sdk/esp32c3/lib/libspiffs.a b/tools/sdk/esp32c3/lib/libspiffs.a index 25aa788f036..e754b36ad05 100644 Binary files a/tools/sdk/esp32c3/lib/libspiffs.a and b/tools/sdk/esp32c3/lib/libspiffs.a differ diff --git a/tools/sdk/esp32c3/lib/libtcp_transport.a b/tools/sdk/esp32c3/lib/libtcp_transport.a index 9a3f28a4b7b..f48c7b45063 100644 Binary files a/tools/sdk/esp32c3/lib/libtcp_transport.a and b/tools/sdk/esp32c3/lib/libtcp_transport.a differ diff --git a/tools/sdk/esp32c3/lib/libtcpip_adapter.a b/tools/sdk/esp32c3/lib/libtcpip_adapter.a index ac6c59e4bf2..c15bde623c2 100644 Binary files a/tools/sdk/esp32c3/lib/libtcpip_adapter.a and b/tools/sdk/esp32c3/lib/libtcpip_adapter.a differ diff --git a/tools/sdk/esp32c3/lib/libvfs.a b/tools/sdk/esp32c3/lib/libvfs.a index 85880f65dff..fe76f424f49 100644 Binary files a/tools/sdk/esp32c3/lib/libvfs.a and b/tools/sdk/esp32c3/lib/libvfs.a differ diff --git a/tools/sdk/esp32c3/lib/libwapi.a b/tools/sdk/esp32c3/lib/libwapi.a index 30dd7ac2a8a..08a268fc906 100644 Binary files a/tools/sdk/esp32c3/lib/libwapi.a and b/tools/sdk/esp32c3/lib/libwapi.a differ diff --git a/tools/sdk/esp32c3/lib/libwifi_provisioning.a b/tools/sdk/esp32c3/lib/libwifi_provisioning.a index 0924beb4f01..0273edbc296 100644 Binary files a/tools/sdk/esp32c3/lib/libwifi_provisioning.a and b/tools/sdk/esp32c3/lib/libwifi_provisioning.a differ diff --git a/tools/sdk/esp32c3/lib/libwpa_supplicant.a b/tools/sdk/esp32c3/lib/libwpa_supplicant.a index 8b132cbf1eb..1cd84fcda9d 100644 Binary files a/tools/sdk/esp32c3/lib/libwpa_supplicant.a and b/tools/sdk/esp32c3/lib/libwpa_supplicant.a differ diff --git a/tools/sdk/esp32c3/sdkconfig b/tools/sdk/esp32c3/sdkconfig index 4c2157908a8..c6864ba317a 100644 --- a/tools/sdk/esp32c3/sdkconfig +++ b/tools/sdk/esp32c3/sdkconfig @@ -842,6 +842,7 @@ CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT=y # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_GCMP_SUPPORT is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # end of Wi-Fi # diff --git a/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin b/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin index 38bb414d787..d15a1d22c9b 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin b/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin index d454c318da5..f5a22f88a6e 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin b/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin index 425e8a4adec..18b8ac82cfb 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin b/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin index bd6f458ee2d..73716ffffee 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin b/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin index f2ca21c91f3..8a89af1b14a 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin b/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin index 94e44340c3e..d5cb266d8aa 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin b/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin index 838fec2d4a2..3e08d59b321 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin b/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin index e678a4d3e9c..4ac736f2c48 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/esp32s2/include/app_trace/include/esp_app_trace_util.h b/tools/sdk/esp32s2/include/app_trace/include/esp_app_trace_util.h index 0ee501b27fa..96595c69827 100644 --- a/tools/sdk/esp32s2/include/app_trace/include/esp_app_trace_util.h +++ b/tools/sdk/esp32s2/include/app_trace/include/esp_app_trace_util.h @@ -68,7 +68,7 @@ typedef struct { */ static inline void esp_apptrace_lock_init(esp_apptrace_lock_t *lock) { - vPortCPUInitializeMutex(&lock->mux); + portMUX_INITIALIZE(&lock->mux); lock->int_state = 0; } diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h index 7f67fa9cff0..078b67349dc 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h @@ -310,8 +310,8 @@ static inline bool tud_hid_gamepad_report(uint8_t report_id, int8_t x, int8_t y HID_COLLECTION_END \ // Gamepad Report Descriptor Template -// with 16 buttons, 2 joysticks and 1 hat/dpad with following layout -// | X | Y | Z | Rz | Rx | Ry (1 byte each) | hat/DPAD (1 byte) | Button Map (2 bytes) | +// with 32 buttons, 2 joysticks and 1 hat/dpad with following layout +// | X | Y | Z | Rz | Rx | Ry (1 byte each) | hat/DPAD (1 byte) | Button Map (4 bytes) | #define TUD_HID_REPORT_DESC_GAMEPAD(...) \ HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ HID_USAGE ( HID_USAGE_DESKTOP_GAMEPAD ) ,\ @@ -319,37 +319,37 @@ static inline bool tud_hid_gamepad_report(uint8_t report_id, int8_t x, int8_t y /* Report ID if any */\ __VA_ARGS__ \ /* 8 bit X, Y, Z, Rz, Rx, Ry (min -127, max 127 ) */ \ - HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ - HID_USAGE ( HID_USAGE_DESKTOP_X ) ,\ - HID_USAGE ( HID_USAGE_DESKTOP_Y ) ,\ - HID_USAGE ( HID_USAGE_DESKTOP_Z ) ,\ - HID_USAGE ( HID_USAGE_DESKTOP_RZ ) ,\ - HID_USAGE ( HID_USAGE_DESKTOP_RX ) ,\ - HID_USAGE ( HID_USAGE_DESKTOP_RY ) ,\ - HID_LOGICAL_MIN ( 0x81 ) ,\ - HID_LOGICAL_MAX ( 0x7f ) ,\ - HID_REPORT_COUNT ( 6 ) ,\ - HID_REPORT_SIZE ( 8 ) ,\ - HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\ + HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ + HID_USAGE ( HID_USAGE_DESKTOP_X ) ,\ + HID_USAGE ( HID_USAGE_DESKTOP_Y ) ,\ + HID_USAGE ( HID_USAGE_DESKTOP_Z ) ,\ + HID_USAGE ( HID_USAGE_DESKTOP_RZ ) ,\ + HID_USAGE ( HID_USAGE_DESKTOP_RX ) ,\ + HID_USAGE ( HID_USAGE_DESKTOP_RY ) ,\ + HID_LOGICAL_MIN ( 0x81 ) ,\ + HID_LOGICAL_MAX ( 0x7f ) ,\ + HID_REPORT_COUNT ( 6 ) ,\ + HID_REPORT_SIZE ( 8 ) ,\ + HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\ /* 8 bit DPad/Hat Button Map */ \ - HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ - HID_USAGE ( HID_USAGE_DESKTOP_HAT_SWITCH ) ,\ - HID_LOGICAL_MIN ( 1 ) ,\ - HID_LOGICAL_MAX ( 8 ) ,\ - HID_PHYSICAL_MIN ( 0 ) ,\ - HID_PHYSICAL_MAX_N ( 315, 2 ) ,\ - HID_REPORT_COUNT ( 1 ) ,\ - HID_REPORT_SIZE ( 8 ) ,\ - HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\ - /* 16 bit Button Map */ \ - HID_USAGE_PAGE ( HID_USAGE_PAGE_BUTTON ) ,\ - HID_USAGE_MIN ( 1 ) ,\ - HID_USAGE_MAX ( 32 ) ,\ - HID_LOGICAL_MIN ( 0 ) ,\ - HID_LOGICAL_MAX ( 1 ) ,\ - HID_REPORT_COUNT ( 32 ) ,\ - HID_REPORT_SIZE ( 1 ) ,\ - HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\ + HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ + HID_USAGE ( HID_USAGE_DESKTOP_HAT_SWITCH ) ,\ + HID_LOGICAL_MIN ( 1 ) ,\ + HID_LOGICAL_MAX ( 8 ) ,\ + HID_PHYSICAL_MIN ( 0 ) ,\ + HID_PHYSICAL_MAX_N ( 315, 2 ) ,\ + HID_REPORT_COUNT ( 1 ) ,\ + HID_REPORT_SIZE ( 8 ) ,\ + HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\ + /* 32 bit Button Map */ \ + HID_USAGE_PAGE ( HID_USAGE_PAGE_BUTTON ) ,\ + HID_USAGE_MIN ( 1 ) ,\ + HID_USAGE_MAX ( 32 ) ,\ + HID_LOGICAL_MIN ( 0 ) ,\ + HID_LOGICAL_MAX ( 1 ) ,\ + HID_REPORT_COUNT ( 32 ) ,\ + HID_REPORT_SIZE ( 1 ) ,\ + HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\ HID_COLLECTION_END \ // HID Generic Input & Output diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/device/dcd_attr.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/device/dcd_attr.h index 73d592e5cea..3c5dadaf4dc 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/device/dcd_attr.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/device/dcd_attr.h @@ -44,6 +44,7 @@ #elif TU_CHECK_MCU(OPT_MCU_LPC18XX, OPT_MCU_LPC43XX) // TODO USB0 has 6, USB1 has 4 + #define DCD_ATTR_CONTROLLER_CHIPIDEA_HS #define DCD_ATTR_ENDPOINT_MAX 6 #elif TU_CHECK_MCU(OPT_MCU_LPC51UXX) @@ -58,6 +59,7 @@ #define DCD_ATTR_ENDPOINT_MAX 6 #elif TU_CHECK_MCU(OPT_MCU_MIMXRT10XX) + #define DCD_ATTR_CONTROLLER_CHIPIDEA_HS #define DCD_ATTR_ENDPOINT_MAX 8 #elif TU_CHECK_MCU(OPT_MCU_MKL25ZXX, OPT_MCU_K32L2BXX) diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_imxrt.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_imxrt.h new file mode 100644 index 00000000000..78ca5a5a236 --- /dev/null +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_imxrt.h @@ -0,0 +1,50 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2021, Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#ifndef _CI_HS_IMXRT_H_ +#define _CI_HS_IMXRT_H_ + +#include "fsl_device_registers.h" + +static const ci_hs_controller_t _ci_controller[] = +{ + // RT1010 and RT1020 only has 1 USB controller + #if FSL_FEATURE_SOC_USBHS_COUNT == 1 + { .reg_base = USB_BASE , .irqnum = USB_OTG1_IRQn, .ep_count = 8 } + #else + { .reg_base = USB1_BASE, .irqnum = USB_OTG1_IRQn, .ep_count = 8 }, + { .reg_base = USB2_BASE, .irqnum = USB_OTG2_IRQn, .ep_count = 8 } + #endif +}; + +#define CI_DCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum) +#define CI_DCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum) + +#define CI_HCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum) +#define CI_HCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum) + + +#endif diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_lpc18_43.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_lpc18_43.h new file mode 100644 index 00000000000..8c2e7dfa65c --- /dev/null +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_lpc18_43.h @@ -0,0 +1,45 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2021, Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#ifndef _CI_HS_LPC18_43_H_ +#define _CI_HS_LPC18_43_H_ + +// LPCOpen for 18xx & 43xx +#include "chip.h" + +static const ci_hs_controller_t _ci_controller[] = +{ + { .reg_base = LPC_USB0_BASE, .irqnum = USB0_IRQn, .ep_count = 6 }, + { .reg_base = LPC_USB1_BASE, .irqnum = USB1_IRQn, .ep_count = 4 } +}; + +#define CI_DCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum) +#define CI_DCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum) + +#define CI_HCD_INT_ENABLE(_p) NVIC_EnableIRQ (_ci_controller[_p].irqnum) +#define CI_HCD_INT_DISABLE(_p) NVIC_DisableIRQ(_ci_controller[_p].irqnum) + +#endif diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_type.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_type.h new file mode 100644 index 00000000000..728a86b8664 --- /dev/null +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/chipidea/ci_hs/ci_hs_type.h @@ -0,0 +1,144 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2021, Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#ifndef CI_HS_TYPE_H_ +#define CI_HS_TYPE_H_ + +#ifdef __cplusplus + extern "C" { +#endif + +// USBCMD +enum { + USBCMD_RUN_STOP = TU_BIT(0), + USBCMD_RESET = TU_BIT(1), + USBCMD_SETUP_TRIPWIRE = TU_BIT(13), + USBCMD_ADD_QTD_TRIPWIRE = TU_BIT(14) ///< This bit is used as a semaphore to ensure the to proper addition of a new dTD to an active (primed) endpoint’s linked list. This bit is set and cleared by software during the process of adding a new dTD +// Interrupt Threshold bit 23:16 +}; + +// PORTSC1 +#define PORTSC1_PORT_SPEED_POS 26 + +enum { + PORTSC1_CURRENT_CONNECT_STATUS = TU_BIT(0), + PORTSC1_FORCE_PORT_RESUME = TU_BIT(6), + PORTSC1_SUSPEND = TU_BIT(7), + PORTSC1_FORCE_FULL_SPEED = TU_BIT(24), + PORTSC1_PORT_SPEED = TU_BIT(26) | TU_BIT(27) +}; + +// OTGSC +enum { + OTGSC_VBUS_DISCHARGE = TU_BIT(0), + OTGSC_VBUS_CHARGE = TU_BIT(1), +// OTGSC_HWASSIST_AUTORESET = TU_BIT(2), + OTGSC_OTG_TERMINATION = TU_BIT(3), ///< Must set to 1 when OTG go to device mode + OTGSC_DATA_PULSING = TU_BIT(4), + OTGSC_ID_PULLUP = TU_BIT(5), +// OTGSC_HWASSIT_DATA_PULSE = TU_BIT(6), +// OTGSC_HWASSIT_BDIS_ACONN = TU_BIT(7), + OTGSC_ID = TU_BIT(8), ///< 0 = A device, 1 = B Device + OTGSC_A_VBUS_VALID = TU_BIT(9), + OTGSC_A_SESSION_VALID = TU_BIT(10), + OTGSC_B_SESSION_VALID = TU_BIT(11), + OTGSC_B_SESSION_END = TU_BIT(12), + OTGSC_1MS_TOGGLE = TU_BIT(13), + OTGSC_DATA_BUS_PULSING_STATUS = TU_BIT(14), +}; + +// USBMode +enum { + USBMODE_CM_DEVICE = 2, + USBMODE_CM_HOST = 3, + + USBMODE_SLOM = TU_BIT(3), + USBMODE_SDIS = TU_BIT(4), + + USBMODE_VBUS_POWER_SELECT = TU_BIT(5), // Need to be enabled for LPC18XX/43XX in host mode +}; + +// Device Registers +typedef struct +{ + //------------- ID + HW Parameter Registers-------------// + volatile uint32_t TU_RESERVED[64]; ///< For iMX RT10xx, but not used by LPC18XX/LPC43XX + + //------------- Capability Registers-------------// + volatile uint8_t CAPLENGTH; ///< Capability Registers Length + volatile uint8_t TU_RESERVED[1]; + volatile uint16_t HCIVERSION; ///< Host Controller Interface Version + + volatile uint32_t HCSPARAMS; ///< Host Controller Structural Parameters + volatile uint32_t HCCPARAMS; ///< Host Controller Capability Parameters + volatile uint32_t TU_RESERVED[5]; + + volatile uint16_t DCIVERSION; ///< Device Controller Interface Version + volatile uint8_t TU_RESERVED[2]; + + volatile uint32_t DCCPARAMS; ///< Device Controller Capability Parameters + volatile uint32_t TU_RESERVED[6]; + + //------------- Operational Registers -------------// + volatile uint32_t USBCMD; ///< USB Command Register + volatile uint32_t USBSTS; ///< USB Status Register + volatile uint32_t USBINTR; ///< Interrupt Enable Register + volatile uint32_t FRINDEX; ///< USB Frame Index + volatile uint32_t TU_RESERVED; + volatile uint32_t DEVICEADDR; ///< Device Address + volatile uint32_t ENDPTLISTADDR; ///< Endpoint List Address + volatile uint32_t TU_RESERVED; + volatile uint32_t BURSTSIZE; ///< Programmable Burst Size + volatile uint32_t TXFILLTUNING; ///< TX FIFO Fill Tuning + uint32_t TU_RESERVED[4]; + volatile uint32_t ENDPTNAK; ///< Endpoint NAK + volatile uint32_t ENDPTNAKEN; ///< Endpoint NAK Enable + volatile uint32_t TU_RESERVED; + volatile uint32_t PORTSC1; ///< Port Status & Control + volatile uint32_t TU_RESERVED[7]; + volatile uint32_t OTGSC; ///< On-The-Go Status & control + volatile uint32_t USBMODE; ///< USB Device Mode + volatile uint32_t ENDPTSETUPSTAT; ///< Endpoint Setup Status + volatile uint32_t ENDPTPRIME; ///< Endpoint Prime + volatile uint32_t ENDPTFLUSH; ///< Endpoint Flush + volatile uint32_t ENDPTSTAT; ///< Endpoint Status + volatile uint32_t ENDPTCOMPLETE; ///< Endpoint Complete + volatile uint32_t ENDPTCTRL[8]; ///< Endpoint Control 0 - 7 +} ci_hs_regs_t; + + +typedef struct +{ + uint32_t reg_base; + uint32_t irqnum; + uint8_t ep_count; // Max bi-directional Endpoints +}ci_hs_controller_t; + +#ifdef __cplusplus + } +#endif + +#endif /* CI_HS_TYPE_H_ */ diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_bcm.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_bcm.h index fcec0b0d212..353bc21ee7a 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_bcm.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_bcm.h @@ -34,7 +34,7 @@ #include "broadcom/interrupts.h" #include "broadcom/caches.h" -#define DWC2_REG_BASE 0xFE980000UL +#define DWC2_REG_BASE USB_OTG_GLOBAL_BASE #define DWC2_EP_MAX 8 #define DWC2_EP_FIFO_SIZE 4096 diff --git a/tools/sdk/esp32s2/include/config/sdkconfig.h b/tools/sdk/esp32s2/include/config/sdkconfig.h index a9a0e3936a2..e773df7572e 100644 --- a/tools/sdk/esp32s2/include/config/sdkconfig.h +++ b/tools/sdk/esp32s2/include/config/sdkconfig.h @@ -213,6 +213,7 @@ #define CONFIG_ESP_WIFI_FTM_ENABLE 1 #define CONFIG_ESP_WIFI_FTM_INITIATOR_SUPPORT 1 #define CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT 1 +#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1 #define CONFIG_ESP_COREDUMP_ENABLE_TO_NONE 1 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 @@ -576,5 +577,5 @@ #define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE #define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "ddc44956bf" +#define CONFIG_ARDUINO_IDF_COMMIT "f23dcd3555" #define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s2/include/esp-face/include/image/dl_image.hpp b/tools/sdk/esp32s2/include/esp-face/include/image/dl_image.hpp index 4a974df063a..8e8a4df705b 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/image/dl_image.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/image/dl_image.hpp @@ -48,6 +48,15 @@ namespace dl output[2] = input & 0xF8; // red } + /** + * @brief Convert RGB565 image to RGB888 image. + * + * @param image ptr of RGB565 image + * @param image_shape shape of the input image + * @return Tensor* output RGB88 image + */ + Tensor *convert_image_rgb565_to_rgb888(uint16_t *image, std::vector &image_shape); + /** * @brief Convert RGB565 pixel to Gray. * @@ -435,5 +444,48 @@ namespace dl */ Tensor *rgb2hsv(Tensor &image, bool bgr = false, bool fast = true); + /** + * @brief resize an image to the target shape. + * + * @param image the input image Tensor + * @param target_shape the target shape of the resized image. + * @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST + * @return Tensor* the pointer of the resized image Tensor + */ + Tensor *resize_image(Tensor &image, std::vector target_shape, resize_type_t resize_type); + + /** + * @brief resize an image to the target shape. + * + * @param image the input image Tensor + * @param resized_image the resized image Tensor + * @param resize_type one of IMAGE_RESIZE_BILINEAR or IMAGE_RESIZE_MEAN or IMAGE_RESIZE_NEAREST + */ + void resize_image(Tensor &image, Tensor &resized_image, resize_type_t resize_type); + + /** + * @brief resize an image to the target shape with nearest method. + * + * @tparam T + * @param image the pointer of the input image + * @param input_shape the input shape of the image + * @param target_shape the target shape of the resized image + * @return T* the pointer of the resized image + */ + template + T *resize_image_nearest(T *image, std::vector input_shape, std::vector target_shape); + + /** + * @brief resize an image to the target shape with nearest method. + * + * @tparam T + * @param image the pointer of the input image + * @param input_shape the input shape of the image + * @param resized_image the pointer of the resized image + * @param target_shape the target shape of the resized image + */ + template + void resize_image_nearest(T *image, std::vector input_shape, T *resized_image, std::vector target_shape); + } // namespace image } // namespace dl diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp index 8a9aaa8dfbe..57c7fb64a9a 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_avg_pool2d.hpp @@ -57,10 +57,10 @@ namespace dl const char *name = "AvgPool2D") : Layer(name), output_exponent(output_exponent), filter_shape(filter_shape), - padding_type(padding_type), - padding(padding), stride_y(stride_y), stride_x(stride_x), + padding_type(padding_type), + padding(padding), output_shape({}) { this->output = new Tensor; diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp index a59bed183fb..c5b5bf02dfc 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp @@ -36,7 +36,10 @@ namespace dl * false: the output will store to a separate memory */ ExpandDims(std::vector axis, const char *name = "ExpandDims", bool inplace = false) : Layer(name), - axis(axis), inplace(inplace), output_shape({}) + output_shape({}), + axis(axis), + output(NULL), + inplace(inplace) { } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp index 70ae483a07f..3d96fa1f042 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp @@ -32,7 +32,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), inplace(inplace), output_shape({}) + Flatten(const char *name = "Flatten", bool inplace = false) : Layer(name), output(NULL), inplace(inplace), output_shape({}) {} /** diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max_pool2d.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max_pool2d.hpp index 629aa87f515..7c7fc69fa71 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max_pool2d.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max_pool2d.hpp @@ -53,10 +53,10 @@ namespace dl const int stride_x = 1, const char *name = "MaxPool2D") : Layer(name), filter_shape(filter_shape), - padding_type(padding_type), - padding(padding), stride_y(stride_y), stride_x(stride_x), + padding_type(padding_type), + padding(padding), output_shape({}) { this->output = new Tensor; diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp index 7dd29d4a178..1a7a40c5856 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp @@ -18,7 +18,7 @@ namespace dl * - int8_t: stands for operation in int8_t quantize */ template - class ReLU : public Layer + class Relu : public Layer { private: Tensor *output; /**/ @@ -33,7 +33,7 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - ReLU(const char *name = "ReLU", bool inplace = false) : Layer(name), + Relu(const char *name = "Relu", bool inplace = false) : Layer(name), output(NULL), inplace(inplace), output_shape({}) { } @@ -42,7 +42,7 @@ namespace dl * @brief Destroy the ReLU object * */ - ~ReLU() + ~Relu() { if ((!this->inplace) && (this->output != NULL)) { diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp index 3f2ed72b6e0..d800c17fa71 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp @@ -35,7 +35,9 @@ namespace dl * false: the output will store to a separate memory */ Reshape(std::vector shape, const char *name = "Reshape", bool inplace = false) : Layer(name), - output_shape(shape), inplace(inplace) + output(NULL), + inplace(inplace), + output_shape(shape) { } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp index cee92f22764..7e692aa1cd8 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp @@ -35,7 +35,11 @@ namespace dl * @param inplace true: the output will store to input0 * false: the output will store to a separate memory */ - Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name), axis(axis), inplace(inplace), output_shape({}) + Squeeze(int axis = INT32_MAX, const char *name = "Squeeze", bool inplace = false) : Layer(name), + output(NULL), + inplace(inplace), + axis(axis), + output_shape({}) { } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp index da03b4aad85..47f39c5674a 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp @@ -38,7 +38,11 @@ namespace dl * false: the output will store to a separate memory */ Sub2D(const int output_exponent, const Activation *activation = NULL, const char *name = "Sub2D", bool inplace = false) : Layer(name), - output_exponent(output_exponent), activation(activation), output(NULL), inplace(inplace), output_shape({}) + output_exponent(output_exponent), + activation(activation), + output(NULL), + inplace(inplace), + output_shape({}) { } diff --git a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp index d89ba8daed5..dab9addf678 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp @@ -33,7 +33,11 @@ namespace dl * @param inplace true: the output will store to input * false: the output will store to a separate memory */ - Transpose(std::vector perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name), perm(perm), inplace(inplace), output_shape({}) + Transpose(std::vector perm = {}, const char *name = "Transpose", bool inplace = false) : Layer(name), + output(NULL), + inplace(inplace), + perm(perm), + output_shape({}) { } diff --git a/tools/sdk/esp32s2/include/esp-face/include/model_zoo/color_detector.hpp b/tools/sdk/esp32s2/include/esp-face/include/model_zoo/color_detector.hpp index 063ab20b34a..f79f98c0fd2 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/model_zoo/color_detector.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/model_zoo/color_detector.hpp @@ -7,46 +7,143 @@ typedef struct int area; /*!< Area of connected domains >*/ std::vector center; /**/ std::vector box; /**/ -} components_stats_t; +} color_detect_result_t; + +typedef struct +{ + std::vector start_col; + std::vector end_col; + std::vector row; + std::vector index; + std::vector area; +} color_segment_result_t; + +typedef struct +{ + std::vector color_thresh; /*!< threshold of colors, The threshold of each color is composed of 6 numbers >*/ + int area_thresh; /*!< the area threshold of each color, + the area that is smaller than the threshold is filtered >*/ + std::string name; /*!*/ +} color_info_t; class ColorDetector { private: - std::vector> results; /*!< detection results >*/ - -public: - std::vector> color_thresh; /*!< threshold of colors, The threshold of each color is composed of 6 numbers >*/ - std::vector area_thresh; /*!< the area threshold of each color, - the area that is smaller than the threshold is filtered >*/ - bool bgr; /*!< true: the input image is in BGR format + std::vector> detection_results; /*!< detection results >*/ + std::vector segmentation_results; /*!< segmentation results >*/ + std::vector registered_colors; /*!< the infomation of registered colors >*/ + std::vector color_thresh_offset; /*!< HSV offset of the registered colors>*/ + std::vector detection_shape; /*!< the inference shape of images, the input image will be resized to this shape. + if the shape == {}, the input image will not be resized >*/ + bool bgr; /*!< true: the input image is in BGR format false: the input image is in RGB format >*/ + int id_nums; /*!< the number of registered colors in history>*/ + float h_ratio; + float w_ratio; + void color_detection_forward(dl::Tensor &bin, int area_thresh); +public: /** * @brief get the color threshold of rectangular region in the image * - * @param image the input image + * @param image the input image in RGB888 format. * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] * @return std::vector the threshold. */ std::vector cal_color_thresh(dl::Tensor &image, std::vector box); + /** + * @brief get the color threshold of rectangular region in the image + * + * @param input the ptr of RGB565 image. + * @param input_shape shape of the input image. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @return std::vector the threshold. + */ + std::vector cal_color_thresh(uint16_t *input, std::vector input_shape, std::vector box); + + /** + * @brief register a new color to the color detector + * + * @param image the input image in RGB888 format. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(dl::Tensor &image, std::vector box, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief register a new color to the color detector + * + * @param input the ptr of RGB565 image. + * @param input_shape shape of the input image. + * @param box the coordinates of the rectanglar region : [left_up_x, left_up_y, right_down_x, right_down_y] + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(uint16_t *input, std::vector input_shape, std::vector box, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief register a new color to the color detector + * + * @param color_thresh the color threshold + * @param area_thresh the area threshold of the color + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int register_color(std::vector color_thresh, int area_thresh = 256, std::string color_name = "", int id = -1); + + /** + * @brief delete a registered color + * + * @param id the index of the color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int delete_color(int id = -1); + + /** + * @brief delete a registered color + * + * @param color_name name of the registered_color + * @return int the number of the registered colors. if the id is not valid, return -1. + */ + int delete_color(std::string color_name); + + /** + * @brief delete all the registered colors + * + */ + void clear_color(); + /** * @brief detect the colors based on the color thresholds * * @param image the input image. - * @return std::vector>& detection result. + * @return std::vector>& detection result. + */ + std::vector> &detect(dl::Tensor &image, std::vector color_ids = {}); + + /** + * @brief + * + * @param input + * @param input_shape + * @return std::vector>& */ - std::vector> &detect(dl::Tensor &image); + std::vector> &detect(uint16_t *input_shape, std::vector shape, std::vector color_ids = {}); /** * @brief Construct a new Color Detector object * - * @param color_thresh threshold of colors, The threshold of each color is composed of 6 numbers - * @param area_thresh the area threshold of each color,the area that is smaller than the threshold is filtered + * @param color_thresh_offset HSV offset of the registered colors> + * @param detection_shape the inference shape of images, the input image will be resized to this shape * @param bgr true: the input image is in BGR format * false: the input image is in RGB format */ - ColorDetector(std::vector> color_thresh, std::vector area_thresh, bool bgr = false) : color_thresh(color_thresh), area_thresh(area_thresh), bgr(bgr) + ColorDetector(std::vector color_thresh_offset = {}, std::vector detection_shape = {}, bool bgr = true) : color_thresh_offset(color_thresh_offset), + detection_shape(detection_shape), bgr(bgr), id_nums(0) { } @@ -57,12 +154,213 @@ class ColorDetector ~ColorDetector() {} /** - * @brief Get the results object + * @brief Get the detection results object + * + * @return std::vector>& the detection result. + */ + std::vector> &get_detection_results() + { + return this->detection_results; + } + + /** + * @brief Get the segmentation results object * - * @return std::vector>& the detection result. + * @return std::vector& the segmentation result. */ - std::vector> &get_results() + std::vector &get_segmentation_results() { - return this->results; + return this->segmentation_results; } + + /** + * @brief Get the registered colors object + * + * @return std::vector the information of resgistered colors + */ + std::vector get_registered_colors() + { + return this->registered_colors; + } + + /** + * @brief Set the color thresh offset object + * + * @param color_thresh_offset the offset of color thresh for registered colors + * @return ColorDetector& + */ + ColorDetector &set_color_thresh_offset(std::vector color_thresh_offset) + { + assert(color_thresh_offset.size() == 3); + this->color_thresh_offset = color_thresh_offset; + return *this; + } + + /** + * @brief Get the color thresh offset object + * + * @return std::vector color_thresh_offset + */ + std::vector get_color_thresh_offset() + { + return this->color_thresh_offset; + } + + /** + * @brief Set the area thresh object + * + * @param area_thresh the area thresh for each registered colors + * @return ColorDetector& + */ + ColorDetector &set_area_thresh(std::vector area_thresh) + { + assert((area_thresh.size() == this->registered_colors.size()) || (area_thresh.size() == 1)); + if (area_thresh.size() == 1) + { + for (int i = 0; i < this->registered_colors.size(); ++i) + { + this->registered_colors[i].area_thresh = area_thresh[0]; + } + } + else + { + for (int i = 0; i < this->registered_colors.size(); ++i) + { + this->registered_colors[i].area_thresh = area_thresh[i]; + } + } + return *this; + } + + /** + * @brief Set the area thresh object + * + * @param area_thresh the area thresh for each registered colors + * @param id index of the registered color + * @return ColorDetector& + */ + ColorDetector &set_area_thresh(int area_thresh, int id) + { + assert((id >= 0) && (id < this->registered_colors.size())); + this->registered_colors[id].area_thresh = area_thresh; + return *this; + } + + /** + * @brief Set the bgr object + * + * @param bgr + * @return ColorDetector& + */ + ColorDetector &set_bgr(bool bgr) + { + this->bgr = bgr; + return *this; + } + + /** + * @brief Get the bgr object + * + * @return bool bgr flag + */ + bool get_bgr() + { + return this->bgr; + } + + /** + * @brief Get the detection shape object + * + * @return std::vector + */ + std::vector get_detection_shape() + { + return this->detection_shape; + } + + /** + * @brief Set the detection shape object + * + * @param detection_shape the inference shape of images, the input image will be resized to this shape + * @return ColorDetector& + */ + ColorDetector &set_detection_shape(std::vector detection_shape) + { + assert(detection_shape.size() == 3); + this->detection_shape = detection_shape; + return *this; + } + + /** + * @brief Get the registered colors num + * + * @return int the registered colors num + */ + int get_registered_colors_num() + { + return this->registered_colors.size(); + } + + /** + * @brief print the detection detection results + * + * @param tag + */ + void print_detection_results(const char *tag = "RGB") + { + printf("\n%s | color detection result:\n", tag); + for (int i = 0; i < this->detection_results.size(); ++i) + { + printf("color %d: detected box :%d\n", i, this->detection_results[i].size()); + for (int j = 0; j < this->detection_results[i].size(); ++j) + { + printf("center: (%d, %d)\n", this->detection_results[i][j].center[0], this->detection_results[i][j].center[1]); + printf("box: (%d, %d), (%d, %d)\n", this->detection_results[i][j].box[0], this->detection_results[i][j].box[1], this->detection_results[i][j].box[2], this->detection_results[i][j].box[3]); + printf("area: %d\n", this->detection_results[i][j].area); + } + printf("\n"); + } + } + + /** + * @brief print the segmentation results + * + * @param tag + */ + void print_segmentation_results(const char *tag = "RGB") + { + printf("\n%s | color segmentation result:\n", tag); + for (int i = 0; i < this->segmentation_results.size(); ++i) + { + printf("color %d: detected box :%d\n", i, this->detection_results[i].size()); + for (int j = 0; j < this->segmentation_results[i].index.size(); ++j) + { + printf("box_index: %d, start col: %d, end col: %d, row: %d, area: %d\n", + this->segmentation_results[i].index[j], this->segmentation_results[i].start_col[j], this->segmentation_results[i].end_col[j], + this->segmentation_results[i].row[j], this->segmentation_results[i].area[j]); + } + printf("\n"); + } + } + + /** + * @brief draw the color segmentation result on the input image + * + * @param image the input RGB image + * @param draw_colors RGB values for each detected colors + * @param draw_backgound draw the background if it is true + * @param background_color RGB values for the background color + */ + void draw_segmentation_results(dl::Tensor &image, std::vector> draw_colors, bool draw_backgound = true, std::vector background_color = {0, 0, 0}); + + /** + * @brief draw the color segmentation result on the input image + * + * @param image the pointer of the input RGB565 image + * @param image_shape the shape of the input image + * @param draw_colors RGB565 values for each detected colors + * @param draw_backgound draw the background if it is true + * @param background_color RGB565 values for the background color + */ + void draw_segmentation_results(uint16_t *image, std::vector image_shape, std::vector draw_colors, bool draw_backgound = true, uint16_t background_color = 0x0000); }; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognition_tool.hpp b/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognition_tool.hpp index 2226d32daf9..3adf1f62f72 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognition_tool.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognition_tool.hpp @@ -10,6 +10,7 @@ #include #include #include +#include "esp_partition.h" /** * @brief struct of face similarity @@ -45,6 +46,13 @@ class FaceID */ FaceID(int id, dl::Tensor &id_emb, std::string name = ""); + /** + * @brief Construct a new Face ID which is same as input face_id + * + * @param face_id input face_id + */ + FaceID(FaceID &face_id); + /** * @brief Destroy the Face ID object * diff --git a/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognizer.hpp b/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognizer.hpp index 864881c984a..0f6b854118b 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognizer.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/model_zoo/face_recognizer.hpp @@ -148,7 +148,7 @@ class FaceRecognizer * @param name name of the face id. * @return int the face id index of the enrolled embedding. */ - int enroll_id(uint16_t *image_input, std::vector shape, std::vector &landmarks, std::string name=""); + int enroll_id(uint16_t *image_input, std::vector shape, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -158,9 +158,11 @@ class FaceRecognizer * @param aligned_face the Tensor to store the intermeidate aligned face. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(uint16_t *image_input, std::vector shape, Tensor &aligned_face, std::vector &landmarks, std::string name=""); + int enroll_id(uint16_t *image_input, std::vector shape, Tensor &aligned_face, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -168,9 +170,11 @@ class FaceRecognizer * @param image_input the Tensor of input image with format bgr888. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &image_input, std::vector &landmarks, std::string name=""); + int enroll_id(Tensor &image_input, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id @@ -179,42 +183,114 @@ class FaceRecognizer * @param aligned_face the Tensor to store the intermeidate aligned face. * @param landmarks face landmarks coordinates * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &image_input, Tensor &aligned_face, std::vector &landmarks, std::string name=""); + int enroll_id(Tensor &image_input, Tensor &aligned_face, std::vector &landmarks, std::string name="", bool update_flash = false); /** * @brief enroll face id * * @param aligned_face the Tensor of the input aligned face with format bgr888. * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &aligned_face, std::string name=""); + int enroll_id(Tensor &aligned_face, std::string name="", bool update_flash = false); /** * @brief enroll the normalzied face embedding. * - * @param emb the normalized face embbeding. - * @param name name of the face id. - * @return int the face id index of the enrolled embedding. + * @param emb the normalized face embbeding. + * @param name name of the face id. + * @param update_flash true: the enrolled ids will be stored to flash + * false: the enrolled ids will not be stored to flash + * @return int the face id index of the enrolled embedding. */ - int enroll_id(Tensor &emb, std::string name=""); + int enroll_id(Tensor &emb, std::string name="", bool update_flash = false); /** - * @brief delete the last enrolled face id. + * @brief delete the last enrolled face id. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash * * @return int the number of remained face ids. * if the face ids list is empty, return -1 */ - int delete_id(); + int delete_id(bool update_flash = false); /** - * @brief delete the face id with id index. + * @brief delete the face id with id index. * - * @param id face id index. - * @return int the number of remained face ids. - * if there is no matched id return -1 + * @param id face id index. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * @return int the number of remained face ids. + * if there is no matched id return -1 + */ + int delete_id(int id, bool update_flash = false); + + /** + * @brief Set the enrolled ids + * + * @param ids the ids to be set + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * @return int the number of enrolled ids. + */ + int set_ids(std::vector *> &ids, bool update_flash = false); + + /** + * @brief Set the enrolled ids from flash + * + * @return int the number of enrolled ids. + */ + int set_ids_from_flash(); + + /** + * @brief write the enrolled ids to flash + * + * @return int the number of enrolled ids. */ - int delete_id(int id); + int write_ids_to_flash(); + + /** + * @brief Get the enrolled ids with name object + * + * @param name + * @return std::vector + */ + std::vector get_enrolled_ids_with_name(std::string name); + + /** + * @brief Check whether the Flash partition is available + * + * @return int -2: the partition has not been set + * -1: the data in the flash does not match the current model. + * model_check_code: the Flash partition is available. + * number of ids in flash: The IDs in Flash and RAM does not sync. + */ + int check_partition(); + + /** + * @brief delete all the enrolled face ids. + * @param update_flash true: the ids will be updated to flash + * false: the ids will not be stored to flash + * + */ + void clear_id(bool update_flash = false); + + /** + * @brief Set the partition for saving face ids to flash or reading face ids from flash. + * + * @param type esp_partition_type + * @param subtype esp_partition_subtype + * @param label the partition label + * @return int 0: set the partition failed + * 1: set the partition successfully + */ + int set_partition(esp_partition_type_t type, esp_partition_subtype_t subtype, const char *label); + }; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_constant.hpp b/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_constant.hpp index 07b2dd24ee1..a111817e3d6 100644 --- a/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_constant.hpp +++ b/tools/sdk/esp32s2/include/esp-face/include/typedef/dl_constant.hpp @@ -2,6 +2,7 @@ #include "dl_define.hpp" #include +#include namespace dl { @@ -48,10 +49,11 @@ namespace dl /**/ std::vector shape_with_dilation; /**/ /**/ - std::vector channel_exponent; /**/ + const int8_t* channel_exponent; /**/ + const int channel_exponent_size; /** - * @brief Construct a new Filter object. + * @brief Construct a new Filter object. * * @param element point to element * @param exponent exponent of element @@ -66,16 +68,17 @@ namespace dl Filter(const T *element, const int exponent, const std::vector shape, const std::vector dilation = {1, 1}); /** - * @brief Construct a new Filter object. + * @brief Construct a new Filter object. it is only avaliable to int16_t * - * @param element point to element - * @param channel_exponent exponent for per-channel - * @param shape shape of element - * @param dilation dilation of Filter - * - 1D: reserved - * - 2D: [dilation_in_height, dilation_in_width] + * @param element point to element + * @param channel_exponent exponent for per-channel + * @param channel_exponent_size size of exponent + * @param shape shape of element + * @param dilation dilation of Filter + * - 1D: reserved + * - 2D: [dilation_in_height, dilation_in_width] */ - Filter(const T *element, const std::vector channel_exponent, const std::vector shape, const std::vector dilation = {1, 1}); + Filter(const T *element, const int8_t* channel_exponent, const int channel_exponent_size, const std::vector shape, const std::vector dilation = {1, 1}); /** * @brief Print the n-th filter. @@ -98,9 +101,6 @@ namespace dl { public: using Constant::Constant; - std::vector channel_exponent; /**/ - - Bias(const T *element, const std::vector channel_exponent, const std::vector shape); }; /** diff --git a/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h b/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h index 820c4168f66..d1b530a42e3 100644 --- a/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h +++ b/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h @@ -344,6 +344,17 @@ esp_err_t esp_http_client_set_password(esp_http_client_handle_t client, const ch */ esp_err_t esp_http_client_set_authtype(esp_http_client_handle_t client, esp_http_client_auth_type_t auth_type); +/** + * @brief Get HTTP client session errno + * + * @param[in] client The esp_http_client handle + * + * @return + * - (-1) if invalid argument + * - errno + */ +int esp_http_client_get_errno(esp_http_client_handle_t client); + /** * @brief Set http request method * diff --git a/tools/sdk/esp32s2/include/esp_hw_support/include/soc/spinlock.h b/tools/sdk/esp32s2/include/esp_hw_support/include/soc/spinlock.h index 97cc9e514ab..fbeff5054b4 100644 --- a/tools/sdk/esp32s2/include/esp_hw_support/include/soc/spinlock.h +++ b/tools/sdk/esp32s2/include/esp_hw_support/include/soc/spinlock.h @@ -52,6 +52,15 @@ static inline void __attribute__((always_inline)) spinlock_initialize(spinlock_t /** * @brief Top level spinlock acquire function, spins until get the lock + * + * This function will: + * - Save current interrupt state, then disable interrupts + * - Spin until lock is acquired or until timeout occurs + * - Restore interrupt state + * + * @note Spinlocks alone do no constitute true critical sections (as this + * function reenables interrupts once the spinlock is acquired). For critical + * sections, use the interface provided by the operating system. * @param lock - target spinlock object * @param timeout - cycles to wait, passing SPINLOCK_WAIT_FOREVER blocs indefinitely */ @@ -125,6 +134,15 @@ static inline bool __attribute__((always_inline)) spinlock_acquire(spinlock_t *l /** * @brief Top level spinlock unlock function, unlocks a previously locked spinlock + * + * This function will: + * - Save current interrupt state, then disable interrupts + * - Release the spinlock + * - Restore interrupt state + * + * @note Spinlocks alone do no constitute true critical sections (as this + * function reenables interrupts once the spinlock is acquired). For critical + * sections, use the interface provided by the operating system. * @param lock - target, locked before, spinlock object */ static inline void __attribute__((always_inline)) spinlock_release(spinlock_t *lock) diff --git a/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_commands.h b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_commands.h new file mode 100644 index 00000000000..091ef1cffef --- /dev/null +++ b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_commands.h @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +/* Common LCD panel commands */ +#define LCD_CMD_NOP 0x00 // This command is empty command +#define LCD_CMD_SWRESET 0x01 // Software reset registers (the built-in frame buffer is not affected) +#define LCD_CMD_RDDID 0x04 // Read 24-bit display ID +#define LCD_CMD_RDDST 0x09 // Read display status +#define LCD_CMD_RDDPM 0x0A // Read display power mode +#define LCD_CMD_RDD_MADCTL 0x0B // Read display MADCTL +#define LCD_CMD_RDD_COLMOD 0x0C // Read display pixel format +#define LCD_CMD_RDDIM 0x0D // Read display image mode +#define LCD_CMD_RDDSM 0x0E // Read display signal mode +#define LCD_CMD_RDDSR 0x0F // Read display self-diagnostic result +#define LCD_CMD_SLPIN 0x10 // Go into sleep mode (DC/DC, oscillator, scanning stopped, but memory keeps content) +#define LCD_CMD_SLPOUT 0x11 // Exit sleep mode +#define LCD_CMD_PTLON 0x12 // Turns on partial display mode +#define LCD_CMD_NORON 0x13 // Turns on normal display mode +#define LCD_CMD_INVOFF 0x20 // Recover from display inversion mode +#define LCD_CMD_INVON 0x21 // Go into display inversion mode +#define LCD_CMD_GAMSET 0x26 // Select Gamma curve for current display +#define LCD_CMD_DISPOFF 0x28 // Display off (disable frame buffer output) +#define LCD_CMD_DISPON 0x29 // Display on (enable frame buffer output) +#define LCD_CMD_CASET 0x2A // Set column address +#define LCD_CMD_RASET 0x2B // Set row address +#define LCD_CMD_RAMWR 0x2C // Write frame memory +#define LCD_CMD_RAMRD 0x2E // Read frame memory +#define LCD_CMD_PTLAR 0x30 // Define the partial area +#define LCD_CMD_VSCRDEF 0x33 // Vertical scrolling definition +#define LCD_CMD_TEOFF 0x34 // Turns of tearing effect +#define LCD_CMD_TEON 0x35 // Turns on tearing effect + +#define LCD_CMD_MADCTL 0x36 // Memory data access control +#define LCD_CMD_MH_BIT (1 << 2) // Display data latch order, 0: refresh left to right, 1: refresh right to left +#define LCD_CMD_BGR_BIT (1 << 3) // RGB/BGR order, 0: RGB, 1: BGR +#define LCD_CMD_ML_BIT (1 << 4) // Line address order, 0: refresh top to bottom, 1: refresh bottom to top +#define LCD_CMD_MV_BIT (1 << 5) // Row/Column order, 0: normal mode, 1: reverse mode +#define LCD_CMD_MX_BIT (1 << 6) // Column address order, 0: left to right, 1: right to left +#define LCD_CMD_MY_BIT (1 << 7) // Row address order, 0: top to bottom, 1: bottom to top + +#define LCD_CMD_VSCSAD 0x37 // Vertical scroll start address +#define LCD_CMD_IDMOFF 0x38 // Recover from IDLE mode +#define LCD_CMD_IDMON 0x39 // Fall into IDLE mode (8 color depth is displayed) +#define LCD_CMD_COLMOD 0x3A // Defines the format of RGB picture data +#define LCD_CMD_RAMWRC 0x3C // Memory write continue +#define LCD_CMD_RAMRDC 0x3E // Memory read continue +#define LCD_CMD_STE 0x44 // Set tear scanline, tearing effect output signal when display module reaches line N +#define LCD_CMD_GDCAN 0x45 // Get scanline +#define LCD_CMD_WRDISBV 0x51 // Write display brightness +#define LCD_CMD_RDDISBV 0x52 // Read display brightness value diff --git a/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_rgb.h b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_rgb.h index 1368bb787f6..0c264545ee2 100644 --- a/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_rgb.h +++ b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_rgb.h @@ -18,10 +18,10 @@ extern "C" { #if SOC_LCD_RGB_SUPPORTED /** * @brief LCD RGB timing structure - * + * @verbatim * Total Width * <---------------------------------------------------> - * Hsync width HBP Active Width HFP + * HSYNC width HBP Active Width HFP * <---><--><--------------------------------------><---> * ____ ____|_______________________________________|____| * |___| | | | @@ -36,7 +36,7 @@ extern "C" { * | /|\ | | / / / / / / / / / / / / / / / / / / / | | * | | | |/ / / / / / / / / / / / / / / / / / / /| | * Total | | | |/ / / / / / / / / / / / / / / / / / / /| | - * Heigh | | | |/ / / / / / / / / / / / / / / / / / / /| | + * Height | | | |/ / / / / / / / / / / / / / / / / / / /| | * |Active| | |/ / / / / / / / / / / / / / / / / / / /| | * |Heigh | | |/ / / / / / Active Display Area / / / /| | * | | | |/ / / / / / / / / / / / / / / / / / / /| | @@ -48,7 +48,7 @@ extern "C" { * | /|\ | | * | VFP | | | * \|/ \|/_____|______________________________________________________| - * + * @endverbatim */ typedef struct { unsigned int pclk_hz; /*!< Frequency of pixel clock */ @@ -65,7 +65,7 @@ typedef struct { unsigned int vsync_idle_low: 1; /*!< The vsync signal is low in IDLE state */ unsigned int de_idle_high: 1; /*!< The de signal is high in IDLE state */ unsigned int pclk_active_neg: 1; /*!< The display will write data lines when there's a falling edge on PCLK */ - unsigned int pclk_idle_low: 1; /*!< The PCLK stays at low level in IDLE phase */ + unsigned int pclk_idle_high: 1; /*!< The PCLK stays at high level in IDLE phase */ } flags; } esp_lcd_rgb_timing_t; diff --git a/tools/sdk/esp32s2/include/esp_netif/include/esp_netif_defaults.h b/tools/sdk/esp32s2/include/esp_netif/include/esp_netif_defaults.h index da01500db1c..b8276068e9a 100644 --- a/tools/sdk/esp32s2/include/esp_netif/include/esp_netif_defaults.h +++ b/tools/sdk/esp32s2/include/esp_netif/include/esp_netif_defaults.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ESP_NETIF_DEFAULTS_H #define _ESP_NETIF_DEFAULTS_H @@ -37,6 +29,7 @@ extern "C" { .route_prio = 100 \ } \ +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT #define ESP_NETIF_INHERENT_DEFAULT_WIFI_AP() \ { \ .flags = (esp_netif_flags_t)(ESP_NETIF_DHCP_SERVER | ESP_NETIF_FLAG_AUTOUP), \ @@ -48,6 +41,7 @@ extern "C" { .if_desc = "ap", \ .route_prio = 10 \ }; +#endif #define ESP_NETIF_INHERENT_DEFAULT_ETH() \ { \ @@ -108,6 +102,7 @@ extern "C" { .stack = ESP_NETIF_NETSTACK_DEFAULT_ETH, \ } +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT /** * @brief Default configuration reference of WIFI AP */ @@ -117,6 +112,7 @@ extern "C" { .driver = NULL, \ .stack = ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP, \ } +#endif /** * @brief Default configuration reference of WIFI STA @@ -154,10 +150,12 @@ extern "C" { */ #define ESP_NETIF_BASE_DEFAULT_WIFI_STA &_g_esp_netif_inherent_sta_config +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT /** * @brief Default base config (esp-netif inherent) of WIFI AP */ #define ESP_NETIF_BASE_DEFAULT_WIFI_AP &_g_esp_netif_inherent_ap_config +#endif /** * @brief Default base config (esp-netif inherent) of ethernet interface @@ -177,7 +175,9 @@ extern "C" { #define ESP_NETIF_NETSTACK_DEFAULT_ETH _g_esp_netif_netstack_default_eth #define ESP_NETIF_NETSTACK_DEFAULT_WIFI_STA _g_esp_netif_netstack_default_wifi_sta +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT #define ESP_NETIF_NETSTACK_DEFAULT_WIFI_AP _g_esp_netif_netstack_default_wifi_ap +#endif #define ESP_NETIF_NETSTACK_DEFAULT_PPP _g_esp_netif_netstack_default_ppp #define ESP_NETIF_NETSTACK_DEFAULT_SLIP _g_esp_netif_netstack_default_slip #define ESP_NETIF_NETSTACK_DEFAULT_OPENTHREAD _g_esp_netif_netstack_default_openthread @@ -190,7 +190,9 @@ extern "C" { // extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_eth; extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_sta; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_ap; +#endif extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_ppp; extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_slip; @@ -200,12 +202,16 @@ extern const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_slip; // common behavioural patterns for common interfaces such as STA, AP, ETH, PPP // extern const esp_netif_inherent_config_t _g_esp_netif_inherent_sta_config; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ap_config; +#endif extern const esp_netif_inherent_config_t _g_esp_netif_inherent_eth_config; extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ppp_config; extern const esp_netif_inherent_config_t _g_esp_netif_inherent_slip_config; +#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT extern const esp_netif_ip_info_t _g_esp_netif_soft_ap_ip; +#endif #if CONFIG_OPENTHREAD_ENABLED /** diff --git a/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi_os_adapter.h b/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi_os_adapter.h index b583e916267..88d0ee54029 100644 --- a/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi_os_adapter.h +++ b/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi_os_adapter.h @@ -1,16 +1,8 @@ -// Copyright 2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef ESP_WIFI_OS_ADAPTER_H_ #define ESP_WIFI_OS_ADAPTER_H_ diff --git a/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi.h b/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi.h index 51e03234841..2d671591765 100644 --- a/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi.h +++ b/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* Notes about WiFi Programming @@ -275,7 +267,7 @@ esp_err_t esp_wifi_deinit(void); * @brief Set the WiFi operating mode * * Set the WiFi operating mode as station, soft-AP or station+soft-AP, - * The default mode is soft-AP mode. + * The default mode is station mode. * * @param mode WiFi operating mode * diff --git a/tools/sdk/esp32s2/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h b/tools/sdk/esp32s2/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h index 675af141ebc..aa87e1b4db2 100644 --- a/tools/sdk/esp32s2/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h +++ b/tools/sdk/esp32s2/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h @@ -166,10 +166,19 @@ #define configSTACK_OVERHEAD_APPTRACE 0 #endif +/* Stack watchpoint decreases minimum usable stack size by up to 60 bytes. + See FreeRTOS FREERTOS_WATCHPOINT_END_OF_STACK option in Kconfig. */ +#if CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK +#define configSTACK_OVERHEAD_WATCHPOINT 60 +#else +#define configSTACK_OVERHEAD_WATCHPOINT 0 +#endif + #define configSTACK_OVERHEAD_TOTAL ( \ configSTACK_OVERHEAD_CHECKER + \ configSTACK_OVERHEAD_OPTIMIZATION + \ - configSTACK_OVERHEAD_APPTRACE \ + configSTACK_OVERHEAD_APPTRACE + \ + configSTACK_OVERHEAD_WATCHPOINT \ ) #define configMINIMAL_STACK_SIZE (768 + configSTACK_OVERHEAD_TOTAL) diff --git a/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro.h b/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro.h index f3efcbfdba1..934f056816c 100644 --- a/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro.h +++ b/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro.h @@ -179,128 +179,112 @@ static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level); * @note [refactor-todo] Check if these comments are still true * ------------------------------------------------------ */ -typedef spinlock_t portMUX_TYPE; /**< Spinlock type used by FreeRTOS critical sections */ -#define portMUX_INITIALIZER_UNLOCKED SPINLOCK_INITIALIZER /**< Spinlock initializer */ -#define portMUX_FREE_VAL SPINLOCK_FREE /**< Spinlock is free. [refactor-todo] check if this is still required */ -#define portMUX_NO_TIMEOUT SPINLOCK_WAIT_FOREVER /**< When passed for 'timeout_cycles', spin forever if necessary. [refactor-todo] check if this is still required */ -#define portMUX_TRY_LOCK SPINLOCK_NO_WAIT /**< Try to acquire the spinlock a single time only. [refactor-todo] check if this is still required */ +typedef spinlock_t portMUX_TYPE; /**< Spinlock type used by FreeRTOS critical sections */ +#define portMUX_INITIALIZER_UNLOCKED SPINLOCK_INITIALIZER /**< Spinlock initializer */ +#define portMUX_FREE_VAL SPINLOCK_FREE /**< Spinlock is free. [refactor-todo] check if this is still required */ +#define portMUX_NO_TIMEOUT SPINLOCK_WAIT_FOREVER /**< When passed for 'timeout_cycles', spin forever if necessary. [refactor-todo] check if this is still required */ +#define portMUX_TRY_LOCK SPINLOCK_NO_WAIT /**< Try to acquire the spinlock a single time only. [refactor-todo] check if this is still required */ +#define portMUX_INITIALIZE(mux) spinlock_initialize(mux) /*< Initialize a spinlock to its unlocked state */ -/** - * @brief Initialize a spinlock - * - * - Initializes a spinlock that is used by FreeRTOS SMP critical sections - * - * @param[in] mux Spinlock - */ -static inline void __attribute__((always_inline)) vPortCPUInitializeMutex(portMUX_TYPE *mux); +// ------------------ Critical Sections -------------------- /** - * @brief Acquire a spinlock + * @brief Enter a SMP critical section with a timeout * - * @note [refactor-todo] check if we still need this + * This function enters an SMP critical section by disabling interrupts then + * taking a spinlock with a specified timeout. * - * @param[in] mux Spinlock - */ -static inline void __attribute__((always_inline)) vPortCPUAcquireMutex(portMUX_TYPE *mux); - -/** - * @brief Acquire a spinlock but with a specified timeout + * This function can be called in a nested manner. * - * @note [refactor-todo] check if we still need this - * @note [refactor-todo] Check if this function should be renamed (due to bool return type) - * - * @param[in] mux Spinlock - * @param timeout - * @return true Spinlock acquired - * @return false Timed out + * @note This function is made non-inline on purpose to reduce code size + * @param mux Spinlock + * @param timeout Timeout to wait for spinlock in number of CPU cycles. + * Use portMUX_NO_TIMEOUT to wait indefinitely + * Use portMUX_TRY_LOCK to only getting the spinlock a single time + * @retval pdPASS Critical section entered (spinlock taken) + * @retval pdFAIL If timed out waiting for spinlock (will not occur if using portMUX_NO_TIMEOUT) */ -static inline bool __attribute__((always_inline)) vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout); +BaseType_t xPortEnterCriticalTimeout(portMUX_TYPE *mux, BaseType_t timeout); /** - * @brief Release a spinlock + * @brief Enter a SMP critical section + * + * This function enters an SMP critical section by disabling interrupts then + * taking a spinlock with an unlimited timeout. * - * @note [refactor-todo] check if we still need this + * This function can be called in a nested manner * * @param[in] mux Spinlock */ -static inline void __attribute__((always_inline)) vPortCPUReleaseMutex(portMUX_TYPE *mux); +static inline void __attribute__((always_inline)) vPortEnterCritical(portMUX_TYPE *mux); /** - * @brief Wrapper for atomic compare-and-set instruction + * @brief Exit a SMP critical section * - * This subroutine will atomically compare *addr to 'compare'. If *addr == compare, *addr is set to *set. *set is - * updated with the previous value of *addr (either 'compare' or some other value.) + * This function can be called in a nested manner. On the outer most level of nesting, this function will: * - * @warning From the ISA docs: in some (unspecified) cases, the s32c1i instruction may return the "bitwise inverse" of - * the old mem if the mem wasn't written. This doesn't seem to happen on the ESP32 (portMUX assertions would - * fail). + * - Release the spinlock + * - Restore the previous interrupt level before the critical section was entered * - * @note [refactor-todo] check if we still need this - * @note [refactor-todo] Check if this function should be renamed (due to void return type) + * If still nesting, this function simply decrements a critical nesting count * - * @param[inout] addr Pointer to target address - * @param[in] compare Compare value - * @param[inout] set Pointer to set value + * @note This function is made non-inline on purpose to reduce code size + * @param[in] mux Spinlock */ -static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set); +void vPortExitCritical(portMUX_TYPE *mux); /** - * @brief Wrapper for atomic compare-and-set instruction in external RAM + * @brief FreeRTOS Compliant version of xPortEnterCriticalTimeout() * - * Atomic compare-and-set but the target address is placed in external RAM + * Compliant version of xPortEnterCriticalTimeout() will ensure that this is + * called from a task context only. An abort is called otherwise. * - * @note [refactor-todo] check if we still need this + * @note This function is made non-inline on purpose to reduce code size * - * @param[inout] addr Pointer to target address - * @param[in] compare Compare value - * @param[inout] set Pointer to set value + * @param mux Spinlock + * @param timeout Timeout + * @return BaseType_t */ -static inline void uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set); - -// ------------------ Critical Sections -------------------- +BaseType_t xPortEnterCriticalTimeoutCompliance(portMUX_TYPE *mux, BaseType_t timeout); /** - * @brief Enter a SMP critical section + * @brief FreeRTOS compliant version of vPortEnterCritical() * - * - Disable interrupts - * - Takes spinlock - * - Can be nested + * Compliant version of vPortEnterCritical() will ensure that this is + * called from a task context only. An abort is called otherwise. * * @param[in] mux Spinlock */ -void vPortEnterCritical(portMUX_TYPE *mux); +static inline void __attribute__((always_inline)) vPortEnterCriticalCompliance(portMUX_TYPE *mux); /** - * @brief Exit a SMP critical section + * @brief FreeRTOS compliant version of vPortExitCritical() * - * - Releases spinlock - * - Reenables interrupts - * - Can be nested + * Compliant version of vPortExitCritical() will ensure that this is + * called from a task context only. An abort is called otherwise. * + * @note This function is made non-inline on purpose to reduce code size * @param[in] mux Spinlock */ -void vPortExitCritical(portMUX_TYPE *mux); +void vPortExitCriticalCompliance(portMUX_TYPE *mux); /** - * @brief FreeRTOS compliant version of enter critical - * - * - Ensures that critical section is only entered from task context + * @brief Safe version of enter critical timeout * - * @param[in] mux Spinlock - */ -static inline void __attribute__((always_inline)) vPortEnterCriticalCompliance(portMUX_TYPE *mux); - -/** - * @brief FreeRTOS compliant version of exit critical + * Safe version of enter critical will automatically select between + * portTRY_ENTER_CRITICAL() and portTRY_ENTER_CRITICAL_ISR() * - * @param[in] mux Spinlock + * @param mux Spinlock + * @param timeout Timeout + * @return BaseType_t */ -static inline void __attribute__((always_inline)) vPortExitCriticalCompliance(portMUX_TYPE *mux); +static inline BaseType_t __attribute__((always_inline)) xPortEnterCriticalTimeoutSafe(portMUX_TYPE *mux, BaseType_t timeout); /** * @brief Safe version of enter critical * - * - This function can be used to enter a critical section from both task and ISR contexts + * Safe version of enter critical will automatically select between + * portENTER_CRITICAL() and portENTER_CRITICAL_ISR() * * @param[in] mux Spinlock */ @@ -309,6 +293,9 @@ static inline void __attribute__((always_inline)) vPortEnterCriticalSafe(portMUX /** * @brief Safe version of exit critical * + * Safe version of enter critical will automatically select between + * portEXIT_CRITICAL() and portEXIT_CRITICAL_ISR() + * * @param[in] mux Spinlock */ static inline void __attribute__((always_inline)) vPortExitCriticalSafe(portMUX_TYPE *mux); @@ -397,6 +384,38 @@ void vPortSetStackWatchpoint( void *pxStackStart ); */ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void); +/** + * @brief Wrapper for atomic compare-and-set instruction + * + * This subroutine will atomically compare *addr to 'compare'. If *addr == compare, *addr is set to *set. *set is + * updated with the previous value of *addr (either 'compare' or some other value.) + * + * @warning From the ISA docs: in some (unspecified) cases, the s32c1i instruction may return the "bitwise inverse" of + * the old mem if the mem wasn't written. This doesn't seem to happen on the ESP32 (portMUX assertions would + * fail). + * + * @note [refactor-todo] Check if this can be deprecated + * @note [refactor-todo] Check if this function should be renamed (due to void return type) + * + * @param[inout] addr Pointer to target address + * @param[in] compare Compare value + * @param[inout] set Pointer to set value + */ +static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set); + +/** + * @brief Wrapper for atomic compare-and-set instruction in external RAM + * + * Atomic compare-and-set but the target address is placed in external RAM + * + * @note [refactor-todo] Check if this can be deprecated + * + * @param[inout] addr Pointer to target address + * @param[in] compare Compare value + * @param[inout] set Pointer to set value + */ +static inline void __attribute__((always_inline)) uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set); + /* ------------------------------------------- FreeRTOS Porting Interface ---------------------------------------------- @@ -449,16 +468,22 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void); * - Safe versions can be called from either contexts */ #ifdef CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE -#define portENTER_CRITICAL(mux) vPortEnterCriticalCompliance(mux) -#define portEXIT_CRITICAL(mux) vPortExitCriticalCompliance(mux) +#define portTRY_ENTER_CRITICAL(mux, timeout) xPortEnterCriticalTimeoutCompliance(mux, timeout) +#define portENTER_CRITICAL(mux) vPortEnterCriticalCompliance(mux) +#define portEXIT_CRITICAL(mux) vPortExitCriticalCompliance(mux) #else -#define portENTER_CRITICAL(mux) vPortEnterCritical(mux) -#define portEXIT_CRITICAL(mux) vPortExitCritical(mux) +#define portTRY_ENTER_CRITICAL(mux, timeout) xPortEnterCriticalTimeout(mux, timeout) +#define portENTER_CRITICAL(mux) vPortEnterCritical(mux) +#define portEXIT_CRITICAL(mux) vPortExitCritical(mux) #endif /* CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE */ -#define portENTER_CRITICAL_ISR(mux) vPortEnterCritical(mux) -#define portEXIT_CRITICAL_ISR(mux) vPortExitCritical(mux) -#define portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux) -#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux) + +#define portTRY_ENTER_CRITICAL_ISR(mux, timeout) xPortEnterCriticalTimeout(mux, timeout) +#define portENTER_CRITICAL_ISR(mux) vPortEnterCritical(mux) +#define portEXIT_CRITICAL_ISR(mux) vPortExitCritical(mux) + +#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) xPortEnterCriticalTimeoutSafe(mux) +#define portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux) +#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux) // ---------------------- Yielding ------------------------- @@ -546,71 +571,32 @@ static inline void vPortClearInterruptMaskFromISR(UBaseType_t prev_level) XTOS_RESTORE_JUST_INTLEVEL(prev_level); } -// ---------------------- Spinlocks ------------------------ - -static inline void __attribute__((always_inline)) vPortCPUInitializeMutex(portMUX_TYPE *mux) -{ - spinlock_initialize(mux); -} - -static inline void __attribute__((always_inline)) vPortCPUAcquireMutex(portMUX_TYPE *mux) -{ - spinlock_acquire(mux, portMUX_NO_TIMEOUT); -} - -static inline bool __attribute__((always_inline)) vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout) -{ - return (spinlock_acquire(mux, timeout)); -} - -static inline void __attribute__((always_inline)) vPortCPUReleaseMutex(portMUX_TYPE *mux) -{ - spinlock_release(mux); -} +// ------------------ Critical Sections -------------------- -static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set) +static inline void __attribute__((always_inline)) vPortEnterCritical(portMUX_TYPE *mux) { - compare_and_set_native(addr, compare, set); + xPortEnterCriticalTimeout(mux, portMUX_NO_TIMEOUT); } -static inline void uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set) -{ -#ifdef CONFIG_SPIRAM - compare_and_set_extram(addr, compare, set); -#endif -} - -// ------------------ Critical Sections -------------------- - static inline void __attribute__((always_inline)) vPortEnterCriticalCompliance(portMUX_TYPE *mux) { - if (!xPortInIsrContext()) { - vPortEnterCritical(mux); - } else { - esp_rom_printf("%s:%d (%s)- port*_CRITICAL called from ISR context!\n", - __FILE__, __LINE__, __FUNCTION__); - abort(); - } + xPortEnterCriticalTimeoutCompliance(mux, portMUX_NO_TIMEOUT); } -static inline void __attribute__((always_inline)) vPortExitCriticalCompliance(portMUX_TYPE *mux) +static inline BaseType_t __attribute__((always_inline)) xPortEnterCriticalTimeoutSafe(portMUX_TYPE *mux, BaseType_t timeout) { - if (!xPortInIsrContext()) { - vPortExitCritical(mux); + BaseType_t ret; + if (xPortInIsrContext()) { + ret = portTRY_ENTER_CRITICAL_ISR(mux, timeout); } else { - esp_rom_printf("%s:%d (%s)- port*_CRITICAL called from ISR context!\n", - __FILE__, __LINE__, __FUNCTION__); - abort(); + ret = portTRY_ENTER_CRITICAL(mux, timeout); } + return ret; } static inline void __attribute__((always_inline)) vPortEnterCriticalSafe(portMUX_TYPE *mux) { - if (xPortInIsrContext()) { - portENTER_CRITICAL_ISR(mux); - } else { - portENTER_CRITICAL(mux); - } + xPortEnterCriticalTimeoutSafe(mux, portMUX_NO_TIMEOUT); } static inline void __attribute__((always_inline)) vPortExitCriticalSafe(portMUX_TYPE *mux) @@ -648,6 +634,18 @@ static inline BaseType_t IRAM_ATTR xPortGetCoreID(void) return (uint32_t) cpu_hal_get_core_id(); } +static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set) +{ + compare_and_set_native(addr, compare, set); +} + +static inline void __attribute__((always_inline)) uxPortCompareSetExtram(volatile uint32_t *addr, uint32_t compare, uint32_t *set) +{ +#ifdef CONFIG_SPIRAM + compare_and_set_extram(addr, compare, set); +#endif +} + /* ------------------------------------------------------ Misc --------------------------------------------------------- diff --git a/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h b/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h index 4f0e3fe1d99..378617c73aa 100644 --- a/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h +++ b/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/portmacro_deprecated.h @@ -32,3 +32,62 @@ static inline void __attribute__((deprecated)) portEXIT_CRITICAL_NESTED(UBaseTyp { portCLEAR_INTERRUPT_MASK_FROM_ISR(prev_level); } + +/* ---------------------- Spinlocks --------------------- */ + +/** + * @brief Initialize a spinlock + * + * Does the exact same thing as spinlock_initialize(); + * + * @deprecated This function is deprecated. Call spinlock_initialize() instead + * @param[in] mux Spinlock + */ +static inline void __attribute__((deprecated)) __attribute__((always_inline)) vPortCPUInitializeMutex(portMUX_TYPE *mux) +{ + spinlock_initialize(mux); +} + +/** + * @brief Acquire a spinlock + * + * Does the exact same thing as spinlock_acquire() with unlimited timeout + * + * @deprecated This function is deprecated. Call spinlock_acquire() instead + * @param[in] mux Spinlock + */ +static inline void __attribute__((deprecated)) __attribute__((always_inline)) vPortCPUAcquireMutex(portMUX_TYPE *mux) +{ + spinlock_acquire(mux, portMUX_NO_TIMEOUT); +} + +/** + * @brief Acquire a spinlock + * + * Does the exact same thing as spinlock_acquire() with a specified timeout + * + * @deprecated This function is deprecated. Call spinlock_acquire() instead + * @note Does not have deprecated attribute due to usage in app_trace_util.c + * @param[in] mux Spinlock + * @param timeout + * @return true Spinlock acquired + * @return false Timed out + */ +static inline bool __attribute__((always_inline)) vPortCPUAcquireMutexTimeout(portMUX_TYPE *mux, int timeout) +{ + return (spinlock_acquire(mux, timeout)); +} + +/** + * @brief Release a spinlock + * + * Does the exact same thing as spinlock_release() + * + * @deprecated This function is deprecated. Call spinlock_release() instead + * @note Does not have deprecated attribute due to usage in app_trace_util.c + * @param[in] mux Spinlock + */ +static inline void __attribute__((always_inline)) vPortCPUReleaseMutex(portMUX_TYPE *mux) +{ + spinlock_release(mux); +} diff --git a/tools/sdk/esp32s2/include/hal/include/hal/lcd_types.h b/tools/sdk/esp32s2/include/hal/include/hal/lcd_types.h index 01e6d0c2949..1a62d8f8eb4 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/lcd_types.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/lcd_types.h @@ -13,12 +13,17 @@ extern "C" { /** * @brief LCD clock source * @note User should select the clock source based on the real requirement: - * - * | LCD clock source | Features | Power Management | - * |---------------------|--------------------------|----------------------------| - * | LCD_CLK_SRC_PLL160M | High resolution, fixed | ESP_PM_APB_FREQ_MAX lock | - * | LCD_CLK_SRC_APLL | Configurable resolution | ESP_PM_NO_LIGHT_SLEEP lock | - * | LCD_CLK_SRC_XTAL | Medium resolution, fixed | No PM lock | + * @verbatim embed:rst:leading-asterisk + * +---------------------+-------------------------+----------------------------+ + * | LCD clock source | Features | Power Management | + * +=====================+=========================+============================+ + * | LCD_CLK_SRC_PLL160M | High resolution | ESP_PM_APB_FREQ_MAX lock | + * +---------------------+-------------------------+----------------------------+ + * | LCD_CLK_SRC_APLL | Configurable resolution | ESP_PM_NO_LIGHT_SLEEP lock | + * +---------------------+-------------------------+----------------------------+ + * | LCD_CLK_SRC_XTAL | Medium resolution | No PM lock | + * +---------------------+-------------------------+----------------------------+ + * @endverbatim */ typedef enum { LCD_CLK_SRC_PLL160M, /*!< Select PLL160M as the source clock */ diff --git a/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h b/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h index f37c2a9e00f..dc8a060f54b 100644 --- a/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h +++ b/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h @@ -1,16 +1,8 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/tools/sdk/esp32s2/include/idf_test/include/esp32s3/idf_performance_target.h b/tools/sdk/esp32s2/include/idf_test/include/esp32s3/idf_performance_target.h index 62f996fc658..b744cda8fa0 100644 --- a/tools/sdk/esp32s2/include/idf_test/include/esp32s3/idf_performance_target.h +++ b/tools/sdk/esp32s2/include/idf_test/include/esp32s3/idf_performance_target.h @@ -1,23 +1,15 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #define IDF_PERFORMANCE_MIN_AES_CBC_THROUGHPUT_MBSEC 43 // SHA256 hardware throughput at 240MHz, threshold set lower than worst case -#define IDF_PERFORMANCE_MIN_SHA256_THROUGHPUT_MBSEC 19.8 +#define IDF_PERFORMANCE_MIN_SHA256_THROUGHPUT_MBSEC 90 // esp_sha() time to process 32KB of input data from RAM #define IDF_PERFORMANCE_MAX_TIME_SHA1_32KB 1000 #define IDF_PERFORMANCE_MAX_TIME_SHA512_32KB 900 diff --git a/tools/sdk/esp32s2/include/idf_test/include/idf_performance.h b/tools/sdk/esp32s2/include/idf_test/include/idf_performance.h index 9d99070b953..b558feb4ca3 100644 --- a/tools/sdk/esp32s2/include/idf_test/include/idf_performance.h +++ b/tools/sdk/esp32s2/include/idf_test/include/idf_performance.h @@ -8,7 +8,7 @@ */ #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP -#define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP 200 +#define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP 250 #endif #ifndef IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM #define IDF_PERFORMANCE_MAX_FREERTOS_SPINLOCK_CYCLES_PER_OP_PSRAM 300 diff --git a/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/bignum.h b/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/bignum.h index a317c456060..4f84bed7407 100644 --- a/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/bignum.h +++ b/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/bignum.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #include_next "mbedtls/bignum.h" @@ -77,4 +69,31 @@ void esp_mpi_release_hardware(void); */ int esp_mpi_mul_mpi_mod(mbedtls_mpi *Z, const mbedtls_mpi *X, const mbedtls_mpi *Y, const mbedtls_mpi *M); +#if CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + +/** + * @brief Perform a sliding-window exponentiation: X = A^E mod N + * + * @param X The destination MPI. This must point to an initialized MPI. + * @param A The base of the exponentiation. + * This must point to an initialized MPI. + * @param E The exponent MPI. This must point to an initialized MPI. + * @param N The base for the modular reduction. This must point to an + * initialized MPI. + * @param _RR A helper MPI depending solely on \p N which can be used to + * speed-up multiple modular exponentiations for the same value + * of \p N. This may be \c NULL. If it is not \c NULL, it must + * point to an initialized MPI. + * + * @return \c 0 if successful. + * @return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed. + * @return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \c N is negative or + * even, or if \c E is negative. + * @return Another negative error code on different kinds of failures. + * + */ +int mbedtls_mpi_exp_mod_soft(mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *E, const mbedtls_mpi *N, mbedtls_mpi *_RR); + +#endif // CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + #endif // CONFIG_MBEDTLS_HARDWARE_MPI diff --git a/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/esp_config.h b/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/esp_config.h index f36ebf9bc75..9c63118eb57 100644 --- a/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/esp_config.h +++ b/tools/sdk/esp32s2/include/mbedtls/port/include/mbedtls/esp_config.h @@ -153,15 +153,22 @@ #undef MBEDTLS_MD5_ALT #endif -/* The following MPI (bignum) functions have ESP32 hardware support. - For exponential mod, both software and hardware implementation - will be compiled. If CONFIG_MBEDTLS_HARDWARE_MPI is enabled, mod APIs - will be wrapped to use hardware implementation. -*/ -#undef MBEDTLS_MPI_EXP_MOD_ALT +/* The following MPI (bignum) functions have hardware support. + * Uncommenting these macros will use the hardware-accelerated + * implementations. + */ #ifdef CONFIG_MBEDTLS_HARDWARE_MPI +#ifdef CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI + /* Prefer hardware and fallback to software */ + #define MBEDTLS_MPI_EXP_MOD_ALT_FALLBACK +#else + /* Hardware only mode */ + #define MBEDTLS_MPI_EXP_MOD_ALT +#endif #define MBEDTLS_MPI_MUL_MPI_ALT #else +#undef MBEDTLS_MPI_EXP_MOD_ALT_FALLBACK +#undef MBEDTLS_MPI_EXP_MOD_ALT #undef MBEDTLS_MPI_MUL_MPI_ALT #endif diff --git a/tools/sdk/esp32s2/include/vfs/include/esp_vfs.h b/tools/sdk/esp32s2/include/vfs/include/esp_vfs.h index 2bc8c77fd2b..0498a3aa59b 100644 --- a/tools/sdk/esp32s2/include/vfs/include/esp_vfs.h +++ b/tools/sdk/esp32s2/include/vfs/include/esp_vfs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __ESP_VFS_H__ #define __ESP_VFS_H__ @@ -410,7 +402,8 @@ int esp_vfs_utime(const char *path, const struct utimbuf *times); * @param timeout If not NULL, then points to timeval structure which * specifies the time period after which the functions should * time-out and return. If it is NULL, then the function will - * not time-out. + * not time-out. Note that the timeout period is rounded up to + * the system tick and incremented by one. * * @return The number of descriptors set in the descriptor sets, or -1 * when an error (specified by errno) have occurred. diff --git a/tools/sdk/esp32s2/ld/libcat_face_detect.a b/tools/sdk/esp32s2/ld/libcat_face_detect.a index 0be62683524..2895139618b 100644 Binary files a/tools/sdk/esp32s2/ld/libcat_face_detect.a and b/tools/sdk/esp32s2/ld/libcat_face_detect.a differ diff --git a/tools/sdk/esp32s2/ld/libcolor_detect.a b/tools/sdk/esp32s2/ld/libcolor_detect.a index 9de44aa6021..8db888bc430 100644 Binary files a/tools/sdk/esp32s2/ld/libcolor_detect.a and b/tools/sdk/esp32s2/ld/libcolor_detect.a differ diff --git a/tools/sdk/esp32s2/ld/libdl.a b/tools/sdk/esp32s2/ld/libdl.a index 64762c5e64d..fef3d980101 100644 Binary files a/tools/sdk/esp32s2/ld/libdl.a and b/tools/sdk/esp32s2/ld/libdl.a differ diff --git a/tools/sdk/esp32s2/ld/libhuman_face_detect.a b/tools/sdk/esp32s2/ld/libhuman_face_detect.a index 871f0bbc997..547178a6d26 100644 Binary files a/tools/sdk/esp32s2/ld/libhuman_face_detect.a and b/tools/sdk/esp32s2/ld/libhuman_face_detect.a differ diff --git a/tools/sdk/esp32s2/ld/libmfn.a b/tools/sdk/esp32s2/ld/libmfn.a index 9d26756b63e..c09504ba0cc 100644 Binary files a/tools/sdk/esp32s2/ld/libmfn.a and b/tools/sdk/esp32s2/ld/libmfn.a differ diff --git a/tools/sdk/esp32s2/ld/sections.ld b/tools/sdk/esp32s2/ld/sections.ld index 553d5febc2b..278d84c981a 100644 --- a/tools/sdk/esp32s2/ld/sections.ld +++ b/tools/sdk/esp32s2/ld/sections.ld @@ -204,7 +204,7 @@ SECTIONS *libesp_system.a:esp_system.*(.literal.esp_system_abort .text.esp_system_abort) *libesp_system.a:ubsan.*(.literal .literal.* .text .text.*) *libfreertos.a:(EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .literal EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .literal.* EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .text EXCLUDE_FILE(*libfreertos.a:port.* *libfreertos.a:port_common.*) .text.*) - *libfreertos.a:port.*(.literal.pxPortInitialiseStack .literal.unlikely.vPortEndScheduler .literal.vApplicationStackOverflowHook .literal.vPortAssertIfInISR .literal.vPortEnterCritical .literal.vPortExitCritical .literal.vPortSetStackWatchpoint .literal.vPortYieldOtherCore .literal.xPortInIsrContext .literal.xPortStartScheduler .text .text.pxPortInitialiseStack .text.unlikely.vPortEndScheduler .text.vApplicationStackOverflowHook .text.vPortAssertIfInISR .text.vPortEnterCritical .text.vPortExitCritical .text.vPortSetStackWatchpoint .text.vPortYieldOtherCore .text.xPortGetTickRateHz .text.xPortInIsrContext .text.xPortStartScheduler) + *libfreertos.a:port.*(.literal.pxPortInitialiseStack .literal.unlikely.vPortEndScheduler .literal.vApplicationStackOverflowHook .literal.vPortAssertIfInISR .literal.vPortExitCritical .literal.vPortExitCritical$constprop$1 .literal.vPortExitCriticalCompliance .literal.vPortSetStackWatchpoint .literal.vPortYieldOtherCore .literal.xPortEnterCriticalTimeout .literal.xPortEnterCriticalTimeout$constprop$2 .literal.xPortEnterCriticalTimeoutCompliance .literal.xPortInIsrContext .literal.xPortStartScheduler .text .text.pxPortInitialiseStack .text.unlikely.vPortEndScheduler .text.vApplicationStackOverflowHook .text.vPortAssertIfInISR .text.vPortExitCritical .text.vPortExitCritical$constprop$1 .text.vPortExitCriticalCompliance .text.vPortSetStackWatchpoint .text.vPortYieldOtherCore .text.xPortEnterCriticalTimeout .text.xPortEnterCriticalTimeout$constprop$2 .text.xPortEnterCriticalTimeoutCompliance .text.xPortGetTickRateHz .text.xPortInIsrContext .text.xPortStartScheduler) *libfreertos.a:port_common.*(.literal.esp_startup_start_app_common .literal.vApplicationGetIdleTaskMemory .literal.vApplicationGetTimerTaskMemory .literal.xPortCheckValidTCBMem .literal.xPortcheckValidStackMem .text .text.esp_startup_start_app_common .text.vApplicationGetIdleTaskMemory .text.vApplicationGetTimerTaskMemory .text.xPortCheckValidTCBMem .text.xPortcheckValidStackMem) *libgcc.a:_divsf3.*(.literal .literal.* .text .text.*) *libgcc.a:lib2funcs.*(.literal .literal.* .text .text.*) @@ -371,8 +371,8 @@ SECTIONS *(.ext_ram.bss*) *(.bss .bss.*) - *(.dynbss .dynsbss .gnu.linkonce.b .gnu.linkonce.b.* .gnu.linkonce.sb .gnu.linkonce.sb.* .gnu.linkonce.sb2 .gnu.linkonce.sb2.* .sbss .sbss.* .sbss2 .sbss2.* .scommon .share.mem) *(.ext_ram.bss .ext_ram.bss.*) + *(.dynbss .dynsbss .gnu.linkonce.b .gnu.linkonce.b.* .gnu.linkonce.sb .gnu.linkonce.sb.* .gnu.linkonce.sb2 .gnu.linkonce.sb2.* .sbss .sbss.* .sbss2 .sbss2.* .scommon .share.mem) *(COMMON) _bt_bss_start = ABSOLUTE(.); *libbt.a:(.bss .bss.* COMMON) diff --git a/tools/sdk/esp32s2/lib/libapp_trace.a b/tools/sdk/esp32s2/lib/libapp_trace.a index 10dfe342d2e..9f3ef64051d 100644 Binary files a/tools/sdk/esp32s2/lib/libapp_trace.a and b/tools/sdk/esp32s2/lib/libapp_trace.a differ diff --git a/tools/sdk/esp32s2/lib/libapp_update.a b/tools/sdk/esp32s2/lib/libapp_update.a index d485ba7e554..5809d9d90fb 100644 Binary files a/tools/sdk/esp32s2/lib/libapp_update.a and b/tools/sdk/esp32s2/lib/libapp_update.a differ diff --git a/tools/sdk/esp32s2/lib/libarduino_tinyusb.a b/tools/sdk/esp32s2/lib/libarduino_tinyusb.a index 995c60cbcfb..88ca4f39605 100644 Binary files a/tools/sdk/esp32s2/lib/libarduino_tinyusb.a and b/tools/sdk/esp32s2/lib/libarduino_tinyusb.a differ diff --git a/tools/sdk/esp32s2/lib/libbootloader_support.a b/tools/sdk/esp32s2/lib/libbootloader_support.a index b0644113d8d..fc067928c95 100644 Binary files a/tools/sdk/esp32s2/lib/libbootloader_support.a and b/tools/sdk/esp32s2/lib/libbootloader_support.a differ diff --git a/tools/sdk/esp32s2/lib/libcoap.a b/tools/sdk/esp32s2/lib/libcoap.a index f3f925798f4..d68fb20bea6 100644 Binary files a/tools/sdk/esp32s2/lib/libcoap.a and b/tools/sdk/esp32s2/lib/libcoap.a differ diff --git a/tools/sdk/esp32s2/lib/libcoexist.a b/tools/sdk/esp32s2/lib/libcoexist.a index 90997cb8692..20fb8051544 100644 Binary files a/tools/sdk/esp32s2/lib/libcoexist.a and b/tools/sdk/esp32s2/lib/libcoexist.a differ diff --git a/tools/sdk/esp32s2/lib/libcore.a b/tools/sdk/esp32s2/lib/libcore.a index f5bc6e23940..e01c44ee438 100644 Binary files a/tools/sdk/esp32s2/lib/libcore.a and b/tools/sdk/esp32s2/lib/libcore.a differ diff --git a/tools/sdk/esp32s2/lib/libcxx.a b/tools/sdk/esp32s2/lib/libcxx.a index 7b342e138da..2da8f501293 100644 Binary files a/tools/sdk/esp32s2/lib/libcxx.a and b/tools/sdk/esp32s2/lib/libcxx.a differ diff --git a/tools/sdk/esp32s2/lib/libdriver.a b/tools/sdk/esp32s2/lib/libdriver.a index 8fbfbfa9d18..a47ffb66908 100644 Binary files a/tools/sdk/esp32s2/lib/libdriver.a and b/tools/sdk/esp32s2/lib/libdriver.a differ diff --git a/tools/sdk/esp32s2/lib/libefuse.a b/tools/sdk/esp32s2/lib/libefuse.a index 59b2300132c..c94fb0a07be 100644 Binary files a/tools/sdk/esp32s2/lib/libefuse.a and b/tools/sdk/esp32s2/lib/libefuse.a differ diff --git a/tools/sdk/esp32s2/lib/libesp-tls.a b/tools/sdk/esp32s2/lib/libesp-tls.a index 273e71c27bf..4fd759d9104 100644 Binary files a/tools/sdk/esp32s2/lib/libesp-tls.a and b/tools/sdk/esp32s2/lib/libesp-tls.a differ diff --git a/tools/sdk/esp32s2/lib/libesp32-camera.a b/tools/sdk/esp32s2/lib/libesp32-camera.a index 7ae3df72acb..b1d03db9ff4 100644 Binary files a/tools/sdk/esp32s2/lib/libesp32-camera.a and b/tools/sdk/esp32s2/lib/libesp32-camera.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_common.a b/tools/sdk/esp32s2/lib/libesp_common.a index 09e2eff034d..d9e5437f105 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_common.a and b/tools/sdk/esp32s2/lib/libesp_common.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_eth.a b/tools/sdk/esp32s2/lib/libesp_eth.a index fbb50ec2c62..e15127e4ae3 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_eth.a and b/tools/sdk/esp32s2/lib/libesp_eth.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_event.a b/tools/sdk/esp32s2/lib/libesp_event.a index 6ec34475e58..e5645673094 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_event.a and b/tools/sdk/esp32s2/lib/libesp_event.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_hid.a b/tools/sdk/esp32s2/lib/libesp_hid.a index dc040bcdded..2c6dc8f2632 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_hid.a and b/tools/sdk/esp32s2/lib/libesp_hid.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_http_client.a b/tools/sdk/esp32s2/lib/libesp_http_client.a index 91e4f60e602..014ef9db0dd 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_http_client.a and b/tools/sdk/esp32s2/lib/libesp_http_client.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_http_server.a b/tools/sdk/esp32s2/lib/libesp_http_server.a index c435e86e3d9..3e6317ecadf 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_http_server.a and b/tools/sdk/esp32s2/lib/libesp_http_server.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_https_ota.a b/tools/sdk/esp32s2/lib/libesp_https_ota.a index 52092754a81..bd3a929c581 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_https_ota.a and b/tools/sdk/esp32s2/lib/libesp_https_ota.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_https_server.a b/tools/sdk/esp32s2/lib/libesp_https_server.a index d5a237c8d29..28305cae1fd 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_https_server.a and b/tools/sdk/esp32s2/lib/libesp_https_server.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_hw_support.a b/tools/sdk/esp32s2/lib/libesp_hw_support.a index 97ef9c79149..30edc9fad03 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_hw_support.a and b/tools/sdk/esp32s2/lib/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_lcd.a b/tools/sdk/esp32s2/lib/libesp_lcd.a index 660aad4bd6c..eee68ce4ca0 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_lcd.a and b/tools/sdk/esp32s2/lib/libesp_lcd.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_littlefs.a b/tools/sdk/esp32s2/lib/libesp_littlefs.a index b0ef8e2281e..c04d1876117 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_littlefs.a and b/tools/sdk/esp32s2/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_local_ctrl.a b/tools/sdk/esp32s2/lib/libesp_local_ctrl.a index 69258b69b6a..5f1d6261334 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_local_ctrl.a and b/tools/sdk/esp32s2/lib/libesp_local_ctrl.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_netif.a b/tools/sdk/esp32s2/lib/libesp_netif.a index d244d1b0189..345a87a198a 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_netif.a and b/tools/sdk/esp32s2/lib/libesp_netif.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_phy.a b/tools/sdk/esp32s2/lib/libesp_phy.a index 78bf95b9003..de8096ef24c 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_phy.a and b/tools/sdk/esp32s2/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_pm.a b/tools/sdk/esp32s2/lib/libesp_pm.a index 8d3a9529433..dbf4c3866c6 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_pm.a and b/tools/sdk/esp32s2/lib/libesp_pm.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_ringbuf.a b/tools/sdk/esp32s2/lib/libesp_ringbuf.a index 8f37b3c2fc0..85c8db36c07 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_ringbuf.a and b/tools/sdk/esp32s2/lib/libesp_ringbuf.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_serial_slave_link.a b/tools/sdk/esp32s2/lib/libesp_serial_slave_link.a index 05c83ae3fbb..168efadc926 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_serial_slave_link.a and b/tools/sdk/esp32s2/lib/libesp_serial_slave_link.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_system.a b/tools/sdk/esp32s2/lib/libesp_system.a index 5f9641737b5..7859a708e9e 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_system.a and b/tools/sdk/esp32s2/lib/libesp_system.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_timer.a b/tools/sdk/esp32s2/lib/libesp_timer.a index 8f5555e9634..abf4d46141a 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_timer.a and b/tools/sdk/esp32s2/lib/libesp_timer.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_websocket_client.a b/tools/sdk/esp32s2/lib/libesp_websocket_client.a index d8478a9bf2f..16946a606f4 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_websocket_client.a and b/tools/sdk/esp32s2/lib/libesp_websocket_client.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_wifi.a b/tools/sdk/esp32s2/lib/libesp_wifi.a index 6e293daec05..a728e0dd76d 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_wifi.a and b/tools/sdk/esp32s2/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32s2/lib/libespcoredump.a b/tools/sdk/esp32s2/lib/libespcoredump.a index 247ffcf3f35..06091cc0866 100644 Binary files a/tools/sdk/esp32s2/lib/libespcoredump.a and b/tools/sdk/esp32s2/lib/libespcoredump.a differ diff --git a/tools/sdk/esp32s2/lib/libespnow.a b/tools/sdk/esp32s2/lib/libespnow.a index 3058c2a659d..6c6fae7f52e 100644 Binary files a/tools/sdk/esp32s2/lib/libespnow.a and b/tools/sdk/esp32s2/lib/libespnow.a differ diff --git a/tools/sdk/esp32s2/lib/libfatfs.a b/tools/sdk/esp32s2/lib/libfatfs.a index c924bdffa03..f3643750b41 100644 Binary files a/tools/sdk/esp32s2/lib/libfatfs.a and b/tools/sdk/esp32s2/lib/libfatfs.a differ diff --git a/tools/sdk/esp32s2/lib/libfreemodbus.a b/tools/sdk/esp32s2/lib/libfreemodbus.a index 1a6fdee0e06..38f5c16b5bb 100644 Binary files a/tools/sdk/esp32s2/lib/libfreemodbus.a and b/tools/sdk/esp32s2/lib/libfreemodbus.a differ diff --git a/tools/sdk/esp32s2/lib/libfreertos.a b/tools/sdk/esp32s2/lib/libfreertos.a index 3b4bbf9b7fc..447b5b00404 100644 Binary files a/tools/sdk/esp32s2/lib/libfreertos.a and b/tools/sdk/esp32s2/lib/libfreertos.a differ diff --git a/tools/sdk/esp32s2/lib/libheap.a b/tools/sdk/esp32s2/lib/libheap.a index 82872650c38..a984f1ca996 100644 Binary files a/tools/sdk/esp32s2/lib/libheap.a and b/tools/sdk/esp32s2/lib/libheap.a differ diff --git a/tools/sdk/esp32s2/lib/liblog.a b/tools/sdk/esp32s2/lib/liblog.a index 5d2bb78ad4f..ae9729a9d0e 100644 Binary files a/tools/sdk/esp32s2/lib/liblog.a and b/tools/sdk/esp32s2/lib/liblog.a differ diff --git a/tools/sdk/esp32s2/lib/liblwip.a b/tools/sdk/esp32s2/lib/liblwip.a index 5a37cc001bf..70184bd8797 100644 Binary files a/tools/sdk/esp32s2/lib/liblwip.a and b/tools/sdk/esp32s2/lib/liblwip.a differ diff --git a/tools/sdk/esp32s2/lib/libmbedcrypto.a b/tools/sdk/esp32s2/lib/libmbedcrypto.a index 8479af75fd4..02273f5c634 100644 Binary files a/tools/sdk/esp32s2/lib/libmbedcrypto.a and b/tools/sdk/esp32s2/lib/libmbedcrypto.a differ diff --git a/tools/sdk/esp32s2/lib/libmdns.a b/tools/sdk/esp32s2/lib/libmdns.a index c5c79869cbd..089b8805f30 100644 Binary files a/tools/sdk/esp32s2/lib/libmdns.a and b/tools/sdk/esp32s2/lib/libmdns.a differ diff --git a/tools/sdk/esp32s2/lib/libmesh.a b/tools/sdk/esp32s2/lib/libmesh.a index 36b6e3f6717..607f468b4af 100644 Binary files a/tools/sdk/esp32s2/lib/libmesh.a and b/tools/sdk/esp32s2/lib/libmesh.a differ diff --git a/tools/sdk/esp32s2/lib/libmqtt.a b/tools/sdk/esp32s2/lib/libmqtt.a index 07aa2c9d846..227973faab6 100644 Binary files a/tools/sdk/esp32s2/lib/libmqtt.a and b/tools/sdk/esp32s2/lib/libmqtt.a differ diff --git a/tools/sdk/esp32s2/lib/libnet80211.a b/tools/sdk/esp32s2/lib/libnet80211.a index 46614493707..3d2c6b257b0 100644 Binary files a/tools/sdk/esp32s2/lib/libnet80211.a and b/tools/sdk/esp32s2/lib/libnet80211.a differ diff --git a/tools/sdk/esp32s2/lib/libnewlib.a b/tools/sdk/esp32s2/lib/libnewlib.a index c17fc3e92ac..265932cb262 100644 Binary files a/tools/sdk/esp32s2/lib/libnewlib.a and b/tools/sdk/esp32s2/lib/libnewlib.a differ diff --git a/tools/sdk/esp32s2/lib/libpp.a b/tools/sdk/esp32s2/lib/libpp.a index 0069750317d..aec44ca7fe6 100644 Binary files a/tools/sdk/esp32s2/lib/libpp.a and b/tools/sdk/esp32s2/lib/libpp.a differ diff --git a/tools/sdk/esp32s2/lib/libpthread.a b/tools/sdk/esp32s2/lib/libpthread.a index fcfa14f33ca..5ac978d4f15 100644 Binary files a/tools/sdk/esp32s2/lib/libpthread.a and b/tools/sdk/esp32s2/lib/libpthread.a differ diff --git a/tools/sdk/esp32s2/lib/libsdmmc.a b/tools/sdk/esp32s2/lib/libsdmmc.a index 661aa9521b7..bc2c23558bd 100644 Binary files a/tools/sdk/esp32s2/lib/libsdmmc.a and b/tools/sdk/esp32s2/lib/libsdmmc.a differ diff --git a/tools/sdk/esp32s2/lib/libsmartconfig.a b/tools/sdk/esp32s2/lib/libsmartconfig.a index b843774944e..952a6b3c8f1 100644 Binary files a/tools/sdk/esp32s2/lib/libsmartconfig.a and b/tools/sdk/esp32s2/lib/libsmartconfig.a differ diff --git a/tools/sdk/esp32s2/lib/libspi_flash.a b/tools/sdk/esp32s2/lib/libspi_flash.a index 051e8bf025b..49fa0396d0e 100644 Binary files a/tools/sdk/esp32s2/lib/libspi_flash.a and b/tools/sdk/esp32s2/lib/libspi_flash.a differ diff --git a/tools/sdk/esp32s2/lib/libspiffs.a b/tools/sdk/esp32s2/lib/libspiffs.a index dece6cd6304..375e9cef62a 100644 Binary files a/tools/sdk/esp32s2/lib/libspiffs.a and b/tools/sdk/esp32s2/lib/libspiffs.a differ diff --git a/tools/sdk/esp32s2/lib/libtcp_transport.a b/tools/sdk/esp32s2/lib/libtcp_transport.a index 5263d9c8910..7b0e4dd99e3 100644 Binary files a/tools/sdk/esp32s2/lib/libtcp_transport.a and b/tools/sdk/esp32s2/lib/libtcp_transport.a differ diff --git a/tools/sdk/esp32s2/lib/libtcpip_adapter.a b/tools/sdk/esp32s2/lib/libtcpip_adapter.a index 394829818fb..9efb7f031db 100644 Binary files a/tools/sdk/esp32s2/lib/libtcpip_adapter.a and b/tools/sdk/esp32s2/lib/libtcpip_adapter.a differ diff --git a/tools/sdk/esp32s2/lib/libtouch_element.a b/tools/sdk/esp32s2/lib/libtouch_element.a index e1aaa7979d1..d15fed6f951 100644 Binary files a/tools/sdk/esp32s2/lib/libtouch_element.a and b/tools/sdk/esp32s2/lib/libtouch_element.a differ diff --git a/tools/sdk/esp32s2/lib/libusb.a b/tools/sdk/esp32s2/lib/libusb.a index 65a5fa28721..767910c9002 100644 Binary files a/tools/sdk/esp32s2/lib/libusb.a and b/tools/sdk/esp32s2/lib/libusb.a differ diff --git a/tools/sdk/esp32s2/lib/libvfs.a b/tools/sdk/esp32s2/lib/libvfs.a index 281b2d7705a..8c806df82d0 100644 Binary files a/tools/sdk/esp32s2/lib/libvfs.a and b/tools/sdk/esp32s2/lib/libvfs.a differ diff --git a/tools/sdk/esp32s2/lib/libwapi.a b/tools/sdk/esp32s2/lib/libwapi.a index 1cdd6cbab29..71485600253 100644 Binary files a/tools/sdk/esp32s2/lib/libwapi.a and b/tools/sdk/esp32s2/lib/libwapi.a differ diff --git a/tools/sdk/esp32s2/lib/libwifi_provisioning.a b/tools/sdk/esp32s2/lib/libwifi_provisioning.a index 2e1ee0d2edc..9056b82679c 100644 Binary files a/tools/sdk/esp32s2/lib/libwifi_provisioning.a and b/tools/sdk/esp32s2/lib/libwifi_provisioning.a differ diff --git a/tools/sdk/esp32s2/lib/libwpa_supplicant.a b/tools/sdk/esp32s2/lib/libwpa_supplicant.a index 929b144a9ec..5dcfa9c3a36 100644 Binary files a/tools/sdk/esp32s2/lib/libwpa_supplicant.a and b/tools/sdk/esp32s2/lib/libwpa_supplicant.a differ diff --git a/tools/sdk/esp32s2/lib/libxtensa.a b/tools/sdk/esp32s2/lib/libxtensa.a index 47e8e31c417..44114f73ccb 100644 Binary files a/tools/sdk/esp32s2/lib/libxtensa.a and b/tools/sdk/esp32s2/lib/libxtensa.a differ diff --git a/tools/sdk/esp32s2/sdkconfig b/tools/sdk/esp32s2/sdkconfig index 28141e190aa..b7d50b9bd9d 100644 --- a/tools/sdk/esp32s2/sdkconfig +++ b/tools/sdk/esp32s2/sdkconfig @@ -574,6 +574,7 @@ CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y # CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 CONFIG_ESP_PHY_MAX_TX_POWER=20 +# CONFIG_ESP_PHY_ENABLE_USB is not set # end of PHY # @@ -670,6 +671,7 @@ CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT=y # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # end of Wi-Fi #