diff --git a/CMakeLists.txt b/CMakeLists.txt index 851d1488eca..2e9e0ccd3d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -251,6 +251,9 @@ endfunction() maybe_add_component(esp-dsp) +if(CONFIG_ESP_INSIGHTS_ENABLED) + maybe_add_component(esp_insights) +endif() if(CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK) maybe_add_component(esp_rainmaker) maybe_add_component(qrcode) diff --git a/cores/esp32/esp_arduino_version.h b/cores/esp32/esp_arduino_version.h index 3d1f0e59ea8..d62db3935a7 100644 --- a/cores/esp32/esp_arduino_version.h +++ b/cores/esp32/esp_arduino_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_ARDUINO_VERSION_MINOR 0 /** Patch version number (x.x.X) */ -#define ESP_ARDUINO_VERSION_PATCH 6 +#define ESP_ARDUINO_VERSION_PATCH 7 /** * Macro to convert ARDUINO version number into an integer diff --git a/package.json b/package.json index 1b79acb417a..c4f551d6db0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "framework-arduinoespressif32", - "version": "2.0.6", + "version": "2.0.7", "description": "Arduino Wiring-based Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs", "keywords": [ "framework", diff --git a/package/package_esp32_index.template.json b/package/package_esp32_index.template.json index 09dddcd3316..ec4658a71c2 100644 --- a/package/package_esp32_index.template.json +++ b/package/package_esp32_index.template.json @@ -36,35 +36,35 @@ } ], "toolsDependencies": [ - { - "packager": "esp32", - "name": "riscv32-esp-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5" - }, { "packager": "esp32", "name": "xtensa-esp32-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5" + "version": "esp-2021r2-patch5-8.4.0" }, { "packager": "esp32", "name": "xtensa-esp32s2-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5" + "version": "esp-2021r2-patch5-8.4.0" }, { "packager": "esp32", "name": "xtensa-esp32s3-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5" + "version": "esp-2021r2-patch5-8.4.0" }, { "packager": "esp32", - "name": "esptool_py", - "version": "4.2.1" + "name": "riscv32-esp-elf-gcc", + "version": "esp-2021r2-patch5-8.4.0" }, { "packager": "esp32", "name": "openocd-esp32", - "version": "v0.11.0-esp32-20220706" + "version": "v0.11.0-esp32-20221026" + }, + { + "packager": "esp32", + "name": "esptool_py", + "version": "4.5" }, { "packager": "esp32", @@ -80,64 +80,9 @@ } ], "tools": [ - { - "name": "riscv32-esp-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5", - "systems": [ - { - "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-amd64.tar.gz", - "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-amd64.tar.gz", - "checksum": "SHA-256:f7d73e5f9e2df3ea6ca8e2c95d6ca6d23d6b38fd101ea5d3012f3cb3cd59f39f", - "size": "192388486" - }, - { - "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-arm64.tar.gz", - "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-arm64.tar.gz", - "checksum": "SHA-256:cf520ae3a72f65b9758ea187524b105b8b7546566d738c32e60a0df9846ef1af", - "size": "188626914" - }, - { - "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-armel.tar.gz", - "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-armel.tar.gz", - "checksum": "SHA-256:2dc3536214caa1697f6834bb4701d05894ca55b53589fc5b54064b050ef93799", - "size": "188624050" - }, - { - "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-i686.tar.gz", - "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-i686.tar.gz", - "checksum": "SHA-256:165d6d53e76d79f5ade7e2b7ade54b2b495ecfda0d1184d84d6343659d0e3bdb", - "size": "194606113" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-macos.tar.gz", - "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-macos.tar.gz", - "checksum": "SHA-256:d6d4cef216cbf28d6fbb88f3e127d4f42a376d9497c260bf8c1ad9cef440f839", - "size": "199411930" - }, - { - "host": "i686-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win32.zip", - "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win32.zip", - "checksum": "SHA-256:1e0cfcfbc8f82c441261cadd21742f66d716ec18c18bf10ed7c7d5b0bee6752f", - "size": "257844437" - }, - { - "host": "x86_64-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win64.zip", - "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win64.zip", - "checksum": "SHA-256:b08f568e8fe5069dd521b87da21b8e56117e5c2c3b492f73a51966a46d3379a4", - "size": "259712666" - } - ] - }, { "name": "xtensa-esp32-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5", + "version": "esp-2021r2-patch5-8.4.0", "systems": [ { "host": "x86_64-pc-linux-gnu", @@ -174,6 +119,13 @@ "checksum": "SHA-256:19af109fda024a3a4c989f7ccaa104f9b1b74cfd6c9363e730bb8cb9b50d5dc4", "size": "101712946" }, + { + "host": "arm64-apple-darwin", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "archiveFileName": "xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "checksum": "SHA-256:b14189772d70a96813895fff7731d0f2fec0c825cfc02e002d6d91a0cc4b6b1d", + "size": "93104016" + }, { "host": "i686-mingw32", "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch5-win32.zip", @@ -192,7 +144,7 @@ }, { "name": "xtensa-esp32s2-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5", + "version": "esp-2021r2-patch5-8.4.0", "systems": [ { "host": "x86_64-pc-linux-gnu", @@ -229,6 +181,13 @@ "checksum": "SHA-256:8eb63745b44083edef7cc6fdf3b06999f576b75134bc5e8b0ef881ca439b72d7", "size": "75154138" }, + { + "host": "arm64-apple-darwin", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "archiveFileName": "xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "checksum": "SHA-256:4cd38d6ec31076c0aa083f62ab84ab5c33aa07fafd0af61366186e5f553aa008", + "size": "66457613" + }, { "host": "i686-mingw32", "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-patch5-win32.zip", @@ -247,7 +206,7 @@ }, { "name": "xtensa-esp32s3-elf-gcc", - "version": "gcc8_4_0-esp-2021r2-patch5", + "version": "esp-2021r2-patch5-8.4.0", "systems": [ { "host": "x86_64-pc-linux-gnu", @@ -284,6 +243,13 @@ "checksum": "SHA-256:99b6d44cea5aebbedc8b6965e7bf551aa4a40ed83ddbe1c0e9b7cb255564ded5", "size": "75719772" }, + { + "host": "arm64-apple-darwin", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "archiveFileName": "xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "checksum": "SHA-256:c64b05be25d26916c65dcfe11de9e60b96d58980b2df706d3074cb70b1ef6cb9", + "size": "66791095" + }, { "host": "i686-mingw32", "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch5-win32.zip", @@ -301,169 +267,231 @@ ] }, { - "name": "esptool_py", - "version": "4.2.1", + "name": "riscv32-esp-elf-gcc", + "version": "esp-2021r2-patch5-8.4.0", "systems": [ { - "host": "i686-mingw32", - "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esptool-4.2.1-windows.zip", - "archiveFileName": "esptool-4.2.1-windows.zip", - "checksum": "SHA-256:582560067bfbd9895f4862eb5fdf87558ddee5d4d30e7575c9b8bcb0dd60fd94", - "size": "6368279" + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-amd64.tar.gz", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-amd64.tar.gz", + "checksum": "SHA-256:f7d73e5f9e2df3ea6ca8e2c95d6ca6d23d6b38fd101ea5d3012f3cb3cd59f39f", + "size": "192388486" }, { - "host": "x86_64-mingw32", - "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esptool-4.2.1-windows.zip", - "archiveFileName": "esptool-4.2.1-windows.zip", - "checksum": "SHA-256:582560067bfbd9895f4862eb5fdf87558ddee5d4d30e7575c9b8bcb0dd60fd94", - "size": "6368279" + "host": "aarch64-linux-gnu", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-arm64.tar.gz", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-arm64.tar.gz", + "checksum": "SHA-256:cf520ae3a72f65b9758ea187524b105b8b7546566d738c32e60a0df9846ef1af", + "size": "188626914" }, { - "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esptool-4.2.1-macos.tar.gz", - "archiveFileName": "esptool-4.2.1-macos.tar.gz", - "checksum": "SHA-256:a984f7ad8bdb40c42d0d368bf4bb21b69a9587aed46b7b6d7de23ca58a3f150d", - "size": "5816598" + "host": "arm-linux-gnueabihf", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-armel.tar.gz", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-armel.tar.gz", + "checksum": "SHA-256:2dc3536214caa1697f6834bb4701d05894ca55b53589fc5b54064b050ef93799", + "size": "188624050" }, { - "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esptool-4.2.1-linux.tar.gz", - "archiveFileName": "esptool-4.2.1-linux.tar.gz", - "checksum": "SHA-256:5a45fb77eb6574554ec2f45230d0b350f26f9c24ab3b6c13c4031ebdf72a34ab", - "size": "90123" + "host": "i686-pc-linux-gnu", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-i686.tar.gz", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-linux-i686.tar.gz", + "checksum": "SHA-256:165d6d53e76d79f5ade7e2b7ade54b2b495ecfda0d1184d84d6343659d0e3bdb", + "size": "194606113" }, { - "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esptool-4.2.1-linux.tar.gz", - "archiveFileName": "esptool-4.2.1-linux.tar.gz", - "checksum": "SHA-256:5a45fb77eb6574554ec2f45230d0b350f26f9c24ab3b6c13c4031ebdf72a34ab", - "size": "90123" + "host": "x86_64-apple-darwin", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-macos.tar.gz", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-macos.tar.gz", + "checksum": "SHA-256:d6d4cef216cbf28d6fbb88f3e127d4f42a376d9497c260bf8c1ad9cef440f839", + "size": "199411930" }, { - "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esptool-4.2.1-linux.tar.gz", - "archiveFileName": "esptool-4.2.1-linux.tar.gz", - "checksum": "SHA-256:5a45fb77eb6574554ec2f45230d0b350f26f9c24ab3b6c13c4031ebdf72a34ab", - "size": "90123" + "host": "arm64-apple-darwin", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-macos-arm64.tar.gz", + "checksum": "SHA-256:6e03f2ab1f145be13f8890c6de77b53f52c7bffe3d9d5824549db20298f5ba91", + "size": "191209735" }, { - "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.4/esptool-4.2.1-linux.tar.gz", - "archiveFileName": "esptool-4.2.1-linux.tar.gz", - "checksum": "SHA-256:5a45fb77eb6574554ec2f45230d0b350f26f9c24ab3b6c13c4031ebdf72a34ab", - "size": "90123" + "host": "i686-mingw32", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win32.zip", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win32.zip", + "checksum": "SHA-256:1e0cfcfbc8f82c441261cadd21742f66d716ec18c18bf10ed7c7d5b0bee6752f", + "size": "257844437" + }, + { + "host": "x86_64-mingw32", + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch5/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win64.zip", + "archiveFileName": "riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch5-win64.zip", + "checksum": "SHA-256:b08f568e8fe5069dd521b87da21b8e56117e5c2c3b492f73a51966a46d3379a4", + "size": "259712666" } ] }, { "name": "openocd-esp32", - "version": "v0.11.0-esp32-20220706", + "version": "v0.11.0-esp32-20221026", "systems": [ { - "host": "i686-mingw32", - "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20220706/openocd-esp32-win32-0.11.0-esp32-20220706.zip", - "archiveFileName": "openocd-esp32-win32-0.11.0-esp32-20220706.zip", - "checksum": "SHA-256:c3d39eb4365a9947e71f1d3780ce031185bc6437f21186568a5c05f23f57a8d0", - "size": "2608736" + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-linux-amd64-0.11.0-esp32-20221026.tar.gz", + "archiveFileName": "openocd-esp32-linux-amd64-0.11.0-esp32-20221026.tar.gz", + "checksum": "SHA-256:ce63e9b1dfab60cc62da5dc2abcc22ba7036c42afe74671c787eb026744e7d0b", + "size": "2051435" }, { - "host": "x86_64-mingw32", - "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20220706/openocd-esp32-win32-0.11.0-esp32-20220706.zip", - "archiveFileName": "openocd-esp32-win32-0.11.0-esp32-20220706.zip", - "checksum": "SHA-256:c3d39eb4365a9947e71f1d3780ce031185bc6437f21186568a5c05f23f57a8d0", - "size": "2608736" + "host": "aarch64-linux-gnu", + "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-linux-arm64-0.11.0-esp32-20221026.tar.gz", + "archiveFileName": "openocd-esp32-linux-arm64-0.11.0-esp32-20221026.tar.gz", + "checksum": "SHA-256:fe60a3a603e8c6bee47367e40fcb8c0da3a38e01163e9674ebc919b067700506", + "size": "1993843" + }, + { + "host": "arm-linux-gnueabihf", + "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-linux-armel-0.11.0-esp32-20221026.tar.gz", + "archiveFileName": "openocd-esp32-linux-armel-0.11.0-esp32-20221026.tar.gz", + "checksum": "SHA-256:6ef76101cca196a4be30fc74f191eff34abb423e32930a383012b866c9b76135", + "size": "2092111" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20220706/openocd-esp32-macos-0.11.0-esp32-20220706.tar.gz", - "archiveFileName": "openocd-esp32-macos-0.11.0-esp32-20220706.tar.gz", - "checksum": "SHA-256:333ee2ec3c9b5dc6ad4509faae55335cdea7f8bf83a56bfcf5327e4497c8538a", - "size": "2077882" + "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-macos-0.11.0-esp32-20221026.tar.gz", + "archiveFileName": "openocd-esp32-macos-0.11.0-esp32-20221026.tar.gz", + "checksum": "SHA-256:8edc666a0a230432554b73df7c62e0b5ec21fb018e7fda13b11a7ca8b6c1763b", + "size": "2199855" + }, + { + "host": "arm64-apple-darwin", + "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-macos-arm64-0.11.0-esp32-20221026.tar.gz", + "archiveFileName": "openocd-esp32-macos-arm64-0.11.0-esp32-20221026.tar.gz", + "checksum": "SHA-256:c426c0158ba6488e2f432f7c5b22e79155b5b0fae6d1ad5bbd7894723b43aa12", + "size": "2247179" + }, + { + "host": "i686-mingw32", + "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-win32-0.11.0-esp32-20221026.zip", + "archiveFileName": "openocd-esp32-win32-0.11.0-esp32-20221026.zip", + "checksum": "SHA-256:e0e789d35308c029c6b53457cf4a42a5620cb1a3014740026c089c2ed4fd77b2", + "size": "2493214" }, + { + "host": "x86_64-mingw32", + "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-win32-0.11.0-esp32-20221026.zip", + "archiveFileName": "openocd-esp32-win32-0.11.0-esp32-20221026.zip", + "checksum": "SHA-256:e0e789d35308c029c6b53457cf4a42a5620cb1a3014740026c089c2ed4fd77b2", + "size": "2493214" + } + ] + }, + { + "name": "esptool_py", + "version": "4.5", + "systems": [ { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20220706/openocd-esp32-linux-amd64-0.11.0-esp32-20220706.tar.gz", - "archiveFileName": "openocd-esp32-linux-amd64-0.11.0-esp32-20220706.tar.gz", - "checksum": "SHA-256:26f1f18dd93eb70a13203848d3fb1cc2e0de1fd6749c7dd771b2de8709735aed", - "size": "2011201" + "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.6/esptool-v4.5-src.tar.gz", + "archiveFileName": "esptool-v4.5-src.tar.gz", + "checksum": "SHA-256:0f5d20c4624d913c3c994db57da3c4e5a43bd8437351d9b789f79d3f1b057292", + "size": "96621" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20220706/openocd-esp32-linux-amd64-0.11.0-esp32-20220706.tar.gz", - "archiveFileName": "openocd-esp32-linux-amd64-0.11.0-esp32-20220706.tar.gz", - "checksum": "SHA-256:26f1f18dd93eb70a13203848d3fb1cc2e0de1fd6749c7dd771b2de8709735aed", - "size": "2011201" + "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.6/esptool-v4.5-src.tar.gz", + "archiveFileName": "esptool-v4.5-src.tar.gz", + "checksum": "SHA-256:0f5d20c4624d913c3c994db57da3c4e5a43bd8437351d9b789f79d3f1b057292", + "size": "96621" + }, + { + "host": "aarch64-linux-gnu", + "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.6/esptool-v4.5-src.tar.gz", + "archiveFileName": "esptool-v4.5-src.tar.gz", + "checksum": "SHA-256:0f5d20c4624d913c3c994db57da3c4e5a43bd8437351d9b789f79d3f1b057292", + "size": "96621" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20220706/openocd-esp32-linux-armhf-0.11.0-esp32-20220706.tar.gz", - "archiveFileName": "openocd-esp32-linux-armhf-0.11.0-esp32-20220706.tar.gz", - "checksum": "SHA-256:7f3b57332104e8b8e6194553365a70a9d3754878cfc063d5dc5d839513a63de9", - "size": "1902964" + "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.6/esptool-v4.5-src.tar.gz", + "archiveFileName": "esptool-v4.5-src.tar.gz", + "checksum": "SHA-256:0f5d20c4624d913c3c994db57da3c4e5a43bd8437351d9b789f79d3f1b057292", + "size": "96621" }, { - "host": "aarch64-linux-gnu", - "url": "https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20220706/openocd-esp32-linux-arm64-0.11.0-esp32-20220706.tar.gz", - "archiveFileName": "openocd-esp32-linux-arm64-0.11.0-esp32-20220706.tar.gz", - "checksum": "SHA-256:f97792bc2852937ec0accb9f0eb2e49926c0f747a71f101a4e34aed75d2c6fcc", - "size": "1954685" + "host": "x86_64-apple-darwin", + "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.6/esptool-v4.5-macos.tar.gz", + "archiveFileName": "esptool-v4.5-macos.tar.gz", + "checksum": "SHA-256:adcce051f282a19f78da30717ff0e4334b0edaf16a7f14d185ba4cae464586e2", + "size": "5850835" + }, + { + "host": "x86_64-mingw32", + "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.6/esptool-v4.5-win64.zip", + "archiveFileName": "esptool-v4.5-win64.zip", + "checksum": "SHA-256:a55c5f7d490fbd2cd5fdf486d71f2ed13e3304482d54374b6aa23d42c9b98a96", + "size": "6639416" + }, + { + "host": "i686-mingw32", + "url": "https://github.com/espressif/arduino-esp32/releases/download/2.0.6/esptool-v4.5-win64.zip", + "archiveFileName": "esptool-v4.5-win64.zip", + "checksum": "SHA-256:a55c5f7d490fbd2cd5fdf486d71f2ed13e3304482d54374b6aa23d42c9b98a96", + "size": "6639416" } ] }, { - "version": "3.0.0-gnu12-dc7f933", - "name": "mklittlefs", - "systems": [ - { - "host": "aarch64-linux-gnu", - "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/aarch64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", - "archiveFileName": "aarch64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", - "checksum": "SHA-256:fc56e389383749e4cf4fab0fcf75cc0ebc41e59383caf6c2eff1c3d9794af200", - "size": "44651" - }, - { - "host": "arm-linux-gnueabihf", - "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/arm-linux-gnueabihf.mklittlefs-c41e51a.200706.tar.gz", - "archiveFileName": "arm-linux-gnueabihf.mklittlefs-c41e51a.200706.tar.gz", - "checksum": "SHA-256:52b642dd0545eb3bd8dfb75dde6601df21700e4867763fd2696274be279294c5", - "size": "37211" - }, - { - "host": "i686-pc-linux-gnu", - "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", - "archiveFileName": "i686-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", - "checksum": "SHA-256:7886051d8ccc54aed0af2e7cdf6ff992bb51638df86f3b545955697720b6d062", - "size": "48033" - }, - { - "host": "i686-mingw32", - "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-w64-mingw32.mklittlefs-c41e51a.200706.zip", - "archiveFileName": "i686-w64-mingw32.mklittlefs-c41e51a.200706.zip", - "checksum": "SHA-256:43740db30ce451454f2337331f10ab4ed41bd83dbf0fa0cb4387107388b59f42", - "size": "332655" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-apple-darwin14.mklittlefs-c41e51a.200706.tar.gz", - "archiveFileName": "x86_64-apple-darwin14.mklittlefs-c41e51a.200706.tar.gz", - "checksum": "SHA-256:e3edd5e05b70db3c7df6b9d626558348ad04804022fe955c799aeb51808c7dc3", - "size": "362608" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", - "archiveFileName": "x86_64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", - "checksum": "SHA-256:66e84dda0aad747517da3785125e05738a540948aab2b7eaa02855167a1eea53", - "size": "46778" - }, - { - "host": "x86_64-mingw32", - "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-w64-mingw32.mklittlefs-c41e51a.200706.zip", - "archiveFileName": "x86_64-w64-mingw32.mklittlefs-c41e51a.200706.zip", - "checksum": "SHA-256:2e319077491f8e832e96eb4f2f7a70dd919333cee4b388c394e0e848d031d542", - "size": "345132" - } - ] + "version": "3.0.0-gnu12-dc7f933", + "name": "mklittlefs", + "systems": [ + { + "host": "aarch64-linux-gnu", + "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/aarch64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", + "archiveFileName": "aarch64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", + "checksum": "SHA-256:fc56e389383749e4cf4fab0fcf75cc0ebc41e59383caf6c2eff1c3d9794af200", + "size": "44651" + }, + { + "host": "arm-linux-gnueabihf", + "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/arm-linux-gnueabihf.mklittlefs-c41e51a.200706.tar.gz", + "archiveFileName": "arm-linux-gnueabihf.mklittlefs-c41e51a.200706.tar.gz", + "checksum": "SHA-256:52b642dd0545eb3bd8dfb75dde6601df21700e4867763fd2696274be279294c5", + "size": "37211" + }, + { + "host": "i686-pc-linux-gnu", + "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", + "archiveFileName": "i686-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", + "checksum": "SHA-256:7886051d8ccc54aed0af2e7cdf6ff992bb51638df86f3b545955697720b6d062", + "size": "48033" + }, + { + "host": "i686-mingw32", + "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-w64-mingw32.mklittlefs-c41e51a.200706.zip", + "archiveFileName": "i686-w64-mingw32.mklittlefs-c41e51a.200706.zip", + "checksum": "SHA-256:43740db30ce451454f2337331f10ab4ed41bd83dbf0fa0cb4387107388b59f42", + "size": "332655" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-apple-darwin14.mklittlefs-c41e51a.200706.tar.gz", + "archiveFileName": "x86_64-apple-darwin14.mklittlefs-c41e51a.200706.tar.gz", + "checksum": "SHA-256:e3edd5e05b70db3c7df6b9d626558348ad04804022fe955c799aeb51808c7dc3", + "size": "362608" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", + "archiveFileName": "x86_64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz", + "checksum": "SHA-256:66e84dda0aad747517da3785125e05738a540948aab2b7eaa02855167a1eea53", + "size": "46778" + }, + { + "host": "x86_64-mingw32", + "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-w64-mingw32.mklittlefs-c41e51a.200706.zip", + "archiveFileName": "x86_64-w64-mingw32.mklittlefs-c41e51a.200706.zip", + "checksum": "SHA-256:2e319077491f8e832e96eb4f2f7a70dd919333cee4b388c394e0e848d031d542", + "size": "345132" + } + ] }, { "name": "mkspiffs", diff --git a/platform.txt b/platform.txt index b6152789e24..29f420e8ffb 100644 --- a/platform.txt +++ b/platform.txt @@ -1,5 +1,5 @@ name=ESP32 Arduino -version=2.0.6 +version=2.0.7 tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf @@ -35,12 +35,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.3" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/esp_hw_support/port/esp32/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/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/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/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/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/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/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_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/src/include" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-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_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 -lulp -lwifi_provisioning -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lcbor -lesp_diagnostics -lrtc_store -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lmultinet -lesp_audio_processor -lesp_audio_front_end -lwakenet -lesp-sr -lmultinet -lesp_audio_processor -lesp_audio_front_end -lwakenet -ljson -lspiffs -ldl_lib -lc_speech_features -lwakeword_model -lmultinet2_ch -lesp_tts_chinese -lvoice_set_xiaole -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_2 -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_2 -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_2 -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_2 -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_2 -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.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.4-148-g4c2afac355" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/esp_hw_support/port/esp32/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/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/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/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/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/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/include" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/src/include" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/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_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 -lulp -lwifi_provisioning -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp-sr -lesp32-camera -lesp_littlefs -lespressif__esp-dsp -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lesp_insights -lcbor -lesp_diagnostics -lrmaker_common -lmqtt -lrtc_store -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lmultinet -lesp_audio_processor -lesp_audio_front_end -lwakenet -lesp-sr -lmultinet -lesp_audio_processor -lesp_audio_front_end -lwakenet -ljson -lspiffs -ldl_lib -lc_speech_features -lwakeword_model -lmultinet2_ch -lesp_tts_chinese -lvoice_set_xiaole -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_2 -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_2 -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_2 -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_2 -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_2 -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 -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 -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=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -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 -Wl,--wrap=esp_log_write -Wl,--wrap=esp_log_writev -Wl,--wrap=log_printf -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 include_esp_phy_override -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 -Wl,--wrap=esp_log_write -Wl,--wrap=esp_log_writev -Wl,--wrap=log_printf -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 include_esp_phy_override -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 # @@ -50,8 +50,8 @@ build.extra_flags.esp32=-DARDUINO_USB_CDC_ON_BOOT=0 # # ESP32S3 Support Start # -compiler.cpreprocessor.flags.esp32s3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4.3" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3/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/esp32s3" "-I{compiler.sdk.path}/include/soc/esp32s3/include" "-I{compiler.sdk.path}/include/hal/esp32s3/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/esp32s3" "-I{compiler.sdk.path}/include/esp_rom/esp32s3" "-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/esp32s3/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s3/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/esp32s3/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/esp32s3/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/esp32s3" "-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/esp32s3/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/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/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/esp32s3" "-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/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/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/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/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/src/include" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32s3" "-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.esp32s3=-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_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 -lulp -lwifi_provisioning -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp-dsp -lesp-sr -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -lcbor -lesp_diagnostics -lrtc_store -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lqrcode -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -lwakenet -lesp-sr -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -lwakenet -ljson -lspiffs -ldl_lib -lc_speech_features -lesp-dsp -lesp_tts_chinese -lvoice_set_xiaole -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_2 -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_2 -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_2 -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_2 -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_2 -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_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc +compiler.cpreprocessor.flags.esp32s3=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.4.4-148-g4c2afac355" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3" "-I{compiler.sdk.path}/include/esp_hw_support/port/esp32s3/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/esp32s3" "-I{compiler.sdk.path}/include/soc/esp32s3/include" "-I{compiler.sdk.path}/include/hal/esp32s3/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/esp32s3" "-I{compiler.sdk.path}/include/esp_rom/esp32s3" "-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/esp32s3/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s3/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/esp32s3/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/esp32s3/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/esp32s3" "-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/esp32s3/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/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/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/freemodbus/common/include" "-I{compiler.sdk.path}/include/idf_test/include" "-I{compiler.sdk.path}/include/idf_test/include/esp32s3" "-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/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/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/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/src/include" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32s3" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.c.elf.libs.esp32s3=-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_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 -lulp -lwifi_provisioning -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp-sr -lesp32-camera -lesp_littlefs -lespressif__esp-dsp -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lesp_insights -lcbor -lesp_diagnostics -lrmaker_common -lmqtt -lrtc_store -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -lwakenet -lesp-sr -lhufzip -lesp_audio_front_end -lesp_audio_processor -lmultinet -lwakenet -ljson -lspiffs -ldl_lib -lfst -lc_speech_features -lespressif__esp-dsp -lesp_tts_chinese -lvoice_set_xiaole -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_2 -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_2 -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_2 -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_2 -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_2 -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_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lphy -lbtbb -lesp_phy -lphy -lbtbb -lesp_phy -lphy -lbtbb -lxt_hal -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32s3=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -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.esp32s3=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -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.esp32s3=-mlongcalls -ffunction-sections -fdata-sections -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -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 @@ -65,8 +65,8 @@ build.extra_flags.esp32s3=-DARDUINO_USB_MODE={build.usb_mode} -DARDUINO_USB_CDC_ # # 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.3" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/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/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/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp-sr/include/esp32" "-I{compiler.sdk.path}/include/esp-sr/src/include" "-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 -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp-dsp -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -ltouch_element -lcbor -lesp_diagnostics -lrtc_store -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lprotobuf-c -lmdns -lrmaker_common -lmqtt -ljson_parser -ljson_generator -lesp_schedule -lqrcode -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -ljson -lspiffs -lesp_tts_chinese -lvoice_set_xiaole -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_2 -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_2 -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_2 -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_2 -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_2 -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_2 -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.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.4-148-g4c2afac355" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/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/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/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/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/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 -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp32-camera -lesp_littlefs -lespressif__esp-dsp -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lperfmon -lusb -ltouch_element -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lprotobuf-c -lmdns -ljson -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lesp_insights -lcbor -lesp_diagnostics -lrmaker_common -lmqtt -lrtc_store -larduino_tinyusb -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_tts_chinese -lvoice_set_xiaole -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_2 -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_2 -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_2 -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_2 -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_2 -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_2 -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 -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 -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.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 -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 @@ -80,8 +80,8 @@ build.extra_flags.esp32s2=-DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT={build. # # 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.3" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/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/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/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_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/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.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 -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp-dsp -lesp32-camera -lesp_littlefs -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lcbor -lesp_diagnostics -lrtc_store -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -lrmaker_common -lmqtt -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 -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_2 -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_2 -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_2 -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_2 -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_2 -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_2 -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.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.4-148-g4c2afac355" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS "-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/bt/esp_ble_mesh/mesh_common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_common/tinycrypt/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_core/storage" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/btc/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/common/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/client/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/mesh_models/server/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/core/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/api/models/include" "-I{compiler.sdk.path}/include/bt/esp_ble_mesh/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/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/rmaker_common/include" "-I{compiler.sdk.path}/include/json_parser/upstream/include" "-I{compiler.sdk.path}/include/json_parser/upstream" "-I{compiler.sdk.path}/include/json_generator/upstream" "-I{compiler.sdk.path}/include/esp_schedule/include" "-I{compiler.sdk.path}/include/esp_rainmaker/include" "-I{compiler.sdk.path}/include/gpio_button/button/include" "-I{compiler.sdk.path}/include/qrcode/include" "-I{compiler.sdk.path}/include/ws2812_led" "-I{compiler.sdk.path}/include/esp_diagnostics/include" "-I{compiler.sdk.path}/include/rtc_store/include" "-I{compiler.sdk.path}/include/esp_insights/include" "-I{compiler.sdk.path}/include/esp_littlefs/include" "-I{compiler.sdk.path}/include/esp-dl/include" "-I{compiler.sdk.path}/include/esp-dl/include/tool" "-I{compiler.sdk.path}/include/esp-dl/include/typedef" "-I{compiler.sdk.path}/include/esp-dl/include/image" "-I{compiler.sdk.path}/include/esp-dl/include/math" "-I{compiler.sdk.path}/include/esp-dl/include/nn" "-I{compiler.sdk.path}/include/esp-dl/include/layer" "-I{compiler.sdk.path}/include/esp-dl/include/detect" "-I{compiler.sdk.path}/include/esp-dl/include/model_zoo" "-I{compiler.sdk.path}/include/esp-sr/esp-tts/esp_tts_chinese/include" "-I{compiler.sdk.path}/include/esp32-camera/driver/include" "-I{compiler.sdk.path}/include/esp32-camera/conversions/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dotprod/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/support/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/hann/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_harris/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/nuttall/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/windows/flat_top/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/iir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fir/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/add/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sub/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mul/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/addc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/mulc/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/math/sqrt/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/matrix/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/fft/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/dct/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/conv/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/common/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf/include" "-I{compiler.sdk.path}/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include" "-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 -lrmaker_common -ljson_parser -ljson_generator -lesp_schedule -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp_diagnostics -lrtc_store -lesp_insights -lesp32-camera -lesp_littlefs -lespressif__esp-dsp -lfb_gfx -lasio -lcmock -lunity -lcoap -lesp_lcd -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lesp_adc_cal -lesp_hid -lfatfs -lwear_levelling -lopenssl -lspiffs -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -lmdns -ljson -ljson_parser -ljson_generator -lesp_schedule -lqrcode -lesp_insights -lcbor -lesp_diagnostics -lrmaker_common -lmqtt -lrtc_store -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lesp_tts_chinese -lvoice_set_xiaole -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_2 -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_2 -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_2 -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_2 -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_2 -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_2 -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 -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.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 -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.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 -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 diff --git a/tools/gen_esp32part.py b/tools/gen_esp32part.py index ba6ba6c5da6..8660c9d6542 100755 --- a/tools/gen_esp32part.py +++ b/tools/gen_esp32part.py @@ -28,6 +28,10 @@ MIN_PARTITION_SUBTYPE_APP_OTA = 0x10 NUM_PARTITION_SUBTYPE_APP_OTA = 16 +SECURE_NONE = None +SECURE_V1 = 'v1' +SECURE_V2 = 'v2' + __version__ = '1.2' APP_TYPE = 0x00 @@ -91,13 +95,26 @@ def get_subtype_as_int(ptype, subtype): STRICT_DATA_ALIGNMENT = 0x1000 -def get_alignment_for_type(ptype): +def get_alignment_offset_for_type(ptype): return ALIGNMENT.get(ptype, ALIGNMENT[DATA_TYPE]) +def get_alignment_size_for_type(ptype): + if ptype == APP_TYPE and secure == SECURE_V1: + # For secure boot v1 case, app partition must be 64K aligned + # signature block (68 bytes) lies at the very end of 64K block + return 0x10000 + if ptype == APP_TYPE and secure == SECURE_V2: + # For secure boot v2 case, app partition must be 4K aligned + # signature block (4K) is kept after padding the unsigned image to 64K boundary + return 0x1000 + # No specific size alignement requirement as such + return 0x1 + + quiet = False md5sum = True -secure = False +secure = SECURE_NONE offset_part_table = 0 @@ -164,7 +181,7 @@ def expand_vars(f): raise InputError('CSV Error: Partitions overlap. Partition at line %d sets offset 0x%x. Previous partition ends 0x%x' % (e.line_no, e.offset, last_end)) if e.offset is None: - pad_to = get_alignment_for_type(e.type) + pad_to = get_alignment_offset_for_type(e.type) if last_end % pad_to != 0: last_end += pad_to - (last_end % pad_to) e.offset = last_end @@ -397,18 +414,20 @@ def verify(self): raise ValidationError(self, 'Subtype field is not set') if self.offset is None: raise ValidationError(self, 'Offset field is not set') - align = get_alignment_for_type(self.type) - if self.offset % align: - raise ValidationError(self, 'Offset 0x%x is not aligned to 0x%x' % (self.offset, align)) + if self.size is None: + raise ValidationError(self, 'Size field is not set') + offset_align = get_alignment_offset_for_type(self.type) + if self.offset % offset_align: + raise ValidationError(self, 'Offset 0x%x is not aligned to 0x%x' % (self.offset, offset_align)) # The alignment requirement for non-app partition is 4 bytes, but it should be 4 kB. # Print a warning for now, make it an error in IDF 5.0 (IDF-3742). if self.type != APP_TYPE and self.offset % STRICT_DATA_ALIGNMENT: critical('WARNING: Partition %s not aligned to 0x%x.' 'This is deprecated and will be considered an error in the future release.' % (self.name, STRICT_DATA_ALIGNMENT)) - if self.size % align and secure and self.type == APP_TYPE: - raise ValidationError(self, 'Size 0x%x is not aligned to 0x%x' % (self.size, align)) - if self.size is None: - raise ValidationError(self, 'Size field is not set') + if self.type == APP_TYPE and secure is not SECURE_NONE: + size_align = get_alignment_size_for_type(self.type) + if self.size % size_align: + raise ValidationError(self, 'Size 0x%x is not aligned to 0x%x' % (self.size, size_align)) if self.name in TYPES and TYPES.get(self.name, '') != self.type: critical("WARNING: Partition has name '%s' which is a partition type, but does not match this partition's " @@ -513,7 +532,7 @@ def main(): 'enabled by default and this flag does nothing.', action='store_true') parser.add_argument('--quiet', '-q', help="Don't print non-critical status messages to stderr", action='store_true') parser.add_argument('--offset', '-o', help='Set offset partition table', default='0x8000') - parser.add_argument('--secure', help='Require app partitions to be suitable for secure boot', action='store_true') + parser.add_argument('--secure', help='Require app partitions to be suitable for secure boot', nargs='?', const=SECURE_V1, choices=[SECURE_V1, SECURE_V2]) parser.add_argument('input', help='Path to CSV or binary file to parse.', type=argparse.FileType('rb')) parser.add_argument('output', help='Path to output converted binary or CSV file. Will use stdout if omitted.', nargs='?', default='-') diff --git a/tools/get.py b/tools/get.py index 088e2f67139..83554bc25e9 100755 --- a/tools/get.py +++ b/tools/get.py @@ -177,20 +177,34 @@ def load_tools_list(filename, platform): for t in tools_info: tool_platform = [p for p in t['systems'] if p['host'] == platform] if len(tool_platform) == 0: - continue + # Fallback to x86 on Apple ARM + if platform == 'arm64-apple-darwin': + tool_platform = [p for p in t['systems'] if p['host'] == 'x86_64-apple-darwin'] + if len(tool_platform) == 0: + continue + # Fallback to 32bit on 64bit x86 Windows + elif platform == 'x86_64-mingw32': + tool_platform = [p for p in t['systems'] if p['host'] == 'i686-mingw32'] + if len(tool_platform) == 0: + continue + else: + continue tools_to_download.append(tool_platform[0]) return tools_to_download def identify_platform(): - arduino_platform_names = {'Darwin' : {32 : 'i386-apple-darwin', 64 : 'x86_64-apple-darwin'}, - 'Linux' : {32 : 'i686-pc-linux-gnu', 64 : 'x86_64-pc-linux-gnu'}, - 'LinuxARM': {32 : 'arm-linux-gnueabihf', 64 : 'aarch64-linux-gnu'}, - 'Windows' : {32 : 'i686-mingw32', 64 : 'i686-mingw32'}} + arduino_platform_names = {'Darwin' : {32 : 'i386-apple-darwin', 64 : 'x86_64-apple-darwin'}, + 'DarwinARM': {32 : 'arm64-apple-darwin', 64 : 'arm64-apple-darwin'}, + 'Linux' : {32 : 'i686-pc-linux-gnu', 64 : 'x86_64-pc-linux-gnu'}, + 'LinuxARM' : {32 : 'arm-linux-gnueabihf', 64 : 'aarch64-linux-gnu'}, + 'Windows' : {32 : 'i686-mingw32', 64 : 'x86_64-mingw32'}} bits = 32 if sys.maxsize > 2**32: bits = 64 sys_name = platform.system() sys_platform = platform.platform() + if 'Darwin' in sys_name and (sys_platform.find('arm') > 0 or sys_platform.find('arm64') > 0): + sys_name = 'DarwinARM' if 'Linux' in sys_name and (sys_platform.find('arm') > 0 or sys_platform.find('aarch64') > 0): sys_name = 'LinuxARM' if 'CYGWIN_NT' in sys_name: diff --git a/tools/platformio-build-esp32.py b/tools/platformio-build-esp32.py index 6d7be1be5c1..72ea5234a10 100644 --- a/tools/platformio-build-esp32.py +++ b/tools/platformio-build-esp32.py @@ -243,7 +243,7 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "fatfs", "diskio"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "fatfs", "vfs"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "fatfs", "src"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "freemodbus", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "freemodbus", "freemodbus", "common", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "idf_test", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "idf_test", "include", "esp32"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "jsmn", "include"), @@ -268,31 +268,6 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_diagnostics", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "rtc_store", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_insights", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "dotprod", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "support", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "windows", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "windows", "hann", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "windows", "blackman", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "windows", "blackman_harris", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "windows", "blackman_nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "windows", "nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "windows", "flat_top", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "iir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "fir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "math", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "math", "add", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "math", "sub", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "math", "mul", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "math", "addc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "math", "mulc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "math", "sqrt", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "matrix", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "fft", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "dct", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "conv", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "common", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "kalman", "ekf", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_littlefs", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-dl", "include", "tool"), @@ -308,6 +283,31 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-sr", "include", "esp32"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp32-camera", "driver", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp32-camera", "conversions", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "dotprod", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "support", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "windows", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "windows", "hann", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "windows", "blackman", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "windows", "blackman_harris", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "windows", "blackman_nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "windows", "nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "windows", "flat_top", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "iir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "fir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "math", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "math", "add", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "math", "sub", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "math", "mul", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "math", "addc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "math", "mulc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "math", "sqrt", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "matrix", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "fft", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "dct", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "conv", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "kalman", "ekf", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "espressif__esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "fb_gfx", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", env.BoardConfig().get("build.arduino.memory_type", (env.BoardConfig().get("build.flash_mode", "dio") + "_qspi")), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) @@ -320,7 +320,7 @@ ], LIBS=[ - "-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_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", "-lulp", "-lwifi_provisioning", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp-dsp", "-lesp-sr", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lcbor", "-lesp_diagnostics", "-lrtc_store", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-lrmaker_common", "-lmqtt", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lmultinet", "-lesp_audio_processor", "-lesp_audio_front_end", "-lwakenet", "-lesp-sr", "-lmultinet", "-lesp_audio_processor", "-lesp_audio_front_end", "-lwakenet", "-ljson", "-lspiffs", "-ldl_lib", "-lc_speech_features", "-lwakeword_model", "-lmultinet2_ch", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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" + "-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_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", "-lulp", "-lwifi_provisioning", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp-sr", "-lesp32-camera", "-lesp_littlefs", "-lespressif__esp-dsp", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-lesp_insights", "-lcbor", "-lesp_diagnostics", "-lrmaker_common", "-lmqtt", "-lrtc_store", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lmultinet", "-lesp_audio_processor", "-lesp_audio_front_end", "-lwakenet", "-lesp-sr", "-lmultinet", "-lesp_audio_processor", "-lesp_audio_front_end", "-lwakenet", "-ljson", "-lspiffs", "-ldl_lib", "-lc_speech_features", "-lwakeword_model", "-lmultinet2_ch", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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" ], CPPDEFINES=[ @@ -329,7 +329,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4.3\\"'), + ("IDF_VER", '\\"v4.4.4-148-g4c2afac355\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32c3.py b/tools/platformio-build-esp32c3.py index fc2c5b77c2a..8ff54326f61 100644 --- a/tools/platformio-build-esp32c3.py +++ b/tools/platformio-build-esp32c3.py @@ -242,7 +242,7 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "fatfs", "diskio"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "fatfs", "vfs"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "fatfs", "src"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "freemodbus", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "freemodbus", "freemodbus", "common", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "idf_test", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "idf_test", "include", "esp32c3"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "jsmn", "include"), @@ -265,31 +265,6 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp_diagnostics", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "rtc_store", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp_insights", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "dotprod", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "support", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "hann", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "blackman", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "blackman_harris", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "blackman_nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "windows", "flat_top", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "iir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "fir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "add", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "sub", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "mul", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "addc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "mulc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "math", "sqrt", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "matrix", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "fft", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "dct", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "conv", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "common", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "kalman", "ekf", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp_littlefs", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "tool"), @@ -300,8 +275,34 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "layer"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "detect"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-dl", "include", "model_zoo"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp-sr", "esp-tts", "esp_tts_chinese", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp32-camera", "driver", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "esp32-camera", "conversions", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "dotprod", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "support", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "windows", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "windows", "hann", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "windows", "blackman", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "windows", "blackman_harris", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "windows", "blackman_nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "windows", "nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "windows", "flat_top", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "iir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "fir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "math", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "math", "add", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "math", "sub", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "math", "mul", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "math", "addc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "math", "mulc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "math", "sqrt", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "matrix", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "fft", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "dct", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "conv", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "kalman", "ekf", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "espressif__esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", "include", "fb_gfx", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32c3", env.BoardConfig().get("build.arduino.memory_type", (env.BoardConfig().get("build.flash_mode", "dio") + "_qspi")), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) @@ -314,7 +315,7 @@ ], LIBS=[ - "-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", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp-dsp", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lcbor", "-lesp_diagnostics", "-lrtc_store", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson", "-lrmaker_common", "-lmqtt", "-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", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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" + "-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", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp32-camera", "-lesp_littlefs", "-lespressif__esp-dsp", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-lesp_insights", "-lcbor", "-lesp_diagnostics", "-lrmaker_common", "-lmqtt", "-lrtc_store", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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" ], CPPDEFINES=[ @@ -323,7 +324,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4.3\\"'), + ("IDF_VER", '\\"v4.4.4-148-g4c2afac355\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s2.py b/tools/platformio-build-esp32s2.py index 4bb4fe5bab2..11f547db7d6 100644 --- a/tools/platformio-build-esp32s2.py +++ b/tools/platformio-build-esp32s2.py @@ -221,7 +221,7 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "fatfs", "diskio"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "fatfs", "vfs"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "fatfs", "src"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "freemodbus", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "freemodbus", "freemodbus", "common", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "idf_test", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "idf_test", "include", "esp32s2"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "jsmn", "include"), @@ -248,31 +248,6 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_diagnostics", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "rtc_store", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_insights", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "dotprod", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "support", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "hann", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "blackman", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "blackman_harris", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "blackman_nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "windows", "flat_top", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "iir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "fir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "math", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "math", "add", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "math", "sub", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "math", "mul", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "math", "addc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "math", "mulc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "math", "sqrt", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "matrix", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "fft", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "dct", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "conv", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "common", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "kalman", "ekf", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "freertos", "include", "freertos"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "arduino_tinyusb", "tinyusb", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "arduino_tinyusb", "include"), @@ -287,10 +262,33 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "detect"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-dl", "include", "model_zoo"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-sr", "esp-tts", "esp_tts_chinese", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-sr", "include", "esp32"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-sr", "src", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp32-camera", "driver", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp32-camera", "conversions", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "dotprod", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "support", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "windows", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "windows", "hann", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "windows", "blackman", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "windows", "blackman_harris", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "windows", "blackman_nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "windows", "nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "windows", "flat_top", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "iir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "fir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "math", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "math", "add", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "math", "sub", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "math", "mul", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "math", "addc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "math", "mulc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "math", "sqrt", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "matrix", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "fft", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "dct", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "conv", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "kalman", "ekf", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "espressif__esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "fb_gfx", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", env.BoardConfig().get("build.arduino.memory_type", (env.BoardConfig().get("build.flash_mode", "dio") + "_qspi")), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) @@ -303,7 +301,7 @@ ], LIBS=[ - "-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", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp-dsp", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lusb", "-ltouch_element", "-lcbor", "-lesp_diagnostics", "-lrtc_store", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-lmdns", "-lrmaker_common", "-lmqtt", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-ljson", "-lspiffs", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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" + "-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", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp32-camera", "-lesp_littlefs", "-lespressif__esp-dsp", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lusb", "-ltouch_element", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-lmdns", "-ljson", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-lesp_insights", "-lcbor", "-lesp_diagnostics", "-lrmaker_common", "-lmqtt", "-lrtc_store", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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" ], CPPDEFINES=[ @@ -312,7 +310,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4.3\\"'), + ("IDF_VER", '\\"v4.4.4-148-g4c2afac355\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/platformio-build-esp32s3.py b/tools/platformio-build-esp32s3.py index 2241d391509..495b4649515 100644 --- a/tools/platformio-build-esp32s3.py +++ b/tools/platformio-build-esp32s3.py @@ -238,7 +238,7 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "fatfs", "diskio"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "fatfs", "vfs"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "fatfs", "src"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "freemodbus", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "freemodbus", "freemodbus", "common", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "idf_test", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "idf_test", "include", "esp32s3"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "jsmn", "include"), @@ -264,31 +264,6 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp_diagnostics", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "rtc_store", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp_insights", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "dotprod", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "support", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "hann", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "blackman", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "blackman_harris", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "blackman_nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "nuttall", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "windows", "flat_top", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "iir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "fir", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "math", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "math", "add", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "math", "sub", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "math", "mul", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "math", "addc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "math", "mulc", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "math", "sqrt", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "matrix", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "fft", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "dct", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "conv", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "common", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "kalman", "ekf", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "freertos", "include", "freertos"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "arduino_tinyusb", "tinyusb", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "arduino_tinyusb", "include"), @@ -307,6 +282,31 @@ join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp-sr", "include", "esp32s3"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp32-camera", "driver", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "esp32-camera", "conversions", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "dotprod", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "support", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "windows", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "windows", "hann", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "windows", "blackman", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "windows", "blackman_harris", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "windows", "blackman_nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "windows", "nuttall", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "windows", "flat_top", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "iir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "fir", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "math", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "math", "add", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "math", "sub", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "math", "mul", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "math", "addc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "math", "mulc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "math", "sqrt", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "matrix", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "fft", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "dct", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "conv", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "common", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "kalman", "ekf", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "espressif__esp-dsp", "modules", "kalman", "ekf_imu13states", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", "include", "fb_gfx", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s3", env.BoardConfig().get("build.arduino.memory_type", (env.BoardConfig().get("build.flash_mode", "dio") + "_qspi")), "include"), join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")) @@ -319,7 +319,7 @@ ], LIBS=[ - "-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_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", "-lulp", "-lwifi_provisioning", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp-dsp", "-lesp-sr", "-lesp32-camera", "-lesp_littlefs", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lusb", "-lcbor", "-lesp_diagnostics", "-lrtc_store", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-lrmaker_common", "-lmqtt", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lhufzip", "-lesp_audio_front_end", "-lesp_audio_processor", "-lmultinet", "-lwakenet", "-lesp-sr", "-lhufzip", "-lesp_audio_front_end", "-lesp_audio_processor", "-lmultinet", "-lwakenet", "-ljson", "-lspiffs", "-ldl_lib", "-lc_speech_features", "-lesp-dsp", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" + "-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_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", "-lulp", "-lwifi_provisioning", "-lrmaker_common", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lesp_rainmaker", "-lgpio_button", "-lqrcode", "-lws2812_led", "-lesp_diagnostics", "-lrtc_store", "-lesp_insights", "-lesp-sr", "-lesp32-camera", "-lesp_littlefs", "-lespressif__esp-dsp", "-lfb_gfx", "-lasio", "-lcmock", "-lunity", "-lcoap", "-lesp_lcd", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lperfmon", "-lusb", "-lesp_adc_cal", "-lesp_hid", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lesp_rainmaker", "-lesp_local_ctrl", "-lesp_https_server", "-lwifi_provisioning", "-lprotocomm", "-lbt", "-lbtdm_app", "-lprotobuf-c", "-lmdns", "-ljson_parser", "-ljson_generator", "-lesp_schedule", "-lqrcode", "-lesp_insights", "-lcbor", "-lesp_diagnostics", "-lrmaker_common", "-lmqtt", "-lrtc_store", "-larduino_tinyusb", "-lcat_face_detect", "-lhuman_face_detect", "-lcolor_detect", "-lmfn", "-ldl", "-lhufzip", "-lesp_audio_front_end", "-lesp_audio_processor", "-lmultinet", "-lwakenet", "-lesp-sr", "-lhufzip", "-lesp_audio_front_end", "-lesp_audio_processor", "-lmultinet", "-lwakenet", "-ljson", "-lspiffs", "-ldl_lib", "-lfst", "-lc_speech_features", "-lespressif__esp-dsp", "-lesp_tts_chinese", "-lvoice_set_xiaole", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-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_2", "-lmbedcrypto", "-lmbedx509", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lsmartconfig", "-lwapi", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lesp_phy", "-lphy", "-lbtbb", "-lxt_hal", "-lm", "-lnewlib", "-lstdc++", "-lpthread", "-lgcc", "-lcxx", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" ], CPPDEFINES=[ @@ -328,7 +328,7 @@ "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.4.3\\"'), + ("IDF_VER", '\\"v4.4.4-148-g4c2afac355\\"'), "ESP_PLATFORM", "_POSIX_READER_WRITER_LOCKS", "ARDUINO_ARCH_ESP32", diff --git a/tools/sdk/esp32/bin/bootloader_dio_40m.elf b/tools/sdk/esp32/bin/bootloader_dio_40m.elf index 169f28df732..d0bb1121bc1 100755 Binary files a/tools/sdk/esp32/bin/bootloader_dio_40m.elf and b/tools/sdk/esp32/bin/bootloader_dio_40m.elf differ diff --git a/tools/sdk/esp32/bin/bootloader_dio_80m.elf b/tools/sdk/esp32/bin/bootloader_dio_80m.elf index 42ff5c30984..e75338668f8 100755 Binary files a/tools/sdk/esp32/bin/bootloader_dio_80m.elf and b/tools/sdk/esp32/bin/bootloader_dio_80m.elf differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_40m.elf b/tools/sdk/esp32/bin/bootloader_dout_40m.elf index 169f28df732..d0bb1121bc1 100755 Binary files a/tools/sdk/esp32/bin/bootloader_dout_40m.elf and b/tools/sdk/esp32/bin/bootloader_dout_40m.elf differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_80m.elf b/tools/sdk/esp32/bin/bootloader_dout_80m.elf index 42ff5c30984..e75338668f8 100755 Binary files a/tools/sdk/esp32/bin/bootloader_dout_80m.elf and b/tools/sdk/esp32/bin/bootloader_dout_80m.elf differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_40m.elf b/tools/sdk/esp32/bin/bootloader_qio_40m.elf index 9b65a2208f9..4923fcd6012 100755 Binary files a/tools/sdk/esp32/bin/bootloader_qio_40m.elf and b/tools/sdk/esp32/bin/bootloader_qio_40m.elf differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_80m.elf b/tools/sdk/esp32/bin/bootloader_qio_80m.elf index 9003ecb1397..f589cffc6c9 100755 Binary files a/tools/sdk/esp32/bin/bootloader_qio_80m.elf and b/tools/sdk/esp32/bin/bootloader_qio_80m.elf differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_40m.elf b/tools/sdk/esp32/bin/bootloader_qout_40m.elf index 35e5d3b09ae..f104214d277 100755 Binary files a/tools/sdk/esp32/bin/bootloader_qout_40m.elf and b/tools/sdk/esp32/bin/bootloader_qout_40m.elf differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_80m.elf b/tools/sdk/esp32/bin/bootloader_qout_80m.elf index 6cf4ccc9443..b426da8d51e 100755 Binary files a/tools/sdk/esp32/bin/bootloader_qout_80m.elf and b/tools/sdk/esp32/bin/bootloader_qout_80m.elf differ diff --git a/tools/sdk/esp32/dio_qspi/include/sdkconfig.h b/tools/sdk/esp32/dio_qspi/include/sdkconfig.h index cc237573476..d5888f829b3 100644 --- a/tools/sdk/esp32/dio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32/dio_qspi/include/sdkconfig.h @@ -135,6 +135,7 @@ #define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BTDM_SCAN_DUPL_TYPE 0 #define CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE 20 +#define CONFIG_BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD 0 #define CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED 1 @@ -158,9 +159,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_STACK_NO_LOG 1 @@ -355,12 +358,14 @@ #define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32 #define CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE 1 #define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1 +#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -391,10 +396,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 #define CONFIG_FREERTOS_CORETIMER_0 1 @@ -459,6 +460,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -607,8 +609,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -646,11 +646,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 3072 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -679,6 +674,11 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_A2DP_ENABLE CONFIG_BT_A2DP_ENABLE @@ -692,35 +692,49 @@ #define CONFIG_BLE_SCAN_DUPLICATE CONFIG_BTDM_BLE_SCAN_DUPL #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 #define CONFIG_BROWNOUT_DET CONFIG_ESP32_BROWNOUT_DET +#define CONFIG_BROWNOUT_DET_LVL CONFIG_ESP32_BROWNOUT_DET_LVL #define CONFIG_BROWNOUT_DET_LVL_SEL_0 CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0 #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN CONFIG_BTDM_CTRL_BLE_MAX_CONN +#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF #define CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED #define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI CONFIG_BTDM_CTRL_HCI_MODE_VHCI #define CONFIG_BTDM_CONTROLLER_MODEM_SLEEP CONFIG_BTDM_CTRL_MODEM_SLEEP #define CONFIG_BTDM_CONTROLLER_MODE_BTDM CONFIG_BTDM_CTRL_MODE_BTDM +#define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE CONFIG_BTDM_CTRL_PINNED_TO_CORE #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_CLASSIC_BT_ENABLED CONFIG_BT_CLASSIC_ENABLED #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -733,6 +747,7 @@ #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE #define CONFIG_HFP_AUDIO_DATA_PATH_PCM CONFIG_BT_HFP_AUDIO_DATA_PATH_PCM #define CONFIG_HFP_CLIENT_ENABLE CONFIG_BT_HFP_CLIENT_ENABLE #define CONFIG_HFP_ENABLE CONFIG_BT_HFP_ENABLE @@ -740,6 +755,7 @@ #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -752,20 +768,25 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED #define CONFIG_MESH_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL +#define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_REDUCE_PHY_TX_POWER CONFIG_ESP_PHY_REDUCE_TX_POWER #define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE +#define CONFIG_SCAN_DUPLICATE_TYPE CONFIG_BTDM_SCAN_DUPL_TYPE #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE #define CONFIG_SPIRAM_SUPPORT CONFIG_ESP32_SPIRAM_SUPPORT #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -777,6 +798,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -793,9 +815,10 @@ #define CONFIG_TIMER_TASK_STACK_DEPTH CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH #define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX +#define CONFIG_TRACEMEM_RESERVE_DRAM CONFIG_ESP32_TRACEMEM_RESERVE_DRAM #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED #define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32/dio_qspi/libspi_flash.a b/tools/sdk/esp32/dio_qspi/libspi_flash.a index ae00247f6d6..6c48612d16c 100644 Binary files a/tools/sdk/esp32/dio_qspi/libspi_flash.a and b/tools/sdk/esp32/dio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32/dout_qspi/include/sdkconfig.h b/tools/sdk/esp32/dout_qspi/include/sdkconfig.h index 956c03fbbe2..3aca5ed9b43 100644 --- a/tools/sdk/esp32/dout_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32/dout_qspi/include/sdkconfig.h @@ -135,6 +135,7 @@ #define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BTDM_SCAN_DUPL_TYPE 0 #define CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE 20 +#define CONFIG_BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD 0 #define CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED 1 @@ -158,9 +159,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_STACK_NO_LOG 1 @@ -355,12 +358,14 @@ #define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32 #define CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE 1 #define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1 +#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -391,10 +396,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 #define CONFIG_FREERTOS_CORETIMER_0 1 @@ -459,6 +460,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -607,8 +609,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -646,11 +646,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 3072 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -679,6 +674,11 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_A2DP_ENABLE CONFIG_BT_A2DP_ENABLE @@ -692,35 +692,49 @@ #define CONFIG_BLE_SCAN_DUPLICATE CONFIG_BTDM_BLE_SCAN_DUPL #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 #define CONFIG_BROWNOUT_DET CONFIG_ESP32_BROWNOUT_DET +#define CONFIG_BROWNOUT_DET_LVL CONFIG_ESP32_BROWNOUT_DET_LVL #define CONFIG_BROWNOUT_DET_LVL_SEL_0 CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0 #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN CONFIG_BTDM_CTRL_BLE_MAX_CONN +#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF #define CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED #define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI CONFIG_BTDM_CTRL_HCI_MODE_VHCI #define CONFIG_BTDM_CONTROLLER_MODEM_SLEEP CONFIG_BTDM_CTRL_MODEM_SLEEP #define CONFIG_BTDM_CONTROLLER_MODE_BTDM CONFIG_BTDM_CTRL_MODE_BTDM +#define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE CONFIG_BTDM_CTRL_PINNED_TO_CORE #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_CLASSIC_BT_ENABLED CONFIG_BT_CLASSIC_ENABLED #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -733,6 +747,7 @@ #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE #define CONFIG_HFP_AUDIO_DATA_PATH_PCM CONFIG_BT_HFP_AUDIO_DATA_PATH_PCM #define CONFIG_HFP_CLIENT_ENABLE CONFIG_BT_HFP_CLIENT_ENABLE #define CONFIG_HFP_ENABLE CONFIG_BT_HFP_ENABLE @@ -740,6 +755,7 @@ #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -752,20 +768,25 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED #define CONFIG_MESH_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL +#define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_REDUCE_PHY_TX_POWER CONFIG_ESP_PHY_REDUCE_TX_POWER #define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE +#define CONFIG_SCAN_DUPLICATE_TYPE CONFIG_BTDM_SCAN_DUPL_TYPE #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE #define CONFIG_SPIRAM_SUPPORT CONFIG_ESP32_SPIRAM_SUPPORT #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -777,6 +798,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -793,9 +815,10 @@ #define CONFIG_TIMER_TASK_STACK_DEPTH CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH #define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX +#define CONFIG_TRACEMEM_RESERVE_DRAM CONFIG_ESP32_TRACEMEM_RESERVE_DRAM #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED #define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32/dout_qspi/libspi_flash.a b/tools/sdk/esp32/dout_qspi/libspi_flash.a index 8548b5e284c..8c476f23ed7 100644 Binary files a/tools/sdk/esp32/dout_qspi/libspi_flash.a and b/tools/sdk/esp32/dout_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32/include/bootloader_support/include/bootloader_common.h b/tools/sdk/esp32/include/bootloader_support/include/bootloader_common.h index 1a641be10ec..13334f2a7ff 100644 --- a/tools/sdk/esp32/include/bootloader_support/include/bootloader_common.h +++ b/tools/sdk/esp32/include/bootloader_support/include/bootloader_common.h @@ -187,13 +187,6 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata, */ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t *partition, esp_app_desc_t *app_desc); -/** - * @brief Get chip revision - * - * @return Chip revision number - */ -uint8_t bootloader_common_get_chip_revision(void); - /** * @brief Get chip package * diff --git a/tools/sdk/esp32/include/bootloader_support/include/esp_app_format.h b/tools/sdk/esp32/include/bootloader_support/include/esp_app_format.h index ef4f7f4f48f..1f547d3bfbf 100644 --- a/tools/sdk/esp32/include/bootloader_support/include/esp_app_format.h +++ b/tools/sdk/esp32/include/bootloader_support/include/esp_app_format.h @@ -6,6 +6,7 @@ #pragma once #include +#include "esp_assert.h" /** * @brief ESP chip ID @@ -21,7 +22,7 @@ typedef enum { } __attribute__((packed)) esp_chip_id_t; /** @cond */ -_Static_assert(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); +ESP_STATIC_ASSERT(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); /** @endcond */ /** @@ -88,7 +89,7 @@ typedef struct { } __attribute__((packed)) esp_image_header_t; /** @cond */ -_Static_assert(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); +ESP_STATIC_ASSERT(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); /** @endcond */ diff --git a/tools/sdk/esp32/include/bootloader_support/include/esp_image_format.h b/tools/sdk/esp32/include/bootloader_support/include/esp_image_format.h index 1db62442537..20545f5d7f6 100644 --- a/tools/sdk/esp32/include/bootloader_support/include/esp_image_format.h +++ b/tools/sdk/esp32/include/bootloader_support/include/esp_image_format.h @@ -9,6 +9,7 @@ #include #include "esp_flash_partitions.h" #include "esp_app_format.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -53,12 +54,18 @@ typedef struct { uint32_t crc; /*!< Check sum crc32 */ } rtc_retain_mem_t; + +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, crc) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t), "CRC field must be the last field of rtc_retain_mem_t structure"); + #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC -_Static_assert(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +/* The custom field must be the penultimate field */ +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, custom) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t) - CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE, + "custom field in rtc_retain_mem_t structure must be the field before the CRC one"); #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); #endif #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC @@ -68,7 +75,7 @@ _Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_R #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); +ESP_STATIC_ASSERT(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); #endif /** diff --git a/tools/sdk/esp32/include/bt/common/api/include/api/esp_blufi_api.h b/tools/sdk/esp32/include/bt/common/api/include/api/esp_blufi_api.h index 63109b20f12..ce7fe3a0d3c 100644 --- a/tools/sdk/esp32/include/bt/common/api/include/api/esp_blufi_api.h +++ b/tools/sdk/esp32/include/bt/common/api/include/api/esp_blufi_api.h @@ -57,6 +57,8 @@ typedef enum { typedef enum { ESP_BLUFI_STA_CONN_SUCCESS = 0x00, ESP_BLUFI_STA_CONN_FAIL = 0x01, + ESP_BLUFI_STA_CONNECTING = 0x02, + ESP_BLUFI_STA_NO_IP = 0x03, } esp_blufi_sta_conn_state_t; /// BLUFI init status @@ -82,6 +84,8 @@ typedef enum { ESP_BLUFI_READ_PARAM_ERROR, ESP_BLUFI_MAKE_PUBLIC_ERROR, ESP_BLUFI_DATA_FORMAT_ERROR, + ESP_BLUFI_CALC_MD5_ERROR, + ESP_BLUFI_WIFI_SCAN_FAIL, } esp_blufi_error_state_t; /** @@ -105,6 +109,12 @@ typedef struct { bool softap_max_conn_num_set; /*!< is max connection number of softap interface set */ uint8_t softap_channel; /*!< channel of softap interface */ bool softap_channel_set; /*!< is channel of softap interface set */ + uint8_t sta_max_conn_retry; /*!< max retry of sta establish connection */ + bool sta_max_conn_retry_set; /*!< is max retry of sta establish connection set */ + uint8_t sta_conn_end_reason; /*!< reason of sta connection end */ + bool sta_conn_end_reason_set; /*!< is reason of sta connection end set */ + int8_t sta_conn_rssi; /*!< rssi of sta connection */ + bool sta_conn_rssi_set; /*!< is rssi of sta connection set */ } esp_blufi_extra_info_t; /** @brief Description of an WiFi AP */ diff --git a/tools/sdk/esp32/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h b/tools/sdk/esp32/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h index 996621e0488..be2c72c78d5 100644 --- a/tools/sdk/esp32/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h +++ b/tools/sdk/esp32/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h @@ -20,7 +20,7 @@ #if (BLUFI_INCLUDED == TRUE) #define BTC_BLUFI_GREAT_VER 0x01 //Version + Subversion -#define BTC_BLUFI_SUB_VER 0x02 //Version + Subversion +#define BTC_BLUFI_SUB_VER 0x03 //Version + Subversion #define BTC_BLUFI_VERSION ((BTC_BLUFI_GREAT_VER<<8)|BTC_BLUFI_SUB_VER) //Version + Subversion typedef UINT8 tGATT_IF; @@ -129,6 +129,9 @@ extern tBLUFI_ENV *blufi_env_ptr; #define BLUFI_TYPE_DATA_SUBTYPE_WIFI_LIST 0x11 #define BLUFI_TYPE_DATA_SUBTYPE_ERROR_INFO 0x12 #define BLUFI_TYPE_DATA_SUBTYPE_CUSTOM_DATA 0x13 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_MAX_CONN_RETRY 0x14 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_END_REASON 0x15 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_RSSI 0x16 #define BLUFI_TYPE_IS_CTRL(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_CTRL) #define BLUFI_TYPE_IS_DATA(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_DATA) diff --git a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h index 39ed1a5c1a4..ce81b6c261f 100644 --- a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h +++ b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_config_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_config_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_config_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_config_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h index a5b586d5ab7..d06785094df 100644 --- a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h +++ b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_generic_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_generic_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_generic_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_generic_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h index 331f41c23d6..a04745485bf 100644 --- a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h +++ b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h @@ -41,6 +41,8 @@ typedef enum { void btc_ble_mesh_health_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_health_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_health_client_call_handler(btc_msg_t *msg); void btc_ble_mesh_health_client_cb_handler(btc_msg_t *msg); diff --git a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h index 854d6521612..45ca7ee14be 100644 --- a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h +++ b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_lighting_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_lighting_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_lighting_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_lighting_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h index ab54cc487b8..b9cd0156d54 100644 --- a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h +++ b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h @@ -336,8 +336,12 @@ typedef union { void btc_ble_mesh_prov_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_prov_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_model_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_model_arg_deep_free(btc_msg_t *msg); + const uint8_t *btc_ble_mesh_node_get_local_net_key(uint16_t net_idx); const uint8_t *btc_ble_mesh_node_get_local_app_key(uint16_t app_idx); diff --git a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h index a0dc29f3784..3d216c7fa95 100644 --- a/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h +++ b/tools/sdk/esp32/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_sensor_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_sensor_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_sensor_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_sensor_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h b/tools/sdk/esp32/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h index 0174c32741f..7bd95c78e0b 100644 --- a/tools/sdk/esp32/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h +++ b/tools/sdk/esp32/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h @@ -776,29 +776,28 @@ int bt_mesh_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], uint8_t enc_data[16]); enum { - BLE_MESH_EXCEP_LIST_ADD = 0, - BLE_MESH_EXCEP_LIST_REMOVE, - BLE_MESH_EXCEP_LIST_CLEAN, + BLE_MESH_EXCEP_LIST_SUB_CODE_ADD = 0, + BLE_MESH_EXCEP_LIST_SUB_CODE_REMOVE, + BLE_MESH_EXCEP_LIST_SUB_CODE_CLEAN, }; enum { - BLE_MESH_EXCEP_INFO_ADV_ADDR = 0, - BLE_MESH_EXCEP_INFO_MESH_LINK_ID, - BLE_MESH_EXCEP_INFO_MESH_BEACON, - BLE_MESH_EXCEP_INFO_MESH_PROV_ADV, - BLE_MESH_EXCEP_INFO_MESH_PROXY_ADV, + BLE_MESH_EXCEP_LIST_TYPE_ADV_ADDR = 0, + BLE_MESH_EXCEP_LIST_TYPE_MESH_LINK_ID, + BLE_MESH_EXCEP_LIST_TYPE_MESH_BEACON, + BLE_MESH_EXCEP_LIST_TYPE_MESH_PROV_ADV, + BLE_MESH_EXCEP_LIST_TYPE_MESH_PROXY_ADV, }; -enum { - BLE_MESH_EXCEP_CLEAN_ADDR_LIST = BIT(0), - BLE_MESH_EXCEP_CLEAN_MESH_LINK_ID_LIST = BIT(1), - BLE_MESH_EXCEP_CLEAN_MESH_BEACON_LIST = BIT(2), - BLE_MESH_EXCEP_CLEAN_MESH_PROV_ADV_LIST = BIT(3), - BLE_MESH_EXCEP_CLEAN_MESH_PROXY_ADV_LIST = BIT(4), - BLE_MESH_EXCEP_CLEAN_ALL_LIST = 0xFFFF, -}; +#define BLE_MESH_EXCEP_LIST_CLEAN_ADDR_LIST BIT(0) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_LINK_ID_LIST BIT(1) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_BEACON_LIST BIT(2) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_PROV_ADV_LIST BIT(3) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_PROXY_ADV_LIST BIT(4) +#define BLE_MESH_EXCEP_LIST_CLEAN_ALL_LIST (BIT(0) | BIT(1) | \ + BIT(2) | BIT(3) | BIT(4)) -int bt_mesh_update_exceptional_list(uint8_t sub_code, uint8_t type, void *info); +int bt_mesh_update_exceptional_list(uint8_t sub_code, uint32_t type, void *info); #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h index d0e1ec00950..b85eb18a78a 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h @@ -27,6 +27,7 @@ extern "C" { return ESP_ERR_INVALID_STATE; \ } +#define ESP_BT_STATUS_BASE_FOR_HCI_ERR 0X0100 /* base for coverting HCI error code to ESP status */ /* relate to BT_STATUS_xxx in bt_def.h */ /// Status Return Value @@ -53,6 +54,71 @@ typedef enum { ESP_BT_STATUS_ERR_ILLEGAL_PARAMETER_FMT, /* relate to HCI_ERR_ILLEGAL_PARAMETER_FMT in stack/hcidefs.h */ ESP_BT_STATUS_MEMORY_FULL = 20, /* relate to BT_STATUS_MEMORY_FULL in bt_def.h */ ESP_BT_STATUS_EIR_TOO_LARGE, /* relate to BT_STATUS_EIR_TOO_LARGE in bt_def.h */ + ESP_BT_STATUS_HCI_SUCCESS = ESP_BT_STATUS_BASE_FOR_HCI_ERR, + ESP_BT_STATUS_HCI_PENDING, + ESP_BT_STATUS_HCI_ILLEGAL_COMMAND, + ESP_BT_STATUS_HCI_NO_CONNECTION, + ESP_BT_STATUS_HCI_HW_FAILURE, + ESP_BT_STATUS_HCI_PAGE_TIMEOUT, + ESP_BT_STATUS_HCI_AUTH_FAILURE, + ESP_BT_STATUS_HCI_KEY_MISSING, + ESP_BT_STATUS_HCI_MEMORY_FULL, + ESP_BT_STATUS_HCI_CONNECTION_TOUT, + ESP_BT_STATUS_HCI_MAX_NUM_OF_CONNECTIONS, + ESP_BT_STATUS_HCI_MAX_NUM_OF_SCOS, + ESP_BT_STATUS_HCI_CONNECTION_EXISTS, + ESP_BT_STATUS_HCI_COMMAND_DISALLOWED, + ESP_BT_STATUS_HCI_HOST_REJECT_RESOURCES, + ESP_BT_STATUS_HCI_HOST_REJECT_SECURITY, + ESP_BT_STATUS_HCI_HOST_REJECT_DEVICE, + ESP_BT_STATUS_HCI_HOST_TIMEOUT, + ESP_BT_STATUS_HCI_UNSUPPORTED_VALUE, + ESP_BT_STATUS_HCI_ILLEGAL_PARAMETER_FMT, + ESP_BT_STATUS_HCI_PEER_USER, + ESP_BT_STATUS_HCI_PEER_LOW_RESOURCES, + ESP_BT_STATUS_HCI_PEER_POWER_OFF, + ESP_BT_STATUS_HCI_CONN_CAUSE_LOCAL_HOST, + ESP_BT_STATUS_HCI_REPEATED_ATTEMPTS, + ESP_BT_STATUS_HCI_PAIRING_NOT_ALLOWED, + ESP_BT_STATUS_HCI_UNKNOWN_LMP_PDU, + ESP_BT_STATUS_HCI_UNSUPPORTED_REM_FEATURE, + ESP_BT_STATUS_HCI_SCO_OFFSET_REJECTED, + ESP_BT_STATUS_HCI_SCO_INTERVAL_REJECTED, + ESP_BT_STATUS_HCI_SCO_AIR_MODE, + ESP_BT_STATUS_HCI_INVALID_LMP_PARAM, + ESP_BT_STATUS_HCI_UNSPECIFIED, + ESP_BT_STATUS_HCI_UNSUPPORTED_LMP_PARAMETERS, + ESP_BT_STATUS_HCI_ROLE_CHANGE_NOT_ALLOWED, + ESP_BT_STATUS_HCI_LMP_RESPONSE_TIMEOUT, + ESP_BT_STATUS_HCI_LMP_ERR_TRANS_COLLISION, + ESP_BT_STATUS_HCI_LMP_PDU_NOT_ALLOWED, + ESP_BT_STATUS_HCI_ENCRY_MODE_NOT_ACCEPTABLE, + ESP_BT_STATUS_HCI_UNIT_KEY_USED, + ESP_BT_STATUS_HCI_QOS_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_INSTANT_PASSED, + ESP_BT_STATUS_HCI_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_DIFF_TRANSACTION_COLLISION, + ESP_BT_STATUS_HCI_UNDEFINED_0x2B, + ESP_BT_STATUS_HCI_QOS_UNACCEPTABLE_PARAM, + ESP_BT_STATUS_HCI_QOS_REJECTED, + ESP_BT_STATUS_HCI_CHAN_CLASSIF_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_INSUFFCIENT_SECURITY, + ESP_BT_STATUS_HCI_PARAM_OUT_OF_RANGE, + ESP_BT_STATUS_HCI_UNDEFINED_0x31, + ESP_BT_STATUS_HCI_ROLE_SWITCH_PENDING, + ESP_BT_STATUS_HCI_UNDEFINED_0x33, + ESP_BT_STATUS_HCI_RESERVED_SLOT_VIOLATION, + ESP_BT_STATUS_HCI_ROLE_SWITCH_FAILED, + ESP_BT_STATUS_HCI_INQ_RSP_DATA_TOO_LARGE, + ESP_BT_STATUS_HCI_SIMPLE_PAIRING_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_HOST_BUSY_PAIRING, + ESP_BT_STATUS_HCI_REJ_NO_SUITABLE_CHANNEL, + ESP_BT_STATUS_HCI_CONTROLLER_BUSY, + ESP_BT_STATUS_HCI_UNACCEPT_CONN_INTERVAL, + ESP_BT_STATUS_HCI_DIRECTED_ADVERTISING_TIMEOUT, + ESP_BT_STATUS_HCI_CONN_TOUT_DUE_TO_MIC_FAILURE, + ESP_BT_STATUS_HCI_CONN_FAILED_ESTABLISHMENT, + ESP_BT_STATUS_HCI_MAC_CONNECTION_FAILED, } esp_bt_status_t; diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h index 686ad1c63e8..6b89b45a840 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h @@ -223,6 +223,8 @@ typedef enum { ESP_BT_GAP_MODE_CHG_EVT, ESP_BT_GAP_REMOVE_BOND_DEV_COMPLETE_EVT, /*!< remove bond device complete event */ ESP_BT_GAP_QOS_CMPL_EVT, /*!< QOS complete event */ + ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT, /*!< ACL connection complete status event */ + ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT, /*!< ACL disconnection complete status event */ ESP_BT_GAP_EVT_MAX, } esp_bt_gap_cb_event_t; @@ -376,6 +378,24 @@ typedef union { which from the master to a particular slave on the ACL logical transport. unit is 0.625ms. */ } qos_cmpl; /*!< QoS complete parameter struct */ + + /** + * @brief ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT + */ + struct acl_conn_cmpl_stat_param { + esp_bt_status_t stat; /*!< ACL connection status */ + uint16_t handle; /*!< ACL connection handle */ + esp_bd_addr_t bda; /*!< remote bluetooth device address */ + } acl_conn_cmpl_stat; /*!< ACL connection complete status parameter struct */ + + /** + * @brief ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT + */ + struct acl_disconn_cmpl_stat_param { + esp_bt_status_t reason; /*!< ACL disconnection reason */ + uint16_t handle; /*!< ACL connection handle */ + esp_bd_addr_t bda; /*!< remote bluetooth device address */ + } acl_disconn_cmpl_stat; /*!< ACL disconnection complete status parameter struct */ } esp_bt_gap_cb_param_t; /** diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h index 9177753bd9d..85d68b49d68 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h @@ -26,7 +26,7 @@ extern "C" { /// GATT INVALID HANDLE #define ESP_GATT_ILLEGAL_HANDLE 0 /// GATT attribute max handle -#define ESP_GATT_ATTR_HANDLE_MAX 100 +#define ESP_GATT_ATTR_HANDLE_MAX UC_CONFIG_BT_GATT_MAX_SR_ATTRIBUTES #define ESP_GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */ @@ -285,6 +285,7 @@ typedef enum { #define ESP_GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 - 0x0100 */ /* relate to BTA_GATT_PERM_WRITE_SIGNED_MITM in bta/bta_gatt_api.h */ #define ESP_GATT_PERM_READ_AUTHORIZATION (1 << 9) /* bit 9 - 0x0200 */ #define ESP_GATT_PERM_WRITE_AUTHORIZATION (1 << 10) /* bit 10 - 0x0400 */ +#define ESP_GATT_PERM_ENCRYPT_KEY_SIZE(keysize) (((keysize - 6) & 0xF) << 12) /* bit 12:15 - 0xF000 */ typedef uint16_t esp_gatt_perm_t; /* relate to BTA_GATT_CHAR_PROP_BIT_xxx in bta/bta_gatt_api.h */ diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h index 558d5d62960..ec2a327a567 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h @@ -360,7 +360,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatts_if, */ esp_err_t esp_ble_gatts_create_attr_tab(const esp_gatts_attr_db_t *gatts_attr_db, esp_gatt_if_t gatts_if, - uint8_t max_nb_attr, + uint16_t max_nb_attr, uint8_t srvc_inst_id); /** * @brief This function is called to add an included service. This function have to be called between diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h index c9278fbed29..239a23c3fee 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h @@ -252,123 +252,144 @@ typedef union { } esp_hidd_cb_param_t; /** - * @brief HID device callback function type. - * @param event: Event type - * @param param: Point to callback parameter, currently is union type + * @brief HID device callback function type. + * @param event: Event type + * @param param: Point to callback parameter, currently is union type */ typedef void (*esp_hd_cb_t)(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param); /** - * @brief This function is called to init callbacks with HID device module. + * @brief This function is called to init callbacks with HID device module. * - * @param[in] callback: pointer to the init callback function. + * @param[in] callback: pointer to the init callback function. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_register_callback(esp_hd_cb_t callback); /** - * @brief This function initializes HIDD. This function should be called after esp_bluedroid_enable and - * esp_blueroid_init success, and should be called after esp_bt_hid_device_register_callback. - * When the operation is complete the callback function will be called with ESP_HIDD_INIT_EVT. + * @brief Initializes HIDD interface. This function should be called after esp_bluedroid_init() and + * esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_register_callback. + * When the operation is complete, the callback function will be called with ESP_HIDD_INIT_EVT. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_init(void); /** - * @brief This function de-initializes HIDD interface. This function should be called after esp_bluedroid_enable() and - * esp_blueroid_init() success, and should be called after esp_bt_hid_device_init(). When the operation is complete the callback - * function will be called with ESP_HIDD_DEINIT_EVT. + * @brief De-initializes HIDD interface. This function should be called after esp_bluedroid_init() and + * esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). When the + * operation is complete, the callback function will be called with ESP_HIDD_DEINIT_EVT. * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_deinit(void); /** - * @brief Registers HIDD parameters with SDP and sets l2cap Quality of Service. This function should be called after - * esp_bluedroid_enable and esp_blueroid_init success, and must be done after esp_bt_hid_device_init. When the operation is complete the callback - * function will be called with ESP_HIDD_REGISTER_APP_EVT. + * @brief Registers HIDD parameters with SDP and sets l2cap Quality of Service. This function should be + * called after esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after + * esp_bt_hid_device_init(). When the operation is complete, the callback function will be called + * with ESP_HIDD_REGISTER_APP_EVT. * - * @param[in] app_param: HIDD parameters - * @param[in] in_qos: incoming QoS parameters - * @param[in] out_qos: outgoing QoS parameters + * @param[in] app_param: HIDD parameters + * @param[in] in_qos: incoming QoS parameters + * @param[in] out_qos: outgoing QoS parameters * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_register_app(esp_hidd_app_param_t *app_param, esp_hidd_qos_param_t *in_qos, esp_hidd_qos_param_t *out_qos); /** - * @brief Removes HIDD parameters from SDP and resets l2cap Quality of Service. This function should be called after esp_bluedroid_enable and - * esp_blueroid_init success, and should be called after esp_bt_hid_device_init. When the operation is complete the callback - * function will be called with ESP_HIDD_UNREGISTER_APP_EVT. + * @brief Removes HIDD parameters from SDP and resets l2cap Quality of Service. This function should be + * called after esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after + * esp_bt_hid_device_init(). When the operation is complete, the callback function will be called + * with ESP_HIDD_UNREGISTER_APP_EVT. * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_unregister_app(void); /** - * @brief This function connects HIDD interface to connected bluetooth device, if not done already. When the operation is complete the callback - * function will be called with ESP_HIDD_OPEN_EVT. + * @brief Connects to the peer HID Host with virtual cable. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_OPEN_EVT. * - * @param[in] bd_addr: Remote host bluetooth device address. + * @param[in] bd_addr: Remote host bluetooth device address. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_connect(esp_bd_addr_t bd_addr); /** - * @brief This function disconnects HIDD interface. When the operation is complete the callback - * function will be called with ESP_HIDD_CLOSE_EVT. + * @brief Disconnects from the currently connected HID Host. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_CLOSE_EVT. + * + * @note The disconnect operation will not remove the virtually cabled device. If the connect request from the + * different HID Host, it will reject the request. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_disconnect(void); /** - * @brief Send HIDD report. When the operation is complete the callback - * function will be called with ESP_HIDD_SEND_REPORT_EVT. + * @brief Sends HID report to the currently connected HID Host. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_SEND_REPORT_EVT. * - * @param[in] type: type of report - * @param[in] id: report id as defined by descriptor - * @param[in] len: length of report - * @param[in] data: report data + * @param[in] type: type of report + * @param[in] id: report id as defined by descriptor + * @param[in] len: length of report + * @param[in] data: report data * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_send_report(esp_hidd_report_type_t type, uint8_t id, uint16_t len, uint8_t *data); /** - * @brief Sends HIDD handshake with error info for invalid set_report. When the operation is complete the callback - * function will be called with ESP_HIDD_REPORT_ERR_EVT. + * @brief Sends HID Handshake with error info for invalid set_report to the currently connected HID Host. + * This function should be called after esp_bluedroid_init() and esp_bluedroid_enable() success, and + * should be called after esp_bt_hid_device_init(). When the operation is complete, the callback + * function will be called with ESP_HIDD_REPORT_ERR_EVT. * - * @param[in] error: type of error + * @param[in] error: type of error * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_report_error(esp_hidd_handshake_error_t error); /** - * @brief Unplug virtual cable of HIDD. When the operation is complete the callback - * function will be called with ESP_HIDD_VC_UNPLUG_EVT. + * @brief Remove the virtually cabled device. This function should be called after esp_bluedroid_init() + * and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). When the + * operation is complete, the callback function will be called with ESP_HIDD_VC_UNPLUG_EVT. + * + * @note If the connection exists, then HID Device will send a `VIRTUAL_CABLE_UNPLUG` control command to + * the peer HID Host, and the connection will be destroyed. If the connection does not exist, then HID + * Device will only unplug on it's single side. Once the unplug operation is success, the related + * pairing and bonding information will be removed, then the HID Device can accept connection request + * from the different HID Host, * - * @return - ESP_OK: success - * - other: failed + * @return - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_virtual_cable_unplug(void); diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_spp_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_spp_api.h index be827649745..24331991933 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_spp_api.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_spp_api.h @@ -77,6 +77,8 @@ typedef enum { ESP_SPP_WRITE_EVT = 33, /*!< When SPP write operation completes, the event comes, only for ESP_SPP_MODE_CB */ ESP_SPP_SRV_OPEN_EVT = 34, /*!< When SPP Server connection open, the event comes */ ESP_SPP_SRV_STOP_EVT = 35, /*!< When SPP server stopped, the event comes */ + ESP_SPP_VFS_REGISTER_EVT = 36, /*!< When SPP VFS register, the event comes */ + ESP_SPP_VFS_UNREGISTER_EVT = 37, /*!< When SPP VFS unregister, the event comes */ } esp_spp_cb_event_t; @@ -195,6 +197,20 @@ typedef union { uint32_t handle; /*!< The connection handle */ bool cong; /*!< TRUE, congested. FALSE, uncongested */ } cong; /*!< SPP callback param of ESP_SPP_CONG_EVT */ + + /** + * @brief ESP_SPP_VFS_REGISTER_EVT + */ + struct spp_vfs_register_evt_param { + esp_spp_status_t status; /*!< status */ + } vfs_register; /*!< SPP callback param of ESP_SPP_VFS_REGISTER_EVT */ + + /** + * @brief ESP_SPP_VFS_UNREGISTER_EVT + */ + struct spp_vfs_unregister_evt_param { + esp_spp_status_t status; /*!< status */ + } vfs_unregister; /*!< SPP callback param of ESP_SPP_VFS_UNREGISTER_EVT */ } esp_spp_cb_param_t; /*!< SPP callback parameter union type */ /** @@ -358,6 +374,8 @@ esp_err_t esp_spp_write(uint32_t handle, int len, uint8_t *p_data); /** * @brief This function is used to register VFS. * For now, SPP only supports write, read and close. + * When the operation is completed, the callback function will be called with ESP_SPP_VFS_REGISTER_EVT. + * This function must be called after esp_spp_init()/esp_spp_enhanced_init() successful and before esp_spp_deinit(). * * @return * - ESP_OK: success @@ -365,6 +383,17 @@ esp_err_t esp_spp_write(uint32_t handle, int len, uint8_t *p_data); */ esp_err_t esp_spp_vfs_register(void); +/** + * @brief This function is used to unregister VFS. + * When the operation is completed, the callback function will be called with ESP_SPP_VFS_UNREGISTER_EVT. + * This function must be called after esp_spp_vfs_register() successful and before esp_spp_deinit(). + * + * @return + * - ESP_OK: success + * - other: failed + */ +esp_err_t esp_spp_vfs_unregister(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/bt/include/esp32/include/esp_bt.h b/tools/sdk/esp32/include/bt/include/esp32/include/esp_bt.h index f74c3df7bfd..f048ff37e65 100644 --- a/tools/sdk/esp32/include/bt/include/esp32/include/esp_bt.h +++ b/tools/sdk/esp32/include/bt/include/esp32/include/esp_bt.h @@ -12,6 +12,7 @@ #include "esp_err.h" #include "sdkconfig.h" #include "esp_task.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -49,7 +50,7 @@ extern "C" { #endif //CONFIG_BT_ENABLED -#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20200622 +#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20221207 /** * @brief Bluetooth mode for controller enable/disable @@ -127,6 +128,12 @@ the adv packet will be discarded until the memory is restored. */ #define MESH_DUPLICATE_SCAN_CACHE_SIZE 0 #endif +#ifdef CONFIG_BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD +#define SCAN_DUPL_CACHE_REFRESH_PERIOD CONFIG_BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD +#else +#define SCAN_DUPL_CACHE_REFRESH_PERIOD 0 +#endif + #if defined(CONFIG_BTDM_CTRL_MODE_BLE_ONLY) #define BTDM_CONTROLLER_MODE_EFF ESP_BT_MODE_BLE #elif defined(CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY) @@ -182,11 +189,12 @@ the adv packet will be discarded until the memory is restored. */ .pcm_role = CONFIG_BTDM_CTRL_PCM_ROLE_EFF, \ .pcm_polar = CONFIG_BTDM_CTRL_PCM_POLAR_EFF, \ .hli = BTDM_CTRL_HLI, \ + .dup_list_refresh_period = SCAN_DUPL_CACHE_REFRESH_PERIOD, \ .magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL, \ } #else -#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; _Static_assert(0, "please enable bluetooth in menuconfig to use bt.h"); +#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; ESP_STATIC_ASSERT(0, "please enable bluetooth in menuconfig to use esp_bt.h"); #endif /** @@ -224,6 +232,7 @@ typedef struct { uint8_t pcm_role; /*!< PCM role (master & slave)*/ uint8_t pcm_polar; /*!< PCM polar trig (falling clk edge & rising clk edge) */ bool hli; /*!< Using high level interrupt or not */ + uint16_t dup_list_refresh_period; /*!< Duplicate scan list refresh period */ uint32_t magic; /*!< Magic number */ } esp_bt_controller_config_t; diff --git a/tools/sdk/esp32/include/console/argtable3/argtable3.h b/tools/sdk/esp32/include/console/argtable3/argtable3.h index abb2009cccf..95715b1907e 100644 --- a/tools/sdk/esp32/include/console/argtable3/argtable3.h +++ b/tools/sdk/esp32/include/console/argtable3/argtable3.h @@ -1,4 +1,11 @@ +/* + * SPDX-FileCopyrightText: 1998-2001,2003-2011,2013 Stewart Heitmann + * + * SPDX-License-Identifier: BSD-3-Clause + */ /******************************************************************************* + * argtable3: Declares the main interfaces of the library + * * This file is part of the argtable3 library. * * Copyright (C) 1998-2001,2003-2011,2013 Stewart Heitmann @@ -31,274 +38,240 @@ #ifndef ARGTABLE3 #define ARGTABLE3 -#include /* FILE */ -#include /* struct tm */ +#include /* FILE */ +#include /* struct tm */ #ifdef __cplusplus extern "C" { #endif #define ARG_REX_ICASE 1 +#define ARG_DSTR_SIZE 200 +#define ARG_CMD_NAME_LEN 100 +#define ARG_CMD_DESCRIPTION_LEN 256 + +#ifndef ARG_REPLACE_GETOPT +#define ARG_REPLACE_GETOPT 0 /* ESP-IDF-specific: use newlib-provided getopt instead of the embedded one */ +#endif /* ARG_REPLACE_GETOPT */ /* bit masks for arg_hdr.flag */ -enum -{ - ARG_TERMINATOR=0x1, - ARG_HASVALUE=0x2, - ARG_HASOPTVALUE=0x4 -}; +enum { ARG_TERMINATOR = 0x1, ARG_HASVALUE = 0x2, ARG_HASOPTVALUE = 0x4 }; + +#if defined(_WIN32) + #if defined(argtable3_EXPORTS) + #define ARG_EXTERN __declspec(dllexport) + #elif defined(argtable3_IMPORTS) + #define ARG_EXTERN __declspec(dllimport) + #else + #define ARG_EXTERN + #endif +#else + #define ARG_EXTERN +#endif -typedef void (arg_resetfn)(void *parent); -typedef int (arg_scanfn)(void *parent, const char *argval); -typedef int (arg_checkfn)(void *parent); -typedef void (arg_errorfn)(void *parent, FILE *fp, int error, const char *argval, const char *progname); +typedef struct _internal_arg_dstr* arg_dstr_t; +typedef void* arg_cmd_itr_t; +typedef void(arg_resetfn)(void* parent); +typedef int(arg_scanfn)(void* parent, const char* argval); +typedef int(arg_checkfn)(void* parent); +typedef void(arg_errorfn)(void* parent, arg_dstr_t ds, int error, const char* argval, const char* progname); +typedef void(arg_dstr_freefn)(char* buf); +typedef int(arg_cmdfn)(int argc, char* argv[], arg_dstr_t res); +typedef int(arg_comparefn)(const void* k1, const void* k2); /* -* The arg_hdr struct defines properties that are common to all arg_xxx structs. -* The argtable library requires each arg_xxx struct to have an arg_hdr -* struct as its first data member. -* The argtable library functions then use this data to identify the -* properties of the command line option, such as its option tags, -* datatype string, and glossary strings, and so on. -* Moreover, the arg_hdr struct contains pointers to custom functions that -* are provided by each arg_xxx struct which perform the tasks of parsing -* that particular arg_xxx arguments, performing post-parse checks, and -* reporting errors. -* These functions are private to the individual arg_xxx source code -* and are the pointer to them are initiliased by that arg_xxx struct's -* constructor function. The user could alter them after construction -* if desired, but the original intention is for them to be set by the -* constructor and left unaltered. -*/ -struct arg_hdr -{ - char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ - const char *shortopts; /* String defining the short options */ - const char *longopts; /* String defiing the long options */ - const char *datatype; /* Description of the argument data type */ - const char *glossary; /* Description of the option as shown by arg_print_glossary function */ - int mincount; /* Minimum number of occurences of this option accepted */ - int maxcount; /* Maximum number of occurences if this option accepted */ - void *parent; /* Pointer to parent arg_xxx struct */ - arg_resetfn *resetfn; /* Pointer to parent arg_xxx reset function */ - arg_scanfn *scanfn; /* Pointer to parent arg_xxx scan function */ - arg_checkfn *checkfn; /* Pointer to parent arg_xxx check function */ - arg_errorfn *errorfn; /* Pointer to parent arg_xxx error function */ - void *priv; /* Pointer to private header data for use by arg_xxx functions */ -}; - -struct arg_rem -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ -}; - -struct arg_lit -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ -}; - -struct arg_int -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - int *ival; /* Array of parsed argument values */ -}; - -struct arg_dbl -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - double *dval; /* Array of parsed argument values */ -}; - -struct arg_str -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_rex -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_file -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args*/ - const char **filename; /* Array of parsed filenames (eg: /home/foo.bar) */ - const char **basename; /* Array of parsed basenames (eg: foo.bar) */ - const char **extension; /* Array of parsed extensions (eg: .bar) */ -}; - -struct arg_date -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - const char *format; /* strptime format string used to parse the date */ - int count; /* Number of matching command line args */ - struct tm *tmval; /* Array of parsed time values */ -}; - -enum {ARG_ELIMIT=1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG}; -struct arg_end -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of errors encountered */ - int *error; /* Array of error codes */ - void **parent; /* Array of pointers to offending arg_xxx struct */ - const char **argval; /* Array of pointers to offending argv[] string */ -}; - + * The arg_hdr struct defines properties that are common to all arg_xxx structs. + * The argtable library requires each arg_xxx struct to have an arg_hdr + * struct as its first data member. + * The argtable library functions then use this data to identify the + * properties of the command line option, such as its option tags, + * datatype string, and glossary strings, and so on. + * Moreover, the arg_hdr struct contains pointers to custom functions that + * are provided by each arg_xxx struct which perform the tasks of parsing + * that particular arg_xxx arguments, performing post-parse checks, and + * reporting errors. + * These functions are private to the individual arg_xxx source code + * and are the pointer to them are initiliased by that arg_xxx struct's + * constructor function. The user could alter them after construction + * if desired, but the original intention is for them to be set by the + * constructor and left unaltered. + */ +typedef struct arg_hdr { + char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ + const char* shortopts; /* String defining the short options */ + const char* longopts; /* String defiing the long options */ + const char* datatype; /* Description of the argument data type */ + const char* glossary; /* Description of the option as shown by arg_print_glossary function */ + int mincount; /* Minimum number of occurences of this option accepted */ + int maxcount; /* Maximum number of occurences if this option accepted */ + void* parent; /* Pointer to parent arg_xxx struct */ + arg_resetfn* resetfn; /* Pointer to parent arg_xxx reset function */ + arg_scanfn* scanfn; /* Pointer to parent arg_xxx scan function */ + arg_checkfn* checkfn; /* Pointer to parent arg_xxx check function */ + arg_errorfn* errorfn; /* Pointer to parent arg_xxx error function */ + void* priv; /* Pointer to private header data for use by arg_xxx functions */ +} arg_hdr_t; + +typedef struct arg_rem { + struct arg_hdr hdr; /* The mandatory argtable header struct */ +} arg_rem_t; + +typedef struct arg_lit { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ +} arg_lit_t; + +typedef struct arg_int { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + int* ival; /* Array of parsed argument values */ +} arg_int_t; + +typedef struct arg_dbl { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + double* dval; /* Array of parsed argument values */ +} arg_dbl_t; + +typedef struct arg_str { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_str_t; + +typedef struct arg_rex { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_rex_t; + +typedef struct arg_file { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args*/ + const char** filename; /* Array of parsed filenames (eg: /home/foo.bar) */ + const char** basename; /* Array of parsed basenames (eg: foo.bar) */ + const char** extension; /* Array of parsed extensions (eg: .bar) */ +} arg_file_t; + +typedef struct arg_date { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + const char* format; /* strptime format string used to parse the date */ + int count; /* Number of matching command line args */ + struct tm* tmval; /* Array of parsed time values */ +} arg_date_t; + +enum { ARG_ELIMIT = 1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG }; +typedef struct arg_end { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of errors encountered */ + int* error; /* Array of error codes */ + void** parent; /* Array of pointers to offending arg_xxx struct */ + const char** argval; /* Array of pointers to offending argv[] string */ +} arg_end_t; + +typedef struct arg_cmd_info { + char name[ARG_CMD_NAME_LEN]; + char description[ARG_CMD_DESCRIPTION_LEN]; + arg_cmdfn* proc; +} arg_cmd_info_t; /**** arg_xxx constructor functions *********************************/ -struct arg_rem* arg_rem(const char* datatype, const char* glossary); - -struct arg_lit* arg_lit0(const char* shortopts, - const char* longopts, - const char* glossary); -struct arg_lit* arg_lit1(const char* shortopts, - const char* longopts, - const char *glossary); -struct arg_lit* arg_litn(const char* shortopts, - const char* longopts, - int mincount, - int maxcount, - const char *glossary); - -struct arg_key* arg_key0(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_key1(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_keyn(const char* keyword, - int flags, - int mincount, - int maxcount, - const char* glossary); - -struct arg_int* arg_int0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_int* arg_int1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_int* arg_intn(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_dbl* arg_dbl0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_dbl* arg_dbl1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_dbl* arg_dbln(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_str* arg_str0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_str* arg_str1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_str* arg_strn(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_rex* arg_rex0(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char* glossary); -struct arg_rex* arg_rex1(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char *glossary); -struct arg_rex* arg_rexn(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int mincount, - int maxcount, - int flags, - const char *glossary); - -struct arg_file* arg_file0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_file* arg_file1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_file* arg_filen(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_date* arg_date0(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char* glossary); -struct arg_date* arg_date1(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char *glossary); -struct arg_date* arg_daten(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_end* arg_end(int maxerrors); +ARG_EXTERN struct arg_rem* arg_rem(const char* datatype, const char* glossary); + +ARG_EXTERN struct arg_lit* arg_lit0(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_lit1(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_litn(const char* shortopts, const char* longopts, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_int* arg_int0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_int1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_intn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_dbl* arg_dbl0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbl1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbln(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_str* arg_str0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_str1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_strn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_rex* arg_rex0(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rex1(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rexn(const char* shortopts, + const char* longopts, + const char* pattern, + const char* datatype, + int mincount, + int maxcount, + int flags, + const char* glossary); + +ARG_EXTERN struct arg_file* arg_file0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_file1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_filen(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_date* arg_date0(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_date1(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_daten(const char* shortopts, const char* longopts, const char* format, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_end* arg_end(int maxcount); +#define ARG_DSTR_STATIC ((arg_dstr_freefn*)0) +#define ARG_DSTR_VOLATILE ((arg_dstr_freefn*)1) +#define ARG_DSTR_DYNAMIC ((arg_dstr_freefn*)3) /**** other functions *******************************************/ -int arg_nullcheck(void **argtable); -int arg_parse(int argc, char **argv, void **argtable); -void arg_print_option(FILE *fp, const char *shortopts, const char *longopts, const char *datatype, const char *suffix); -void arg_print_syntax(FILE *fp, void **argtable, const char *suffix); -void arg_print_syntaxv(FILE *fp, void **argtable, const char *suffix); -void arg_print_glossary(FILE *fp, void **argtable, const char *format); -void arg_print_glossary_gnu(FILE *fp, void **argtable); -void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); -void arg_freetable(void **argtable, size_t n); -void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN int arg_nullcheck(void** argtable); +ARG_EXTERN int arg_parse(int argc, char** argv, void** argtable); +ARG_EXTERN void arg_print_option(FILE* fp, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary(FILE* fp, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu(FILE* fp, void** argtable); +ARG_EXTERN void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_print_option_ds(arg_dstr_t ds, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary_ds(arg_dstr_t ds, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu_ds(arg_dstr_t ds, void** argtable); +ARG_EXTERN void arg_print_errors_ds(arg_dstr_t ds, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_freetable(void** argtable, size_t n); + +ARG_EXTERN arg_dstr_t arg_dstr_create(void); +ARG_EXTERN void arg_dstr_destroy(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_reset(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_free(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_set(arg_dstr_t ds, char* str, arg_dstr_freefn* free_proc); +ARG_EXTERN void arg_dstr_cat(arg_dstr_t ds, const char* str); +ARG_EXTERN void arg_dstr_catc(arg_dstr_t ds, char c); +ARG_EXTERN void arg_dstr_catf(arg_dstr_t ds, const char* fmt, ...); +ARG_EXTERN char* arg_dstr_cstr(arg_dstr_t ds); + +ARG_EXTERN void arg_cmd_init(void); +ARG_EXTERN void arg_cmd_uninit(void); +ARG_EXTERN void arg_cmd_register(const char* name, arg_cmdfn* proc, const char* description); +ARG_EXTERN void arg_cmd_unregister(const char* name); +ARG_EXTERN int arg_cmd_dispatch(const char* name, int argc, char* argv[], arg_dstr_t res); +ARG_EXTERN unsigned int arg_cmd_count(void); +ARG_EXTERN arg_cmd_info_t* arg_cmd_info(const char* name); +ARG_EXTERN arg_cmd_itr_t arg_cmd_itr_create(void); +ARG_EXTERN void arg_cmd_itr_destroy(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_advance(arg_cmd_itr_t itr); +ARG_EXTERN char* arg_cmd_itr_key(arg_cmd_itr_t itr); +ARG_EXTERN arg_cmd_info_t* arg_cmd_itr_value(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_search(arg_cmd_itr_t itr, void* k); +ARG_EXTERN void arg_mgsort(void* data, int size, int esize, int i, int k, arg_comparefn* comparefn); +ARG_EXTERN void arg_make_get_help_msg(arg_dstr_t res); +ARG_EXTERN void arg_make_help_msg(arg_dstr_t ds, char* cmd_name, void** argtable); +ARG_EXTERN void arg_make_syntax_err_msg(arg_dstr_t ds, void** argtable, struct arg_end* end); +ARG_EXTERN int arg_make_syntax_err_help_msg(arg_dstr_t ds, char* name, int help, int nerrors, void** argtable, struct arg_end* end, int* exitcode); +ARG_EXTERN void arg_set_module_name(const char* name); +ARG_EXTERN void arg_set_module_version(int major, int minor, int patch, const char* tag); /**** deprecated functions, for back-compatibility only ********/ -void arg_free(void **argtable); +ARG_EXTERN void arg_free(void** argtable); #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/console/argtable3/argtable3_private.h b/tools/sdk/esp32/include/console/argtable3/argtable3_private.h new file mode 100644 index 00000000000..5589fc7ffad --- /dev/null +++ b/tools/sdk/esp32/include/console/argtable3/argtable3_private.h @@ -0,0 +1,245 @@ +/* + * SPDX-FileCopyrightText: 2013-2019 Tom G. Huang + * + * SPDX-License-Identifier: BSD-3-Clause + */ +/******************************************************************************* + * argtable3_private: Declares private types, constants, and interfaces + * + * This file is part of the argtable3 library. + * + * Copyright (C) 2013-2019 Tom G. Huang + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of STEWART HEITMANN nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +#ifndef ARG_UTILS_H +#define ARG_UTILS_H + +#include + +#define ARG_ENABLE_TRACE 0 +#define ARG_ENABLE_LOG 0 + +#ifdef __cplusplus +extern "C" { +#endif + +enum { ARG_ERR_MINCOUNT = 1, ARG_ERR_MAXCOUNT, ARG_ERR_BADINT, ARG_ERR_OVERFLOW, ARG_ERR_BADDOUBLE, ARG_ERR_BADDATE, ARG_ERR_REGNOMATCH }; + +typedef void(arg_panicfn)(const char* fmt, ...); + +#if defined(_MSC_VER) +#define ARG_TRACE(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) + +#define ARG_LOG(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) +#else +#define ARG_TRACE(x) \ + do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } while (0) + +#define ARG_LOG(x) \ + do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } while (0) +#endif + +/* + * Rename a few generic names to unique names. + * They can be a problem for the platforms like NuttX, where + * the namespace is flat for everything including apps and libraries. + */ +#define xmalloc argtable3_xmalloc +#define xcalloc argtable3_xcalloc +#define xrealloc argtable3_xrealloc +#define xfree argtable3_xfree + +extern void dbg_printf(const char* fmt, ...); +extern void arg_set_panic(arg_panicfn* proc); +extern void* xmalloc(size_t size); +extern void* xcalloc(size_t count, size_t size); +extern void* xrealloc(void* ptr, size_t size); +extern void xfree(void* ptr); + +struct arg_hashtable_entry { + void *k, *v; + unsigned int h; + struct arg_hashtable_entry* next; +}; + +typedef struct arg_hashtable { + unsigned int tablelength; + struct arg_hashtable_entry** table; + unsigned int entrycount; + unsigned int loadlimit; + unsigned int primeindex; + unsigned int (*hashfn)(const void* k); + int (*eqfn)(const void* k1, const void* k2); +} arg_hashtable_t; + +/** + * @brief Create a hash table. + * + * @param minsize minimum initial size of hash table + * @param hashfn function for hashing keys + * @param eqfn function for determining key equality + * @return newly created hash table or NULL on failure + */ +arg_hashtable_t* arg_hashtable_create(unsigned int minsize, unsigned int (*hashfn)(const void*), int (*eqfn)(const void*, const void*)); + +/** + * @brief This function will cause the table to expand if the insertion would take + * the ratio of entries to table size over the maximum load factor. + * + * This function does not check for repeated insertions with a duplicate key. + * The value returned when using a duplicate key is undefined -- when + * the hash table changes size, the order of retrieval of duplicate key + * entries is reversed. + * If in doubt, remove before insert. + * + * @param h the hash table to insert into + * @param k the key - hash table claims ownership and will free on removal + * @param v the value - does not claim ownership + * @return non-zero for successful insertion + */ +void arg_hashtable_insert(arg_hashtable_t* h, void* k, void* v); + +#define ARG_DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \ + int fnname(arg_hashtable_t* h, keytype* k, valuetype* v) { return arg_hashtable_insert(h, k, v); } + +/** + * @brief Search the specified key in the hash table. + * + * @param h the hash table to search + * @param k the key to search for - does not claim ownership + * @return the value associated with the key, or NULL if none found + */ +void* arg_hashtable_search(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \ + valuetype* fnname(arg_hashtable_t* h, keytype* k) { return (valuetype*)(arg_hashtable_search(h, k)); } + +/** + * @brief Remove the specified key from the hash table. + * + * @param h the hash table to remove the item from + * @param k the key to search for - does not claim ownership + */ +void arg_hashtable_remove(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \ + void fnname(arg_hashtable_t* h, keytype* k) { arg_hashtable_remove(h, k); } + +/** + * @brief Return the number of keys in the hash table. + * + * @param h the hash table + * @return the number of items stored in the hash table + */ +unsigned int arg_hashtable_count(arg_hashtable_t* h); + +/** + * @brief Change the value associated with the key. + * + * function to change the value associated with a key, where there already + * exists a value bound to the key in the hash table. + * Source due to Holger Schemel. + * + * @name hashtable_change + * @param h the hash table + * @param key + * @param value + */ +int arg_hashtable_change(arg_hashtable_t* h, void* k, void* v); + +/** + * @brief Free the hash table and the memory allocated for each key-value pair. + * + * @param h the hash table + * @param free_values whether to call 'free' on the remaining values + */ +void arg_hashtable_destroy(arg_hashtable_t* h, int free_values); + +typedef struct arg_hashtable_itr { + arg_hashtable_t* h; + struct arg_hashtable_entry* e; + struct arg_hashtable_entry* parent; + unsigned int index; +} arg_hashtable_itr_t; + +arg_hashtable_itr_t* arg_hashtable_itr_create(arg_hashtable_t* h); + +void arg_hashtable_itr_destroy(arg_hashtable_itr_t* itr); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_key(arg_hashtable_itr_t* i); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_value(arg_hashtable_itr_t* i); + +/** + * @brief Advance the iterator to the next element. Returns zero if advanced to end of table. + */ +int arg_hashtable_itr_advance(arg_hashtable_itr_t* itr); + +/** + * @brief Remove current element and advance the iterator to the next element. + */ +int arg_hashtable_itr_remove(arg_hashtable_itr_t* itr); + +/** + * @brief Search and overwrite the supplied iterator, to point to the entry matching the supplied key. + * + * @return Zero if not found. + */ +int arg_hashtable_itr_search(arg_hashtable_itr_t* itr, arg_hashtable_t* h, void* k); + +#define ARG_DEFINE_HASHTABLE_ITERATOR_SEARCH(fnname, keytype) \ + int fnname(arg_hashtable_itr_t* i, arg_hashtable_t* h, keytype* k) { return (arg_hashtable_iterator_search(i, h, k)); } + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tools/sdk/esp32/include/driver/include/driver/gpio.h b/tools/sdk/esp32/include/driver/include/driver/gpio.h index b904def347b..90723c2100a 100644 --- a/tools/sdk/esp32/include/driver/include/driver/gpio.h +++ b/tools/sdk/esp32/include/driver/include/driver/gpio.h @@ -50,7 +50,9 @@ extern "C" { #define GPIO_IS_VALID_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_GPIO_MASK) != 0) /// Check whether it can be a valid GPIO number of output mode #define GPIO_IS_VALID_OUTPUT_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_OUTPUT_GPIO_MASK) != 0) - +/// Check whether it can be a valid digital I/O pad +#define GPIO_IS_VALID_DIGITAL_IO_PAD(gpio_num) ((gpio_num >= 0) && \ + (((1ULL << (gpio_num)) & SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK) != 0)) typedef intr_handle_t gpio_isr_handle_t; @@ -447,7 +449,6 @@ esp_err_t gpio_force_hold_all(void); esp_err_t gpio_force_unhold_all(void); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable SLP_SEL to change GPIO status automantically in lightsleep. * @param gpio_num GPIO number of the pad. @@ -494,7 +495,6 @@ esp_err_t gpio_sleep_set_direction(gpio_num_t gpio_num, gpio_mode_t mode); * - ESP_ERR_INVALID_ARG : Parameter error */ esp_err_t gpio_sleep_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull); -#endif #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32/include/driver/include/driver/ledc.h b/tools/sdk/esp32/include/driver/include/driver/ledc.h index d9b8df8edaf..599622a2c24 100644 --- a/tools/sdk/esp32/include/driver/include/driver/ledc.h +++ b/tools/sdk/esp32/include/driver/include/driver/ledc.h @@ -78,8 +78,9 @@ typedef struct { * @brief Type of LEDC event callback * @param param LEDC callback parameter * @param user_arg User registered data + * @return Whether a high priority task has been waken up by this function */ -typedef bool (* ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); +typedef bool (*ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); /** * @brief Group of supported LEDC callbacks @@ -99,7 +100,7 @@ typedef struct { * - ESP_OK Success * - ESP_ERR_INVALID_ARG Parameter error */ -esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); +esp_err_t ledc_channel_config(const ledc_channel_config_t *ledc_conf); /** * @brief LEDC timer configuration @@ -112,7 +113,7 @@ esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); * - ESP_ERR_INVALID_ARG Parameter error * - ESP_FAIL Can not find a proper pre-divider number base on the given frequency and the current duty_resolution. */ -esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf); +esp_err_t ledc_timer_config(const ledc_timer_config_t *timer_conf); /** * @brief LEDC update channel parameters @@ -285,7 +286,7 @@ esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t * - ESP_OK Success * - ESP_ERR_INVALID_ARG Function pointer error. */ -esp_err_t ledc_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, ledc_isr_handle_t *handle); +esp_err_t ledc_isr_register(void (*fn)(void *), void *arg, int intr_alloc_flags, ledc_isr_handle_t *handle); /** * @brief Configure LEDC settings @@ -496,6 +497,7 @@ esp_err_t ledc_set_fade_step_and_start(ledc_mode_t speed_mode, ledc_channel_t ch * - ESP_FAIL Fade function init error */ esp_err_t ledc_cb_register(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_cbs_t *cbs, void *user_arg); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/driver/include/driver/mcpwm.h b/tools/sdk/esp32/include/driver/include/driver/mcpwm.h index fed2c3f326d..c80bca21d23 100644 --- a/tools/sdk/esp32/include/driver/include/driver/mcpwm.h +++ b/tools/sdk/esp32/include/driver/include/driver/mcpwm.h @@ -7,6 +7,7 @@ #pragma once #include "soc/soc_caps.h" +#include "esp_assert.h" #if SOC_MCPWM_SUPPORTED #include "esp_err.h" #include "soc/soc.h" @@ -74,7 +75,7 @@ typedef enum { MCPWM_UNIT_MAX, /*! #include "soc/gdma_channel.h" +#include "hal/gdma_types.h" #include "esp_err.h" #ifdef __cplusplus @@ -23,34 +24,6 @@ extern "C" { */ typedef struct gdma_channel_t *gdma_channel_handle_t; -/** - * @brief Enumeration of peripherals which have the DMA capability - * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. - * - */ -typedef enum { - GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ - GDMA_TRIG_PERIPH_UART, /*!< GDMA trigger peripheral: UART */ - GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ - GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ - GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ - GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ - GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ - GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ - GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ - GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ - GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ -} gdma_trigger_peripheral_t; - -/** - * @brief Enumeration of GDMA channel direction - * - */ -typedef enum { - GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ - GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ -} gdma_channel_direction_t; - /** * @brief Collection of configuration items that used for allocating GDMA channel * @@ -124,13 +97,13 @@ typedef struct { */ typedef struct { gdma_trigger_peripheral_t periph; /*!< Target peripheral which will trigger DMA operations */ - int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UART0 */ + int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UHCI0 */ } gdma_trigger_t; /** * @brief Helper macro to initialize GDMA trigger * @note value of `peri` must be selected from `gdma_trigger_peripheral_t` enum. - * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UART,0) + * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_I2S,0) * */ #define GDMA_MAKE_TRIGGER(peri, id) \ @@ -325,6 +298,22 @@ esp_err_t gdma_append(gdma_channel_handle_t dma_chan); */ esp_err_t gdma_reset(gdma_channel_handle_t dma_chan); +/** + * @brief Get the mask of free M2M trigger IDs + * + * @note On some ESP targets (e.g. ESP32C3/S3), DMA trigger used for memory copy can be any of valid peripheral's trigger ID, + * which can bring conflict if the peripheral is also using the same trigger ID. This function can return the free IDs + * for memory copy, at the runtime. + * + * @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel` + * @param[out] mask Returned mask of free M2M trigger IDs + * @return + * - ESP_OK: Get free M2M trigger IDs successfully + * - ESP_ERR_INVALID_ARG: Get free M2M trigger IDs failed because of invalid argument + * - ESP_FAIL: Get free M2M trigger IDs failed because of other error + */ +esp_err_t gdma_get_free_m2m_trig_id_mask(gdma_channel_handle_t dma_chan, uint32_t *mask); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/driver/include/esp_private/gpio.h b/tools/sdk/esp32/include/driver/include/esp_private/gpio.h index c4227dc8c4f..65211a5e4e8 100644 --- a/tools/sdk/esp32/include/driver/include/esp_private/gpio.h +++ b/tools/sdk/esp32/include/driver/include/esp_private/gpio.h @@ -12,7 +12,6 @@ #include "soc/soc_caps.h" #include "driver/gpio.h" -#if SOC_GPIO_SUPPORT_SLP_SWITCH #if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Emulate ESP32S2 behaviour to backup FUN_PU, FUN_PD information @@ -34,4 +33,3 @@ esp_err_t gpio_sleep_pupd_config_apply(gpio_num_t gpio_num); */ esp_err_t gpio_sleep_pupd_config_unapply(gpio_num_t gpio_num); #endif -#endif diff --git a/tools/sdk/esp32/include/efuse/esp32/include/esp_efuse_table.h b/tools/sdk/esp32/include/efuse/esp32/include/esp_efuse_table.h index a1f8cf3cdc0..3c0a01d125d 100644 --- a/tools/sdk/esp32/include/efuse/esp32/include/esp_efuse_table.h +++ b/tools/sdk/esp32/include/efuse/esp32/include/esp_efuse_table.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ extern "C" { #endif -// md5_digest_table f552d73ac112985991efa6734a60c8d9 +// md5_digest_table 6256f9b7c6783e0b651bf52b5b162aa8 // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. @@ -48,6 +48,7 @@ extern const esp_efuse_desc_t* ESP_EFUSE_CHIP_CPU_FREQ_LOW[]; extern const esp_efuse_desc_t* ESP_EFUSE_CHIP_CPU_FREQ_RATED[]; extern const esp_efuse_desc_t* ESP_EFUSE_CHIP_VER_REV1[]; extern const esp_efuse_desc_t* ESP_EFUSE_CHIP_VER_REV2[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MINOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_XPD_SDIO_REG[]; extern const esp_efuse_desc_t* ESP_EFUSE_SDIO_TIEH[]; extern const esp_efuse_desc_t* ESP_EFUSE_SDIO_FORCE[]; diff --git a/tools/sdk/esp32/include/efuse/include/esp_efuse.h b/tools/sdk/esp32/include/efuse/include/esp_efuse.h index 435b5e100fb..f2c08bad30e 100644 --- a/tools/sdk/esp32/include/efuse/include/esp_efuse.h +++ b/tools/sdk/esp32/include/efuse/include/esp_efuse.h @@ -276,13 +276,6 @@ esp_err_t esp_efuse_read_block(esp_efuse_block_t blk, void* dst_key, size_t offs */ esp_err_t esp_efuse_write_block(esp_efuse_block_t blk, const void* src_key, size_t offset_in_bits, size_t size_bits); -/** - * @brief Returns chip version from efuse - * - * @return chip version - */ -uint8_t esp_efuse_get_chip_ver(void); - /** * @brief Returns chip package from efuse * diff --git a/tools/sdk/esp32/include/esp_common/include/esp_assert.h b/tools/sdk/esp32/include/esp_common/include/esp_assert.h index 39d6a32843f..17e4b928f83 100644 --- a/tools/sdk/esp32/include/esp_common/include/esp_assert.h +++ b/tools/sdk/esp32/include/esp_common/include/esp_assert.h @@ -16,15 +16,21 @@ #include "assert.h" +#ifndef __cplusplus + #define ESP_STATIC_ASSERT _Static_assert +#else // __cplusplus + #define ESP_STATIC_ASSERT static_assert +#endif // __cplusplus + /* Assert at compile time if possible, runtime otherwise */ #ifndef __cplusplus /* __builtin_choose_expr() is only in C, makes this a lot cleaner */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ - _Static_assert(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ + ESP_STATIC_ASSERT(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ assert(#MSG && (CONDITION)); \ } while(0) #else -/* for C++, use __attribute__((error)) - works almost as well as _Static_assert */ +/* for C++, use __attribute__((error)) - works almost as well as ESP_STATIC_ASSERT */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ if (__builtin_constant_p(CONDITION) && !(CONDITION)) { \ extern __attribute__((error(#MSG))) void failed_compile_time_assert(void); \ diff --git a/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h index 74dda44cbdc..4caac067f95 100644 --- a/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 3 +#define ESP_IDF_VERSION_PATCH 4 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32/include/esp_diagnostics/include/esp_diagnostics.h b/tools/sdk/esp32/include/esp_diagnostics/include/esp_diagnostics.h index 0e0fb50da36..682f316db7b 100644 --- a/tools/sdk/esp32/include/esp_diagnostics/include/esp_diagnostics.h +++ b/tools/sdk/esp32/include/esp_diagnostics/include/esp_diagnostics.h @@ -238,7 +238,7 @@ esp_err_t esp_diag_log_event(const char *tag, const char *format, ...) __attribu */ #define ESP_DIAG_EVENT(tag, format, ...) \ { \ - esp_diag_log_event(tag, "EV (%" PRIu32 ") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ + esp_diag_log_event(tag, "EV (%"PRIu32") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ ESP_LOGI(tag, format, ##__VA_ARGS__); \ } diff --git a/tools/sdk/esp32/include/esp_https_server/include/esp_https_server.h b/tools/sdk/esp32/include/esp_https_server/include/esp_https_server.h index 75720bd1ce7..f5159207216 100644 --- a/tools/sdk/esp32/include/esp_https_server/include/esp_https_server.h +++ b/tools/sdk/esp32/include/esp_https_server/include/esp_https_server.h @@ -119,6 +119,8 @@ typedef struct httpd_ssl_config httpd_ssl_config_t; .global_user_ctx_free_fn = NULL, \ .global_transport_ctx = NULL, \ .global_transport_ctx_free_fn = NULL, \ + .enable_so_linger = false, \ + .linger_timeout = 0, \ .open_fn = NULL, \ .close_fn = NULL, \ .uri_match_fn = NULL \ diff --git a/tools/sdk/esp32/include/esp_hw_support/include/esp_chip_info.h b/tools/sdk/esp32/include/esp_hw_support/include/esp_chip_info.h index 0b081d37e1b..a99863d7718 100644 --- a/tools/sdk/esp32/include/esp_hw_support/include/esp_chip_info.h +++ b/tools/sdk/esp32/include/esp_hw_support/include/esp_chip_info.h @@ -41,6 +41,7 @@ typedef enum { typedef struct { esp_chip_model_t model; //!< chip model, one of esp_chip_model_t uint32_t features; //!< bit mask of CHIP_FEATURE_x feature flags + uint16_t full_revision; //!< chip revision number (in format MXX; where M - wafer major version, XX - wafer minor version) uint8_t cores; //!< number of CPU cores uint8_t revision; //!< chip revision number } esp_chip_info_t; diff --git a/tools/sdk/esp32/include/esp_hw_support/include/esp_intr_alloc.h b/tools/sdk/esp32/include/esp_hw_support/include/esp_intr_alloc.h index a26fde9394f..a800c94fe86 100644 --- a/tools/sdk/esp32/include/esp_hw_support/include/esp_intr_alloc.h +++ b/tools/sdk/esp32/include/esp_hw_support/include/esp_intr_alloc.h @@ -64,6 +64,7 @@ extern "C" { #define ETS_INTERNAL_SW0_INTR_SOURCE -4 ///< Software int source 1 #define ETS_INTERNAL_SW1_INTR_SOURCE -5 ///< Software int source 2 #define ETS_INTERNAL_PROFILING_INTR_SOURCE -6 ///< Int source for profiling +#define ETS_INTERNAL_UNUSED_INTR_SOURCE -99 ///< Interrupt is not assigned to any source /**@}*/ diff --git a/tools/sdk/esp32/include/esp_hw_support/include/esp_private/esp_sleep_internal.h b/tools/sdk/esp32/include/esp_hw_support/include/esp_private/esp_sleep_internal.h index ee0b72953f0..5eb5081b562 100644 --- a/tools/sdk/esp32/include/esp_hw_support/include/esp_private/esp_sleep_internal.h +++ b/tools/sdk/esp32/include/esp_hw_support/include/esp_private/esp_sleep_internal.h @@ -6,6 +6,7 @@ #pragma once #include +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { @@ -20,6 +21,15 @@ extern "C" { */ void esp_sleep_enable_adc_tsens_monitor(bool enable); +// IDF does not officially support esp32h2 in v4.4 +#if !CONFIG_IDF_TARGET_ESP32H2 +/** + * @brief Isolate all digital IOs except those that are held during deep sleep + * + * Reduce digital IOs current leakage during deep sleep. + */ +void esp_sleep_isolate_digital_gpio(void); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/esp_hw_support/include/esp_private/sleep_gpio.h b/tools/sdk/esp32/include/esp_hw_support/include/esp_private/sleep_gpio.h index abab21871a4..493687ec32d 100644 --- a/tools/sdk/esp32/include/esp_hw_support/include/esp_private/sleep_gpio.h +++ b/tools/sdk/esp32/include/esp_hw_support/include/esp_private/sleep_gpio.h @@ -18,7 +18,7 @@ extern "C" { * This file contains declarations of GPIO related functions in light sleep mode. */ -#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Save GPIO pull-up and pull-down configuration information in the wake-up state @@ -39,7 +39,7 @@ void gpio_sleep_mode_config_apply(void); */ void gpio_sleep_mode_config_unapply(void); -#endif // SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/esp_hw_support/include/esp_sleep.h b/tools/sdk/esp32/include/esp_hw_support/include/esp_sleep.h index 8090fe85211..1c1b51d3519 100644 --- a/tools/sdk/esp32/include/esp_hw_support/include/esp_sleep.h +++ b/tools/sdk/esp32/include/esp_hw_support/include/esp_sleep.h @@ -80,6 +80,11 @@ typedef enum { /* Leave this type define for compatibility */ typedef esp_sleep_source_t esp_sleep_wakeup_cause_t; +enum { + ESP_ERR_SLEEP_REJECT = ESP_ERR_INVALID_STATE, + ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION = ESP_ERR_INVALID_ARG, +}; + /** * @brief Disable wakeup source * @@ -101,10 +106,8 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source); #if SOC_ULP_SUPPORTED /** * @brief Enable wakeup by ULP coprocessor - * @note In revisions 0 and 1 of the ESP32, ULP wakeup source - * cannot be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when - * ext0 wakeup source is used. + * @note On ESP32, ULP wakeup source cannot be used when RTC_PERIPH power domain is forced, + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * @return * - ESP_OK on success * - ESP_ERR_NOT_SUPPORTED if additional current by touch (CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT) is enabled. @@ -128,10 +131,8 @@ esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us); /** * @brief Enable wakeup by touch sensor * - * @note In revisions 0 and 1 of the ESP32, touch wakeup source - * can not be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup - * source is used. + * @note On ESP32, touch wakeup source can not be used when RTC_PERIPH power domain is forced + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * * @note The FSM mode of the touch button should be configured * as the timer trigger mode. @@ -179,8 +180,7 @@ bool esp_sleep_is_valid_wakeup_gpio(gpio_num_t gpio_num); * @note This function does not modify pin configuration. The pin is * configured in esp_sleep_start, immediately before entering sleep mode. * - * @note In revisions 0 and 1 of the ESP32, ext0 wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, ext0 wakeup source can not be used together with touch or ULP wakeup sources. * * @param gpio_num GPIO number used as wakeup source. Only GPIOs which are have RTC * functionality can be used: 0,2,4,12-15,25-27,32-39. @@ -265,8 +265,7 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee * wakeup level, for each GPIO which is used for wakeup. * Then call this function to enable wakeup feature. * - * @note In revisions 0 and 1 of the ESP32, GPIO wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources. * * @return * - ESP_OK on success @@ -351,7 +350,10 @@ void esp_deep_sleep_start(void) __attribute__((noreturn)); * * @return * - ESP_OK on success (returned after wakeup) - * - ESP_ERR_INVALID_STATE if WiFi or BT is not stopped + * - ESP_ERR_SLEEP_REJECT sleep request is rejected(wakeup source set before the sleep request) + * - ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION after deducting the sleep flow overhead, the final sleep duration + * is too short to cover the minimum sleep duration of the chip, when + * rtc timer wakeup source enabled */ esp_err_t esp_light_sleep_start(void); @@ -456,7 +458,6 @@ void esp_deep_sleep_disable_rom_logging(void); esp_err_t esp_sleep_cpu_pd_low_init(bool enable); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Configure to isolate all GPIO pins in sleep state */ @@ -467,7 +468,6 @@ void esp_sleep_config_gpio_isolate(void); * @param enable decide whether to switch status or not */ void esp_sleep_enable_gpio_switch(bool enable); -#endif #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_io.h b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_io.h index 2f2c613f1a8..9bc140870e4 100644 --- a/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_io.h +++ b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_io.h @@ -19,11 +19,35 @@ typedef void *esp_lcd_spi_bus_handle_t; /*!< Type of LCD S typedef void *esp_lcd_i2c_bus_handle_t; /*!< Type of LCD I2C bus handle */ typedef struct esp_lcd_i80_bus_t *esp_lcd_i80_bus_handle_t; /*!< Type of LCD intel 8080 bus handle */ +/** + * @brief Type of LCD panel IO event data + */ +typedef struct { +} esp_lcd_panel_io_event_data_t; + +/** + * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * + * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] edata Panel IO event data, fed by driver + * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` + * @return Whether a high priority task has been waken up by this function + */ +typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); + +/** + * @brief Type of LCD panel IO callbacks + */ +typedef struct { + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ +} esp_lcd_panel_io_callbacks_t; + + /** * @brief Transmit LCD command and receive corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -42,7 +66,7 @@ esp_err_t esp_lcd_panel_io_rx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, v * @brief Transmit LCD command and corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -65,7 +89,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c * Recycling of color buffer should be done in the callback `on_color_trans_done()`. * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] lcd_cmd The specific LCD command + * @param[in] lcd_cmd The specific LCD command, set to -1 if no command needed * @param[in] color Buffer that holds the RGB color data * @param[in] color_size Size of `color` in memory, in bytes * @return @@ -75,7 +99,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, const void *color, size_t color_size); /** - * @brief Destory LCD panel IO handle (deinitialize panel and free all corresponding resource) + * @brief Destroy LCD panel IO handle (deinitialize panel and free all corresponding resource) * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` * @return @@ -85,20 +109,16 @@ esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t io); /** - * @brief Type of LCD panel IO event data - */ -typedef struct { -} esp_lcd_panel_io_event_data_t; - -/** - * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * @brief Register LCD panel IO callbacks * - * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] edata Panel IO event data, fed by driver - * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` - * @return Whether a high priority task has been waken up by this function + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success */ -typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); +esp_err_t esp_lcd_panel_io_register_event_callbacks(esp_lcd_panel_io_handle_t io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); /** * @brief Panel IO configuration structure, for SPI interface @@ -142,7 +162,7 @@ typedef struct { uint32_t dev_addr; /*!< I2C device address */ esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ - size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C seclection) into control phase, in several bytes */ + size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C selection) into control phase, in several bytes */ unsigned int dc_bit_offset; /*!< Offset of the D/C selection bit in control phase */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ @@ -194,7 +214,7 @@ typedef struct { esp_err_t esp_lcd_new_i80_bus(const esp_lcd_i80_bus_config_t *bus_config, esp_lcd_i80_bus_handle_t *ret_bus); /** - * @brief Destory Intel 8080 bus handle + * @brief Destroy Intel 8080 bus handle * * @param[in] bus Intel 8080 bus handle, created by `esp_lcd_new_i80_bus()` * @return @@ -211,7 +231,7 @@ typedef struct { int cs_gpio_num; /*!< GPIO used for CS line, set to -1 will declaim exclusively use of I80 bus */ unsigned int pclk_hz; /*!< Frequency of pixel clock */ size_t trans_queue_depth; /*!< Transaction queue size, larger queue, higher throughput */ - esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was tranferred done */ + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was transferred done */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ diff --git a/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_ops.h b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_ops.h index 5099233ce83..63bc6fe2742 100644 --- a/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_ops.h +++ b/tools/sdk/esp32/include/esp_lcd/include/esp_lcd_panel_ops.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -110,9 +110,22 @@ esp_err_t esp_lcd_panel_set_gap(esp_lcd_panel_handle_t panel, int x_gap, int y_g */ esp_err_t esp_lcd_panel_invert_color(esp_lcd_panel_handle_t panel, bool invert_color_data); +/** + * @brief Turn on or off the display + * + * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` + * @param[in] on_off True to turns on display, False to turns off display + * @return + * - ESP_OK on success + * - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel + */ +esp_err_t esp_lcd_panel_disp_on_off(esp_lcd_panel_handle_t panel, bool on_off); + /** * @brief Turn off the display * + * @deprecated This function has similar functionality to `esp_lcd_panel_disp_on_off`. + * * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` * @param[in] off Whether to turn off the screen * @return diff --git a/tools/sdk/esp32/include/esp_lcd/interface/esp_lcd_panel_io_interface.h b/tools/sdk/esp32/include/esp_lcd/interface/esp_lcd_panel_io_interface.h index 9f2226587e5..88bf9db0d47 100644 --- a/tools/sdk/esp32/include/esp_lcd/interface/esp_lcd_panel_io_interface.h +++ b/tools/sdk/esp32/include/esp_lcd/interface/esp_lcd_panel_io_interface.h @@ -7,6 +7,7 @@ #include #include "esp_err.h" +#include "esp_lcd_panel_io.h" #ifdef __cplusplus extern "C" { @@ -73,6 +74,18 @@ struct esp_lcd_panel_io_t { * - ESP_OK on success */ esp_err_t (*del)(esp_lcd_panel_io_t *io); + + /** + * @brief Register LCD panel IO callbacks + * + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success + */ + esp_err_t (*register_event_callbacks)(esp_lcd_panel_io_t *io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); }; #ifdef __cplusplus diff --git a/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h index 60409b1b689..c41da24e963 100644 --- a/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32/include/esp_littlefs/include/esp_littlefs.h @@ -8,10 +8,10 @@ extern "C" { #endif -#define ESP_LITTLEFS_VERSION_NUMBER "1.5.1" +#define ESP_LITTLEFS_VERSION_NUMBER "1.5.2" #define ESP_LITTLEFS_VERSION_MAJOR 1 #define ESP_LITTLEFS_VERSION_MINOR 5 -#define ESP_LITTLEFS_VERSION_PATCH 1 +#define ESP_LITTLEFS_VERSION_PATCH 2 /** *Configuration structure for esp_vfs_littlefs_register. diff --git a/tools/sdk/esp32/include/esp_phy/include/esp_phy_init.h b/tools/sdk/esp32/include/esp_phy/include/esp_phy_init.h index efefd114d4f..bcf3e289d3d 100644 --- a/tools/sdk/esp32/include/esp_phy/include/esp_phy_init.h +++ b/tools/sdk/esp32/include/esp_phy/include/esp_phy_init.h @@ -178,12 +178,13 @@ void esp_phy_load_cal_and_init(void); /** * @brief Initialize backup memory for Phy power up/down */ -void esp_phy_pd_mem_init(void); +void esp_phy_modem_init(void); /** * @brief Deinitialize backup memory for Phy power up/down + * Set phy_init_flag if all modems deinit on ESP32C3 */ -void esp_phy_pd_mem_deinit(void); +void esp_phy_modem_deinit(void); #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h index eba3615a70c..8775eb8696f 100644 --- a/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ b/tools/sdk/esp32/include/esp_rainmaker/include/esp_rmaker_mqtt.h @@ -100,6 +100,17 @@ esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); */ void esp_rmaker_create_mqtt_topic(char *buf, size_t buf_size, const char *topic_suffix, const char *rule); +/** + * @brief Check if budget is available to publish an mqtt message + * + * @return true if budget is available + * @return false if budget is exhausted + * + * @note `esp_rmaker_mqtt_publish` API already does this check. In addition to that, + * some use-cases might still need to check for this. + */ +bool esp_rmaker_mqtt_is_budget_available(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/esp_rom/esp32/esp_rom_caps.h b/tools/sdk/esp32/include/esp_rom/esp32/esp_rom_caps.h index 1d19be85715..959075b29c4 100644 --- a/tools/sdk/esp32/include/esp_rom/esp32/esp_rom_caps.h +++ b/tools/sdk/esp32/include/esp_rom/esp32/esp_rom_caps.h @@ -9,5 +9,4 @@ #define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian #define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian #define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library -#define ESP_ROM_SUPPORT_MULTIPLE_UART (1) // ROM has multiple UARTs available for logging #define ESP_ROM_NEEDS_SWSETUP_WORKAROUND (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32/rom/rtc.h b/tools/sdk/esp32/include/esp_rom/include/esp32/rom/rtc.h index 2be040aa99d..7410180da3a 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32/rom/rtc.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -100,17 +101,17 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32/rom/secure_boot.h b/tools/sdk/esp32/include/esp_rom/include/esp32/rom/secure_boot.h index 50a3fcd4948..04c3c509f78 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32/rom/secure_boot.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -62,7 +63,7 @@ typedef struct { uint32_t block_crc; uint8_t _padding[16]; } ets_secure_boot_sig_block_t; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); /* ROM supports up to 3, but IDF only checks the first one (SECURE_BOOT_NUM_BLOCKS) */ #define SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE 3 @@ -73,7 +74,7 @@ typedef struct { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE)]; } ets_secure_boot_signature_t; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); typedef struct { const void *key_digests[SECURE_BOOT_NUM_BLOCKS]; diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/rtc.h b/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/rtc.h index 2a7f6cb6140..1e6100cb106 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/rtc.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/rtc.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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ROM_RTC_H_ #define _ROM_RTC_H_ @@ -19,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -105,24 +98,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/secure_boot.h b/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/secure_boot.h index a9d417283b7..26cd0b4b842 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/secure_boot.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32c3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/rtc.h b/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/rtc.h index e3a8d9d63e2..2629fd9a6d9 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/rtc.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/rtc.h @@ -11,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -98,25 +99,25 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); -_Static_assert((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/secure_boot.h b/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/secure_boot.h index 36a490d8584..b7dd24b00cb 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/secure_boot.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32h2/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/rtc.h b/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/rtc.h index 2de02a88c8e..2c5b1b2a631 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/rtc.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -101,20 +102,21 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/secure_boot.h b/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/secure_boot.h index a0fcecfd3c5..49edf7d6fd7 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/secure_boot.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,6 +9,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -92,7 +93,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -102,7 +103,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/usb/usb_device.h b/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/usb/usb_device.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32s2/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/rtc.h b/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/rtc.h index d395ce3976e..168ca7997a7 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/rtc.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/rtc.h @@ -8,6 +8,7 @@ #include #include +#include "esp_assert.h" #include "soc/rtc_cntl_reg.h" #include "soc/reset_reasons.h" @@ -91,24 +92,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/secure_boot.h b/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/secure_boot.h index a372517b7a1..3c374fe3016 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/secure_boot.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -80,7 +81,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -90,7 +91,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/usb/usb_device.h b/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/usb/usb_device.h +++ b/tools/sdk/esp32/include/esp_rom/include/esp32s3/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32/include/esp_wifi/include/esp_mesh_internal.h b/tools/sdk/esp32/include/esp_wifi/include/esp_mesh_internal.h index e967dbaafbc..af602bb5480 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_mesh_internal.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_mesh_internal.h @@ -1,16 +1,8 @@ -// Copyright 2017-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: 2017-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __ESP_MESH_INTERNAL_H__ #define __ESP_MESH_INTERNAL_H__ @@ -107,6 +99,9 @@ typedef struct { mesh_chain_layer_t chain; } __attribute__((packed)) mesh_chain_assoc_t; +/* mesh max connections */ +#define MESH_MAX_CONNECTIONS (10) + /** * @brief Mesh PS duties */ @@ -117,7 +112,7 @@ typedef struct { bool used; uint8_t duty; uint8_t mac[6]; - } child[ESP_WIFI_MAX_CONN_NUM]; + } child[MESH_MAX_CONNECTIONS]; } esp_mesh_ps_duties_t; /******************************************************* 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 08be53cf6a4..ab138a96926 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi.h @@ -108,6 +108,7 @@ typedef struct { int mgmt_sbuf_num; /**< WiFi management short buffer number, the minimum value is 6, the maximum value is 32 */ uint64_t feature_caps; /**< Enables additional WiFi features and capabilities */ bool sta_disconnected_pm; /**< WiFi Power Management for station at disconnected status */ + int espnow_max_encrypt_num; /**< Maximum encrypt number of peers supported by espnow */ int magic; /**< WiFi init magic number, it should be the last field */ } wifi_init_config_t; @@ -227,6 +228,7 @@ extern uint64_t g_wifi_feature_caps; .mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \ .feature_caps = g_wifi_feature_caps, \ .sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \ + .espnow_max_encrypt_num = CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM, \ .magic = WIFI_INIT_CONFIG_MAGIC\ } @@ -455,6 +457,21 @@ esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number); esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records); +/** + * @brief Clear AP list found in last scan + * + * @attention When the obtained ap list fails,bss info must be cleared,otherwise it may cause memory leakage. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_MODE: WiFi mode is wrong + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_clear_ap_list(void); + + /** * @brief Get information of AP which the ESP32 station is associated with * @@ -567,6 +584,8 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); * @attention 2. When ESP32 is in STA mode, this API should not be called when STA is scanning or connecting to an external AP * @attention 3. When ESP32 is in softAP mode, this API should not be called when softAP has connected to external STAs * @attention 4. When ESP32 is in STA+softAP mode, this API should not be called when in the scenarios described above + * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remeber the channel used before wifi stop, + * you need to call this API again after wifi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. * * @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel * @param second for HT20, second is ignored, for HT40, second is the second channel @@ -776,6 +795,7 @@ esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter * @attention 2. For station configuration, bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. * @attention 3. ESP32 is limited to only one channel, so when in the soft-AP+station mode, the soft-AP will adjust its channel automatically to be the same as * the channel of the ESP32 station. + * @attention 4. The configuration will be stored in NVS * * @param interface interface * @param conf station or soft-AP configuration @@ -1161,7 +1181,9 @@ esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi); * @brief Start an FTM Initiator session by sending FTM request * If successful, event WIFI_EVENT_FTM_REPORT is generated with the result of the FTM procedure * - * @attention Use this API only in Station mode + * @attention 1. Use this API only in Station mode. + * @attention 2. If FTM is initiated on a different channel than Station is connected in or internal SoftAP is started in, + * FTM defaults to a single burst in ASAP mode. * * @param cfg FTM Initiator session configuration * @@ -1219,7 +1241,7 @@ esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable); * @attention 3. This configuration would influence nothing until some module configure wake_window * @attention 4. A sensible interval which is not too small is recommended (e.g. 100ms) * - * @param interval how much micriosecond would the chip wake up, from 1 to 65535. + * @param interval how much milliseconds would the chip wake up, from 1 to 65535. */ esp_err_t esp_wifi_set_connectionless_wake_interval(uint16_t interval); diff --git a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h index 4dae6a8c3fa..60b22707c15 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_types.h @@ -61,41 +61,63 @@ typedef enum { } wifi_auth_mode_t; typedef enum { - WIFI_REASON_UNSPECIFIED = 1, - WIFI_REASON_AUTH_EXPIRE = 2, - WIFI_REASON_AUTH_LEAVE = 3, - WIFI_REASON_ASSOC_EXPIRE = 4, - WIFI_REASON_ASSOC_TOOMANY = 5, - WIFI_REASON_NOT_AUTHED = 6, - WIFI_REASON_NOT_ASSOCED = 7, - WIFI_REASON_ASSOC_LEAVE = 8, - WIFI_REASON_ASSOC_NOT_AUTHED = 9, - WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, - WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, - WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, - WIFI_REASON_IE_INVALID = 13, - WIFI_REASON_MIC_FAILURE = 14, - WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, - WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, - WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, - WIFI_REASON_GROUP_CIPHER_INVALID = 18, - WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, - WIFI_REASON_AKMP_INVALID = 20, - WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, - WIFI_REASON_INVALID_RSN_IE_CAP = 22, - WIFI_REASON_802_1X_AUTH_FAILED = 23, - WIFI_REASON_CIPHER_SUITE_REJECTED = 24, - - WIFI_REASON_INVALID_PMKID = 53, - - WIFI_REASON_BEACON_TIMEOUT = 200, - WIFI_REASON_NO_AP_FOUND = 201, - WIFI_REASON_AUTH_FAIL = 202, - WIFI_REASON_ASSOC_FAIL = 203, - WIFI_REASON_HANDSHAKE_TIMEOUT = 204, - WIFI_REASON_CONNECTION_FAIL = 205, - WIFI_REASON_AP_TSF_RESET = 206, - WIFI_REASON_ROAMING = 207, + WIFI_REASON_UNSPECIFIED = 1, + WIFI_REASON_AUTH_EXPIRE = 2, + WIFI_REASON_AUTH_LEAVE = 3, + WIFI_REASON_ASSOC_EXPIRE = 4, + WIFI_REASON_ASSOC_TOOMANY = 5, + WIFI_REASON_NOT_AUTHED = 6, + WIFI_REASON_NOT_ASSOCED = 7, + WIFI_REASON_ASSOC_LEAVE = 8, + WIFI_REASON_ASSOC_NOT_AUTHED = 9, + WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, + WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, + WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, + WIFI_REASON_IE_INVALID = 13, + WIFI_REASON_MIC_FAILURE = 14, + WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, + WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, + WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, + WIFI_REASON_GROUP_CIPHER_INVALID = 18, + WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, + WIFI_REASON_AKMP_INVALID = 20, + WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, + WIFI_REASON_INVALID_RSN_IE_CAP = 22, + WIFI_REASON_802_1X_AUTH_FAILED = 23, + WIFI_REASON_CIPHER_SUITE_REJECTED = 24, + WIFI_REASON_TDLS_PEER_UNREACHABLE = 25, + WIFI_REASON_TDLS_UNSPECIFIED = 26, + WIFI_REASON_SSP_REQUESTED_DISASSOC = 27, + WIFI_REASON_NO_SSP_ROAMING_AGREEMENT = 28, + WIFI_REASON_BAD_CIPHER_OR_AKM = 29, + WIFI_REASON_NOT_AUTHORIZED_THIS_LOCATION = 30, + WIFI_REASON_SERVICE_CHANGE_PERCLUDES_TS = 31, + WIFI_REASON_UNSPECIFIED_QOS = 32, + WIFI_REASON_NOT_ENOUGH_BANDWIDTH = 33, + WIFI_REASON_MISSING_ACKS = 34, + WIFI_REASON_EXCEEDED_TXOP = 35, + WIFI_REASON_STA_LEAVING = 36, + WIFI_REASON_END_BA = 37, + WIFI_REASON_UNKNOWN_BA = 38, + WIFI_REASON_TIMEOUT = 39, + WIFI_REASON_PEER_INITIATED = 46, + WIFI_REASON_AP_INITIATED = 47, + WIFI_REASON_INVALID_FT_ACTION_FRAME_COUNT = 48, + WIFI_REASON_INVALID_PMKID = 49, + WIFI_REASON_INVALID_MDE = 50, + WIFI_REASON_INVALID_FTE = 51, + WIFI_REASON_TRANSMISSION_LINK_ESTABLISH_FAILED = 67, + WIFI_REASON_ALTERATIVE_CHANNEL_OCCUPIED = 68, + + WIFI_REASON_BEACON_TIMEOUT = 200, + WIFI_REASON_NO_AP_FOUND = 201, + WIFI_REASON_AUTH_FAIL = 202, + WIFI_REASON_ASSOC_FAIL = 203, + WIFI_REASON_HANDSHAKE_TIMEOUT = 204, + WIFI_REASON_CONNECTION_FAIL = 205, + WIFI_REASON_AP_TSF_RESET = 206, + WIFI_REASON_ROAMING = 207, + WIFI_REASON_ASSOC_COMEBACK_TIME_TOO_LONG = 208, } wifi_err_reason_t; typedef enum { @@ -235,7 +257,7 @@ typedef struct { uint8_t channel; /**< Channel of ESP32 soft-AP */ wifi_auth_mode_t authmode; /**< Auth mode of ESP32 soft-AP. Do not support AUTH_WEP in soft-AP mode */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ - uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 10 */ + uint8_t max_connection; /**< Max number of stations allowed to connect in */ uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */ wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of SoftAP, group cipher will be derived using this. cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */ bool ftm_responder; /**< Enable FTM Responder mode */ @@ -256,8 +278,10 @@ typedef struct { uint32_t rm_enabled:1; /**< Whether Radio Measurements are enabled for the connection */ uint32_t btm_enabled:1; /**< Whether BSS Transition Management is enabled for the connection */ uint32_t mbo_enabled:1; /**< Whether MBO is enabled for the connection */ - uint32_t reserved:29; /**< Reserved for future feature set */ + uint32_t transition_disable:1; /**< Whether to enable transition disable feature */ + uint32_t reserved:28; /**< Reserved for future feature set */ wifi_sae_pwe_method_t sae_pwe_h2e; /**< Whether SAE hash to element is enabled */ + uint8_t failure_retry_cnt; /**< Number of connection retries station will do before moving to next AP. scan_method should be set as WIFI_ALL_CHANNEL_SCAN to use this config. Note: Enabling this may cause connection time to increase incase best AP doesn't behave properly. */ } wifi_sta_config_t; /** @brief Configuration data for ESP32 AP or STA. @@ -283,7 +307,11 @@ typedef struct { uint32_t reserved:27; /**< bit: 5..31 reserved */ } wifi_sta_info_t; -#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32 soft-AP */ +#if CONFIG_IDF_TARGET_ESP32C3 +#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */ +#else +#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */ +#endif /** @brief List of stations associated with the ESP32 Soft-AP */ typedef struct { @@ -640,6 +668,7 @@ typedef struct { uint8_t ssid_len; /**< SSID length of disconnected AP */ uint8_t bssid[6]; /**< BSSID of disconnected AP */ uint8_t reason; /**< reason of disconnection */ + int8_t rssi; /**< rssi of disconnection */ } wifi_event_sta_disconnected_t; /** Argument structure for WIFI_EVENT_STA_AUTHMODE_CHANGE event */ diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_common.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_common.h similarity index 83% rename from tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_common.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_common.h index bc8dc619544..988fdf35f57 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_common.h +++ b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_common.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -52,6 +52,19 @@ bool dsp_is_power_of_two(int x); */ int dsp_power_of_two(int x); + +/** + * @brief Logginng for esp32s3 TIE core + * Registers covered q0 to q7, ACCX and SAR_BYTE + * + * @param n_regs: number of registers to be logged at once + * @param ...: register codes 0, 1, 2, 3, 4, 5, 6, 7, 'a', 's' + * + * @return ESP_OK + * + */ +esp_err_t tie_log(int n_regs, ...); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_err.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_err.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_err.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_err.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_err_codes.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h similarity index 89% rename from tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_err_codes.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h index c8827781a80..a4176e5a818 100644 --- a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_err_codes.h +++ b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -22,6 +22,7 @@ #define ESP_ERR_DSP_PARAM_OUTOFRANGE (ESP_ERR_DSP_BASE + 3) #define ESP_ERR_DSP_UNINITIALIZED (ESP_ERR_DSP_BASE + 4) #define ESP_ERR_DSP_REINITIALIZED (ESP_ERR_DSP_BASE + 5) +#define ESP_ERR_DSP_ARRAY_NOT_ALIGNED (ESP_ERR_DSP_BASE + 6) #endif // _dsp_error_codes_H_ \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_tests.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_tests.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_tests.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_tests.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_types.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_types.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_types.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/dsp_types.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/esp_dsp.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/esp_dsp.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/common/include/esp_dsp.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/common/include/esp_dsp.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_ccorr.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_ccorr.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_conv_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_corr.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/conv/include/dsps_corr.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/dct/include/dsps_dct.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/dct/include/dsps_dct.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft_tables.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/fft/include/dsps_fft_tables.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/fir/include/dsps_fir.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h similarity index 71% rename from tools/sdk/esp32c3/include/esp-dsp/modules/fir/include/dsps_fir.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h index a7d3d09003e..c06b1f34b77 100644 --- a/tools/sdk/esp32c3/include/esp-dsp/modules/fir/include/dsps_fir.h +++ b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h @@ -19,6 +19,7 @@ #include "dsp_err.h" #include "dsps_fir_platform.h" +#include "dsp_common.h" #ifdef __cplusplus extern "C" @@ -49,13 +50,16 @@ typedef struct fir_f32_s { * All fields of this structure are initialized by the dsps_fir_init_s16(...) function. */ typedef struct fir_s16_s{ - int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ - int16_t *delay; /*!< Pointer to the delay line buffer.*/ - int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ - int16_t pos; /*!< Position in delay line.*/ - int16_t decim; /*!< Decimation factor.*/ - int16_t d_pos; /*!< Actual decimation counter.*/ - int16_t shift; /*!< shift value of the result.*/ + int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ + int16_t *delay; /*!< Pointer to the delay line buffer.*/ + int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ + int16_t pos; /*!< Position in delay line.*/ + int16_t decim; /*!< Decimation factor.*/ + int16_t d_pos; /*!< Actual decimation counter.*/ + int16_t shift; /*!< Shift value of the result.*/ + int32_t *rounding_buff; /*!< Rounding buffer for the purposes of esp32s3 ee.ld.accx.ip assembly instruction */ + int32_t rounding_val; /*!< Rounding value*/ + int16_t free_status; /*!< Indicator for dsps_fird_s16_aes3_free() function*/ }fir_s16_t; /** @@ -173,7 +177,43 @@ int dsps_fird_f32_ae32(fir_f32_t *fir, const float *input, float *output, int le */ int32_t dsps_fird_s16_ansi(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); +int32_t dsps_fird_s16_aes3(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); + + /**@}*/ +/** + * @brief support arrays freeing function + * + * Function frees all the arrays, which were created during the initialization of the fir_s16_t structure + * 1. frees allocated memory for rounding buffer, for the purposes of esp32s3 ee.ld.accx.ip assembly instruction + * 2. frees allocated memory in case the delay line is NULL + * 3. frees allocated memory in case the length of the filter (and the delay line) is not divisible by 8 + * and new delay line and filter coefficients arrays are created for the purpose of the esp32s3 assembly + * + * @param fir: pointer to fir filter structure, that must be initialized before + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_fird_s16_aexx_free(fir_s16_t *fir); +/**@}*/ + + +/**@{*/ +/** + * @brief Array reversal + * + * Function reverses 16-bit long array members for the purpose of the dsps_fird_s16_aes3 implementation + * The function has to be called either during the fir struct initialization or every time the coefficients change + * + * @param fir: pointer to the array to be reversed + * @param len: length of the array to be reversed + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_16_array_rev(int16_t *arr, int16_t len); +/**@{*/ #ifdef __cplusplus } @@ -182,28 +222,34 @@ int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output #if CONFIG_DSP_OPTIMIZED -#if (dsps_fir_f32_ae32_enabled == 1) -#define dsps_fir_f32 dsps_fir_f32_ae32 -#else -#define dsps_fir_f32 dsps_fir_f32_ansi -#endif + #if (dsps_fir_f32_ae32_enabled == 1) + #define dsps_fir_f32 dsps_fir_f32_ae32 + #else + #define dsps_fir_f32 dsps_fir_f32_ansi + #endif -#if (dsps_fird_f32_ae32_enabled == 1) -#define dsps_fird_f32 dsps_fird_f32_ae32 -#else -#define dsps_fird_f32 dsps_fird_f32_ansi -#endif + #if (dsps_fird_f32_ae32_enabled == 1) + #define dsps_fird_f32 dsps_fird_f32_ae32 + #else + #define dsps_fird_f32 dsps_fird_f32_ansi + #endif -#if (dsps_fird_s16_ae32_enabled == 1) -#define dsps_fird_s16 dsps_fird_s16_ae32 -#else -#define dsps_fird_s16 dsps_fird_s16_ansi -#endif + #if (dsps_fird_s16_ae32_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_ae32 + + #elif (dsps_fird_s16_aes3_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_aes3 + + #else + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif #else // CONFIG_DSP_OPTIMIZED -#define dsps_fir_f32 dsps_fir_f32_ansi -#define dsps_fird_f32 dsps_fird_f32_ansi -#define dsps_fird_s16 dsps_fird_s16_ansi + + #define dsps_fir_f32 dsps_fir_f32_ansi + #define dsps_fird_f32 dsps_fird_f32_ansi + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif // CONFIG_DSP_OPTIMIZED #endif // _dsps_fir_H_ \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/fir/include/dsps_fir_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h similarity index 64% rename from tools/sdk/esp32s2/include/esp-dsp/modules/fir/include/dsps_fir_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h index f352fa85fc4..a20fa0a6bb6 100644 --- a/tools/sdk/esp32s2/include/esp-dsp/modules/fir/include/dsps_fir_platform.h +++ b/tools/sdk/esp32/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h @@ -12,8 +12,14 @@ #define dsps_fir_f32_ae32_enabled 1 #define dsps_fird_f32_ae32_enabled 1 -#define dsps_fird_s16_ae32_enabled 1 -#define dsps_fird_s16_ae32_mul_enabled 1 + +#if CONFIG_IDF_TARGET_ESP32S3 + #define dsps_fird_s16_aes3_enabled 1 + #define dsps_fird_s16_ae32_enabled 0 +#else + #define dsps_fird_s16_aes3_enabled 0 + #define dsps_fird_s16_ae32_enabled 1 +#endif #endif // #endif // __XTENSA__ diff --git a/tools/sdk/esp32/include/esp-dsp/modules/iir/include/dsps_biquad.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/iir/include/dsps_biquad.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/kalman/ekf/include/ekf.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/kalman/ekf/include/ekf.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/add/include/dsps_add.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/add/include/dsps_add.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/add/include/dsps_add_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/add/include/dsps_add_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/addc/include/dsps_addc.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/addc/include/dsps_addc.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/include/dsps_math.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/include/dsps_math.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/include/dsps_math.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/include/dsps_math.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/mul/include/dsps_mul.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/mul/include/dsps_mul.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/sub/include/dsps_sub.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/sub/include/dsps_sub.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/matrix/include/dspm_mult.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/matrix/include/dspm_mult.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/matrix/include/mat.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/matrix/include/mat.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/matrix/include/mat.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/matrix/include/mat.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_d_gen.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_d_gen.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_h_gen.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_h_gen.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_sfdr.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_sfdr.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_snr.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_snr.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_snr.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_snr.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_tone_gen.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_tone_gen.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_view.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_view.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/support/include/dsps_view.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/support/include/dsps_view.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/windows/include/dsps_wind.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/windows/include/dsps_wind.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h b/tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h similarity index 100% rename from tools/sdk/esp32/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h rename to tools/sdk/esp32/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h diff --git a/tools/sdk/esp32/include/expat/expat/expat/lib/expat.h b/tools/sdk/esp32/include/expat/expat/expat/lib/expat.h index e2020a4a29e..1c83563cbf6 100644 --- a/tools/sdk/esp32/include/expat/expat/expat/lib/expat.h +++ b/tools/sdk/esp32/include/expat/expat/expat/lib/expat.h @@ -1054,8 +1054,8 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold( See http://semver.org. */ #define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 4 -#define XML_MICRO_VERSION 8 +#define XML_MINOR_VERSION 5 +#define XML_MICRO_VERSION 0 #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/expat/expat/expat/lib/internal.h b/tools/sdk/esp32/include/expat/expat/expat/lib/internal.h index 444eba0fb03..e09f533b23c 100644 --- a/tools/sdk/esp32/include/expat/expat/expat/lib/internal.h +++ b/tools/sdk/esp32/include/expat/expat/expat/lib/internal.h @@ -28,7 +28,7 @@ Copyright (c) 2002-2003 Fred L. Drake, Jr. Copyright (c) 2002-2006 Karl Waclawek Copyright (c) 2003 Greg Stein - Copyright (c) 2016-2021 Sebastian Pipping + Copyright (c) 2016-2022 Sebastian Pipping Copyright (c) 2018 Yury Gribov Copyright (c) 2019 David Loffredo Licensed under the MIT license: @@ -107,7 +107,9 @@ #include // ULONG_MAX -#if defined(_WIN32) && ! defined(__USE_MINGW_ANSI_STDIO) +#if defined(_WIN32) \ + && (! defined(__USE_MINGW_ANSI_STDIO) \ + || (1 - __USE_MINGW_ANSI_STDIO - 1 == 0)) # define EXPAT_FMT_ULL(midpart) "%" midpart "I64u" # if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW # define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d" diff --git a/tools/sdk/esp32/include/expat/expat/expat/lib/siphash.h b/tools/sdk/esp32/include/expat/expat/expat/lib/siphash.h index e5406d7ee9e..303283ad2de 100644 --- a/tools/sdk/esp32/include/expat/expat/expat/lib/siphash.h +++ b/tools/sdk/esp32/include/expat/expat/expat/lib/siphash.h @@ -106,7 +106,7 @@ * if this code is included and compiled as C++; related GCC warning is: * warning: use of C++11 long long integer constant [-Wlong-long] */ -#define _SIP_ULL(high, low) (((uint64_t)high << 32) | low) +#define _SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low)) #define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) diff --git a/tools/sdk/esp32/include/expat/expat/expat/lib/xmltok_impl.h b/tools/sdk/esp32/include/expat/expat/expat/lib/xmltok_impl.h index c518aada013..3469c4ae138 100644 --- a/tools/sdk/esp32/include/expat/expat/expat/lib/xmltok_impl.h +++ b/tools/sdk/esp32/include/expat/expat/expat/lib/xmltok_impl.h @@ -45,7 +45,7 @@ enum { BT_LF, /* line feed = "\n" */ BT_GT, /* greater than = ">" */ BT_QUOT, /* quotation character = "\"" */ - BT_APOS, /* aposthrophe = "'" */ + BT_APOS, /* apostrophe = "'" */ BT_EQUALS, /* equal sign = "=" */ BT_QUEST, /* question mark = "?" */ BT_EXCL, /* exclamation mark = "!" */ diff --git a/tools/sdk/esp32/include/expat/port/include/expat_config.h b/tools/sdk/esp32/include/expat/port/include/expat_config.h index 42acb52a5ca..c5a086c1357 100644 --- a/tools/sdk/esp32/include/expat/port/include/expat_config.h +++ b/tools/sdk/esp32/include/expat/port/include/expat_config.h @@ -63,7 +63,7 @@ #define PACKAGE_NAME "expat" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "expat 2.4.8" +#define PACKAGE_STRING "expat 2.5.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "expat" @@ -72,13 +72,13 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.4.8" +#define PACKAGE_VERSION "2.5.0" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "2.4.8" +#define VERSION "2.5.0" /* whether byteorder is bigendian */ /* #undef WORDS_BIGENDIAN */ diff --git a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_common.h b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_common.h similarity index 87% rename from tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_common.h rename to tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_common.h index 9c65f08b90d..f443286ae87 100644 --- a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_common.h +++ b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_common.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _MB_IFACE_COMMON_H @@ -24,6 +15,7 @@ extern "C" { #if __has_include("esp_check.h") #include "esp_check.h" +#include "esp_log.h" #define MB_RETURN_ON_FALSE(a, err_code, tag, format, ...) ESP_RETURN_ON_FALSE(a, err_code, tag, format __VA_OPT__(,) __VA_ARGS__) @@ -44,10 +36,10 @@ extern "C" { #define MB_CONTROLLER_PRIORITY (CONFIG_FMB_PORT_TASK_PRIO - 1) // priority of MB controller task // Default port defines -#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus -#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined +#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus +#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined #define MB_UART_PORT (UART_NUM_MAX - 1) // Default UART port number -#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info +#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info #define MB_PARITY_NONE (UART_PARITY_DISABLE) // The Macros below handle the endianness while transfer N byte data into buffer diff --git a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_master.h b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_master.h similarity index 95% rename from tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_master.h rename to tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_master.h index 8084e689027..d11ade7a4d8 100644 --- a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_master.h +++ b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_master.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_MASTER_INTERFACE_H diff --git a/tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_slave.h b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h similarity index 88% rename from tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_slave.h rename to tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h index 040d18265bf..7d79b513a67 100644 --- a/tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_slave.h +++ b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_SLAVE_INTERFACE_H diff --git a/tools/sdk/esp32/include/freemodbus/common/include/mbcontroller.h b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/mbcontroller.h similarity index 51% rename from tools/sdk/esp32/include/freemodbus/common/include/mbcontroller.h rename to tools/sdk/esp32/include/freemodbus/freemodbus/common/include/mbcontroller.h index 08b3c183c8f..10205f8951a 100644 --- a/tools/sdk/esp32/include/freemodbus/common/include/mbcontroller.h +++ b/tools/sdk/esp32/include/freemodbus/freemodbus/common/include/mbcontroller.h @@ -1,17 +1,8 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 + */ // mbcontroller.h // mbcontroller - common Modbus controller header file 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 6bb81894593..3d0c3380556 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 @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H diff --git a/tools/sdk/esp32/include/freertos/include/freertos/FreeRTOS.h b/tools/sdk/esp32/include/freertos/include/freertos/FreeRTOS.h index eb0ee6be357..296b2878377 100644 --- a/tools/sdk/esp32/include/freertos/include/freertos/FreeRTOS.h +++ b/tools/sdk/esp32/include/freertos/include/freertos/FreeRTOS.h @@ -1296,7 +1296,9 @@ typedef struct xSTATIC_QUEUE UBaseType_t uxDummy8; uint8_t ucDummy9; #endif - portMUX_TYPE xDummy10; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy10; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticQueue_t; typedef StaticQueue_t StaticSemaphore_t; @@ -1326,7 +1328,9 @@ typedef struct xSTATIC_EVENT_GROUP #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) uint8_t ucDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticEventGroup_t; /* @@ -1378,7 +1382,9 @@ typedef struct xSTATIC_STREAM_BUFFER #if ( configUSE_TRACE_FACILITY == 1 ) UBaseType_t uxDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticStreamBuffer_t; /* Message buffers are built on stream buffers. */ diff --git a/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h b/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h index f2aab51ccfc..f543e1881f3 100644 --- a/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h +++ b/tools/sdk/esp32/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_XTENSA_H #define FREERTOS_CONFIG_XTENSA_H 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 2ee4c12c2b8..bce731d331d 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 @@ -106,7 +106,7 @@ typedef uint32_t TickType_t; #define portCRITICAL_NESTING_IN_TCB 0 #define portSTACK_GROWTH ( -1 ) #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) -#define portBYTE_ALIGNMENT 4 +#define portBYTE_ALIGNMENT 16 // Xtensa Windowed ABI requires the stack pointer to always be 16-byte aligned. See "isa_rm.pdf 8.1.1 Windowed Register Usage and Stack Layout" #define portNOP() XT_NOP() diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/clk_gate_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/clk_gate_ll.h index 43b9b07e5eb..f8bcd3cd0c8 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/clk_gate_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/clk_gate_ll.h @@ -104,6 +104,8 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en switch (periph) { case PERIPH_LEDC_MODULE: return DPORT_LEDC_RST; + case PERIPH_WIFI_MODULE: + return DPORT_WIFIMAC_RST; case PERIPH_UART0_MODULE: return DPORT_UART_RST; case PERIPH_UART1_MODULE: diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/efuse_hal.h b/tools/sdk/esp32/include/hal/esp32/include/hal/efuse_hal.h new file mode 100644 index 00000000000..a0b087e8135 --- /dev/null +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/efuse_hal.h @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include "soc/soc_caps.h" +#include "hal/efuse_ll.h" +#include_next "hal/efuse_hal.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief get rated frequency in MHz + */ +uint32_t efuse_hal_get_rated_freq_mhz(void); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/efuse_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/efuse_ll.h new file mode 100644 index 00000000000..191adb249a5 --- /dev/null +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/efuse_ll.h @@ -0,0 +1,213 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include "soc/efuse_periph.h" +#include "hal/assert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Always inline these functions even no gcc optimization is applied. + +/******************* eFuse fields *************************/ + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_flash_crypt_cnt(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA0_REG, EFUSE_RD_FLASH_CRYPT_CNT); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac0(void) +{ + return REG_READ(EFUSE_BLK0_RDATA1_REG); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac1(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA2_REG, EFUSE_RD_WIFI_MAC_CRC_HIGH) & 0x0000FFFF; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_secure_boot_v1_en(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA6_REG, EFUSE_RD_ABS_DONE_0); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_secure_boot_v2_en(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA6_REG, EFUSE_RD_ABS_DONE_1); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_sdio_force(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA4_REG, EFUSE_RD_SDIO_FORCE); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_xpd_sdio(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA4_REG, EFUSE_RD_XPD_SDIO_REG); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_sdio_tieh(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA4_REG, EFUSE_RD_SDIO_TIEH); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_sdio_drefh(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA0_REG, EFUSE_RD_SDIO_DREFH); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_sdio_drefm(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA0_REG, EFUSE_RD_SDIO_DREFM); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_sdio_drefl(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA0_REG, EFUSE_RD_SDIO_DREFL); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_blk3_part_reserve(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_chip_cpu_freq_rated(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_RATED); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_chip_cpu_freq_low(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_CPU_FREQ_LOW); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_ver_pkg(void) +{ + uint32_t pkg_version = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG); + uint32_t pkg_version_4bit = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG_4BIT); + return (pkg_version_4bit << 3) | pkg_version; +} + +// use efuse_hal_get_major_chip_version() to get full major chip version +__attribute__((always_inline)) static inline bool efuse_ll_get_chip_ver_rev1(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_REV1); +} + +// use efuse_hal_get_major_chip_version() to get full major chip version +__attribute__((always_inline)) static inline bool efuse_ll_get_chip_ver_rev2(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA5_REG, EFUSE_RD_CHIP_VER_REV2); +} + +// use efuse_hal_get_minor_chip_version() to get minor chip version +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_minor(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA5_REG, EFUSE_RD_WAFER_VERSION_MINOR); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_wafer_version_major(void) +{ + return false; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_coding_scheme(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA6_REG, EFUSE_CODING_SCHEME); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_app_cpu(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_DIS_APP_CPU); +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_bt(void) +{ + return REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_DIS_BT); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_vol_level_hp_inv(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA5_REG, EFUSE_RD_VOL_LEVEL_HP_INV); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_adc_vref(void) +{ + return REG_GET_FIELD(EFUSE_BLK0_RDATA4_REG, EFUSE_RD_ADC_VREF); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_adc1_tp_low(void) +{ + return REG_GET_FIELD(EFUSE_BLK3_RDATA3_REG, EFUSE_RD_ADC1_TP_LOW); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_adc2_tp_low(void) +{ + return REG_GET_FIELD(EFUSE_BLK3_RDATA3_REG, EFUSE_RD_ADC2_TP_LOW); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_adc1_tp_high(void) +{ + return REG_GET_FIELD(EFUSE_BLK3_RDATA3_REG, EFUSE_RD_ADC1_TP_HIGH); +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_adc2_tp_high(void) +{ + return REG_GET_FIELD(EFUSE_BLK3_RDATA3_REG, EFUSE_RD_ADC2_TP_HIGH); +} + +/******************* eFuse control functions *************************/ + +__attribute__((always_inline)) static inline bool efuse_ll_get_cmd(void) +{ + return REG_READ(EFUSE_CMD_REG); +} + +__attribute__((always_inline)) static inline void efuse_ll_set_read_cmd(void) +{ + REG_WRITE(EFUSE_CMD_REG, EFUSE_READ_CMD); +} + +__attribute__((always_inline)) static inline void efuse_ll_set_pgm_cmd(void) +{ + REG_WRITE(EFUSE_CMD_REG, EFUSE_PGM_CMD); +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_read_op_code(void) +{ + REG_WRITE(EFUSE_CONF_REG, EFUSE_READ_OP_CODE); +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_write_op_code(void) +{ + REG_WRITE(EFUSE_CONF_REG, EFUSE_WRITE_OP_CODE); +} + +__attribute__((always_inline)) static inline void efuse_ll_set_dac_clk_div(uint32_t value) +{ + REG_SET_FIELD(EFUSE_DAC_CONF_REG, EFUSE_DAC_CLK_DIV, value); +} + +__attribute__((always_inline)) static inline void efuse_ll_set_dac_clk_sel0(uint32_t value) +{ + REG_SET_FIELD(EFUSE_CLK_REG, EFUSE_CLK_SEL0, value); +} + +__attribute__((always_inline)) static inline void efuse_ll_set_dac_clk_sel1(uint32_t value) +{ + REG_SET_FIELD(EFUSE_CLK_REG, EFUSE_CLK_SEL1, value); +} + +/******************* eFuse control functions *************************/ + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/gpio_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/gpio_ll.h index fcff6a22bd6..7ffa3ffda77 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/gpio_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/gpio_ll.h @@ -27,6 +27,9 @@ extern "C" { #endif +// the address of esp32's IO_MUX_GPIOx_REGs are not incremented as the gpio number increments(address are out of order) +extern const uint8_t GPIO_PIN_MUX_REG_OFFSET[SOC_GPIO_PIN_COUNT]; + // Get GPIO hardware instance with giving gpio num #define GPIO_LL_GET_HW(num) (((num) == 0) ? (&GPIO) : NULL) @@ -53,9 +56,10 @@ static inline void gpio_ll_pullup_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pullup_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PU); + REG_CLR_BIT(DR_REG_IO_MUX_BASE + GPIO_PIN_MUX_REG_OFFSET[gpio_num], FUN_PU); } /** @@ -87,9 +91,10 @@ static inline void gpio_ll_pulldown_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pulldown_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PD); + REG_CLR_BIT(DR_REG_IO_MUX_BASE + GPIO_PIN_MUX_REG_OFFSET[gpio_num], FUN_PD); } /** @@ -297,9 +302,10 @@ static inline void gpio_ll_intr_disable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_input_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { - PIN_INPUT_DISABLE(GPIO_PIN_MUX_REG[gpio_num]); + PIN_INPUT_DISABLE(DR_REG_IO_MUX_BASE + GPIO_PIN_MUX_REG_OFFSET[gpio_num]); } /** @@ -319,6 +325,7 @@ static inline void gpio_ll_input_enable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_output_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { if (gpio_num < 32) { @@ -413,6 +420,18 @@ static inline void gpio_ll_od_enable(gpio_dev_t *hw, gpio_num_t gpio_num) hw->pin[gpio_num].pad_driver = 1; } +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +static inline __attribute__((always_inline)) void gpio_ll_func_sel(gpio_dev_t *hw, uint8_t gpio_num, uint32_t func) +{ + PIN_FUNC_SELECT(DR_REG_IO_MUX_BASE + GPIO_PIN_MUX_REG_OFFSET[gpio_num], func); +} + /** * @brief GPIO set output level * @@ -513,6 +532,7 @@ static inline void gpio_ll_get_drive_capability(gpio_dev_t *hw, gpio_num_t gpio_ */ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) { + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD); SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } @@ -526,6 +546,21 @@ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } +/** + * @brief Get deep sleep hold status + * + * @param hw Peripheral GPIO hardware instance address. + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +__attribute__((always_inline)) +static inline bool gpio_ll_deep_sleep_hold_is_en(gpio_dev_t *hw) +{ + return !GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD) && GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); +} + /** * @brief Enable gpio pad hold function. * @@ -548,6 +583,36 @@ static inline void gpio_ll_hold_dis(gpio_dev_t *hw, gpio_num_t gpio_num) CLEAR_PERI_REG_MASK(RTC_IO_DIG_PAD_HOLD_REG, GPIO_HOLD_MASK[gpio_num]); } +/** + * @brief Get digital gpio pad hold status. + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number, only support output GPIOs + * + * @note caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +__attribute__((always_inline)) +static inline bool gpio_ll_is_digital_io_hold(gpio_dev_t *hw, uint32_t gpio_num) +{ + uint32_t mask = 0; + + switch (gpio_num) { + case 1: mask = BIT(1); break; + case 3: mask = BIT(0); break; + case 5: mask = BIT(8); break; + case 6 ... 11 : mask = BIT(gpio_num - 4); break; + case 16 ... 19: + case 21 ... 23: mask = BIT(gpio_num - 7); break; + default: break; + } + + return GET_PERI_REG_MASK(RTC_IO_DIG_PAD_HOLD_REG, mask); +} + /** * @brief Set pad input to a peripheral signal through the IOMUX. * diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/i2c_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/i2c_ll.h index df4a7d5eb74..b7c71bde849 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/i2c_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/i2c_ll.h @@ -238,6 +238,7 @@ static inline void i2c_ll_disable_intr_mask(i2c_dev_t *hw, uint32_t mask) * * @return I2C interrupt status */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_intsts_mask(i2c_dev_t *hw) { return hw->int_status.val; @@ -293,6 +294,7 @@ static inline void i2c_ll_set_slave_addr(i2c_dev_t *hw, uint16_t slave_addr, boo * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_write_cmd_reg(i2c_dev_t *hw, i2c_hw_cmd_t cmd, int cmd_idx) { hw->command[cmd_idx].val = cmd.val; @@ -457,6 +459,7 @@ static inline bool i2c_ll_is_master_mode(i2c_dev_t *hw) * * @return RxFIFO readable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) { return hw->status_reg.rx_fifo_cnt; @@ -469,6 +472,7 @@ static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) * * @return TxFIFO writable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_txfifo_len(i2c_dev_t *hw) { return SOC_I2C_FIFO_LEN - hw->status_reg.tx_fifo_cnt; @@ -493,6 +497,7 @@ static inline uint32_t i2c_ll_get_tout(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_trans_start(i2c_dev_t *hw) { hw->ctr.trans_start = 1; @@ -552,6 +557,7 @@ static inline void i2c_ll_get_scl_timing(i2c_dev_t *hw, int *high_period, int *l * * @return None. */ +__attribute__((always_inline)) static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { uint32_t fifo_addr = (hw == &I2C0) ? 0x6001301c : 0x6002701c; @@ -569,6 +575,7 @@ static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_read_rxfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { for(int i = 0; i < len; i++) { @@ -617,6 +624,7 @@ static inline uint8_t i2c_ll_get_filter(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -630,6 +638,7 @@ static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -643,6 +652,7 @@ static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_TX_INT); @@ -655,6 +665,7 @@ static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_RX_INT); @@ -667,6 +678,7 @@ static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_TX_INT; @@ -679,6 +691,7 @@ static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_rx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_RX_INT; @@ -715,6 +728,7 @@ static inline void i2c_ll_slave_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_SLAVE_TX_INT); @@ -739,6 +753,7 @@ static inline void i2c_ll_slave_disable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_SLAVE_TX_INT; @@ -804,6 +819,7 @@ static inline void i2c_ll_set_source_clk(i2c_dev_t *hw, i2c_sclk_t src_clk) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; @@ -830,6 +846,7 @@ static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *even * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; @@ -885,6 +902,7 @@ static inline void i2c_ll_slave_init(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_update(i2c_dev_t *hw) { ;// ESP32 do not support diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/mwdt_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/mwdt_ll.h index 267f15ef2c1..a621af61147 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/mwdt_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/mwdt_ll.h @@ -28,21 +28,22 @@ extern "C" { #include "soc/timer_group_struct.h" #include "hal/wdt_types.h" #include "esp_attr.h" +#include "esp_assert.h" //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == TIMG_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == TIMG_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == TIMG_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == TIMG_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == TIMG_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == TIMG_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == TIMG_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == TIMG_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == TIMG_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == TIMG_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == TIMG_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == TIMG_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == TIMG_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == TIMG_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == TIMG_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == TIMG_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == TIMG_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == TIMG_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == TIMG_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == TIMG_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); /** * @brief Enable the MWDT diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/rmt_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/rmt_ll.h index dfd8199d5ba..32adb02b47a 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/rmt_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/rmt_ll.h @@ -28,63 +28,75 @@ extern "C" { // Note: TX and RX channel number are all index from zero in the LL driver // i.e. tx_channel belongs to [0,7], and rx_channel belongs to [0,7] +__attribute__((always_inline)) static inline void rmt_ll_enable_drive_clock(rmt_dev_t *dev, bool enable) { dev->conf_ch[0].conf0.clk_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_power_down_mem(rmt_dev_t *dev, bool enable) { dev->conf_ch[0].conf0.mem_pd = enable; // Only conf0 register of channel0 has `mem_pd` } +__attribute__((always_inline)) static inline bool rmt_ll_is_mem_power_down(rmt_dev_t *dev) { return dev->conf_ch[0].conf0.mem_pd; // Only conf0 register of channel0 has `mem_pd` } +__attribute__((always_inline)) static inline void rmt_ll_enable_mem_access(rmt_dev_t *dev, bool enable) { dev->apb_conf.fifo_mask = enable; } +__attribute__((always_inline)) static inline void rmt_ll_set_group_clock_src(rmt_dev_t *dev, uint32_t channel, uint8_t src, uint8_t div_num, uint8_t div_a, uint8_t div_b) { dev->conf_ch[channel].conf1.ref_always_on = src; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_group_clock_src(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.ref_always_on; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.ref_cnt_rst = 1; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.ref_cnt_rst = 1; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.mem_rd_rst = 1; dev->conf_ch[channel].conf1.mem_rd_rst = 0; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.mem_wr_rst = 1; dev->conf_ch[channel].conf1.mem_wr_rst = 0; } +__attribute__((always_inline)) static inline void rmt_ll_tx_start(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.tx_start = 1; } +__attribute__((always_inline)) static inline void rmt_ll_tx_stop(rmt_dev_t *dev, uint32_t channel) { RMTMEM.chan[channel].data32[0].val = 0; @@ -93,138 +105,165 @@ static inline void rmt_ll_tx_stop(rmt_dev_t *dev, uint32_t channel) dev->conf_ch[channel].conf1.mem_rd_rst = 0; } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.rx_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->conf_ch[channel].conf0.mem_size = block_num; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->conf_ch[channel].conf0.mem_size = block_num; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf0.mem_size; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf0.mem_size; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt, div); } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt, div); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { uint32_t div = HAL_FORCE_READ_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt); return div == 0 ? 256 : div; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { uint32_t div = HAL_FORCE_READ_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt); return div == 0 ? 256 : div; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_pingpong(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->apb_conf.mem_tx_wrap_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_idle_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf0, idle_thres, thres); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_idle_thres(rmt_dev_t *dev, uint32_t channel) { return HAL_FORCE_READ_U32_REG_FIELD(dev->conf_ch[channel].conf0, idle_thres); } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_owner(rmt_dev_t *dev, uint32_t channel, uint8_t owner) { dev->conf_ch[channel].conf1.mem_owner = owner; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_owner(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.mem_owner; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.tx_conti_mode = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_loop_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.tx_conti_mode; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_loop(rmt_dev_t *dev, uint32_t channel) { // RMT on esp32 doesn't support loop count, adding this only for HAL API consistency } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_filter(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.rx_filter_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_filter_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf1, rx_filter_thres, thres); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_idle(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.idle_out_en = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_idle_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.idle_out_en; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_idle_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->conf_ch[channel].conf1.idle_out_lv = level; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_idle_level(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.idle_out_lv; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->status_ch[channel]; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->status_ch[channel]; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_limit(rmt_dev_t *dev, uint32_t channel, uint32_t limit) { dev->tx_lim_ch[channel].limit = limit; } +__attribute__((always_inline)) static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool enable) { if (enable) { @@ -234,61 +273,72 @@ static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool e } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3)); dev->int_ena.val |= (enable << (channel * 3)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3 + 1)); dev->int_ena.val |= (enable << (channel * 3 + 1)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3 + 2)); dev->int_ena.val |= (enable << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3 + 2)); dev->int_ena.val |= (enable << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel + 24)); dev->int_ena.val |= (enable << (channel + 24)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3 + 1)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 24)); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_end_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; @@ -296,6 +346,7 @@ static inline uint32_t rmt_ll_get_tx_end_interrupt_status(rmt_dev_t *dev) ((status & 0x1000) >> 8) | ((status & 0x8000) >> 10) | ((status & 0x40000) >> 12) | ((status & 0x200000) >> 14); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_end_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; @@ -303,6 +354,7 @@ static inline uint32_t rmt_ll_get_rx_end_interrupt_status(rmt_dev_t *dev) ((status & 0x2000) >> 9) | ((status & 0x10000) >> 11) | ((status & 0x80000) >> 13) | ((status & 0x400000) >> 15); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_err_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; @@ -310,6 +362,7 @@ static inline uint32_t rmt_ll_get_tx_err_interrupt_status(rmt_dev_t *dev) ((status & 0x4000) >> 10) | ((status & 0x20000) >> 12) | ((status & 0x100000) >> 14) | ((status & 0x800000) >> 16); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_err_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; @@ -317,29 +370,34 @@ static inline uint32_t rmt_ll_get_rx_err_interrupt_status(rmt_dev_t *dev) ((status & 0x4000) >> 10) | ((status & 0x20000) >> 12) | ((status & 0x100000) >> 14) | ((status & 0x800000) >> 16); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_thres_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return (status & 0xFF000000) >> 24; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->carrier_duty_ch[channel], high, high_ticks); HAL_FORCE_MODIFY_U32_REG_FIELD(dev->carrier_duty_ch[channel], low, low_ticks); } +__attribute__((always_inline)) static inline void rmt_ll_tx_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t *high_ticks, uint32_t *low_ticks) { *high_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->carrier_duty_ch[channel], high); *low_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->carrier_duty_ch[channel], low); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_carrier_modulation(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf0.carrier_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->conf_ch[channel].conf0.carrier_out_lv = level; @@ -347,6 +405,7 @@ static inline void rmt_ll_tx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, //Writes items to the specified TX channel memory with the given offset and length. //the caller should ensure that (length + off) <= (memory block * SOC_RMT_MEM_WORDS_PER_CHANNEL) +__attribute__((always_inline)) static inline void rmt_ll_write_memory(rmt_mem_t *mem, uint32_t channel, const void *data, size_t length_in_words, size_t off) { volatile uint32_t *to = (volatile uint32_t *)&mem->chan[channel].data32[off]; diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/rwdt_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/rwdt_ll.h index e409eeaa8b1..41a88f9232f 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/rwdt_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/rwdt_ll.h @@ -1,16 +1,8 @@ -// Copyright 2015-2019 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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ // The LL layer for Timer Group register operations. // Note that most of the register operations in this layer are non-atomic operations. @@ -27,22 +19,23 @@ extern "C" { #include "soc/rtc_cntl_periph.h" #include "soc/rtc_cntl_struct.h" #include "esp_attr.h" +#include "esp_assert.h" //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == RTC_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == RTC_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_RTC == RTC_WDT_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == RTC_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == RTC_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_RTC == RTC_WDT_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == RTC_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == RTC_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == RTC_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == RTC_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == RTC_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == RTC_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == RTC_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == RTC_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == RTC_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == RTC_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == RTC_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == RTC_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == RTC_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == RTC_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == RTC_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == RTC_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); /** diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/twai_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/twai_ll.h index 72949aa9cf9..61beaa6a624 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/twai_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/twai_ll.h @@ -29,6 +29,7 @@ extern "C" { #include #include #include "sdkconfig.h" +#include "esp_assert.h" #include "hal/misc.h" #include "hal/twai_types.h" #include "soc/twai_periph.h" @@ -85,7 +86,7 @@ typedef union { uint8_t bytes[13]; } __attribute__((packed)) twai_ll_frame_buffer_t; -_Static_assert(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); +ESP_STATIC_ASSERT(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); #if defined(CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID) || defined(CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT) /** diff --git a/tools/sdk/esp32/include/hal/esp32/include/hal/uart_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/uart_ll.h index de8fc640ffc..a5b7a43dbff 100644 --- a/tools/sdk/esp32/include/hal/esp32/include/hal/uart_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/uart_ll.h @@ -131,7 +131,8 @@ FORCE_INLINE_ATTR void uart_ll_set_baudrate(uart_dev_t *hw, uint32_t baud) FORCE_INLINE_ATTR uint32_t uart_ll_get_baudrate(uart_dev_t *hw) { uint32_t sclk_freq = uart_ll_get_sclk_freq(hw); - typeof(hw->clk_div) div_reg = hw->clk_div; + typeof(hw->clk_div) div_reg; + div_reg.val = hw->clk_div.val; return ((sclk_freq << 4)) / ((div_reg.div_int << 4) | div_reg.div_frag); } @@ -291,7 +292,8 @@ FORCE_INLINE_ATTR void uart_ll_txfifo_rst(uart_dev_t *hw) FORCE_INLINE_ATTR uint32_t uart_ll_get_rxfifo_len(uart_dev_t *hw) { uint32_t fifo_cnt = HAL_FORCE_READ_U32_REG_FIELD(hw->status, rxfifo_cnt); - typeof(hw->mem_rx_status) rx_status = hw->mem_rx_status; + typeof(hw->mem_rx_status) rx_status; + rx_status.val = hw->mem_rx_status.val; uint32_t len = 0; // When using DPort to read fifo, fifo_cnt is not credible, we need to calculate the real cnt based on the fifo read and write pointer. @@ -351,9 +353,9 @@ FORCE_INLINE_ATTR void uart_ll_get_stop_bits(uart_dev_t *hw, uart_stop_bits_t *s { //workaround for hardware issue, when UART stop bit set as 2-bit mode. if(hw->rs485_conf.dl1_en == 1 && hw->conf0.stop_bit_num == 0x1) { - *stop_bit = UART_STOP_BITS_2; + *stop_bit = (uart_stop_bits_t)UART_STOP_BITS_2; } else { - *stop_bit = hw->conf0.stop_bit_num; + *stop_bit = (uart_stop_bits_t)hw->conf0.stop_bit_num; } } @@ -384,7 +386,7 @@ FORCE_INLINE_ATTR void uart_ll_set_parity(uart_dev_t *hw, uart_parity_t parity_m FORCE_INLINE_ATTR void uart_ll_get_parity(uart_dev_t *hw, uart_parity_t *parity_mode) { if(hw->conf0.parity_en) { - *parity_mode = 0X2 | hw->conf0.parity; + *parity_mode = (uart_parity_t)(0x2 | hw->conf0.parity); } else { *parity_mode = UART_PARITY_DISABLE; } @@ -500,10 +502,10 @@ FORCE_INLINE_ATTR void uart_ll_get_hw_flow_ctrl(uart_dev_t *hw, uart_hw_flowcont { *flow_ctrl = UART_HW_FLOWCTRL_DISABLE; if(hw->conf1.rx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_RTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_RTS); } if(hw->conf0.tx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_CTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_CTS); } } @@ -758,7 +760,7 @@ FORCE_INLINE_ATTR uint32_t uart_ll_get_wakeup_thrd(uart_dev_t *hw) */ FORCE_INLINE_ATTR void uart_ll_get_data_bit_num(uart_dev_t *hw, uart_word_length_t *data_bit) { - *data_bit = hw->conf0.bit_num; + *data_bit = (uart_word_length_t)hw->conf0.bit_num; } /** @@ -770,7 +772,8 @@ FORCE_INLINE_ATTR void uart_ll_get_data_bit_num(uart_dev_t *hw, uart_word_length */ FORCE_INLINE_ATTR IRAM_ATTR bool uart_ll_is_tx_idle(uart_dev_t *hw) { - typeof(hw->status) status = hw->status; + typeof(hw->status) status; + status.val = hw->status.val; return ((status.txfifo_cnt == 0) && (status.st_utx_out == 0)); } @@ -822,7 +825,8 @@ FORCE_INLINE_ATTR void uart_ll_set_loop_back(uart_dev_t *hw, bool loop_back_en) */ FORCE_INLINE_ATTR void uart_ll_inverse_signal(uart_dev_t *hw, uint32_t inv_mask) { - typeof(hw->conf0) conf0_reg = hw->conf0; + typeof(hw->conf0) conf0_reg; + conf0_reg.val = hw->conf0.val; conf0_reg.irda_tx_inv = (inv_mask & UART_SIGNAL_IRDA_TX_INV) ? 1 : 0; conf0_reg.irda_rx_inv = (inv_mask & UART_SIGNAL_IRDA_RX_INV) ? 1 : 0; conf0_reg.rxd_inv = (inv_mask & UART_SIGNAL_RXD_INV) ? 1 : 0; diff --git a/tools/sdk/esp32/include/hal/include/hal/dma_types.h b/tools/sdk/esp32/include/hal/include/hal/dma_types.h index 66c8677e98f..5a832950999 100644 --- a/tools/sdk/esp32/include/hal/include/hal/dma_types.h +++ b/tools/sdk/esp32/include/hal/include/hal/dma_types.h @@ -15,6 +15,7 @@ #pragma once #include +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -38,7 +39,7 @@ typedef struct dma_descriptor_s { struct dma_descriptor_s *next; /*!< Pointer to the next descriptor (set to NULL if the descriptor is the last one, e.g. suc_eof=1) */ } dma_descriptor_t; -_Static_assert(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); #define DMA_DESCRIPTOR_BUFFER_OWNER_CPU (0) /*!< DMA buffer is allowed to be accessed by CPU */ #define DMA_DESCRIPTOR_BUFFER_OWNER_DMA (1) /*!< DMA buffer is allowed to be accessed by DMA engine */ diff --git a/tools/sdk/esp32/include/hal/include/hal/efuse_hal.h b/tools/sdk/esp32/include/hal/include/hal/efuse_hal.h new file mode 100644 index 00000000000..ca7fcd2003e --- /dev/null +++ b/tools/sdk/esp32/include/hal/include/hal/efuse_hal.h @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @brief Returns chip version + * + * @return Chip version in format: Major * 100 + Minor + */ +uint32_t efuse_hal_chip_revision(void); + +/** + * @brief Returns major chip version + */ +uint32_t efuse_hal_get_major_chip_version(void); + +/** + * @brief Returns minor chip version + */ +uint32_t efuse_hal_get_minor_chip_version(void); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/hal/include/hal/emac_hal.h b/tools/sdk/esp32/include/hal/include/hal/emac_hal.h index 27cd38456dc..fbf0a8ebd66 100644 --- a/tools/sdk/esp32/include/hal/include/hal/emac_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/emac_hal.h @@ -12,6 +12,7 @@ extern "C" { #include #include +#include "esp_assert.h" #include "esp_err.h" #include "hal/eth_types.h" #include "soc/emac_dma_struct.h" @@ -76,7 +77,7 @@ typedef struct { #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPSEGMENT 2 /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */ #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPFULL 3 /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */ -_Static_assert(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); /** * @brief Ethernet DMA RX Descriptor @@ -150,7 +151,7 @@ typedef struct { uint32_t TimeStampHigh; /*!< Receive frame timestamp high */ } eth_dma_rx_descriptor_t; -_Static_assert(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); typedef struct { emac_mac_dev_t *mac_regs; diff --git a/tools/sdk/esp32/include/hal/include/hal/gdma_types.h b/tools/sdk/esp32/include/hal/include/hal/gdma_types.h new file mode 100644 index 00000000000..eb1447a78f4 --- /dev/null +++ b/tools/sdk/esp32/include/hal/include/hal/gdma_types.h @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumeration of peripherals which have the DMA capability + * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. + * + */ +typedef enum { + GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ + GDMA_TRIG_PERIPH_UHCI, /*!< GDMA trigger peripheral: UHCI */ + GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ + GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ + GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ + GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ + GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ + GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ + GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ + GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ + GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ +} gdma_trigger_peripheral_t; + +/** + * @brief Enumeration of GDMA channel direction + * + */ +typedef enum { + GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ + GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ +} gdma_channel_direction_t; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/hal/include/hal/gpio_hal.h b/tools/sdk/esp32/include/hal/include/hal/gpio_hal.h index 018b4be1288..5a3ce27b0b4 100644 --- a/tools/sdk/esp32/include/hal/include/hal/gpio_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/gpio_hal.h @@ -187,6 +187,15 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_od_enable(hal, gpio_num) gpio_ll_od_enable((hal)->dev, gpio_num) +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +#define gpio_hal_func_sel(hal, gpio_num, func) gpio_ll_func_sel((hal)->dev, gpio_num, func) + /** * @brief GPIO set output level * @@ -280,6 +289,22 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_hold_dis(hal, gpio_num) gpio_ll_hold_dis((hal)->dev, gpio_num) +/** + * @brief Get wether digital gpio pad is held + * + * @param hal Context of the HAL layer + * @param gpio_num GPIO number, only support output GPIOs + * + * @note digital io means io pad powered by VDD3P3_CPU or VDD_SPI + * rtc io means io pad powered by VDD3P3_RTC + * caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +#define gpio_hal_is_digital_io_hold(hal, gpio_num) gpio_ll_is_digital_io_hold((hal)->dev, gpio_num) + /** * @brief Enable all digital gpio pad hold function during Deep-sleep. * @@ -300,6 +325,17 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_deep_sleep_hold_dis(hal) gpio_ll_deep_sleep_hold_dis((hal)->dev) +/** + * @brief Get whether all digital gpio pad hold function during Deep-sleep is enabled. + * + * @param hal Context of the HAL layer + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +#define gpio_hal_deep_sleep_hold_is_en(hal) gpio_ll_deep_sleep_hold_is_en((hal)->dev) + /** * @brief Set pad input to a peripheral signal through the IOMUX. * @@ -322,7 +358,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #if SOC_GPIO_SUPPORT_FORCE_HOLD /** - * @brief Force hold digital and rtc gpio pad. + * @brief Force hold digital gpio pad. * @note GPIO force hold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -330,7 +366,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_hold_all(hal) gpio_ll_force_hold_all((hal)->dev) /** - * @brief Force unhold digital and rtc gpio pad. + * @brief Force unhold digital gpio pad. * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -338,7 +374,6 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_unhold_all() gpio_ll_force_unhold_all() #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable pull-up on GPIO when system sleep. * @@ -436,7 +471,6 @@ void gpio_hal_sleep_pupd_config_apply(gpio_hal_context_t *hal, gpio_num_t gpio_n */ void gpio_hal_sleep_pupd_config_unapply(gpio_hal_context_t *hal, gpio_num_t gpio_num); #endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL -#endif //SOC_GPIO_SUPPORT_SLP_SWITCH #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32/include/hal/include/hal/spi_flash_hal.h b/tools/sdk/esp32/include/hal/include/hal/spi_flash_hal.h index ae37016fa2d..e51251b4593 100644 --- a/tools/sdk/esp32/include/hal/include/hal/spi_flash_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/spi_flash_hal.h @@ -26,6 +26,7 @@ #include "hal/spi_types.h" #include "hal/spi_flash_types.h" #include "soc/soc_memory_types.h" +#include "esp_assert.h" /* Hardware host-specific constants */ #define SPI_FLASH_HAL_MAX_WRITE_BYTES 64 @@ -56,7 +57,7 @@ typedef struct { uint32_t slicer_flags; /// Slicer flags for configuring how to slice data correctly while reading or writing. #define SPI_FLASH_HOST_CONTEXT_SLICER_FLAG_DTR BIT(0) ///< Slice data according to DTR mode, the address and length must be even (A0=0). } spi_flash_hal_context_t; -_Static_assert(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); +ESP_STATIC_ASSERT(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); /// This struct provide MSPI Flash necessary timing related config, should be consistent with that in union in `spi_flash_hal_config_t`. typedef struct { diff --git a/tools/sdk/esp32/include/hal/include/hal/spi_slave_hal.h b/tools/sdk/esp32/include/hal/include/hal/spi_slave_hal.h index 3ad5f485f1f..49d8b0ca12c 100644 --- a/tools/sdk/esp32/include/hal/include/hal/spi_slave_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/spi_slave_hal.h @@ -150,6 +150,7 @@ void spi_slave_hal_store_result(spi_slave_hal_context_t *hal); */ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); +#if CONFIG_IDF_TARGET_ESP32 /** * Check whether we need to reset the DMA according to the status of last transactions. * @@ -161,3 +162,4 @@ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); * @return true if reset is needed, else false. */ bool spi_slave_hal_dma_need_reset(const spi_slave_hal_context_t *hal); +#endif //#if CONFIG_IDF_TARGET_ESP32 diff --git a/tools/sdk/esp32/include/hal/include/hal/spi_types.h b/tools/sdk/esp32/include/hal/include/hal/spi_types.h index 9c008838a19..c7caa95df9a 100644 --- a/tools/sdk/esp32/include/hal/include/hal/spi_types.h +++ b/tools/sdk/esp32/include/hal/include/hal/spi_types.h @@ -27,7 +27,9 @@ typedef enum { //SPI1 can be used as GPSPI only on ESP32 SPI1_HOST=0, ///< SPI1 SPI2_HOST=1, ///< SPI2 +#if SOC_SPI_PERIPH_NUM > 2 SPI3_HOST=2, ///< SPI3 +#endif } spi_host_device_t; /// SPI Events diff --git a/tools/sdk/esp32/include/hal/include/hal/systimer_types.h b/tools/sdk/esp32/include/hal/include/hal/systimer_types.h index d4583dc7ae0..0ed44feb4eb 100644 --- a/tools/sdk/esp32/include/hal/include/hal/systimer_types.h +++ b/tools/sdk/esp32/include/hal/include/hal/systimer_types.h @@ -16,6 +16,7 @@ #include #include "soc/soc_caps.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -39,7 +40,7 @@ typedef struct { } systimer_counter_value_t; /** @cond */ -_Static_assert(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); /** @endcond */ /** diff --git a/tools/sdk/esp32/include/hal/include/hal/usbh_hal.h b/tools/sdk/esp32/include/hal/include/hal/usb_dwc_hal.h similarity index 67% rename from tools/sdk/esp32/include/hal/include/hal/usbh_hal.h rename to tools/sdk/esp32/include/hal/include/hal/usb_dwc_hal.h index 5326deb2dca..d52e882cb9f 100644 --- a/tools/sdk/esp32/include/hal/include/hal/usbh_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/usb_dwc_hal.h @@ -17,8 +17,8 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL #include #include -#include "soc/usbh_struct.h" -#include "hal/usbh_ll.h" +#include "soc/usb_dwc_struct.h" +#include "hal/usb_dwc_ll.h" #include "hal/usb_types_private.h" #include "hal/assert.h" @@ -26,11 +26,11 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL // ------------------ Constants/Configs -------------------- -#define USBH_HAL_DMA_MEM_ALIGN 512 -#define USBH_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) -#define USBH_HAL_NUM_CHAN 8 -#define USBH_HAL_XFER_DESC_SIZE (sizeof(usbh_ll_dma_qtd_t)) -#define USBH_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL +#define USB_DWC_HAL_DMA_MEM_ALIGN 512 +#define USB_DWC_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) +#define USB_DWC_HAL_NUM_CHAN 8 +#define USB_DWC_HAL_XFER_DESC_SIZE (sizeof(usb_dwc_ll_dma_qtd_t)) +#define USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL /** * @brief FIFO size configuration structure @@ -39,7 +39,7 @@ typedef struct { uint32_t rx_fifo_lines; /**< Size of the RX FIFO in terms the number of FIFO lines */ uint32_t nptx_fifo_lines; /**< Size of the Non-periodic FIFO in terms the number of FIFO lines */ uint32_t ptx_fifo_lines; /**< Size of the Periodic FIFO in terms the number of FIFO lines */ -} usbh_hal_fifo_config_t; +} usb_dwc_hal_fifo_config_t; // --------------------- HAL Events ------------------------ @@ -47,25 +47,25 @@ typedef struct { * @brief Host port HAL events */ typedef enum { - USBH_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ - USBH_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ - USBH_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ - USBH_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ - USBH_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ - USBH_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ - USBH_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ - USBH_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ -} usbh_hal_port_event_t; + USB_DWC_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ + USB_DWC_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ + USB_DWC_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ + USB_DWC_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ + USB_DWC_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ + USB_DWC_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ + USB_DWC_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ + USB_DWC_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ +} usb_dwc_hal_port_event_t; /** * @brief Channel events */ typedef enum { - USBH_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USBH_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ - USBH_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ - USBH_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ - USBH_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ -} usbh_hal_chan_event_t; + USB_DWC_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USB_DWC_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ + USB_DWC_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ + USB_DWC_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ + USB_DWC_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ +} usb_dwc_hal_chan_event_t; // --------------------- HAL Errors ------------------------ @@ -73,20 +73,20 @@ typedef enum { * @brief Channel errors */ typedef enum { - USBH_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ - USBH_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ - USBH_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ - USBH_HAL_CHAN_ERROR_STALL, /**< STALL response received */ -} usbh_hal_chan_error_t; + USB_DWC_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ + USB_DWC_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ + USB_DWC_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ + USB_DWC_HAL_CHAN_ERROR_STALL, /**< STALL response received */ +} usb_dwc_hal_chan_error_t; // ------------- Transfer Descriptor Related --------------- /** * @brief Flags used to describe the type of transfer descriptor to fill */ -#define USBH_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ -#define USBH_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ -#define USBH_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ +#define USB_DWC_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ +#define USB_DWC_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ +#define USB_DWC_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ /** * @brief Status value of a transfer descriptor @@ -95,10 +95,10 @@ typedef enum { * or an error). Therefore, if a channel halt is requested before a transfer descriptor completes, the transfer * descriptor remains unexecuted. */ -#define USBH_HAL_XFER_DESC_STS_SUCCESS USBH_LL_QTD_STATUS_SUCCESS -#define USBH_HAL_XFER_DESC_STS_PKTERR USBH_LL_QTD_STATUS_PKTERR -#define USBH_HAL_XFER_DESC_STS_BUFFER_ERR USBH_LL_QTD_STATUS_BUFFER -#define USBH_HAL_XFER_DESC_STS_NOT_EXECUTED USBH_LL_QTD_STATUS_NOT_EXECUTED +#define USB_DWC_HAL_XFER_DESC_STS_SUCCESS USB_DWC_LL_QTD_STATUS_SUCCESS +#define USB_DWC_HAL_XFER_DESC_STS_PKTERR USB_DWC_LL_QTD_STATUS_PKTERR +#define USB_DWC_HAL_XFER_DESC_STS_BUFFER_ERR USB_DWC_LL_QTD_STATUS_BUFFER +#define USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED USB_DWC_LL_QTD_STATUS_NOT_EXECUTED // -------------------- Object Types ----------------------- @@ -122,7 +122,7 @@ typedef struct { usb_hal_interval_t interval; /**< The interval of the endpoint */ uint32_t phase_offset_frames; /**< Phase offset in number of frames */ } periodic; /**< Characteristic for periodic (interrupt/isochronous) endpoints only */ -} usbh_hal_ep_char_t; +} usb_dwc_hal_ep_char_t; /** * @brief Channel object @@ -139,18 +139,18 @@ typedef struct { }; uint32_t val; } flags; /**< Flags regarding channel's status and information */ - usb_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ - usbh_hal_chan_error_t error; /**< The last error that occurred on the channel */ + usb_dwc_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ + usb_dwc_hal_chan_error_t error; /**< The last error that occurred on the channel */ usb_priv_xfer_type_t type; /**< The transfer type of the channel */ void *chan_ctx; /**< Context variable for the owner of the channel */ -} usbh_hal_chan_t; +} usb_dwc_hal_chan_t; /** * @brief HAL context structure */ typedef struct { //Context - usbh_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ + usb_dwc_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ //Host Port related uint32_t *periodic_frame_list; /**< Pointer to scheduling frame list */ usb_hal_frame_list_len_t frame_list_len; /**< Length of the periodic scheduling frame list */ @@ -168,9 +168,9 @@ typedef struct { struct { int num_allocd; /**< Number of channels currently allocated */ uint32_t chan_pend_intrs_msk; /**< Bit mask of channels with pending interrupts */ - usbh_hal_chan_t *hdls[USBH_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ + usb_dwc_hal_chan_t *hdls[USB_DWC_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ } channels; -} usbh_hal_context_t; +} usb_dwc_hal_context_t; // -------------------------------------------------- Core (Global) ---------------------------------------------------- @@ -188,12 +188,12 @@ typedef struct { * - Sets default values to some global and OTG registers (GAHBCFG and GUSBCFG) * - Umask global interrupt signal * - Put DWC_OTG into host mode. Require 25ms delay before this takes effect. - * - State -> USBH_HAL_PORT_STATE_OTG + * - State -> USB_DWC_HAL_PORT_STATE_OTG * - Interrupts cleared. Users can now enable their ISR * * @param[inout] hal Context of the HAL layer */ -void usbh_hal_init(usbh_hal_context_t *hal); +void usb_dwc_hal_init(usb_dwc_hal_context_t *hal); /** * @brief Deinitialize the HAL context @@ -206,20 +206,20 @@ void usbh_hal_init(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -void usbh_hal_deinit(usbh_hal_context_t *hal); +void usb_dwc_hal_deinit(usb_dwc_hal_context_t *hal); /** * @brief Issue a soft reset to the controller * * This should be called when the host port encounters an error event or has been disconnected. Before calling this, * users are responsible for safely freeing all channels as a soft reset will wipe all host port and channel registers. - * This function will result in the host port being put back into same state as after calling usbh_hal_init(). + * This function will result in the host port being put back into same state as after calling usb_dwc_hal_init(). * * @note This has nothing to do with a USB bus reset. It simply resets the peripheral * * @param hal Context of the HAL layer */ -void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); +void usb_dwc_hal_core_soft_reset(usb_dwc_hal_context_t *hal); /** * @brief Set FIFO sizes @@ -229,14 +229,14 @@ void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); * may be situations where this function may need to be called again to resize the FIFOs. If resizing FIFOs dynamically, * it is the user's responsibility to ensure there are no active channels when this function is called. * - * @note The totol size of all the FIFOs must be less than or equal to USBH_HAL_FIFO_TOTAL_USABLE_LINES + * @note The totol size of all the FIFOs must be less than or equal to USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES * @note After a port reset, the FIFO size registers will reset to their default values, so this function must be called * again post reset. * * @param hal Context of the HAL layer * @param fifo_config FIFO configuration */ -void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_t *fifo_config); +void usb_dwc_hal_set_fifo_size(usb_dwc_hal_context_t *hal, const usb_dwc_hal_fifo_config_t *fifo_config); // ---------------------------------------------------- Host Port ------------------------------------------------------ @@ -249,11 +249,11 @@ void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_ * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_init(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_init(usb_dwc_hal_context_t *hal) { //Configure Host related interrupts - usbh_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -263,10 +263,10 @@ static inline void usbh_hal_port_init(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_deinit(usb_dwc_hal_context_t *hal) { //Disable Host port and channel interrupts - usb_ll_dis_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_gintmsk_dis_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -275,12 +275,12 @@ static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param power_on Whether to power ON or OFF the port */ -static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool power_on) +static inline void usb_dwc_hal_port_toggle_power(usb_dwc_hal_context_t *hal, bool power_on) { if (power_on) { - usbh_ll_hprt_en_pwr(hal->dev); + usb_dwc_ll_hprt_en_pwr(hal->dev); } else { - usbh_ll_hprt_dis_pwr(hal->dev); + usb_dwc_ll_hprt_dis_pwr(hal->dev); } } @@ -291,19 +291,19 @@ static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool powe * Entry: * - Host port detects a device connection or Host port is already enabled * Exit: - * - On release of the reset signal, a USBH_HAL_PORT_EVENT_ENABLED will be generated + * - On release of the reset signal, a USB_DWC_HAL_PORT_EVENT_ENABLED will be generated * * @note If the host port is already enabled, then issuing a reset will cause it be disabled and generate a - * USBH_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus - * generating the USBH_HAL_PORT_EVENT_ENABLED event) + * USB_DWC_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus + * generating the USB_DWC_HAL_PORT_EVENT_ENABLED event) * * @param hal Context of the HAL layer * @param enable Enable/disable reset signal */ -static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_reset(usb_dwc_hal_context_t *hal, bool enable) { HAL_ASSERT(hal->channels.num_allocd == 0); //Cannot reset if there are still allocated channels - usbh_ll_hprt_set_port_reset(hal->dev, enable); + usb_dwc_ll_hprt_set_port_reset(hal->dev, enable); } /** @@ -317,7 +317,7 @@ static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enab * * @param hal Context of the HAL layer */ -void usbh_hal_port_enable(usbh_hal_context_t *hal); +void usb_dwc_hal_port_enable(usb_dwc_hal_context_t *hal); /** * @brief Disable the host port @@ -327,9 +327,9 @@ void usbh_hal_port_enable(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_disable(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_port_dis(hal->dev); + usb_dwc_ll_hprt_port_dis(hal->dev); } /** @@ -337,9 +337,9 @@ static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layers */ -static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_suspend(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_set_port_suspend(hal->dev); + usb_dwc_ll_hprt_set_port_suspend(hal->dev); } /** @@ -352,12 +352,12 @@ static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param enable Enable/disable resume signal */ -static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_resume(usb_dwc_hal_context_t *hal, bool enable) { if (enable) { - usbh_ll_hprt_set_port_resume(hal->dev); + usb_dwc_ll_hprt_set_port_resume(hal->dev); } else { - usbh_ll_hprt_clr_port_resume(hal->dev); + usb_dwc_ll_hprt_clr_port_resume(hal->dev); } } @@ -371,9 +371,9 @@ static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool ena * @return true Resume signal is still being driven * @return false Resume signal is no longer driven */ -static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_resume(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_port_resume(hal->dev); + return usb_dwc_ll_hprt_get_port_resume(hal->dev); } // ---------------- Host Port Scheduling ------------------- @@ -382,13 +382,13 @@ static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) * @brief Sets the periodic scheduling frame list * * @note This function must be called before attempting configuring any channels to be period via - * usbh_hal_chan_set_ep_char() + * usb_dwc_hal_chan_set_ep_char() * * @param hal Context of the HAL layer * @param frame_list Base address of the frame list * @param frame_list_len Number of entries in the frame list (can only be 8, 16, 32, 64) */ -static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) +static inline void usb_dwc_hal_port_set_frame_list(usb_dwc_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) { //Clear and save frame list hal->periodic_frame_list = frame_list; @@ -401,7 +401,7 @@ static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_ * @param hal Context of the HAL layer * @return uint32_t* Base address of the periodic scheduling frame list */ -static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) +static inline uint32_t *usb_dwc_hal_port_get_frame_list(usb_dwc_hal_context_t *hal) { return hal->periodic_frame_list; } @@ -409,18 +409,18 @@ static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) /** * @brief Enable periodic scheduling * - * @note The periodic frame list must be set via usbh_hal_port_set_frame_list() should be set before calling this + * @note The periodic frame list must be set via usb_dwc_hal_port_set_frame_list() should be set before calling this * function * @note This function must be called before activating any periodic channels * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_enable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->periodic_frame_list != NULL); - usbh_ll_set_frame_list_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); - usbh_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); - usbh_ll_hcfg_en_perio_sched(hal->dev); + usb_dwc_ll_hflbaddr_set_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); + usb_dwc_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); + usb_dwc_ll_hcfg_en_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 1; } @@ -435,16 +435,16 @@ static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_disable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->flags.periodic_sched_enabled); - usbh_ll_hcfg_dis_perio_sched(hal->dev); + usb_dwc_ll_hcfg_dis_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 0; } -static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) +static inline uint32_t usb_dwc_hal_port_get_cur_frame_num(usb_dwc_hal_context_t *hal) { - return usbh_ll_get_frm_num(hal->dev); + return usb_dwc_ll_hfnum_get_frame_num(hal->dev); } // --------------- Host Port Status/State ------------------ @@ -453,19 +453,19 @@ static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) * @brief Check if a device is currently connected to the host port * * This function is intended to be called after one of the following events followed by an adequate debounce delay - * - USBH_HAL_PORT_EVENT_CONN - * - USBH_HAL_PORT_EVENT_DISCONN + * - USB_DWC_HAL_PORT_EVENT_CONN + * - USB_DWC_HAL_PORT_EVENT_DISCONN * * @note No other connection/disconnection event will occur again until the debounce lock is disabled via - * usbh_hal_disable_debounce_lock() + * usb_dwc_hal_disable_debounce_lock() * * @param hal Context of the HAL layer * @return true A device is connected to the host port * @return false A device is not connected to the host port */ -static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_if_connected(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_conn_status(hal->dev); + return usb_dwc_ll_hprt_get_conn_status(hal->dev); } /** @@ -476,27 +476,27 @@ static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @return usb_priv_speed_t Speed of the connected device (FS or LS only on the esp32-s2 and esp32-s3) */ -static inline usb_priv_speed_t usbh_hal_port_get_conn_speed(usbh_hal_context_t *hal) +static inline usb_priv_speed_t usb_dwc_hal_port_get_conn_speed(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_speed(hal->dev); + return usb_dwc_ll_hprt_get_speed(hal->dev); } /** * @brief Disable the debounce lock * - * This function must be called after calling usbh_hal_port_check_if_connected() and will allow connection/disconnection + * This function must be called after calling usb_dwc_hal_port_check_if_connected() and will allow connection/disconnection * events to occur again. Any pending connection or disconenction interrupts are cleared. * * @param hal Context of the HAL layer */ -static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_disable_debounce_lock(usb_dwc_hal_context_t *hal) { hal->flags.dbnc_lock_enabled = 0; //Clear Conenction and disconenction interrupt in case it triggered again - usb_ll_intr_clear(hal->dev, USB_LL_INTR_CORE_DISCONNINT); - usbh_ll_hprt_intr_clear(hal->dev, USBH_LL_INTR_HPRT_PRTCONNDET); + usb_dwc_ll_gintsts_clear_intrs(hal->dev, USB_DWC_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_hprt_intr_clear(hal->dev, USB_DWC_LL_INTR_HPRT_PRTCONNDET); //Reenable the hprt (connection) and disconnection interrupts - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_DISCONNINT); } // ----------------------------------------------------- Channel ------------------------------------------------------- @@ -512,7 +512,7 @@ static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) * @return true Channel successfully allocated * @return false Failed to allocate channel */ -bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, void *chan_ctx); +bool usb_dwc_hal_chan_alloc(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, void *chan_ctx); /** * @brief Free a channel @@ -520,7 +520,7 @@ bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, voi * @param[in] hal Context of the HAL layer * @param[in] chan_obj Channel object */ -void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); +void usb_dwc_hal_chan_free(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj); // ---------------- Channel Configuration ------------------ @@ -530,7 +530,7 @@ void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); * @param[in] chan_obj Channel object * @return void* The context variable of the channel */ -static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) +static inline void *usb_dwc_hal_chan_get_context(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->chan_ctx; } @@ -547,7 +547,7 @@ static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) * @param chan_obj Channel object * @param ep_char Endpoint characteristics */ -void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, usbh_hal_ep_char_t *ep_char); +void usb_dwc_hal_chan_set_ep_char(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, usb_dwc_hal_ep_char_t *ep_char); /** * @brief Set the direction of the channel @@ -561,11 +561,11 @@ void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_ob * @param chan_obj Channel object * @param is_in Whether the direction is IN */ -static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) +static inline void usb_dwc_hal_chan_set_dir(usb_dwc_hal_chan_t *chan_obj, bool is_in) { //Cannot change direction whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); - usbh_ll_chan_set_dir(chan_obj->regs, is_in); + usb_dwc_ll_hcchar_set_dir(chan_obj->regs, is_in); } /** @@ -580,12 +580,12 @@ static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) * @param chan_obj Channel object * @param pid PID of the next DATA packet (DATA0 or DATA1) */ -static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) +static inline void usb_dwc_hal_chan_set_pid(usb_dwc_hal_chan_t *chan_obj, int pid) { //Cannot change pid whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); //Update channel object and set the register - usbh_ll_chan_set_pid(chan_obj->regs, pid); + usb_dwc_ll_hctsiz_set_pid(chan_obj->regs, pid); } /** @@ -598,10 +598,10 @@ static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) * @param chan_obj Channel object * @return uint32_t Starting PID of the next transfer (DATA0 or DATA1) */ -static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) +static inline uint32_t usb_dwc_hal_chan_get_pid(usb_dwc_hal_chan_t *chan_obj) { HAL_ASSERT(!chan_obj->flags.active); - return usbh_ll_chan_get_pid(chan_obj->regs); + return usb_dwc_ll_hctsiz_get_pid(chan_obj->regs); } // ------------------- Channel Control --------------------- @@ -619,7 +619,7 @@ static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) * @param desc_list_len Transfer descriptor list length * @param start_idx Index of the starting transfer descriptor in the list */ -void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); +void usb_dwc_hal_chan_activate(usb_dwc_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); /** * @brief Get the index of the current transfer descriptor @@ -627,9 +627,9 @@ void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int * @param chan_obj Channel object * @return int Descriptor index */ -static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) +static inline int usb_dwc_hal_chan_get_qtd_idx(usb_dwc_hal_chan_t *chan_obj) { - return usbh_ll_chan_get_ctd(chan_obj->regs); + return usb_dwc_ll_hcdam_get_cur_qtd_idx(chan_obj->regs); } /** @@ -637,24 +637,24 @@ static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) * * This function should be called in order to halt a channel. If the channel is already halted, this function will * return true. If the channel is still active, this function will return false and users must wait for the - * USBH_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. + * USB_DWC_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. * * @note When a transfer is in progress (i.e., the channel is active) and a halt is requested, the channel will halt * after the next USB packet is completed. If the transfer has more pending packets, the transfer will just be - * marked as USBH_HAL_XFER_DESC_STS_NOT_EXECUTED. + * marked as USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED. * * @param chan_obj Channel object * @return true The channel is already halted - * @return false The halt was requested, wait for USBH_HAL_CHAN_EVENT_HALT_REQ + * @return false The halt was requested, wait for USB_DWC_HAL_CHAN_EVENT_HALT_REQ */ -bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); +bool usb_dwc_hal_chan_request_halt(usb_dwc_hal_chan_t *chan_obj); /** * @brief Indicate that a channel is halted after a port error * * When a port error occurs (e.g., discconect, overcurrent): * - Any previously active channels will remain active (i.e., they will not receive a channel interrupt) - * - Attempting to disable them using usbh_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels + * - Attempting to disable them using usb_dwc_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels * (probalby something to do with the periodic scheduling) * * However, the channel's enable bit can be left as 1 since after a port error, a soft reset will be done anyways. @@ -663,7 +663,7 @@ bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); * * @param chan_obj Channel object */ -static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) +static inline void usb_dwc_hal_chan_mark_halted(usb_dwc_hal_chan_t *chan_obj) { chan_obj->flags.active = 0; } @@ -672,9 +672,9 @@ static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) * @brief Get a channel's error * * @param chan_obj Channel object - * @return usbh_hal_chan_error_t The type of error the channel has encountered + * @return usb_dwc_hal_chan_error_t The type of error the channel has encountered */ -static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *chan_obj) +static inline usb_dwc_hal_chan_error_t usb_dwc_hal_chan_get_error(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->error; } @@ -688,8 +688,8 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * - A stage of a transfer (for control transfers) * - A frame of a transfer interval (for interrupt and isoc) * - An entire transfer (for bulk transfers) - * - Check the various USBH_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor - * - For IN transfer entries, set the USBH_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of + * - Check the various USB_DWC_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor + * - For IN transfer entries, set the USB_DWC_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of * the endpoint's MPS * * @note Critical section is not required for this function @@ -700,19 +700,19 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * @param xfer_len Transfer length * @param flags Transfer flags */ -static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) +static inline void usb_dwc_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - if (flags & USBH_HAL_XFER_DESC_FLAG_IN) { - usbh_ll_set_qtd_in(&qtd_list[desc_idx], + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + if (flags & USB_DWC_HAL_XFER_DESC_FLAG_IN) { + usb_dwc_ll_qtd_set_in(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC); } else { - usbh_ll_set_qtd_out(&qtd_list[desc_idx], + usb_dwc_ll_qtd_set_out(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC, - flags & USBH_HAL_XFER_DESC_FLAG_SETUP); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC, + flags & USB_DWC_HAL_XFER_DESC_FLAG_SETUP); } } @@ -722,10 +722,10 @@ static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, u * @param desc_list Transfer descriptor list * @param desc_idx Transfer descriptor index */ -static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) +static inline void usb_dwc_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } /** @@ -738,12 +738,12 @@ static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) * * @note Critical section is not required for this function */ -static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) +static inline void usb_dwc_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_get_qtd_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_get_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); //Clear the QTD to prevent it from being read again - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } // ------------------------------------------------- Event Handling ---------------------------------------------------- @@ -757,9 +757,9 @@ static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, * @note This should be the first interrupt decode function to be run * * @param hal Context of the HAL layer - * @return usbh_hal_port_event_t Host port event + * @return usb_dwc_hal_port_event_t Host port event */ -usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); +usb_dwc_hal_port_event_t usb_dwc_hal_decode_intr(usb_dwc_hal_context_t *hal); /** * @brief Gets the next channel with a pending interrupt @@ -768,9 +768,9 @@ usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); * interrupt, this function returns one of the channel's objects. Call this function repeatedly until it returns NULL. * * @param hal Context of the HAL layer - * @return usbh_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. + * @return usb_dwc_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. */ -usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); +usb_dwc_hal_chan_t *usb_dwc_hal_get_chan_pending_intr(usb_dwc_hal_context_t *hal); /** * @brief Decode a particular channel's interrupt @@ -781,9 +781,9 @@ usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); * @param chan_obj Channel object * @note If the host port has an error (e.g., a sudden disconnect or an port error), any active channels will not * receive an interrupt. Each active channel must be manually halted. - * @return usbh_hal_chan_event_t Channel event + * @return usb_dwc_hal_chan_event_t Channel event */ -usbh_hal_chan_event_t usbh_hal_chan_decode_intr(usbh_hal_chan_t *chan_obj); +usb_dwc_hal_chan_event_t usb_dwc_hal_chan_decode_intr(usb_dwc_hal_chan_t *chan_obj); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/hal/include/hal/usbh_ll.h b/tools/sdk/esp32/include/hal/include/hal/usb_dwc_ll.h similarity index 59% rename from tools/sdk/esp32s2/include/hal/include/hal/usbh_ll.h rename to tools/sdk/esp32/include/hal/include/hal/usb_dwc_ll.h index 4320ead0a3b..3bbaeca4c2e 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/usbh_ll.h +++ b/tools/sdk/esp32/include/hal/include/hal/usb_dwc_ll.h @@ -12,7 +12,7 @@ extern "C" { #include #include -#include "soc/usbh_struct.h" +#include "soc/usb_dwc_struct.h" #include "hal/usb_types_private.h" #include "hal/misc.h" @@ -24,48 +24,48 @@ extern "C" { /* * Interrupt bit masks of the GINTSTS and GINTMSK registers */ -#define USB_LL_INTR_CORE_WKUPINT (1 << 31) -#define USB_LL_INTR_CORE_SESSREQINT (1 << 30) -#define USB_LL_INTR_CORE_DISCONNINT (1 << 29) -#define USB_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) -#define USB_LL_INTR_CORE_PTXFEMP (1 << 26) -#define USB_LL_INTR_CORE_HCHINT (1 << 25) -#define USB_LL_INTR_CORE_PRTINT (1 << 24) -#define USB_LL_INTR_CORE_RESETDET (1 << 23) -#define USB_LL_INTR_CORE_FETSUSP (1 << 22) -#define USB_LL_INTR_CORE_INCOMPIP (1 << 21) -#define USB_LL_INTR_CORE_INCOMPISOIN (1 << 20) -#define USB_LL_INTR_CORE_OEPINT (1 << 19) -#define USB_LL_INTR_CORE_IEPINT (1 << 18) -#define USB_LL_INTR_CORE_EPMIS (1 << 17) -#define USB_LL_INTR_CORE_EOPF (1 << 15) -#define USB_LL_INTR_CORE_ISOOUTDROP (1 << 14) -#define USB_LL_INTR_CORE_ENUMDONE (1 << 13) -#define USB_LL_INTR_CORE_USBRST (1 << 12) -#define USB_LL_INTR_CORE_USBSUSP (1 << 11) -#define USB_LL_INTR_CORE_ERLYSUSP (1 << 10) -#define USB_LL_INTR_CORE_GOUTNAKEFF (1 << 7) -#define USB_LL_INTR_CORE_GINNAKEFF (1 << 6) -#define USB_LL_INTR_CORE_NPTXFEMP (1 << 5) -#define USB_LL_INTR_CORE_RXFLVL (1 << 4) -#define USB_LL_INTR_CORE_SOF (1 << 3) -#define USB_LL_INTR_CORE_OTGINT (1 << 2) -#define USB_LL_INTR_CORE_MODEMIS (1 << 1) -#define USB_LL_INTR_CORE_CURMOD (1 << 0) +#define USB_DWC_LL_INTR_CORE_WKUPINT (1 << 31) +#define USB_DWC_LL_INTR_CORE_SESSREQINT (1 << 30) +#define USB_DWC_LL_INTR_CORE_DISCONNINT (1 << 29) +#define USB_DWC_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) +#define USB_DWC_LL_INTR_CORE_PTXFEMP (1 << 26) +#define USB_DWC_LL_INTR_CORE_HCHINT (1 << 25) +#define USB_DWC_LL_INTR_CORE_PRTINT (1 << 24) +#define USB_DWC_LL_INTR_CORE_RESETDET (1 << 23) +#define USB_DWC_LL_INTR_CORE_FETSUSP (1 << 22) +#define USB_DWC_LL_INTR_CORE_INCOMPIP (1 << 21) +#define USB_DWC_LL_INTR_CORE_INCOMPISOIN (1 << 20) +#define USB_DWC_LL_INTR_CORE_OEPINT (1 << 19) +#define USB_DWC_LL_INTR_CORE_IEPINT (1 << 18) +#define USB_DWC_LL_INTR_CORE_EPMIS (1 << 17) +#define USB_DWC_LL_INTR_CORE_EOPF (1 << 15) +#define USB_DWC_LL_INTR_CORE_ISOOUTDROP (1 << 14) +#define USB_DWC_LL_INTR_CORE_ENUMDONE (1 << 13) +#define USB_DWC_LL_INTR_CORE_USBRST (1 << 12) +#define USB_DWC_LL_INTR_CORE_USBSUSP (1 << 11) +#define USB_DWC_LL_INTR_CORE_ERLYSUSP (1 << 10) +#define USB_DWC_LL_INTR_CORE_GOUTNAKEFF (1 << 7) +#define USB_DWC_LL_INTR_CORE_GINNAKEFF (1 << 6) +#define USB_DWC_LL_INTR_CORE_NPTXFEMP (1 << 5) +#define USB_DWC_LL_INTR_CORE_RXFLVL (1 << 4) +#define USB_DWC_LL_INTR_CORE_SOF (1 << 3) +#define USB_DWC_LL_INTR_CORE_OTGINT (1 << 2) +#define USB_DWC_LL_INTR_CORE_MODEMIS (1 << 1) +#define USB_DWC_LL_INTR_CORE_CURMOD (1 << 0) /* * Bit mask of interrupt generating bits of the the HPRT register. These bits - * are ORd into the USB_LL_INTR_CORE_PRTINT interrupt. + * are ORd into the USB_DWC_LL_INTR_CORE_PRTINT interrupt. * * Note: Some fields of the HPRT are W1C (write 1 clear), this we cannot do a * simple read and write-back to clear the HPRT interrupt bits. Instead we need * a W1C mask the non-interrupt related bits */ -#define USBH_LL_HPRT_W1C_MSK (0x2E) -#define USBH_LL_HPRT_ENA_MSK (0x04) -#define USBH_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) -#define USBH_LL_INTR_HPRT_PRTENCHNG (1 << 3) -#define USBH_LL_INTR_HPRT_PRTCONNDET (1 << 1) +#define USB_DWC_LL_HPRT_W1C_MSK (0x2E) +#define USB_DWC_LL_HPRT_ENA_MSK (0x04) +#define USB_DWC_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) +#define USB_DWC_LL_INTR_HPRT_PRTENCHNG (1 << 3) +#define USB_DWC_LL_INTR_HPRT_PRTCONNDET (1 << 1) /* * Bit mask of channel interrupts (HCINTi and HCINTMSKi registers) @@ -78,22 +78,22 @@ extern "C" { * - XFERCOMPL * The remaining interrupt bits will still be set (when the corresponding event occurs) * but will not generate an interrupt. Therefore we must proxy through the - * USBH_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. + * USB_DWC_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. */ -#define USBH_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) -#define USBH_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) -#define USBH_LL_INTR_CHAN_BNAINTR (1 << 11) -#define USBH_LL_INTR_CHAN_DATATGLERR (1 << 10) -#define USBH_LL_INTR_CHAN_FRMOVRUN (1 << 9) -#define USBH_LL_INTR_CHAN_BBLEER (1 << 8) -#define USBH_LL_INTR_CHAN_XACTERR (1 << 7) -#define USBH_LL_INTR_CHAN_NYET (1 << 6) -#define USBH_LL_INTR_CHAN_ACK (1 << 5) -#define USBH_LL_INTR_CHAN_NAK (1 << 4) -#define USBH_LL_INTR_CHAN_STALL (1 << 3) -#define USBH_LL_INTR_CHAN_AHBERR (1 << 2) -#define USBH_LL_INTR_CHAN_CHHLTD (1 << 1) -#define USBH_LL_INTR_CHAN_XFERCOMPL (1 << 0) +#define USB_DWC_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) +#define USB_DWC_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) +#define USB_DWC_LL_INTR_CHAN_BNAINTR (1 << 11) +#define USB_DWC_LL_INTR_CHAN_DATATGLERR (1 << 10) +#define USB_DWC_LL_INTR_CHAN_FRMOVRUN (1 << 9) +#define USB_DWC_LL_INTR_CHAN_BBLEER (1 << 8) +#define USB_DWC_LL_INTR_CHAN_XACTERR (1 << 7) +#define USB_DWC_LL_INTR_CHAN_NYET (1 << 6) +#define USB_DWC_LL_INTR_CHAN_ACK (1 << 5) +#define USB_DWC_LL_INTR_CHAN_NAK (1 << 4) +#define USB_DWC_LL_INTR_CHAN_STALL (1 << 3) +#define USB_DWC_LL_INTR_CHAN_AHBERR (1 << 2) +#define USB_DWC_LL_INTR_CHAN_CHHLTD (1 << 1) +#define USB_DWC_LL_INTR_CHAN_XFERCOMPL (1 << 0) /* * QTD (Queue Transfer Descriptor) structure used in Scatter/Gather DMA mode. @@ -150,7 +150,7 @@ typedef struct { uint32_t buffer_status_val; }; uint8_t *buffer; -} usbh_ll_dma_qtd_t; +} usb_dwc_ll_dma_qtd_t; /* ----------------------------------------------------------------------------- @@ -159,61 +159,61 @@ typedef struct { // --------------------------- GAHBCFG Register -------------------------------- -static inline void usb_ll_en_dma_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_dma_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 1; } -static inline void usb_ll_en_slave_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_slave_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 0; } -static inline void usb_ll_set_hbstlen(usbh_dev_t *hw, uint32_t burst_len) +static inline void usb_dwc_ll_gahbcfg_set_hbstlen(usb_dwc_dev_t *hw, uint32_t burst_len) { hw->gahbcfg_reg.hbstlen = burst_len; } -static inline void usb_ll_en_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 1; } -static inline void usb_ll_dis_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_dis_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 0; } // --------------------------- GUSBCFG Register -------------------------------- -static inline void usb_ll_set_host_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_force_host_mode(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.forcehstmode = 1; } -static inline void usb_ll_dis_hnp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_hnp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.hnpcap = 0; } -static inline void usb_ll_dis_srp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_srp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.srpcap = 0; } // --------------------------- GRSTCTL Register -------------------------------- -static inline bool usb_ll_check_ahb_idle(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_ahb_idle(usb_dwc_dev_t *hw) { return hw->grstctl_reg.ahbidle; } -static inline bool usb_ll_check_dma_req_in_progress(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_dma_req_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.dmareq; } -static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_nptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 0; //Set the TX FIFO number to 0 to select the non-periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //Flush the selected TX FIFO @@ -223,7 +223,7 @@ static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_ptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 1; //Set the TX FIFO number to 1 to select the periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //FLush the select TX FIFO @@ -233,7 +233,7 @@ static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_rx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.rxfflsh = 1; //Wait for the flushing to complete @@ -242,17 +242,17 @@ static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_reset_frame_counter(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_reset_frame_counter(usb_dwc_dev_t *hw) { hw->grstctl_reg.frmcntrrst = 1; } -static inline void usb_ll_core_soft_reset(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_core_soft_reset(usb_dwc_dev_t *hw) { hw->grstctl_reg.csftrst = 1; } -static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_core_soft_reset_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.csftrst; } @@ -265,9 +265,9 @@ static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @return uint32_t Mask of interrupts */ -static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_gintsts_read_and_clear_intrs(usb_dwc_dev_t *hw) { - usb_gintsts_reg_t gintsts; + usb_dwc_gintsts_reg_t gintsts; gintsts.val = hw->gintsts_reg.val; hw->gintsts_reg.val = gintsts.val; //Write back to clear return gintsts.val; @@ -279,7 +279,7 @@ static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param intr_msk Mask of interrupts to clear */ -static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) +static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t intr_msk) { //All GINTSTS fields are either W1C or read only. So safe to write directly hw->gintsts_reg.val = intr_msk; @@ -287,19 +287,19 @@ static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) // --------------------------- GINTMSK Register -------------------------------- -static inline void usb_ll_en_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val |= intr_mask; } -static inline void usb_ll_dis_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_dis_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val &= ~intr_mask; } // --------------------------- GRXFSIZ Register -------------------------------- -static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) +static inline void usb_dwc_ll_grxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t num_lines) { //Set size in words HAL_FORCE_MODIFY_U32_REG_FIELD(hw->grxfsiz_reg, rxfdep, num_lines); @@ -307,20 +307,24 @@ static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) // -------------------------- GNPTXFSIZ Register ------------------------------- -static inline void usb_ll_set_nptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_gnptxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_gnptxfsiz_reg_t gnptxfsiz; + usb_dwc_gnptxfsiz_reg_t gnptxfsiz; gnptxfsiz.val = hw->gnptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfdep, num_lines); hw->gnptxfsiz_reg.val = gnptxfsiz.val; } -static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) +// --------------------------- GSNPSID Register -------------------------------- + +static inline uint32_t usb_dwc_ll_gsnpsid_get_id(usb_dwc_dev_t *hw) { return hw->gsnpsid_reg.val; } +// --------------------------- GHWCFGx Register -------------------------------- + /** * @brief Get the hardware configuration regiters of the DWC_OTG controller * @@ -333,7 +337,7 @@ static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) * @param[out] ghwcfg3 Hardware configuration registesr 3 * @param[out] ghwcfg4 Hardware configuration registesr 4 */ -static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) +static inline void usb_dwc_ll_ghwcfg_get_hw_config(usb_dwc_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) { *ghwcfg1 = hw->ghwcfg1_reg.val; *ghwcfg2 = hw->ghwcfg2_reg.val; @@ -343,9 +347,9 @@ static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, // --------------------------- HPTXFSIZ Register ------------------------------- -static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_hptxfsiz_set_ptx_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_hptxfsiz_reg_t hptxfsiz; + usb_dwc_hptxfsiz_reg_t hptxfsiz; hptxfsiz.val = hw->hptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfsize, num_lines); @@ -358,12 +362,12 @@ static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint // ----------------------------- HCFG Register --------------------------------- -static inline void usbh_ll_hcfg_en_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 1; } -static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_dis_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 0; } @@ -373,7 +377,7 @@ static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) * * @param num_entires Number of entires in the frame list */ -static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_hal_frame_list_len_t num_entries) +static inline void usb_dwc_ll_hcfg_set_num_frame_list_entries(usb_dwc_dev_t *hw, usb_hal_frame_list_len_t num_entries) { uint32_t frlisten; switch (num_entries) { @@ -393,17 +397,17 @@ static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_h hw->hcfg_reg.frlisten = frlisten; } -static inline void usbh_ll_hcfg_en_scatt_gatt_dma(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_scatt_gatt_dma(usb_dwc_dev_t *hw) { hw->hcfg_reg.descdma = 1; } -static inline void usbh_ll_hcfg_set_fsls_supp_only(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_supp_only(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslssupp = 1; } -static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_pclk_sel(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslspclksel = 1; } @@ -414,7 +418,7 @@ static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param speed Speed to initialize the host port at */ -static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hcfg_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { hw->hcfg_reg.descdma = 1; //Enable scatt/gatt hw->hcfg_reg.fslssupp = 1; //FS/LS support only @@ -429,9 +433,9 @@ static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFIR Register --------------------------------- -static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hfir_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { - usb_hfir_reg_t hfir; + usb_dwc_hfir_reg_t hfir; hfir.val = hw->hfir_reg.val; hfir.hfirrldctrl = 0; //Disable dynamic loading /* @@ -445,49 +449,49 @@ static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFNUM Register -------------------------------- -static inline uint32_t usbh_ll_get_frm_time_rem(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_time_rem(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hfnum_reg, frrem); } -static inline uint32_t usbh_ll_get_frm_num(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_num(usb_dwc_dev_t *hw) { return hw->hfnum_reg.frnum; } // ---------------------------- HPTXSTS Register ------------------------------- -static inline uint32_t usbh_ll_get_p_tx_queue_top(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_top(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxqtop); } -static inline uint32_t usbh_ll_get_p_tx_queue_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_space_avail(usb_dwc_dev_t *hw) { return hw->hptxsts_reg.ptxqspcavail; } -static inline uint32_t usbh_ll_get_p_tx_fifo_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_ptxsts_get_ptxf_space_avail(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxfspcavail); } // ----------------------------- HAINT Register -------------------------------- -static inline uint32_t usbh_ll_get_chan_intrs_msk(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_haint_get_chan_intrs(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->haint_reg, haint); } // --------------------------- HAINTMSK Register ------------------------------- -static inline void usbh_ll_haintmsk_en_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_en_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val |= mask; } -static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_dis_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val &= ~mask; } @@ -504,7 +508,7 @@ static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) * @param hw Start address of the DWC_OTG registers * @param addr Base address of the scheduling frame list */ -static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t addr) +static inline void usb_dwc_ll_hflbaddr_set_base_addr(usb_dwc_dev_t *hw, uint32_t addr) { hw->hflbaddr_reg.hflbaddr = addr; } @@ -515,14 +519,14 @@ static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t add * @param hw Start address of the DWC_OTG registers * @return uint32_t Base address of the scheduling frame list */ -static inline uint32_t usbh_ll_get_frame_list_base_addr(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hflbaddr_get_base_addr(usb_dwc_dev_t *hw) { return hw->hflbaddr_reg.hflbaddr; } // ----------------------------- HPRT Register --------------------------------- -static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) +static inline usb_priv_speed_t usb_dwc_ll_hprt_get_speed(usb_dwc_dev_t *hw) { usb_priv_speed_t speed; //esp32-s2 and esp32-s3 only support FS or LS @@ -537,163 +541,163 @@ static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) return speed; } -static inline uint32_t usbh_ll_hprt_get_test_ctl(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_test_ctl(usb_dwc_dev_t *hw) { return hw->hprt_reg.prttstctl; } -static inline void usbh_ll_hprt_set_test_ctl(usbh_dev_t *hw, uint32_t test_mode) +static inline void usb_dwc_ll_hprt_set_test_ctl(usb_dwc_dev_t *hw, uint32_t test_mode) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prttstctl = test_mode; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_en_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_en_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_dis_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_dis_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline uint32_t usbh_ll_hprt_get_pwr_line_status(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_pwr_line_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtlnsts; } -static inline void usbh_ll_hprt_set_port_reset(usbh_dev_t *hw, bool reset) +static inline void usb_dwc_ll_hprt_set_port_reset(usb_dwc_dev_t *hw, bool reset) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtrst = reset; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_reset(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtrst; } -static inline void usbh_ll_hprt_set_port_suspend(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_suspend(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtsusp = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_suspend(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_suspend(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtsusp; } -static inline void usbh_ll_hprt_set_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_clr_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_clr_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_resume(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_resume(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtres; } -static inline bool usbh_ll_hprt_get_port_overcur(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_overcur(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtovrcurract; } -static inline bool usbh_ll_hprt_get_port_en(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_en(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtena; } -static inline void usbh_ll_hprt_port_dis(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_port_dis(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtena = 1; //W1C to disable //we want to W1C ENA but not W1C the interrupt bits - hw->hprt_reg.val = hprt.val & ((~USBH_LL_HPRT_W1C_MSK) | USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & ((~USB_DWC_LL_HPRT_W1C_MSK) | USB_DWC_LL_HPRT_ENA_MSK); } -static inline bool usbh_ll_hprt_get_conn_status(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_conn_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtconnsts; } -static inline uint32_t usbh_ll_hprt_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_intr_read_and_clear(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; //We want to W1C the interrupt bits but not that ENA - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_ENA_MSK); //Return only the interrupt bits - return (hprt.val & (USBH_LL_HPRT_W1C_MSK & ~(USBH_LL_HPRT_ENA_MSK))); + return (hprt.val & (USB_DWC_LL_HPRT_W1C_MSK & ~(USB_DWC_LL_HPRT_ENA_MSK))); } -static inline void usbh_ll_hprt_intr_clear(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_hprt_intr_clear(usb_dwc_dev_t *hw, uint32_t intr_mask) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; - hw->hprt_reg.val = ((hprt.val & ~USBH_LL_HPRT_ENA_MSK) & ~USBH_LL_HPRT_W1C_MSK) | intr_mask; + hw->hprt_reg.val = ((hprt.val & ~USB_DWC_LL_HPRT_ENA_MSK) & ~USB_DWC_LL_HPRT_W1C_MSK) | intr_mask; } //Per Channel registers // --------------------------- HCCHARi Register -------------------------------- -static inline void usbh_ll_chan_start(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_enable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chena = 1; } -static inline bool usbh_ll_chan_is_active(volatile usb_host_chan_regs_t *chan) +static inline bool usb_dwc_ll_hcchar_chan_is_enabled(volatile usb_dwc_host_chan_regs_t *chan) { return chan->hcchar_reg.chena; } -static inline void usbh_ll_chan_halt(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_disable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chdis = 1; } -static inline void usbh_ll_chan_xfer_odd_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_odd_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 1; } -static inline void usbh_ll_chan_xfer_even_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_even_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 0; } -static inline void usbh_ll_chan_set_dev_addr(volatile usb_host_chan_regs_t *chan, uint32_t addr) +static inline void usb_dwc_ll_hcchar_set_dev_addr(volatile usb_dwc_host_chan_regs_t *chan, uint32_t addr) { chan->hcchar_reg.devaddr = addr; } -static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, usb_priv_xfer_type_t type) +static inline void usb_dwc_ll_hcchar_set_ep_type(volatile usb_dwc_host_chan_regs_t *chan, usb_priv_xfer_type_t type) { uint32_t ep_type; switch (type) { @@ -715,42 +719,42 @@ static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, //Indicates whether channel is commuunicating with a LS device connected via a FS hub. Setting this bit to 1 will cause //each packet to be preceded by a PREamble packet -static inline void usbh_ll_chan_set_lspddev(volatile usb_host_chan_regs_t *chan, bool is_ls) +static inline void usb_dwc_ll_hcchar_set_lspddev(volatile usb_dwc_host_chan_regs_t *chan, bool is_ls) { chan->hcchar_reg.lspddev = is_ls; } -static inline void usbh_ll_chan_set_dir(volatile usb_host_chan_regs_t *chan, bool is_in) +static inline void usb_dwc_ll_hcchar_set_dir(volatile usb_dwc_host_chan_regs_t *chan, bool is_in) { chan->hcchar_reg.epdir = is_in; } -static inline void usbh_ll_chan_set_ep_num(volatile usb_host_chan_regs_t *chan, uint32_t num) +static inline void usb_dwc_ll_hcchar_set_ep_num(volatile usb_dwc_host_chan_regs_t *chan, uint32_t num) { chan->hcchar_reg.epnum = num; } -static inline void usbh_ll_chan_set_mps(volatile usb_host_chan_regs_t *chan, uint32_t mps) +static inline void usb_dwc_ll_hcchar_set_mps(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mps) { chan->hcchar_reg.mps = mps; } -static inline void usbh_ll_chan_hcchar_init(volatile usb_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) +static inline void usb_dwc_ll_hcchar_init(volatile usb_dwc_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) { //Sets all persistent fields of the channel over its lifetimez - usbh_ll_chan_set_dev_addr(chan, dev_addr); - usbh_ll_chan_set_ep_type(chan, type); - usbh_ll_chan_set_lspddev(chan, is_ls); - usbh_ll_chan_set_dir(chan, is_in); - usbh_ll_chan_set_ep_num(chan, ep_num); - usbh_ll_chan_set_mps(chan, mps); + usb_dwc_ll_hcchar_set_dev_addr(chan, dev_addr); + usb_dwc_ll_hcchar_set_ep_type(chan, type); + usb_dwc_ll_hcchar_set_lspddev(chan, is_ls); + usb_dwc_ll_hcchar_set_dir(chan, is_in); + usb_dwc_ll_hcchar_set_ep_num(chan, ep_num); + usb_dwc_ll_hcchar_set_mps(chan, mps); } // ---------------------------- HCINTi Register -------------------------------- -static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_regs_t *chan) +static inline uint32_t usb_dwc_ll_hcint_read_and_clear_intrs(volatile usb_dwc_host_chan_regs_t *chan) { - usb_hcint_reg_t hcint; + usb_dwc_hcint_reg_t hcint; hcint.val = chan->hcint_reg.val; chan->hcint_reg.val = hcint.val; return hcint.val; @@ -758,14 +762,14 @@ static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_r // --------------------------- HCINTMSKi Register ------------------------------ -static inline void usbh_ll_chan_set_intr_mask(volatile usb_host_chan_regs_t *chan, uint32_t mask) +static inline void usb_dwc_ll_hcintmsk_set_intr_mask(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mask) { chan->hcintmsk_reg.val = mask; } -// ---------------------- HCTSIZi and HCDMAi Registers ------------------------- +// ---------------------------- HCTSIZi Register ------------------------------- -static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uint32_t data_pid) +static inline void usb_dwc_ll_hctsiz_set_pid(volatile usb_dwc_host_chan_regs_t *chan, uint32_t data_pid) { if (data_pid == 0) { chan->hctsiz_reg.pid = 0; @@ -774,7 +778,8 @@ static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uin } } -static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) { +static inline uint32_t usb_dwc_ll_hctsiz_get_pid(volatile usb_dwc_host_chan_regs_t *chan) +{ if (chan->hctsiz_reg.pid == 0) { return 0; //DATA0 } else { @@ -782,35 +787,35 @@ static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) } } -static inline void usbh_ll_chan_set_dma_addr_non_iso(volatile usb_host_chan_regs_t *chan, - void *dmaaddr, - uint32_t qtd_idx) +static inline void usb_dwc_ll_hctsiz_set_qtd_list_len(volatile usb_dwc_host_chan_regs_t *chan, int qtd_list_len) { - //Set HCDMAi - chan->hcdma_reg.val = 0; - chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address - chan->hcdma_reg.non_iso.ctd = qtd_idx; + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list } -static inline int usbh_ll_chan_get_ctd(usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hctsiz_init(volatile usb_dwc_host_chan_regs_t *chan) { - return chan->hcdma_reg.non_iso.ctd; + chan->hctsiz_reg.dopng = 0; //Don't do ping + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels } -static inline void usbh_ll_chan_hctsiz_init(volatile usb_host_chan_regs_t *chan) +// ---------------------------- HCDMAi Register -------------------------------- + +static inline void usb_dwc_ll_hcdma_set_qtd_list_addr(volatile usb_dwc_host_chan_regs_t *chan, void *dmaaddr, uint32_t qtd_idx) { - chan->hctsiz_reg.dopng = 0; //Don't do ping - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels + //Set HCDMAi + chan->hcdma_reg.val = 0; + chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address + chan->hcdma_reg.non_iso.ctd = qtd_idx; } -static inline void usbh_ll_chan_set_qtd_list_len(volatile usb_host_chan_regs_t *chan, int qtd_list_len) +static inline int usb_dwc_ll_hcdam_get_cur_qtd_idx(usb_dwc_host_chan_regs_t *chan) { - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list + return chan->hcdma_reg.non_iso.ctd; } // ---------------------------- HCDMABi Register ------------------------------- -static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t *chan) +static inline void *usb_dwc_ll_hcdmab_get_buff_addr(volatile usb_dwc_host_chan_regs_t *chan) { return (void *)chan->hcdmab_reg.hcdmab; } @@ -826,20 +831,20 @@ static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t * * @param dev Start address of the DWC_OTG registers * @param chan_idx The channel's index - * @return usb_host_chan_regs_t* Pointer to channel's registers + * @return usb_dwc_host_chan_regs_t* Pointer to channel's registers */ -static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int chan_idx) +static inline usb_dwc_host_chan_regs_t *usb_dwc_ll_chan_get_regs(usb_dwc_dev_t *dev, int chan_idx) { return &dev->host_chans[chan_idx]; } // ------------------------------ QTD related ---------------------------------- -#define USBH_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully -#define USBH_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). +#define USB_DWC_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully +#define USB_DWC_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). //Note: 0x2 is reserved -#define USBH_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. -#define USBH_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed +#define USB_DWC_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. +#define USB_DWC_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed /** * @brief Set a QTD for a non isochronous IN transfer @@ -850,7 +855,7 @@ static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int c * Non zero length must be mulitple of the endpoint's MPS. * @param hoc Halt on complete (will generate an interrupt and halt the channel) */ -static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) +static inline void usb_dwc_ll_qtd_set_in(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -873,7 +878,7 @@ static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff * @param is_setup Indicates whether this is a control transfer setup packet or a normal OUT Data transfer. * (As per the USB protocol, setup packets cannot be STALLd or NAKd by the device) */ -static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) +static inline void usb_dwc_ll_qtd_set_out(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -896,7 +901,7 @@ static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buf * * @param qtd Pointer to the QTD */ -static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) +static inline void usb_dwc_ll_qtd_set_null(usb_dwc_ll_dma_qtd_t *qtd) { qtd->buffer = NULL; qtd->buffer_status_val = 0; //Disable qtd by clearing it to zero. Used by interrupt/isoc as an unscheudled frame @@ -911,12 +916,12 @@ static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) * @param[out] rem_len Number of bytes ramining in the QTD * @param[out] status Status of the QTD */ -static inline void usbh_ll_get_qtd_status(usbh_ll_dma_qtd_t *qtd, int *rem_len, int *status) +static inline void usb_dwc_ll_qtd_get_status(usb_dwc_ll_dma_qtd_t *qtd, int *rem_len, int *status) { //Status is the same regardless of IN or OUT if (qtd->in_non_iso.active) { //QTD was never processed - *status = USBH_LL_QTD_STATUS_NOT_EXECUTED; + *status = USB_DWC_LL_QTD_STATUS_NOT_EXECUTED; } else { *status = qtd->in_non_iso.rx_status; } diff --git a/tools/sdk/esp32/include/hal/platform_port/include/hal/check.h b/tools/sdk/esp32/include/hal/platform_port/include/hal/check.h index 3ad02946c71..df2d4af46ed 100644 --- a/tools/sdk/esp32/include/hal/platform_port/include/hal/check.h +++ b/tools/sdk/esp32/include/hal/platform_port/include/hal/check.h @@ -1,17 +1,11 @@ -// Copyright 2021 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: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once -#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) _Static_assert((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") +#include "esp_assert.h" + +#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) ESP_STATIC_ASSERT((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") diff --git a/tools/sdk/esp32/include/lwip/include/apps/ping/ping_sock.h b/tools/sdk/esp32/include/lwip/include/apps/ping/ping_sock.h index fb946f7e162..6abe6f77bd7 100644 --- a/tools/sdk/esp32/include/lwip/include/apps/ping/ping_sock.h +++ b/tools/sdk/esp32/include/lwip/include/apps/ping/ping_sock.h @@ -88,7 +88,7 @@ typedef struct { .tos = 0, \ .ttl = IP_DEFAULT_TTL, \ .target_addr = *(IP_ANY_TYPE), \ - .task_stack_size = 2048, \ + .task_stack_size = 2048 + TASK_EXTRA_STACK_SIZE, \ .task_prio = 2, \ .interface = 0,\ } diff --git a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/dhcp.h b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/dhcp.h index 8a528219da6..56e35223df3 100644 --- a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/dhcp.h +++ b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/dhcp.h @@ -151,6 +151,9 @@ u8_t dhcp_supplied_address(const struct netif *netif); void dhcp_coarse_tmr(void); /* to be called every half second */ void dhcp_fine_tmr(void); +#if ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND +void dhcp_fine_timeout_cb(void *arg); +#endif #if LWIP_DHCP_GET_NTP_SRV /** This function must exist, in other to add offered NTP servers to diff --git a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/ip4_napt.h b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/ip4_napt.h index 8d98e120dfa..8246d6fd36e 100644 --- a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/ip4_napt.h +++ b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/ip4_napt.h @@ -60,16 +60,21 @@ extern "C" { #include "lwip/err.h" #include "lwip/ip4.h" + +#ifndef NAPT_TMR_INTERVAL +#define NAPT_TMR_INTERVAL 2000 +#endif + /** -* NAPT for a forwarded packet. It checks weather we need NAPT and modify -* the packet source address and port if needed. -* -* @param p the packet to forward (p->payload points to IP header) -* @param iphdr the IP header of the input packet -* @param inp the netif on which this packet was received -* @param outp the netif on which this packet will be sent -* @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped -*/ + * NAPT for a forwarded packet. It checks weather we need NAPT and modify + * the packet source address and port if needed. + * + * @param p the packet to forward (p->payload points to IP header) + * @param iphdr the IP header of the input packet + * @param inp the netif on which this packet was received + * @param outp the netif on which this packet will be sent + * @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped + */ err_t ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct netif *outp); @@ -79,7 +84,6 @@ ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct * * @param p the packet to forward (p->payload points to IP header) * @param iphdr the IP header of the input packet - * @param inp the netif on which this packet was received */ void ip_napt_recv(struct pbuf *p, struct ip_hdr *iphdr); diff --git a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/lwip_napt.h b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/lwip_napt.h index a1816d42034..ccea172585a 100644 --- a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/lwip_napt.h +++ b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/lwip_napt.h @@ -59,13 +59,24 @@ extern "C" { #endif /* Timeouts in sec for the various protocol types */ +#ifndef IP_NAPT_TIMEOUT_MS_TCP #define IP_NAPT_TIMEOUT_MS_TCP (30*60*1000) -#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (20*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_TCP_DISCON +#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (TCP_MSL) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_UDP #define IP_NAPT_TIMEOUT_MS_UDP (2*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_ICMP #define IP_NAPT_TIMEOUT_MS_ICMP (2*1000) - +#endif +#ifndef IP_NAPT_PORT_RANGE_START #define IP_NAPT_PORT_RANGE_START 49152 +#endif +#ifndef IP_NAPT_PORT_RANGE_END #define IP_NAPT_PORT_RANGE_END 61439 +#endif /** * Enable/Disable NAPT for a specified interface. @@ -80,13 +91,12 @@ ip_napt_enable(u32_t addr, int enable); /** * Enable/Disable NAPT for a specified interface. * - * @param netif number of the interface + * @param number number of the interface * @param enable non-zero to enable NAPT, or 0 to disable. */ void ip_napt_enable_no(u8_t number, int enable); - /** * Register port mapping on the external interface to internal interface. * When the same port mapping is registered again, the old mapping is overwritten. @@ -101,16 +111,31 @@ ip_napt_enable_no(u8_t number, int enable); u8_t ip_portmap_add(u8_t proto, u32_t maddr, u16_t mport, u32_t daddr, u16_t dport); +u8_t +ip_portmap_get(u8_t proto, u16_t mport, u32_t *maddr, u32_t *daddr, u16_t *dport); + /** * Unregister port mapping on the external interface to internal interface. * * @param proto target protocol - * @param maddr ip address of the external interface + * @param mport mapped port on the external interface, in host byte order. */ u8_t ip_portmap_remove(u8_t proto, u16_t mport); + + +#if LWIP_STATS +/** + * Get statistics. + * + * @param stats struct to receive current stats + */ +void +ip_napt_get_stats(struct stats_ip_napt *stats); +#endif + #endif /* IP_NAPT */ #endif /* IP_FORWARD */ #endif /* ESP_LWIP */ diff --git a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/opt.h b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/opt.h index b314c59a439..11c9b10b886 100644 --- a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/opt.h +++ b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/opt.h @@ -506,7 +506,7 @@ * The default number of timeouts is calculated here for all enabled modules. */ #if ESP_LWIP -#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) +#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND ? LWIP_DHCP : 2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + (ESP_LWIP_DNS_TIMERS_ONDEMAND ? 0 : LWIP_DNS) + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #else #define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #endif @@ -2273,6 +2273,14 @@ #define MIB2_STATS 0 #endif +/** + * IP_NAPT_STATS==1: Stats for IP NAPT. + */ +#if !defined IP_NAPT_STATS || defined __DOXYGEN__ +#define IP_NAPT_STATS (IP_NAPT) +#endif + + #else #define LINK_STATS 0 @@ -2293,6 +2301,7 @@ #define MLD6_STATS 0 #define ND6_STATS 0 #define MIB2_STATS 0 +#define IP_NAPT_STATS 0 #endif /* LWIP_STATS */ /** diff --git a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h index 72f9126d465..92e582448aa 100644 --- a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h +++ b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h @@ -128,7 +128,9 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb); #define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in milliseconds */ #endif /* TCP_SLOW_INTERVAL */ +#ifndef TCP_FIN_WAIT_TIMEOUT #define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ +#endif /* TCP_FIN_WAIT_TIMEOUT */ #define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */ #define TCP_OOSEQ_TIMEOUT 6U /* x RTO */ diff --git a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/stats.h b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/stats.h index b570dbacf58..94e16691ca4 100644 --- a/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/stats.h +++ b/tools/sdk/esp32/include/lwip/lwip/src/include/lwip/stats.h @@ -228,6 +228,18 @@ struct stats_mib2_netif_ctrs { u32_t ifouterrors; }; +#if ESP_LWIP && IP_NAPT_STATS +/** + * IP NAPT stats + */ +struct stats_ip_napt { + STAT_COUNTER nr_active_tcp; + STAT_COUNTER nr_active_udp; + STAT_COUNTER nr_active_icmp; + STAT_COUNTER nr_forced_evictions; +}; +#endif /* ESP_LWIP && IP_NAPT */ + /** lwIP stats container */ struct stats_ { #if LINK_STATS @@ -298,6 +310,11 @@ struct stats_ { /** SNMP MIB2 */ struct stats_mib2 mib2; #endif +#if ESP_LWIP && IP_NAPT_STATS + /** IP NAPT */ + struct stats_ip_napt ip_napt; +#endif + }; /** Global variable containing lwIP internal statistics. Add this to your debugger's watchlist. */ @@ -467,6 +484,19 @@ void stats_init(void); #define MIB2_STATS_INC(x) #endif +#if IP_NAPT_STATS +#define IP_NAPT_STATS_INC(x) STATS_INC(x) +#else +#define IP_NAPT_STATS_INC(x) +#endif + +#if LWIP_STATS_DISPLAY && IP_NAPT_STATS +void stats_display_ip_napt(struct stats_ip_napt *napt); +#define IP_NAPT_STATS_DISPLAY() stats_display_ip_napt(&lwip_stats.ip_napt) +#else +#define IP_NAPT_STATS_DISPLAY() +#endif + /* Display of statistics */ #if LWIP_STATS_DISPLAY void stats_display(void); diff --git a/tools/sdk/esp32/include/lwip/port/esp32/include/lwipopts.h b/tools/sdk/esp32/include/lwip/port/esp32/include/lwipopts.h index bb0d371c6ee..bbae6d42412 100644 --- a/tools/sdk/esp32/include/lwip/port/esp32/include/lwipopts.h +++ b/tools/sdk/esp32/include/lwip/port/esp32/include/lwipopts.h @@ -254,6 +254,14 @@ */ #define ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +#define DHCP_DEFINE_CUSTOM_TIMEOUTS 1 +/* Since for embedded devices it's not that hard to miss a discover packet, so lower + * the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s. + */ + #define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \ + (uint16_t)(1 * 1000) : \ + (uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250)) + /* ------------------------------------ ---------- AUTOIP options ---------- @@ -359,6 +367,11 @@ */ #define TCP_MSL CONFIG_LWIP_TCP_MSL +/** + * TCP_FIN_WAIT_TIMEOUT: The maximum FIN segment lifetime in milliseconds + */ +#define TCP_FIN_WAIT_TIMEOUT CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT + /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ @@ -1021,9 +1034,25 @@ #ifdef CONFIG_LWIP_TIMERS_ONDEMAND #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 1 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 1 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* LWIP_IPV6_REASS */ #else #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 0 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 0 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* LWIP_IPV6_REASS */ #endif #define TCP_SND_BUF CONFIG_LWIP_TCP_SND_BUF_DEFAULT diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/asn1write.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/asn1write.h index 44afae0e560..5da7654bb40 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/asn1write.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/asn1write.h @@ -90,7 +90,7 @@ int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start, #if defined(MBEDTLS_BIGNUM_C) /** - * \brief Write a arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) + * \brief Write an arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) * in ASN.1 format. * * \note This function works backwards in data buffer. diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bignum.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bignum.h index c71a1d40227..95b9485acf1 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bignum.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bignum.h @@ -184,6 +184,20 @@ #endif /* !MBEDTLS_NO_UDBL_DIVISION */ #endif /* !MBEDTLS_HAVE_INT64 */ +/** \typedef mbedtls_mpi_uint + * \brief The type of machine digits in a bignum, called _limbs_. + * + * This is always an unsigned integer type with no padding bits. The size + * is platform-dependent. + */ + +/** \typedef mbedtls_mpi_sint + * \brief The signed type corresponding to #mbedtls_mpi_uint. + * + * This is always a signed integer type with no padding bits. The size + * is platform-dependent. + */ + #ifdef __cplusplus extern "C" { #endif @@ -193,9 +207,27 @@ extern "C" { */ typedef struct mbedtls_mpi { - int s; /*!< Sign: -1 if the mpi is negative, 1 otherwise */ - size_t n; /*!< total # of limbs */ - mbedtls_mpi_uint *p; /*!< pointer to limbs */ + /** Sign: -1 if the mpi is negative, 1 otherwise. + * + * The number 0 must be represented with `s = +1`. Although many library + * functions treat all-limbs-zero as equivalent to a valid representation + * of 0 regardless of the sign bit, there are exceptions, so bignum + * functions and external callers must always set \c s to +1 for the + * number zero. + * + * Note that this implies that calloc() or `... = {0}` does not create + * a valid MPI representation. You must call mbedtls_mpi_init(). + */ + int s; + + /** Total number of limbs in \c p. */ + size_t n; + + /** Pointer to limbs. + * + * This may be \c NULL if \c n is 0. + */ + mbedtls_mpi_uint *p; } mbedtls_mpi; @@ -282,7 +314,7 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * \param Y The MPI to be assigned from. This must point to an * initialized MPI. * \param assign The condition deciding whether to perform the - * assignment or not. Possible values: + * assignment or not. Must be either 0 or 1: * * \c 1: Perform the assignment `X = Y`. * * \c 0: Keep the original value of \p X. * @@ -293,6 +325,10 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p assign is neither 0 nor 1, the result of this function + * is indeterminate, and the resulting value in \p X might be + * neither its original value nor the value in \p Y. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. @@ -305,24 +341,28 @@ int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned * * \param X The first MPI. This must be initialized. * \param Y The second MPI. This must be initialized. - * \param assign The condition deciding whether to perform - * the swap or not. Possible values: + * \param swap The condition deciding whether to perform + * the swap or not. Must be either 0 or 1: * * \c 1: Swap the values of \p X and \p Y. * * \c 0: Keep the original values of \p X and \p Y. * * \note This function is equivalent to - * if( assign ) mbedtls_mpi_swap( X, Y ); + * if( swap ) mbedtls_mpi_swap( X, Y ); * except that it avoids leaking any information about whether - * the assignment was done or not (the above code may leak + * the swap was done or not (the above code may leak * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p swap is neither 0 nor 1, the result of this function + * is indeterminate, and both \p X and \p Y might end up with + * values different to either of the original ones. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. * */ -int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign ); +int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char swap ); /** * \brief Store integer value in MPI. @@ -755,11 +795,11 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A or B. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. - * \param A The dividend. This must point to an initialized MPi. + * remainder is not needed. This must not alias A or B. + * \param A The dividend. This must point to an initialized MPI. * \param B The divisor. This must point to an initialized MPI. * * \return \c 0 if successful. @@ -776,10 +816,10 @@ int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. + * remainder is not needed. This must not alias A. * \param A The dividend. This must point to an initialized MPi. * \param b The divisor. * @@ -834,6 +874,7 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, * \brief Perform a sliding-window exponentiation: X = A^E mod N * * \param X The destination MPI. This must point to an initialized MPI. + * This must not alias E or N. * \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. diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h index 31137cd4c23..a3fc3638150 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h @@ -94,13 +94,29 @@ #if defined(__GNUC__) && \ ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) +/* + * GCC < 5.0 treated the x86 ebx (which is used for the GOT) as a + * fixed reserved register when building as PIC, leading to errors + * like: bn_mul.h:46:13: error: PIC register clobbered by 'ebx' in 'asm' + * + * This is fixed by an improved register allocator in GCC 5+. From the + * release notes: + * Register allocation improvements: Reuse of the PIC hard register, + * instead of using a fixed register, was implemented on x86/x86-64 + * targets. This improves generated PIC code performance as more hard + * registers can be used. + */ +#if defined(__GNUC__) && __GNUC__ < 5 && defined(__PIC__) +#define MULADDC_CANNOT_USE_EBX +#endif + /* * Disable use of the i386 assembly code below if option -O0, to disable all * compiler optimisations, is passed, detected with __OPTIMIZE__ * This is done as the number of registers used in the assembly code doesn't * work with the -O0 option. */ -#if defined(__i386__) && defined(__OPTIMIZE__) +#if defined(__i386__) && defined(__OPTIMIZE__) && !defined(MULADDC_CANNOT_USE_EBX) #define MULADDC_INIT \ asm( \ @@ -563,10 +579,20 @@ "andi r7, r6, 0xffff \n\t" \ "bsrli r6, r6, 16 \n\t" -#define MULADDC_CORE \ +#if(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#define MULADDC_LHUI \ + "lhui r9, r3, 0 \n\t" \ + "addi r3, r3, 2 \n\t" \ + "lhui r8, r3, 0 \n\t" +#else +#define MULADDC_LHUI \ "lhui r8, r3, 0 \n\t" \ "addi r3, r3, 2 \n\t" \ - "lhui r9, r3, 0 \n\t" \ + "lhui r9, r3, 0 \n\t" +#endif + +#define MULADDC_CORE \ + MULADDC_LHUI \ "addi r3, r3, 2 \n\t" \ "mul r10, r9, r6 \n\t" \ "mul r11, r8, r7 \n\t" \ diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/check_config.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/check_config.h index be5c548e561..7ae1ff94db9 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/check_config.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/check_config.h @@ -525,6 +525,20 @@ #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously" #endif +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_ALT defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) &&\ + ( defined(MBEDTLS_PLATFORM_STD_VSNPRINTF) ||\ + defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) ) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_VSNPRINTF/MBEDTLS_PLATFORM_VSNPRINTF_ALT cannot be defined simultaneously" +#endif + #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\ !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites" @@ -650,10 +664,9 @@ MBEDTLS_ECDSA_C requires MBEDTLS_PK_WRITE_C to be defined." #endif -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PKCS1_V15) && \ - !defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_PSA_CRYPTO_C) -#error "MBEDTLS_PSA_CRYPTO_C, MBEDTLS_RSA_C and MBEDTLS_PKCS1_V15 defined, \ - but not all prerequisites" +#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_RSA_C) && \ + !( defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_PK_WRITE_C) ) +#error "MBEDTLS_PSA_CRYPTO_C with MBEDTLS_RSA_C requires MBEDTLS_PK_PARSE_C and MBEDTLS_PK_WRITE_C" #endif #if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ @@ -812,6 +825,11 @@ #error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_TICKET_C) && \ + !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" +#endif + #if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) && \ !defined(MBEDTLS_SSL_PROTO_SSL3) && !defined(MBEDTLS_SSL_PROTO_TLS1) #error "MBEDTLS_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites" @@ -926,6 +944,10 @@ #error "MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) && !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites" +#endif + /* * Avoid warning from -pedantic. This is a convenient place for this * workaround since this is included by every single file before the diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config.h index 1cd6eb66348..61db79362f7 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config.h @@ -1329,7 +1329,7 @@ * Include backtrace information with each allocated block. * * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * GLIBC-compatible backtrace() an backtrace_symbols() support + * GLIBC-compatible backtrace() and backtrace_symbols() support * * Uncomment this macro to include backtrace information */ @@ -1620,6 +1620,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #define MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -2425,7 +2427,7 @@ * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * * \warning ARC4 is considered a weak cipher and its use constitutes a - * security risk. If possible, we recommend avoidng dependencies on + * security risk. If possible, we recommend avoiding dependencies on * it, and considering stronger ciphers instead. * */ @@ -3030,7 +3032,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/net_sockets.c * @@ -3400,7 +3402,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #define MBEDTLS_SSL_TICKET_C @@ -3456,7 +3459,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * @@ -3488,7 +3491,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config_psa.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config_psa.h index 1bf750ad5ee..d27fb54b033 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config_psa.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/config_psa.h @@ -7,7 +7,7 @@ * those definitions to define symbols used in the library code. * * Users and integrators should not edit this file, please edit - * include/mbedtls/config.h for MBETLS_XXX settings or + * include/mbedtls/config.h for MBEDTLS_XXX settings or * include/psa/crypto_config.h for PSA_WANT_XXX settings. */ /* @@ -446,6 +446,8 @@ extern "C" { #if !defined(MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305) #if defined(PSA_WANT_KEY_TYPE_CHACHA20) #define MBEDTLS_CHACHAPOLY_C +#define MBEDTLS_CHACHA20_C +#define MBEDTLS_POLY1305_C #define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1 #endif /* PSA_WANT_KEY_TYPE_CHACHA20 */ #endif /* !MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 */ diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h index 264a638bb52..118f7cedb1e 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h @@ -309,10 +309,8 @@ int mbedtls_ecdsa_sign_det_ext( mbedtls_ecp_group *grp, mbedtls_mpi *r, * This must be initialized. * * \return \c 0 on success. - * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the signature - * is invalid. * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX - * error code on failure for any other reason. + * error code on failure. */ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp, const unsigned char *buf, size_t blen, diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/md.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/md.h index 84fafd2ac77..9cea40a89c6 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/md.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/md.h @@ -215,7 +215,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ); /** - * \brief This function clones the state of an message-digest + * \brief This function clones the state of a message-digest * context. * * \note You must call mbedtls_md_setup() on \c dst before calling diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/platform.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/platform.h index 06dd192eab9..eaf5122bec7 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/platform.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/platform.h @@ -11,6 +11,13 @@ * implementations of these functions, or implementations specific to * their platform, which can be statically linked to the library or * dynamically configured at runtime. + * + * When all compilation options related to platform abstraction are + * disabled, this header just defines `mbedtls_xxx` function names + * as aliases to the standard `xxx` function. + * + * Most modules in the library and example programs are expected to + * include this header. */ /* * Copyright The Mbed TLS Contributors diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h index 63270d12394..f890aefaeec 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h @@ -74,7 +74,7 @@ void mbedtls_ripemd160_init( mbedtls_ripemd160_context *ctx ); void mbedtls_ripemd160_free( mbedtls_ripemd160_context *ctx ); /** - * \brief Clone (the state of) an RIPEMD-160 context + * \brief Clone (the state of) a RIPEMD-160 context * * \param dst The destination context * \param src The context to be cloned diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/rsa.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/rsa.h index 062df73aa06..8559f67bb97 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/rsa.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/rsa.h @@ -491,7 +491,7 @@ int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx ); * the current function does not have access to them, * and therefore cannot check them. See mbedtls_rsa_complete(). * If you want to check the consistency of the entire - * content of an PKCS1-encoded RSA private key, for example, you + * content of a PKCS1-encoded RSA private key, for example, you * should use mbedtls_rsa_validate_params() before setting * up the RSA context. * Additionally, if the implementation performs empirical checks, diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl.h index 5064ec56891..aecac93f334 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl.h @@ -624,7 +624,7 @@ typedef int mbedtls_ssl_recv_t( void *ctx, * \param ctx Context for the receive callback (typically a file descriptor) * \param buf Buffer to write the received data to * \param len Length of the receive buffer - * \param timeout Maximum nomber of millisecondes to wait for data + * \param timeout Maximum number of milliseconds to wait for data * 0 means no timeout (potentially waiting forever) * * \return The callback must return the number of bytes received, @@ -652,7 +652,7 @@ typedef int mbedtls_ssl_recv_timeout_t( void *ctx, * for the associated \c mbedtls_ssl_get_timer_t callback to * return correct information. * - * \note If using a event-driven style of programming, an event must + * \note If using an event-driven style of programming, an event must * be generated when the final delay is passed. The event must * cause a call to \c mbedtls_ssl_handshake() with the proper * SSL context to be scheduled. Care must be taken to ensure @@ -2000,7 +2000,7 @@ int mbedtls_ssl_check_record( mbedtls_ssl_context const *ssl, * here, except if using an event-driven style. * * \note See also the "DTLS tutorial" article in our knowledge base. - * https://tls.mbed.org/kb/how-to/dtls-tutorial + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/dtls-tutorial */ void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, void *p_timer, diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h index 46ade67b9c4..77ad755477a 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h @@ -782,7 +782,7 @@ struct mbedtls_ssl_transform #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) uint8_t in_cid_len; uint8_t out_cid_len; - unsigned char in_cid [ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; + unsigned char in_cid [ MBEDTLS_SSL_CID_IN_LEN_MAX ]; unsigned char out_cid[ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/version.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/version.h index 44adcbfe037..b3b441d46b6 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/version.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/mbedtls/version.h @@ -38,16 +38,16 @@ */ #define MBEDTLS_VERSION_MAJOR 2 #define MBEDTLS_VERSION_MINOR 28 -#define MBEDTLS_VERSION_PATCH 1 +#define MBEDTLS_VERSION_PATCH 2 /** * The single version number has the following structure: * MMNNPP00 * Major version | Minor version | Patch version */ -#define MBEDTLS_VERSION_NUMBER 0x021C0100 -#define MBEDTLS_VERSION_STRING "2.28.1" -#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.1" +#define MBEDTLS_VERSION_NUMBER 0x021C0200 +#define MBEDTLS_VERSION_STRING "2.28.2" +#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.2" #if defined(MBEDTLS_VERSION_C) diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto.h index d6d3e4f559f..faa3b9e3fb0 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto.h @@ -551,7 +551,7 @@ psa_status_t psa_copy_key(mbedtls_svc_key_id_t source_key, * \retval #PSA_ERROR_INVALID_HANDLE * \p key is not a valid identifier nor \c 0. * \retval #PSA_ERROR_COMMUNICATION_FAILURE - * There was an failure in communication with the cryptoprocessor. + * There was a failure in communication with the cryptoprocessor. * The key material may still be present in the cryptoprocessor. * \retval #PSA_ERROR_DATA_INVALID * This error is typically a result of either storage corruption on a diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h index a875b237041..711c43df785 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h @@ -43,6 +43,12 @@ #define MBEDTLS_PSA_BUILTIN_MAC #endif +#if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305) +#define MBEDTLS_PSA_BUILTIN_AEAD 1 +#endif + #if defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC) || defined(PSA_CRYPTO_DRIVER_TEST) typedef struct { diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_compat.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_compat.h index 09ac488398f..0d184042e34 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_compat.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_compat.h @@ -44,7 +44,7 @@ typedef mbedtls_svc_key_id_t psa_key_handle_t; #define PSA_KEY_HANDLE_INIT MBEDTLS_SVC_KEY_ID_INIT -/** Check whether an handle is null. +/** Check whether a handle is null. * * \param handle Handle * diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_extra.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_extra.h index a48a4bb5eb9..a34d5516458 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_extra.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_extra.h @@ -356,7 +356,7 @@ psa_status_t mbedtls_psa_inject_entropy(const uint8_t *seed, */ #define PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) -/** Whether a key type is an DSA key (pair or public-only). */ +/** Whether a key type is a DSA key (pair or public-only). */ #define PSA_KEY_TYPE_IS_DSA(type) \ (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_platform.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_platform.h index 66f46879305..d3f518e3276 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_platform.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_platform.h @@ -60,8 +60,8 @@ * * The function psa_its_identifier_of_slot() in psa_crypto_storage.c that * translates a key identifier to a key storage file name assumes that - * mbedtls_key_owner_id_t is an 32 bits integer. This function thus needs - * reworking if mbedtls_key_owner_id_t is not defined as a 32 bits integer + * mbedtls_key_owner_id_t is a 32-bit integer. This function thus needs + * reworking if mbedtls_key_owner_id_t is not defined as a 32-bit integer * here anymore. */ typedef int32_t mbedtls_key_owner_id_t; diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h index 1dc8f9b5c40..f8f8c92e883 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h @@ -225,7 +225,7 @@ typedef psa_status_t (*psa_drv_se_mac_finish_t)(void *op_context, * operation by comparing the resulting MAC against a provided value * * \param[in,out] op_context A hardware-specific structure for the previously - * started MAC operation to be fiinished + * started MAC operation to be finished * \param[in] p_mac The MAC value against which the resulting MAC * will be compared against * \param[in] mac_length The size in bytes of the value stored in `p_mac` @@ -336,7 +336,7 @@ typedef struct { /** Function that completes a MAC operation with a verify check */ psa_drv_se_mac_finish_verify_t p_finish_verify; - /** Function that aborts a previoustly started MAC operation + /** Function that aborts a previously started MAC operation */ psa_drv_se_mac_abort_t p_abort; /** Function that performs a MAC operation in one call @@ -394,7 +394,7 @@ typedef psa_status_t (*psa_drv_se_cipher_setup_t)(psa_drv_se_context_t *drv_cont psa_encrypt_or_decrypt_t direction); /** \brief A function that sets the initialization vector (if - * necessary) for an secure element cipher operation + * necessary) for a secure element cipher operation * * Rationale: The `psa_se_cipher_*` operation in the PSA Cryptographic API has * two IV functions: one to set the IV, and one to generate it internally. The @@ -745,7 +745,7 @@ typedef psa_status_t (*psa_drv_se_aead_encrypt_t)(psa_drv_se_context_t *drv_cont size_t ciphertext_size, size_t *p_ciphertext_length); -/** A function that peforms a secure element authenticated decryption operation +/** A function that performs a secure element authenticated decryption operation * * \param[in,out] drv_context The driver context structure. * \param[in] key_slot Slot containing the key to use @@ -1156,7 +1156,7 @@ typedef struct { * * Different key derivation algorithms require a different number of inputs. * Instead of having an API that takes as input variable length arrays, which - * can be problemmatic to manage on embedded platforms, the inputs are passed + * can be problematic to manage on embedded platforms, the inputs are passed * to the driver via a function, `psa_drv_se_key_derivation_collateral`, that * is called multiple times with different `collateral_id`s. Thus, for a key * derivation algorithm that required 3 parameter inputs, the flow would look @@ -1270,7 +1270,7 @@ typedef struct { psa_drv_se_key_derivation_collateral_t p_collateral; /** Function that performs a final key derivation step */ psa_drv_se_key_derivation_derive_t p_derive; - /** Function that perforsm a final key derivation or agreement and + /** Function that performs a final key derivation or agreement and * exports the key */ psa_drv_se_key_derivation_export_t p_export; } psa_drv_se_key_derivation_t; diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_sizes.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_sizes.h index 0d4532200e7..a0a52876bef 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_sizes.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_sizes.h @@ -716,7 +716,7 @@ (PSA_KEY_EXPORT_ASN1_INTEGER_MAX_SIZE(key_bits) + 11) /* Maximum size of the export encoding of an RSA key pair. - * Assumes thatthe public exponent is less than 2^32 and that the size + * Assumes that the public exponent is less than 2^32 and that the size * difference between the two primes is at most 1 bit. * * RSAPrivateKey ::= SEQUENCE { diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_types.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_types.h index 8f23021a45a..679cbc48e6a 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_types.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_types.h @@ -104,7 +104,7 @@ typedef uint8_t psa_ecc_family_t; * Values of this type are generally constructed by macros called * `PSA_DH_FAMILY_xxx`. * - * The group identifier is required to create an Diffie-Hellman key using the + * The group identifier is required to create a Diffie-Hellman key using the * PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY() * macros. * @@ -296,7 +296,7 @@ typedef psa_key_id_t mbedtls_svc_key_id_t; #else /* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */ /* Implementation-specific: The Mbed Cryptography library can be built as - * part of a multi-client service that exposes the PSA Cryptograpy API in each + * part of a multi-client service that exposes the PSA Cryptography API in each * client and encodes the client identity in the key identifier argument of * functions such as psa_open_key(). */ diff --git a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_values.h b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_values.h index 8b3a815ac19..a4b4927e9d0 100644 --- a/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_values.h +++ b/tools/sdk/esp32/include/mbedtls/mbedtls/include/psa/crypto_values.h @@ -1195,7 +1195,7 @@ */ #define PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x05100500) -/* In the encoding of a AEAD algorithm, the bits corresponding to +/* In the encoding of an AEAD algorithm, the bits corresponding to * PSA_ALG_AEAD_TAG_LENGTH_MASK encode the length of the AEAD tag. * The constants for default lengths follow this encoding. */ @@ -1330,9 +1330,11 @@ * This is the signature scheme defined by RFC 8017 * (PKCS#1: RSA Cryptography Specifications) under the name * RSASSA-PSS, with the message generation function MGF1, and with - * a salt length equal to the length of the hash. The specified - * hash algorithm is used to hash the input message, to create the - * salted hash, and for the mask generation. + * a salt length equal to the length of the hash, or the largest + * possible salt length for the algorithm and key size if that is + * smaller than the hash length. The specified hash algorithm is + * used to hash the input message, to create the salted hash, and + * for the mask generation. * * \param hash_alg A hash algorithm (\c PSA_ALG_XXX value such that * #PSA_ALG_IS_HASH(\p hash_alg) is true). 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 607d35ffc69..95bd65883c4 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 @@ -44,7 +44,12 @@ * The time does not need to be correct, only time differences are used, * by contrast with MBEDTLS_HAVE_TIME_DATE * - * Comment if your system does not support time functions + * Comment if your system does not support time functions. + * + * \note If MBEDTLS_TIMING_C is set - to enable the semi-portable timing + * interface - timing.c will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. */ #ifdef CONFIG_MBEDTLS_HAVE_TIME #define MBEDTLS_HAVE_TIME @@ -253,9 +258,8 @@ #define MBEDTLS_CIPHER_PADDING_ZEROS /** - * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES & MBEDTLS_ARC4_C + * \def MBEDTLS_ARC4_C * - * MBEDTLS_ARC4_C * Enable the ARCFOUR stream cipher. * * This module enables/disables the following ciphersuites @@ -270,7 +274,14 @@ * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * - * MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * \warning ARC4 is considered a weak cipher and its use constitutes a + * security risk. If possible, we recommend avoiding dependencies on + * it, and considering stronger ciphers instead. + * + * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * + * Remove RC4 ciphersuites by default in SSL / TLS. + * * This flag removes the ciphersuites based on RC4 from the default list as * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them @@ -941,6 +952,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #ifdef CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -976,7 +989,7 @@ * Enable support for RFC 7627: Session Hash and Extended Master Secret * Extension. * - * This was introduced as "the proper fix" to the Triple Handshake familiy of + * This was introduced as "the proper fix" to the Triple Handshake family of * attacks, but it is recommended to always use it (even if you disable * renegotiation), since it actually fixes a more fundamental issue in the * original SSL/TLS design, and has implications beyond Triple Handshake. @@ -1026,7 +1039,7 @@ * \note This option has no influence on the protection against the * triple handshake attack. Even if it is disabled, Mbed TLS will * still ensure that certificates do not change during renegotiation, - * for exaple by keeping a hash of the peer's certificate. + * for example by keeping a hash of the peer's certificate. * * Comment this macro to disable storing the peer's certificate * after the handshake. @@ -1209,7 +1222,7 @@ * unless you know for sure amplification cannot be a problem in the * environment in which your server operates. * - * \warning Disabling this can ba a security risk! (see above) + * \warning Disabling this can be a security risk! (see above) * * Requires: MBEDTLS_SSL_PROTO_DTLS * @@ -1944,7 +1957,7 @@ * * Requires: MBEDTLS_MD_C * - * Uncomment to enable the HMAC_DRBG random number geerator. + * Uncomment to enable the HMAC_DRBG random number generator. */ #define MBEDTLS_HMAC_DRBG_C @@ -1978,11 +1991,19 @@ /** * \def MBEDTLS_NET_C * - * Enable the TCP/IP networking routines. + * Enable the TCP and UDP over IPv6/IPv4 networking routines. * - * Module: library/net.c + * \note This module only works on POSIX/Unix (including Linux, BSD and OS X) + * and Windows. For other platforms, you'll want to disable it, and write your + * own networking callbacks to be passed to \c mbedtls_ssl_set_bio(). * - * This module provides TCP/IP networking routines. + * \note See also our Knowledge Base article about porting to a new + * environment: + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * + * Module: library/net_sockets.c + * + * This module provides networking routines. */ #ifdef MBEDTLS_NET_C #undef MBEDTLS_NET_C @@ -2070,7 +2091,7 @@ /** * \def MBEDTLS_PK_C * - * Enable the generic public (asymetric) key layer. + * Enable the generic public (asymmetric) key layer. * * Module: library/pk.c * Caller: library/ssl_tls.c @@ -2086,7 +2107,7 @@ /** * \def MBEDTLS_PK_PARSE_C * - * Enable the generic public (asymetric) key parser. + * Enable the generic public (asymmetric) key parser. * * Module: library/pkparse.c * Caller: library/mbedtls_x509_crt.c @@ -2101,7 +2122,7 @@ /** * \def MBEDTLS_PK_WRITE_C * - * Enable the generic public (asymetric) key writer. + * Enable the generic public (asymmetric) key writer. * * Module: library/pkwrite.c * Caller: library/x509write.c @@ -2290,7 +2311,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #ifdef CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS #define MBEDTLS_SSL_TICKET_C @@ -2366,9 +2388,13 @@ * your own implementation of the whole module by setting * \c MBEDTLS_TIMING_ALT in the current file. * + * \note The timing module will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. + * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c @@ -2680,7 +2706,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/dport_reg.h b/tools/sdk/esp32/include/soc/esp32/include/soc/dport_reg.h index 367c9e43e02..66820b0e05b 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/dport_reg.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/dport_reg.h @@ -1076,17 +1076,24 @@ #define DPORT_CORE_RST_EN_REG (DR_REG_DPORT_BASE + 0x0D0) /* DPORT_CORE_RST : R/W ;bitpos:[31:0] ;default: 32'h0 ; */ /*description: */ -#define DPORT_RW_BTLP_RST (BIT(10)) -#define DPORT_RW_BTMAC_RST (BIT(9)) -#define DPORT_MACPWR_RST (BIT(8)) -#define DPORT_EMAC_RST (BIT(7)) -#define DPORT_SDIO_HOST_RST (BIT(6)) -#define DPORT_SDIO_RST (BIT(5)) -#define DPORT_BTMAC_RST (BIT(4)) -#define DPORT_BT_RST (BIT(3)) -#define DPORT_MAC_RST (BIT(2)) -#define DPORT_FE_RST (BIT(1)) -#define DPORT_BB_RST (BIT(0)) +#define DPORT_WIFIBB_RST BIT(0) +#define DPORT_FE_RST BIT(1) +#define DPORT_WIFIMAC_RST BIT(2) +#define DPORT_BTBB_RST BIT(3) +#define DPORT_BTMAC_RST BIT(4) +#define DPORT_SDIO_RST BIT(5) +#define DPORT_SDIO_HOST_RST BIT(6) +#define DPORT_EMAC_RST BIT(7) +#define DPORT_MACPWR_RST BIT(8) +#define DPORT_RW_BTMAC_RST BIT(9) +#define DPORT_RW_BTLP_RST BIT(10) + +#define MODEM_RESET_FIELD_WHEN_PU (DPORT_WIFIBB_RST | \ + DPORT_FE_RST | \ + DPORT_WIFIMAC_RST | \ + DPORT_BTBB_RST | \ + DPORT_BTMAC_RST | \ + DPORT_RW_BTMAC_RST) #define DPORT_BT_LPCK_DIV_INT_REG (DR_REG_DPORT_BASE + 0x0D4) /* DPORT_BTEXTWAKEUP_REQ : R/W ;bitpos:[12] ;default: 1'b0 ; */ diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/efuse_reg.h b/tools/sdk/esp32/include/soc/esp32/include/soc/efuse_reg.h index 77e3b8db96d..78adc9693a2 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/efuse_reg.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/efuse_reg.h @@ -200,15 +200,12 @@ #define EFUSE_RD_FLASH_CRYPT_CONFIG_M ((EFUSE_RD_FLASH_CRYPT_CONFIG_V)<<(EFUSE_RD_FLASH_CRYPT_CONFIG_S)) #define EFUSE_RD_FLASH_CRYPT_CONFIG_V 0xF #define EFUSE_RD_FLASH_CRYPT_CONFIG_S 28 -/* EFUSE_RD_DIG_VOL_L6: RO; bitpos:[27:24]; */ -/*descritpion: This field stores the difference between the digital regulator voltage at level6 and 1.2 V. (RO) - BIT[27] is the sign bit, 0: + , 1: - - BIT[26:24] is the difference value, unit: 0.017V - volt_lv6 = BIT[27] ? 1.2 - BIT[26:24] * 0.017 : 1.2 + BIT[26:24] * 0.017 */ -#define EFUSE_RD_DIG_VOL_L6 0x0F -#define EFUSE_RD_DIG_VOL_L6_M ((EFUSE_RD_DIG_VOL_L6_V)<<(EFUSE_RD_DIG_VOL_L6_S)) -#define EFUSE_RD_DIG_VOL_L6_V 0x0F -#define EFUSE_RD_DIG_VOL_L6_S 24 +/* EFUSE_RD_WAFER_VERSION_MINOR: RO; bitpos:[25:24]; */ +/*descritpion: Wafer version minor*/ +#define EFUSE_RD_WAFER_VERSION_MINOR 0x00000003 +#define EFUSE_RD_WAFER_VERSION_MINOR_M ((EFUSE_RD_WAFER_VERSION_MINOR_V)<<(EFUSE_RD_WAFER_VERSION_MINOR_S)) +#define EFUSE_RD_WAFER_VERSION_MINOR_V 0x03 +#define EFUSE_RD_WAFER_VERSION_MINOR_S 24 /* EFUSE_RD_VOL_LEVEL_HP_INV: RO; bitpos:[23:22] */ /*description: This field stores the voltage level for CPU to run at 240 MHz, or for flash/PSRAM to run at 80 MHz. 0x0: level 7; 0x1: level 6; 0x2: level 5; 0x3: level 4. (RO)*/ @@ -216,12 +213,11 @@ #define EFUSE_RD_VOL_LEVEL_HP_INV_M ((EFUSE_RD_VOL_LEVEL_HP_INV_V)<<(EFUSE_RD_VOL_LEVEL_HP_INV_S)) #define EFUSE_RD_VOL_LEVEL_HP_INV_V 0x03 #define EFUSE_RD_VOL_LEVEL_HP_INV_S 22 -/* EFUSE_RD_INST_CONFIG : RO ;bitpos:[27:20] ;default: 8'b0 ; */ -/* Deprecated */ -#define EFUSE_RD_INST_CONFIG 0x000000FF /** Deprecated **/ -#define EFUSE_RD_INST_CONFIG_M ((EFUSE_RD_INST_CONFIG_V)<<(EFUSE_RD_INST_CONFIG_S)) /** Deprecated **/ -#define EFUSE_RD_INST_CONFIG_V 0xFF /** Deprecated **/ -#define EFUSE_RD_INST_CONFIG_S 20 /** Deprecated **/ +/* EFUSE_RD_CHIP_VER_REV2 : RO ;bitpos:[20] ;default: 8'b0 ; */ +#define EFUSE_RD_CHIP_VER_REV2 (BIT(20)) +#define EFUSE_RD_CHIP_VER_REV2_M ((EFUSE_RD_CHIP_VER_REV2_V)<<(EFUSE_RD_CHIP_VER_REV2_S)) +#define EFUSE_RD_CHIP_VER_REV2_V 0x1 +#define EFUSE_RD_CHIP_VER_REV2_S 20 /* EFUSE_RD_SPI_PAD_CONFIG_CS0 : RO ;bitpos:[19:15] ;default: 5'b0 ; */ /*description: read for SPI_pad_config_cs0*/ #define EFUSE_RD_SPI_PAD_CONFIG_CS0 0x0000001F @@ -1054,6 +1050,9 @@ #define EFUSE_CLK_SEL0_V 0xFF #define EFUSE_CLK_SEL0_S 0 +#define EFUSE_WRITE_OP_CODE 0x5a5a +#define EFUSE_READ_OP_CODE 0x5aa5 + #define EFUSE_CONF_REG (DR_REG_EFUSE_BASE + 0x0fc) /* EFUSE_FORCE_NO_WR_RD_DIS : R/W ;bitpos:[16] ;default: 1'h1 ; */ /*description: */ diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/efuse_struct.h b/tools/sdk/esp32/include/soc/esp32/include/soc/efuse_struct.h new file mode 100644 index 00000000000..d9b52d49416 --- /dev/null +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/efuse_struct.h @@ -0,0 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/rtc.h b/tools/sdk/esp32/include/soc/esp32/include/soc/rtc.h index 033a877a07e..3a5ad9de5e2 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/rtc.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/rtc.h @@ -514,6 +514,7 @@ typedef struct rtc_sleep_config_s { uint32_t lslp_meminf_pd : 1; //!< remove all peripheral force power up flags uint32_t vddsdio_pd_en : 1; //!< power down VDDSDIO regulator uint32_t xtal_fpu : 1; //!< keep main XTAL powered up in sleep + uint32_t dbg_atten_slp : 2; //!< voltage parameter } rtc_sleep_config_t; #define RTC_SLEEP_PD_DIG BIT(0) //!< Deep sleep (power down digital domain) @@ -541,12 +542,13 @@ typedef struct rtc_sleep_config_s { void rtc_sleep_get_default_config(uint32_t sleep_flags, rtc_sleep_config_t *out_config); /* Various delays to be programmed into power control state machines */ -#define RTC_CNTL_XTL_BUF_WAIT_SLP_US (500) +#define RTC_CNTL_XTL_BUF_WAIT_SLP_US (1000) #define RTC_CNTL_PLL_BUF_WAIT_SLP_CYCLES (1) #define RTC_CNTL_CK8M_WAIT_SLP_CYCLES (4) #define RTC_CNTL_WAKEUP_DELAY_CYCLES (7) #define RTC_CNTL_OTHER_BLOCKS_POWERUP_CYCLES (1) #define RTC_CNTL_OTHER_BLOCKS_WAIT_CYCLES (1) +#define RTC_CNTL_MIN_SLP_VAL_MIN (128) #define RTC_CNTL_CK8M_WAIT_DEFAULT 20 #define RTC_CK8M_ENABLE_WAIT_DEFAULT 5 diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/rtc_cntl_reg.h b/tools/sdk/esp32/include/soc/esp32/include/soc/rtc_cntl_reg.h index 7e53e96993a..5afc1aef27a 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/rtc_cntl_reg.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/rtc_cntl_reg.h @@ -432,7 +432,6 @@ #define RTC_CNTL_MIN_SLP_VAL_M ((RTC_CNTL_MIN_SLP_VAL_V)<<(RTC_CNTL_MIN_SLP_VAL_S)) #define RTC_CNTL_MIN_SLP_VAL_V 0xFF #define RTC_CNTL_MIN_SLP_VAL_S 8 -#define RTC_CNTL_MIN_SLP_VAL_MIN 2 /* RTC_CNTL_ULP_CP_SUBTIMER_PREDIV : R/W ;bitpos:[7:0] ;default: 8'd1 ; */ /*description: */ #define RTC_CNTL_ULP_CP_SUBTIMER_PREDIV 0x000000FF @@ -1071,6 +1070,7 @@ #define RTC_CNTL_DBG_ATTEN_V 0x3 #define RTC_CNTL_DBG_ATTEN_S 24 #define RTC_CNTL_DBG_ATTEN_DEFAULT 3 +#define RTC_CNTL_DBG_ATTEN_NODROP 0 #define RTC_CNTL_REG (DR_REG_RTCCNTL_BASE + 0x7c) /* RTC_CNTL_FORCE_PU : R/W ;bitpos:[31] ;default: 1'd1 ; */ /*description: RTC_REG force power up*/ diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/sdmmc_struct.h b/tools/sdk/esp32/include/soc/esp32/include/soc/sdmmc_struct.h index 814a255249e..ea5ef747133 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/sdmmc_struct.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/sdmmc_struct.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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _SOC_SDMMC_STRUCT_H_ #define _SOC_SDMMC_STRUCT_H_ @@ -48,7 +40,9 @@ typedef struct sdmmc_desc_s { #define SDMMC_DMA_MAX_BUF_LEN 4096 +#ifndef __cplusplus _Static_assert(sizeof(sdmmc_desc_t) == 16, "invalid size of sdmmc_desc_t structure"); +#endif typedef struct sdmmc_hw_cmd_s { @@ -77,7 +71,9 @@ typedef struct sdmmc_hw_cmd_s { uint32_t start_command: 1; ///< Start command; once command is sent to the card, bit is cleared. } sdmmc_hw_cmd_t; ///< command format used in cmd register; this structure is defined to make it easier to build command values +#ifndef __cplusplus _Static_assert(sizeof(sdmmc_hw_cmd_t) == 4, "invalid size of sdmmc_cmd_t structure"); +#endif typedef volatile struct sdmmc_dev_s { @@ -393,7 +389,9 @@ typedef volatile struct sdmmc_dev_s { } sdmmc_dev_t; extern sdmmc_dev_t SDMMC; +#ifndef __cplusplus _Static_assert(sizeof(sdmmc_dev_t) == 0x804, "invalid size of sdmmc_dev_t structure"); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/soc_caps.h b/tools/sdk/esp32/include/soc/esp32/include/soc/soc_caps.h index 67007c4d70b..f69caf88803 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/soc_caps.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/soc_caps.h @@ -131,8 +131,8 @@ // GPIO >= 34 are input only #define SOC_GPIO_VALID_OUTPUT_GPIO_MASK (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | BIT34 | BIT35 | BIT36 | BIT37 | BIT38 | BIT39)) -// Support to configure slept status -#define SOC_GPIO_SUPPORT_SLP_SWITCH (1) +// digital I/O pad powered by VDD3P3_CPU or VDD_SPI(GPIO_NUM: 1, 3, 5, 6, 7, 8, 9, 10, 11, 16, 17, 18, 19, 21, 22, 23) +#define SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK 0xEF0FEAULL /*-------------------------- I2C CAPS ----------------------------------------*/ // ESP32 have 2 I2C. @@ -320,6 +320,3 @@ */ #define SOC_SDMMC_USE_IOMUX 1 #define SOC_SDMMC_NUM_SLOTS 2 - -/*------------------------------ BLE --------------------------------------------*/ -#define SOC_BLE_DONT_UPDATE_OWN_RPA (1) diff --git a/tools/sdk/esp32/include/soc/esp32/include/soc/twai_struct.h b/tools/sdk/esp32/include/soc/esp32/include/soc/twai_struct.h index e4349d33edd..3f5d9a43c22 100644 --- a/tools/sdk/esp32/include/soc/esp32/include/soc/twai_struct.h +++ b/tools/sdk/esp32/include/soc/esp32/include/soc/twai_struct.h @@ -206,7 +206,9 @@ typedef volatile struct twai_dev_s { } clock_divider_reg; /* Address 0x007C */ } twai_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(twai_dev_t) == 128, "TWAI registers should be 32 * 4 bytes"); +#endif extern twai_dev_t TWAI; diff --git a/tools/sdk/esp32/include/soc/include/soc/efuse_periph.h b/tools/sdk/esp32/include/soc/include/soc/efuse_periph.h index 76a118e3b68..a7fc65042c6 100644 --- a/tools/sdk/esp32/include/soc/include/soc/efuse_periph.h +++ b/tools/sdk/esp32/include/soc/include/soc/efuse_periph.h @@ -14,3 +14,4 @@ #pragma once #include "soc/efuse_reg.h" +#include "soc/efuse_struct.h" diff --git a/tools/sdk/esp32/include/spi_flash/include/esp_flash.h b/tools/sdk/esp32/include/spi_flash/include/esp_flash.h index c5adb279dcd..3529898bce6 100644 --- a/tools/sdk/esp32/include/spi_flash/include/esp_flash.h +++ b/tools/sdk/esp32/include/spi_flash/include/esp_flash.h @@ -103,7 +103,8 @@ struct esp_flash_t { uint32_t size; ///< Size of SPI flash in bytes. If 0, size will be detected during initialisation. uint32_t chip_id; ///< Detected chip id. uint32_t busy :1; ///< This flag is used to verify chip's status. - uint32_t reserved_flags :31; ///< reserved. + uint32_t hpm_dummy_ena :1; ///< This flag is used to verify whether flash works under HPM status. + uint32_t reserved_flags :30; ///< reserved. }; diff --git a/tools/sdk/esp32/include/spi_flash/include/esp_private/spi_flash_os.h b/tools/sdk/esp32/include/spi_flash/include/esp_private/spi_flash_os.h index 996606dbcee..f2a89112eb6 100644 --- a/tools/sdk/esp32/include/spi_flash/include/esp_private/spi_flash_os.h +++ b/tools/sdk/esp32/include/spi_flash/include/esp_private/spi_flash_os.h @@ -35,6 +35,7 @@ #include "esp_flash.h" #include "hal/spi_flash_hal.h" #include "soc/soc_caps.h" +#include "spi_flash_override.h" #ifdef __cplusplus extern "C" { @@ -138,6 +139,28 @@ bool spi_timing_is_tuned(void); */ void spi_flash_set_vendor_required_regs(void); +/** + * @brief Enable SPI flash high performance mode. + * + * @return ESP_OK if success. + */ +esp_err_t spi_flash_enable_high_performance_mode(void); + +/** + * @brief Get the flash dummy through this function + * This can be used when one flash has several dummy configurations to enable the high performance mode. + * @note Don't forget to subtract one when assign to the register of mspi e.g. if the value you get is 4, (4-1=3) should be assigned to the register. + * + * @return Pointer to spi_flash_hpm_dummy_conf_t. + */ +const spi_flash_hpm_dummy_conf_t *spi_flash_hpm_get_dummy(void); + +/** + * @brief Used to judge whether flash works under HPM mode with dummy adjustment. + * + * @return true Yes, and work under HPM with adjusting dummy. Otherwise, false. + */ +bool spi_flash_hpm_dummy_adjust(void); #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/spi_flash/include/spi_flash/spi_flash_defs.h b/tools/sdk/esp32/include/spi_flash/include/spi_flash/spi_flash_defs.h index 1ff0bfdea5c..b248b24dcde 100644 --- a/tools/sdk/esp32/include/spi_flash/include/spi_flash/spi_flash_defs.h +++ b/tools/sdk/esp32/include/spi_flash/include/spi_flash/spi_flash_defs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2019 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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once @@ -52,6 +44,7 @@ #define CMD_PROGRAM_PAGE_4B 0x12 #define CMD_SUSPEND 0x75 #define CMD_RESUME 0x7A +#define CMD_HPMEN 0xA3 /* Enable High Performance mode on flash */ #define CMD_RST_EN 0x66 #define CMD_RST_DEV 0x99 @@ -72,3 +65,5 @@ #define SPI_FLASH_OPISTR_DUMMY_BITLEN 20 #define SPI_FLASH_OPIDTR_ADDR_BITLEN 32 #define SPI_FLASH_OPIDTR_DUMMY_BITLEN 40 +#define SPI_FLASH_QIO_HPM_DUMMY_BITLEN 10 +#define SPI_FLASH_DIO_HPM_DUMMY_BITLEN 8 diff --git a/tools/sdk/esp32/include/spi_flash/include/spi_flash_override.h b/tools/sdk/esp32/include/spi_flash/include/spi_flash_override.h new file mode 100644 index 00000000000..7f01576deed --- /dev/null +++ b/tools/sdk/esp32/include/spi_flash/include/spi_flash_override.h @@ -0,0 +1,62 @@ +/* + * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "sdkconfig.h" +#include "esp_err.h" + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Structure for flash dummy bits. + * For some flash chips, dummy bits are configurable under different conditions. + */ +typedef struct { + uint8_t dio_dummy; + uint8_t dout_dummy; + uint8_t qio_dummy; + uint8_t qout_dummy; + uint8_t fastrd_dummy; +} spi_flash_hpm_dummy_conf_t; + +typedef enum { + SPI_FLASH_HPM_CMD_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by command. + SPI_FLASH_HPM_DUMMY_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by adjusting dummy. + SPI_FLASH_HPM_WRITE_SR_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by writing status register. + SPI_FLASH_HPM_UNNEEDED, // Means that flash doesn't need to enter the high performance mode. + SPI_FLASH_HPM_BEYOND_LIMIT, // Means that flash has no capability to meet that condition. +} spi_flash_requirement_t; + +typedef void (*spi_flash_hpm_enable_fn_t)(void); +typedef esp_err_t (*spi_flash_hpf_check_fn_t)(void); +typedef void (*spi_flash_get_chip_dummy_fn_t)(spi_flash_hpm_dummy_conf_t *dummy_conf); +typedef esp_err_t (*spi_flash_hpm_probe_fn_t)(uint32_t flash_id); +typedef spi_flash_requirement_t (*spi_flash_hpm_chip_requirement_check_t)(uint32_t flash_id, uint32_t freq_mhz, int voltage_mv, int temperature); + +typedef struct __attribute__((packed)) +{ + const char *method; /* Flash HPM method */ + spi_flash_hpm_probe_fn_t probe; + spi_flash_hpm_chip_requirement_check_t chip_hpm_requirement_check; + spi_flash_hpm_enable_fn_t flash_hpm_enable; + spi_flash_hpf_check_fn_t flash_hpf_check; + spi_flash_get_chip_dummy_fn_t flash_get_dummy; +} spi_flash_hpm_info_t; + +/** + * Array of known flash chips and method to enable flash high performance mode. + * + * Users can override this array. + */ +extern const spi_flash_hpm_info_t __attribute__((weak)) spi_flash_hpm_enable_list[]; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32/include/spiffs/include/spiffs_config.h b/tools/sdk/esp32/include/spiffs/include/spiffs_config.h index 5cc3d78049c..5e915039215 100644 --- a/tools/sdk/esp32/include/spiffs/include/spiffs_config.h +++ b/tools/sdk/esp32/include/spiffs/include/spiffs_config.h @@ -20,6 +20,7 @@ #include #include #include +#include "esp_assert.h" // compile time switches #define SPIFFS_TAG "SPIFFS" @@ -161,7 +162,7 @@ extern void spiffs_api_unlock(struct spiffs_t *fs); // spiffs_object_ix_header fields + at least some LUT entries) #define SPIFFS_OBJ_META_LEN (CONFIG_SPIFFS_META_LENGTH) #define SPIFFS_PAGE_EXTRA_SIZE (64) -_Static_assert(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE +ESP_STATIC_ASSERT(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE <= CONFIG_SPIFFS_PAGE_SIZE, "SPIFFS_OBJ_META_LEN or SPIFFS_OBJ_NAME_LEN too long"); // Size of buffer allocated on stack used when copying data. diff --git a/tools/sdk/esp32/include/ulp/include/esp32/ulp.h b/tools/sdk/esp32/include/ulp/include/esp32/ulp.h index 583c77c383c..bd104013dc8 100644 --- a/tools/sdk/esp32/include/ulp/include/esp32/ulp.h +++ b/tools/sdk/esp32/include/ulp/include/esp32/ulp.h @@ -16,6 +16,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -289,7 +290,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h b/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h index 184c7c2a203..e55c162a64a 100644 --- a/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h +++ b/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h @@ -8,6 +8,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -265,7 +266,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32/include/ulp/include/esp32s3/ulp.h b/tools/sdk/esp32/include/ulp/include/esp32s3/ulp.h index 8adbb2ebcfe..e1e50880740 100644 --- a/tools/sdk/esp32/include/ulp/include/esp32s3/ulp.h +++ b/tools/sdk/esp32/include/ulp/include/esp32s3/ulp.h @@ -8,6 +8,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -265,7 +266,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32/include/xtensa/include/xt_instr_macros.h b/tools/sdk/esp32/include/xtensa/include/xt_instr_macros.h index efcdbd4a78c..e3a11990208 100644 --- a/tools/sdk/esp32/include/xtensa/include/xt_instr_macros.h +++ b/tools/sdk/esp32/include/xtensa/include/xt_instr_macros.h @@ -84,11 +84,11 @@ do { \ uint32_t sp = (uint32_t)new_sp - SAVE_AREA_OFFSET; \ *(uint32_t*)(sp - BASE_AREA_SP_OFFSET) = (uint32_t)new_sp; \ + const uint32_t mask = ~(PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK); \ uint32_t tmp1 = 0, tmp2 = 0; \ asm volatile ( \ "rsr.ps %1 \n"\ - "movi %2, ~" XTSTR( PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK ) " \n"\ - "and %1, %1, %2 \n"\ + "and %1, %1, %3 \n"\ "wsr.ps %1 \n"\ "rsync \n"\ " \n"\ @@ -99,6 +99,7 @@ "wsr.windowstart %1 \n"\ "rsync \n"\ " \n"\ + "movi a0, 0\n" \ "mov sp, %0 \n"\ "rsr.ps %1 \n"\ " \n"\ @@ -107,6 +108,6 @@ "or %1, %1, %2 \n"\ "wsr.ps %1 \n"\ "rsync \n"\ - : "+r"(sp), "+r"(tmp1), "+r"(tmp2)); \ + : "+r"(sp), "+r"(tmp1), "+r"(tmp2) : "r"(mask)); \ } while (0); #endif // __ASSEMBLER__ diff --git a/tools/sdk/esp32/ld/libbtdm_app.a b/tools/sdk/esp32/ld/libbtdm_app.a index 0f3296c05a2..bd270b7e91e 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/libesp_tts_chinese.a b/tools/sdk/esp32/ld/libesp_tts_chinese.a index 22334d195de..3b0684950ae 100644 Binary files a/tools/sdk/esp32/ld/libesp_tts_chinese.a and b/tools/sdk/esp32/ld/libesp_tts_chinese.a differ diff --git a/tools/sdk/esp32/ld/libvoice_set_xiaole.a b/tools/sdk/esp32/ld/libvoice_set_xiaole.a index 06862f813ec..e376720e31e 100644 Binary files a/tools/sdk/esp32/ld/libvoice_set_xiaole.a and b/tools/sdk/esp32/ld/libvoice_set_xiaole.a differ diff --git a/tools/sdk/esp32/ld/sections.ld b/tools/sdk/esp32/ld/sections.ld index a22203c7d9d..0cc0f2a1779 100644 --- a/tools/sdk/esp32/ld/sections.ld +++ b/tools/sdk/esp32/ld/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -335,9 +335,44 @@ SECTIONS *libhal.a:spi_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -387,10 +422,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -533,13 +570,11 @@ SECTIONS *libhal.a:spi_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -602,22 +637,40 @@ SECTIONS . = ALIGN (8); _bss_start = ABSOLUTE(.); - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); . = ALIGN (8); _bss_end = ABSOLUTE(.); @@ -643,8 +696,8 @@ SECTIONS { _flash_rodata_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata.*) *(.rodata_wlog_error .rodata_wlog_error.*) + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libc.a:creat.* *libc.a:isatty.* *libc.a:lib_a-abs.* *libc.a:lib_a-asctime.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-atoi.* *libc.a:lib_a-atol.* *libc.a:lib_a-bzero.* *libc.a:lib_a-close.* *libc.a:lib_a-creat.* *libc.a:lib_a-ctime.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-div.* *libc.a:lib_a-environ.* *libc.a:lib_a-envlock.* *libc.a:lib_a-fclose.* *libc.a:lib_a-fflush.* *libc.a:lib_a-findfp.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-impure.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-isblank.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-islower.* *libc.a:lib_a-isprint.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isupper.* *libc.a:lib_a-itoa.* *libc.a:lib_a-labs.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-memchr.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-memmove.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-memset.* *libc.a:lib_a-mktime.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-open.* *libc.a:lib_a-quorem.* *libc.a:lib_a-raise.* *libc.a:lib_a-rand.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-read.* *libc.a:lib_a-refill.* *libc.a:lib_a-rshift.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-sccl.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-srand.* *libc.a:lib_a-stdio.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-strcspn.* *libc.a:lib_a-strdup.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strftime.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-strlen.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-strncat.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-strptime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-strspn.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strtol.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strupr.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-sysread.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-system.* *libc.a:lib_a-systimes.* *libc.a:lib_a-syswrite.* *libc.a:lib_a-time.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-toascii.* *libc.a:lib_a-tolower.* *libc.a:lib_a-toupper.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-tzset.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-utoa.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-wsetup.* *libc.a:lock.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ @@ -730,6 +783,9 @@ SECTIONS *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port.*(.literal.esp_startup_start_app_other_cores .text.esp_startup_start_app_other_cores) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) diff --git a/tools/sdk/esp32/lib/libapp_trace.a b/tools/sdk/esp32/lib/libapp_trace.a index b4ccb0d5992..40e8e1b8ada 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 f8dff43e133..7c50591eca5 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 c8d3fffd01f..94b36c58428 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 4970807d478..d9984527a6f 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 2875848a893..9f0be684267 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/libcbor.a b/tools/sdk/esp32/lib/libcbor.a index 717b5791a9a..20250e854df 100644 Binary files a/tools/sdk/esp32/lib/libcbor.a and b/tools/sdk/esp32/lib/libcbor.a differ diff --git a/tools/sdk/esp32/lib/libcmock.a b/tools/sdk/esp32/lib/libcmock.a index e6bd3d11c04..ddbc7c95f78 100644 Binary files a/tools/sdk/esp32/lib/libcmock.a and b/tools/sdk/esp32/lib/libcmock.a differ diff --git a/tools/sdk/esp32/lib/libcoap.a b/tools/sdk/esp32/lib/libcoap.a index 0443a4318fa..ac9b3a729f5 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 c494a606d99..2fda75aac3c 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/libconsole.a b/tools/sdk/esp32/lib/libconsole.a index 164879ad02a..073d6995b52 100644 Binary files a/tools/sdk/esp32/lib/libconsole.a and b/tools/sdk/esp32/lib/libconsole.a differ diff --git a/tools/sdk/esp32/lib/libcore.a b/tools/sdk/esp32/lib/libcore.a index 55afaf589b9..137b2359ede 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 44cb5771124..740b0f34f03 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 c8a526fb0e4..cdb00d30d8d 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 3155c48fcd0..758dafdcfe7 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-sr.a b/tools/sdk/esp32/lib/libesp-sr.a index e9f1d067dd5..9821afef829 100644 Binary files a/tools/sdk/esp32/lib/libesp-sr.a and b/tools/sdk/esp32/lib/libesp-sr.a differ diff --git a/tools/sdk/esp32/lib/libesp-tls.a b/tools/sdk/esp32/lib/libesp-tls.a index 95b32127227..ffc84aacd90 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 19fb13ab579..2bf5cf2cb83 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_adc_cal.a b/tools/sdk/esp32/lib/libesp_adc_cal.a index 533bec49312..0aa429e0f1d 100644 Binary files a/tools/sdk/esp32/lib/libesp_adc_cal.a and b/tools/sdk/esp32/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/esp32/lib/libesp_common.a b/tools/sdk/esp32/lib/libesp_common.a index c0477fdff81..5f2efa2c236 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_diagnostics.a b/tools/sdk/esp32/lib/libesp_diagnostics.a index 0b6b00485f5..592aa1722c0 100644 Binary files a/tools/sdk/esp32/lib/libesp_diagnostics.a and b/tools/sdk/esp32/lib/libesp_diagnostics.a differ diff --git a/tools/sdk/esp32/lib/libesp_eth.a b/tools/sdk/esp32/lib/libesp_eth.a index b5152390191..c7a716dcd4f 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 9e4948dc819..9468f81fc12 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_gdbstub.a b/tools/sdk/esp32/lib/libesp_gdbstub.a index 7d24cf1363b..a054d710055 100644 Binary files a/tools/sdk/esp32/lib/libesp_gdbstub.a and b/tools/sdk/esp32/lib/libesp_gdbstub.a differ diff --git a/tools/sdk/esp32/lib/libesp_hid.a b/tools/sdk/esp32/lib/libesp_hid.a index c47d80e267e..3f8772dfb5c 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 14f1b47f3bc..34e3f45b587 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 9df69b54370..0ff5fa85407 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 1de31c3fac1..359512202dd 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_https_server.a b/tools/sdk/esp32/lib/libesp_https_server.a index 05f8f8d9aa8..698cb142110 100644 Binary files a/tools/sdk/esp32/lib/libesp_https_server.a and b/tools/sdk/esp32/lib/libesp_https_server.a differ diff --git a/tools/sdk/esp32/lib/libesp_hw_support.a b/tools/sdk/esp32/lib/libesp_hw_support.a index bc1508ff884..7ae245374bb 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_insights.a b/tools/sdk/esp32/lib/libesp_insights.a index 1fc099a7de7..8d465d34818 100644 Binary files a/tools/sdk/esp32/lib/libesp_insights.a and b/tools/sdk/esp32/lib/libesp_insights.a differ diff --git a/tools/sdk/esp32/lib/libesp_ipc.a b/tools/sdk/esp32/lib/libesp_ipc.a index b803b949579..2fe6d1d42d0 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 7c428e49c1c..484cdcc836d 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 caa170dc18b..5a115044381 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_local_ctrl.a b/tools/sdk/esp32/lib/libesp_local_ctrl.a index bab90f436f3..cc61dc668e5 100644 Binary files a/tools/sdk/esp32/lib/libesp_local_ctrl.a and b/tools/sdk/esp32/lib/libesp_local_ctrl.a differ diff --git a/tools/sdk/esp32/lib/libesp_netif.a b/tools/sdk/esp32/lib/libesp_netif.a index b7560b19265..4ea549888c7 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 0f4ffc38ec0..d0270a58150 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 cacc116c764..3ad1e1acc64 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 3ae9e886a5d..0bf58439394 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 d971f79d1e2..e6eede4e1ff 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_rom.a b/tools/sdk/esp32/lib/libesp_rom.a index a43a10693d2..e84128755c7 100644 Binary files a/tools/sdk/esp32/lib/libesp_rom.a and b/tools/sdk/esp32/lib/libesp_rom.a differ diff --git a/tools/sdk/esp32/lib/libesp_schedule.a b/tools/sdk/esp32/lib/libesp_schedule.a index e0458ccaf91..cce7d7363f8 100644 Binary files a/tools/sdk/esp32/lib/libesp_schedule.a and b/tools/sdk/esp32/lib/libesp_schedule.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 5cae54a1237..121832b5218 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 edf8cc3c318..bd0eae016aa 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 8d8e8554906..04f5c888002 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 4c8529a4fd4..534fe01f931 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 09b9093579b..63390a973cb 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 484b1204f3e..b711bcee645 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 4a5d3efc5c1..25651055df9 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/libesp-dsp.a b/tools/sdk/esp32/lib/libespressif__esp-dsp.a similarity index 53% rename from tools/sdk/esp32/lib/libesp-dsp.a rename to tools/sdk/esp32/lib/libespressif__esp-dsp.a index 27fd179c920..d5db1cb12c1 100644 Binary files a/tools/sdk/esp32/lib/libesp-dsp.a and b/tools/sdk/esp32/lib/libespressif__esp-dsp.a differ diff --git a/tools/sdk/esp32/lib/libexpat.a b/tools/sdk/esp32/lib/libexpat.a index 98b9886bf67..8cb648b822e 100644 Binary files a/tools/sdk/esp32/lib/libexpat.a and b/tools/sdk/esp32/lib/libexpat.a differ diff --git a/tools/sdk/esp32/lib/libfatfs.a b/tools/sdk/esp32/lib/libfatfs.a index aacad8d1cc5..b6e64845132 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/libfb_gfx.a b/tools/sdk/esp32/lib/libfb_gfx.a index 4c3c9185508..a0f655f8d3f 100644 Binary files a/tools/sdk/esp32/lib/libfb_gfx.a and b/tools/sdk/esp32/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32/lib/libfreemodbus.a b/tools/sdk/esp32/lib/libfreemodbus.a index 59af27ab2da..dcd6b67a99b 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 396ffe0e5d8..71b84a6834e 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/libgpio_button.a b/tools/sdk/esp32/lib/libgpio_button.a index 5b30d54a55b..dd1f850e58f 100644 Binary files a/tools/sdk/esp32/lib/libgpio_button.a and b/tools/sdk/esp32/lib/libgpio_button.a differ diff --git a/tools/sdk/esp32/lib/libhal.a b/tools/sdk/esp32/lib/libhal.a index ad8844621ed..ecb3781046e 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 1fd69bd98bd..7e27ce36f28 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/libjsmn.a b/tools/sdk/esp32/lib/libjsmn.a index b8276668a8f..6e68c2bf4c2 100644 Binary files a/tools/sdk/esp32/lib/libjsmn.a and b/tools/sdk/esp32/lib/libjsmn.a differ diff --git a/tools/sdk/esp32/lib/libjson.a b/tools/sdk/esp32/lib/libjson.a index 8587c2fda7b..836385dac14 100644 Binary files a/tools/sdk/esp32/lib/libjson.a and b/tools/sdk/esp32/lib/libjson.a differ diff --git a/tools/sdk/esp32/lib/libjson_generator.a b/tools/sdk/esp32/lib/libjson_generator.a index 04d015ad99a..b11d719f5ef 100644 Binary files a/tools/sdk/esp32/lib/libjson_generator.a and b/tools/sdk/esp32/lib/libjson_generator.a differ diff --git a/tools/sdk/esp32/lib/libjson_parser.a b/tools/sdk/esp32/lib/libjson_parser.a index 6f8e6d5ecd2..10c032929ec 100644 Binary files a/tools/sdk/esp32/lib/libjson_parser.a and b/tools/sdk/esp32/lib/libjson_parser.a differ diff --git a/tools/sdk/esp32/lib/liblibsodium.a b/tools/sdk/esp32/lib/liblibsodium.a index 5059ed406cd..53fb10a488e 100644 Binary files a/tools/sdk/esp32/lib/liblibsodium.a and b/tools/sdk/esp32/lib/liblibsodium.a differ diff --git a/tools/sdk/esp32/lib/liblog.a b/tools/sdk/esp32/lib/liblog.a index 63543dc8c5e..e6bd393d900 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 2647c995d5f..6ec08259652 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 e85987e3ce6..114b400675e 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/libmbedtls.a b/tools/sdk/esp32/lib/libmbedtls.a index d1fe39ed822..05a2d1934ce 100644 Binary files a/tools/sdk/esp32/lib/libmbedtls.a and b/tools/sdk/esp32/lib/libmbedtls.a differ diff --git a/tools/sdk/esp32/lib/libmbedtls_2.a b/tools/sdk/esp32/lib/libmbedtls_2.a index 79a9604fa49..aac4c988cc1 100644 Binary files a/tools/sdk/esp32/lib/libmbedtls_2.a and b/tools/sdk/esp32/lib/libmbedtls_2.a differ diff --git a/tools/sdk/esp32/lib/libmbedx509.a b/tools/sdk/esp32/lib/libmbedx509.a index 32966b940a3..46a05491086 100644 Binary files a/tools/sdk/esp32/lib/libmbedx509.a and b/tools/sdk/esp32/lib/libmbedx509.a differ diff --git a/tools/sdk/esp32/lib/libmdns.a b/tools/sdk/esp32/lib/libmdns.a index 933a5cebb60..fb4fe74845a 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 21de1504f4d..c285473152c 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 e0e857be0db..3beab1ee434 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 5541326a430..bd14593c19b 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 fc697c8c229..5681dd9600a 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/libnghttp.a b/tools/sdk/esp32/lib/libnghttp.a index c8282153e26..f9f5fa6c54c 100644 Binary files a/tools/sdk/esp32/lib/libnghttp.a and b/tools/sdk/esp32/lib/libnghttp.a differ diff --git a/tools/sdk/esp32/lib/libnvs_flash.a b/tools/sdk/esp32/lib/libnvs_flash.a index 119d85cc734..9ebfb84bbd5 100644 Binary files a/tools/sdk/esp32/lib/libnvs_flash.a and b/tools/sdk/esp32/lib/libnvs_flash.a differ diff --git a/tools/sdk/esp32/lib/libopenssl.a b/tools/sdk/esp32/lib/libopenssl.a index f1c42b440a1..ac4a04f6f28 100644 Binary files a/tools/sdk/esp32/lib/libopenssl.a and b/tools/sdk/esp32/lib/libopenssl.a differ diff --git a/tools/sdk/esp32/lib/libperfmon.a b/tools/sdk/esp32/lib/libperfmon.a index 450df36c9b4..728c1e2ec9e 100644 Binary files a/tools/sdk/esp32/lib/libperfmon.a and b/tools/sdk/esp32/lib/libperfmon.a differ diff --git a/tools/sdk/esp32/lib/libpp.a b/tools/sdk/esp32/lib/libpp.a index 4fe8daf0675..537aeab06fc 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/libprotobuf-c.a b/tools/sdk/esp32/lib/libprotobuf-c.a index 0b9aaadeb99..c2027e10af0 100644 Binary files a/tools/sdk/esp32/lib/libprotobuf-c.a and b/tools/sdk/esp32/lib/libprotobuf-c.a differ diff --git a/tools/sdk/esp32/lib/libprotocomm.a b/tools/sdk/esp32/lib/libprotocomm.a index c5f1f670d56..2b06d482a3d 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 38f39b34898..39a4c559ca7 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/libqrcode.a b/tools/sdk/esp32/lib/libqrcode.a index 962dd1062be..0a9c1127c3f 100644 Binary files a/tools/sdk/esp32/lib/libqrcode.a and b/tools/sdk/esp32/lib/libqrcode.a differ diff --git a/tools/sdk/esp32/lib/librmaker_common.a b/tools/sdk/esp32/lib/librmaker_common.a index f7e3a9b2005..a36d896f42e 100644 Binary files a/tools/sdk/esp32/lib/librmaker_common.a and b/tools/sdk/esp32/lib/librmaker_common.a differ diff --git a/tools/sdk/esp32/lib/librtc_store.a b/tools/sdk/esp32/lib/librtc_store.a index 213d94dd9d9..11cb8f6f625 100644 Binary files a/tools/sdk/esp32/lib/librtc_store.a and b/tools/sdk/esp32/lib/librtc_store.a differ diff --git a/tools/sdk/esp32/lib/libsdmmc.a b/tools/sdk/esp32/lib/libsdmmc.a index e04461b0b32..dde6d1f2ffb 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 b857e6667bb..88d5cd79c75 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/libsoc.a b/tools/sdk/esp32/lib/libsoc.a index 22d2f4844a9..a64030e6e9a 100644 Binary files a/tools/sdk/esp32/lib/libsoc.a and b/tools/sdk/esp32/lib/libsoc.a differ diff --git a/tools/sdk/esp32/lib/libspiffs.a b/tools/sdk/esp32/lib/libspiffs.a index 5cc02ef8c93..171a17fa286 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 13a7f6a54f4..e691dcfcaab 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 59cd8ccdb6c..1ebe6c4f416 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/libulp.a b/tools/sdk/esp32/lib/libulp.a index cccf73656ae..29fa727c79f 100644 Binary files a/tools/sdk/esp32/lib/libulp.a and b/tools/sdk/esp32/lib/libulp.a differ diff --git a/tools/sdk/esp32/lib/libunity.a b/tools/sdk/esp32/lib/libunity.a index 066ab95bbfc..53b7b8577d9 100644 Binary files a/tools/sdk/esp32/lib/libunity.a and b/tools/sdk/esp32/lib/libunity.a differ diff --git a/tools/sdk/esp32/lib/libvfs.a b/tools/sdk/esp32/lib/libvfs.a index d9eaadc61f9..18db9a6ce19 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 029765dcc6f..23e2f4e836f 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/libwear_levelling.a b/tools/sdk/esp32/lib/libwear_levelling.a index 08bedbef3eb..2eb18adb9b7 100644 Binary files a/tools/sdk/esp32/lib/libwear_levelling.a and b/tools/sdk/esp32/lib/libwear_levelling.a differ diff --git a/tools/sdk/esp32/lib/libwifi_provisioning.a b/tools/sdk/esp32/lib/libwifi_provisioning.a index f4f8b2b6e3c..013b342c7d6 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 cabed73b6e3..60509f6d8de 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/libws2812_led.a b/tools/sdk/esp32/lib/libws2812_led.a index de58acb1c95..3826b53d298 100644 Binary files a/tools/sdk/esp32/lib/libws2812_led.a and b/tools/sdk/esp32/lib/libws2812_led.a differ diff --git a/tools/sdk/esp32/lib/libxtensa.a b/tools/sdk/esp32/lib/libxtensa.a index 5db61f82182..e5d762c7937 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/qio_qspi/include/sdkconfig.h b/tools/sdk/esp32/qio_qspi/include/sdkconfig.h index 49cde1ec45b..0f6fb6ddd91 100644 --- a/tools/sdk/esp32/qio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32/qio_qspi/include/sdkconfig.h @@ -136,6 +136,7 @@ #define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BTDM_SCAN_DUPL_TYPE 0 #define CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE 20 +#define CONFIG_BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD 0 #define CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED 1 @@ -159,9 +160,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_STACK_NO_LOG 1 @@ -355,12 +358,14 @@ #define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32 #define CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE 1 #define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1 +#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -391,10 +396,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 #define CONFIG_FREERTOS_CORETIMER_0 1 @@ -459,6 +460,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -607,8 +609,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -646,11 +646,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 3072 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -679,6 +674,11 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_A2DP_ENABLE CONFIG_BT_A2DP_ENABLE @@ -692,35 +692,49 @@ #define CONFIG_BLE_SCAN_DUPLICATE CONFIG_BTDM_BLE_SCAN_DUPL #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 #define CONFIG_BROWNOUT_DET CONFIG_ESP32_BROWNOUT_DET +#define CONFIG_BROWNOUT_DET_LVL CONFIG_ESP32_BROWNOUT_DET_LVL #define CONFIG_BROWNOUT_DET_LVL_SEL_0 CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0 #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN CONFIG_BTDM_CTRL_BLE_MAX_CONN +#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF #define CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED #define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI CONFIG_BTDM_CTRL_HCI_MODE_VHCI #define CONFIG_BTDM_CONTROLLER_MODEM_SLEEP CONFIG_BTDM_CTRL_MODEM_SLEEP #define CONFIG_BTDM_CONTROLLER_MODE_BTDM CONFIG_BTDM_CTRL_MODE_BTDM +#define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE CONFIG_BTDM_CTRL_PINNED_TO_CORE #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_CLASSIC_BT_ENABLED CONFIG_BT_CLASSIC_ENABLED #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -733,6 +747,7 @@ #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE #define CONFIG_HFP_AUDIO_DATA_PATH_PCM CONFIG_BT_HFP_AUDIO_DATA_PATH_PCM #define CONFIG_HFP_CLIENT_ENABLE CONFIG_BT_HFP_CLIENT_ENABLE #define CONFIG_HFP_ENABLE CONFIG_BT_HFP_ENABLE @@ -740,6 +755,7 @@ #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -752,20 +768,25 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED #define CONFIG_MESH_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL +#define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_REDUCE_PHY_TX_POWER CONFIG_ESP_PHY_REDUCE_TX_POWER #define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE +#define CONFIG_SCAN_DUPLICATE_TYPE CONFIG_BTDM_SCAN_DUPL_TYPE #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE #define CONFIG_SPIRAM_SUPPORT CONFIG_ESP32_SPIRAM_SUPPORT #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -777,6 +798,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -793,9 +815,10 @@ #define CONFIG_TIMER_TASK_STACK_DEPTH CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH #define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX +#define CONFIG_TRACEMEM_RESERVE_DRAM CONFIG_ESP32_TRACEMEM_RESERVE_DRAM #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED #define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32/qio_qspi/libspi_flash.a b/tools/sdk/esp32/qio_qspi/libspi_flash.a index 0aa528219bb..44382dda4f7 100644 Binary files a/tools/sdk/esp32/qio_qspi/libspi_flash.a and b/tools/sdk/esp32/qio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32/qout_qspi/include/sdkconfig.h b/tools/sdk/esp32/qout_qspi/include/sdkconfig.h index 21ecef0ef8e..966bd3d0b5c 100644 --- a/tools/sdk/esp32/qout_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32/qout_qspi/include/sdkconfig.h @@ -136,6 +136,7 @@ #define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BTDM_SCAN_DUPL_TYPE 0 #define CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE 20 +#define CONFIG_BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD 0 #define CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED 1 @@ -159,9 +160,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_STACK_NO_LOG 1 @@ -355,12 +358,14 @@ #define CONFIG_ESP32_WIFI_MGMT_SBUF_NUM 32 #define CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE 1 #define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1 +#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -391,10 +396,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 #define CONFIG_FREERTOS_CORETIMER_0 1 @@ -459,6 +460,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -607,8 +609,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -646,11 +646,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 3072 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -679,6 +674,11 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_A2DP_ENABLE CONFIG_BT_A2DP_ENABLE @@ -692,35 +692,49 @@ #define CONFIG_BLE_SCAN_DUPLICATE CONFIG_BTDM_BLE_SCAN_DUPL #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 #define CONFIG_BROWNOUT_DET CONFIG_ESP32_BROWNOUT_DET +#define CONFIG_BROWNOUT_DET_LVL CONFIG_ESP32_BROWNOUT_DET_LVL #define CONFIG_BROWNOUT_DET_LVL_SEL_0 CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0 #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN CONFIG_BTDM_CTRL_BLE_MAX_CONN +#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF #define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN +#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF #define CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED #define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI CONFIG_BTDM_CTRL_HCI_MODE_VHCI #define CONFIG_BTDM_CONTROLLER_MODEM_SLEEP CONFIG_BTDM_CTRL_MODEM_SLEEP #define CONFIG_BTDM_CONTROLLER_MODE_BTDM CONFIG_BTDM_CTRL_MODE_BTDM +#define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE CONFIG_BTDM_CTRL_PINNED_TO_CORE #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_CLASSIC_BT_ENABLED CONFIG_BT_CLASSIC_ENABLED #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -733,6 +747,7 @@ #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE #define CONFIG_HFP_AUDIO_DATA_PATH_PCM CONFIG_BT_HFP_AUDIO_DATA_PATH_PCM #define CONFIG_HFP_CLIENT_ENABLE CONFIG_BT_HFP_CLIENT_ENABLE #define CONFIG_HFP_ENABLE CONFIG_BT_HFP_ENABLE @@ -740,6 +755,7 @@ #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -752,20 +768,25 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED #define CONFIG_MESH_DUPLICATE_SCAN_CACHE_SIZE CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL +#define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_REDUCE_PHY_TX_POWER CONFIG_ESP_PHY_REDUCE_TX_POWER #define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE +#define CONFIG_SCAN_DUPLICATE_TYPE CONFIG_BTDM_SCAN_DUPL_TYPE #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE #define CONFIG_SPIRAM_SUPPORT CONFIG_ESP32_SPIRAM_SUPPORT #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -777,6 +798,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -793,9 +815,10 @@ #define CONFIG_TIMER_TASK_STACK_DEPTH CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH #define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX +#define CONFIG_TRACEMEM_RESERVE_DRAM CONFIG_ESP32_TRACEMEM_RESERVE_DRAM #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED #define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32/qout_qspi/libspi_flash.a b/tools/sdk/esp32/qout_qspi/libspi_flash.a index 868a2a82662..c45ffeb97b8 100644 Binary files a/tools/sdk/esp32/qout_qspi/libspi_flash.a and b/tools/sdk/esp32/qout_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32/sdkconfig b/tools/sdk/esp32/sdkconfig index 19b4562301b..ff8056ede8d 100644 --- a/tools/sdk/esp32/sdkconfig +++ b/tools/sdk/esp32/sdkconfig @@ -360,6 +360,7 @@ CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE=y # CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE is not set CONFIG_BTDM_SCAN_DUPL_TYPE=0 CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE=20 +CONFIG_BTDM_SCAN_DUPL_CACHE_REFRESH_PERIOD=0 CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN=y CONFIG_BTDM_MESH_DUPL_SCAN_CACHE_SIZE=100 CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED=y @@ -398,10 +399,12 @@ CONFIG_BT_GATTS_ENABLE=y # CONFIG_BT_GATTS_PPCP_CHAR_GAP is not set # CONFIG_BT_BLE_BLUFI_ENABLE is not set CONFIG_BT_GATT_MAX_SR_PROFILES=8 +CONFIG_BT_GATT_MAX_SR_ATTRIBUTES=100 # CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL is not set CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0 CONFIG_BT_GATTC_ENABLE=y +CONFIG_BT_GATTC_MAX_CACHE_CHAR=40 # CONFIG_BT_GATTC_CACHE_NVS_FLASH is not set CONFIG_BT_GATTC_CONNECT_RETRY_COUNT=3 CONFIG_BT_BLE_SMP_ENABLE=y @@ -455,6 +458,7 @@ CONFIG_BLE_MESH_CRPL=10 CONFIG_BLE_MESH_MSG_CACHE_SIZE=10 CONFIG_BLE_MESH_ADV_BUF_COUNT=60 CONFIG_BLE_MESH_IVU_DIVIDER=4 +# CONFIG_BLE_MESH_IVU_RECOVERY_IVI is not set CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=1 CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=1 CONFIG_BLE_MESH_RX_SDU_MAX=384 @@ -848,6 +852,7 @@ CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 +# CONFIG_ESP_MAC_IGNORE_MAC_CRC_ERROR is not set # end of MAC Config # @@ -1002,6 +1007,7 @@ CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set +CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7 # end of Wi-Fi # @@ -1017,6 +1023,7 @@ CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y CONFIG_ESP_COREDUMP_CHECK_BOOT=y CONFIG_ESP_COREDUMP_ENABLE=y CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 +CONFIG_ESP_COREDUMP_STACK_SIZE=1024 # end of Core dump # @@ -1086,11 +1093,7 @@ CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 CONFIG_FMB_TIMER_PORT_ENABLED=y -CONFIG_FMB_TIMER_GROUP=0 -CONFIG_FMB_TIMER_INDEX=0 -CONFIG_FMB_MASTER_TIMER_GROUP=0 -CONFIG_FMB_MASTER_TIMER_INDEX=0 -# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# CONFIG_FMB_TIMER_USE_ISR_DISPATCH_METHOD is not set # end of Modbus configuration # @@ -1253,6 +1256,7 @@ CONFIG_LWIP_TCP_SYNMAXRTX=6 CONFIG_LWIP_TCP_MSS=1436 CONFIG_LWIP_TCP_TMR_INTERVAL=250 CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=20000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 CONFIG_LWIP_TCP_WND_DEFAULT=5744 CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 @@ -1676,8 +1680,8 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 -CONFIG_WIFI_PROV_BLE_BONDING=y -CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y +# CONFIG_WIFI_PROV_BLE_BONDING is not set +# CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION is not set # CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV is not set # end of Wi-Fi Provisioning Manager @@ -1770,23 +1774,6 @@ CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT=80 # CONFIG_RTC_STORE_OVERWRITE_NON_CRITICAL_DATA is not set # end of RTC Store -# -# DSP Library -# -CONFIG_DSP_OPTIMIZATIONS_SUPPORTED=y -# CONFIG_DSP_ANSI is not set -CONFIG_DSP_OPTIMIZED=y -CONFIG_DSP_OPTIMIZATION=1 -# CONFIG_DSP_MAX_FFT_SIZE_512 is not set -# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set -# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set -CONFIG_DSP_MAX_FFT_SIZE_4096=y -# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set -# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set -# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set -CONFIG_DSP_MAX_FFT_SIZE=4096 -# end of DSP Library - # # Camera configuration # @@ -1835,6 +1822,23 @@ CONFIG_LITTLEFS_MTIME_USE_SECONDS=y # CONFIG_LITTLEFS_SPIFFS_COMPAT is not set # CONFIG_LITTLEFS_FLUSH_FILE_EVERY_WRITE is not set # end of LittleFS + +# +# DSP Library +# +CONFIG_DSP_OPTIMIZATIONS_SUPPORTED=y +# CONFIG_DSP_ANSI is not set +CONFIG_DSP_OPTIMIZED=y +CONFIG_DSP_OPTIMIZATION=1 +# CONFIG_DSP_MAX_FFT_SIZE_512 is not set +# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set +# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set +CONFIG_DSP_MAX_FFT_SIZE_4096=y +# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set +# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set +# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set +CONFIG_DSP_MAX_FFT_SIZE=4096 +# end of DSP Library # end of Component config # @@ -2007,6 +2011,7 @@ CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y # CONFIG_ESP32_COREDUMP_CHECKSUM_SHA256 is not set CONFIG_ESP32_ENABLE_COREDUMP=y CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 +CONFIG_ESP32_CORE_DUMP_STACK_SIZE=1024 CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 CONFIG_MB_QUEUE_LENGTH=20 @@ -2019,8 +2024,6 @@ CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_MB_CONTROLLER_STACK_SIZE=4096 CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 CONFIG_MB_TIMER_PORT_ENABLED=y -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048 diff --git a/tools/sdk/esp32c3/bin/bootloader_dio_40m.elf b/tools/sdk/esp32c3/bin/bootloader_dio_40m.elf index a5fe80310ef..0e9591058d5 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_dio_40m.elf and b/tools/sdk/esp32c3/bin/bootloader_dio_40m.elf differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dio_80m.elf b/tools/sdk/esp32c3/bin/bootloader_dio_80m.elf index a5fe80310ef..0e9591058d5 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_dio_80m.elf and b/tools/sdk/esp32c3/bin/bootloader_dio_80m.elf differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dout_40m.elf b/tools/sdk/esp32c3/bin/bootloader_dout_40m.elf index a5fe80310ef..0e9591058d5 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_dout_40m.elf and b/tools/sdk/esp32c3/bin/bootloader_dout_40m.elf differ diff --git a/tools/sdk/esp32c3/bin/bootloader_dout_80m.elf b/tools/sdk/esp32c3/bin/bootloader_dout_80m.elf index a5fe80310ef..0e9591058d5 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_dout_80m.elf and b/tools/sdk/esp32c3/bin/bootloader_dout_80m.elf differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qio_40m.elf b/tools/sdk/esp32c3/bin/bootloader_qio_40m.elf index dbe3514ab41..ba1d55b59af 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_qio_40m.elf and b/tools/sdk/esp32c3/bin/bootloader_qio_40m.elf differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qio_80m.elf b/tools/sdk/esp32c3/bin/bootloader_qio_80m.elf index dbe3514ab41..ba1d55b59af 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_qio_80m.elf and b/tools/sdk/esp32c3/bin/bootloader_qio_80m.elf differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qout_40m.elf b/tools/sdk/esp32c3/bin/bootloader_qout_40m.elf index 0d8aba6d800..3af6086aa2c 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_qout_40m.elf and b/tools/sdk/esp32c3/bin/bootloader_qout_40m.elf differ diff --git a/tools/sdk/esp32c3/bin/bootloader_qout_80m.elf b/tools/sdk/esp32c3/bin/bootloader_qout_80m.elf index 0d8aba6d800..3af6086aa2c 100755 Binary files a/tools/sdk/esp32c3/bin/bootloader_qout_80m.elf and b/tools/sdk/esp32c3/bin/bootloader_qout_80m.elf differ diff --git a/tools/sdk/esp32c3/dio_qspi/include/sdkconfig.h b/tools/sdk/esp32c3/dio_qspi/include/sdkconfig.h index fe94988ed2e..8769329a9f3 100644 --- a/tools/sdk/esp32c3/dio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32c3/dio_qspi/include/sdkconfig.h @@ -97,6 +97,12 @@ #define CONFIG_ARDUHAL_ESP_LOG 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME "default" +#define CONFIG_USE_AFE 1 +#define CONFIG_AFE_INTERFACE_V1 1 +#define CONFIG_USE_WAKENET 1 +#define CONFIG_USE_MULTINET 1 +#define CONFIG_SR_MN_CN_NONE 1 +#define CONFIG_SR_MN_EN_NONE 1 #define CONFIG_COMPILER_OPTIMIZATION_SIZE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL 2 @@ -126,8 +132,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -135,6 +141,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 @@ -150,9 +157,11 @@ #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_BLE_BLUFI_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -342,6 +351,7 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 @@ -378,10 +388,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 @@ -446,6 +452,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -597,8 +604,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -636,10 +641,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -668,26 +669,45 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND @@ -701,33 +721,44 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM #define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_DIO CONFIG_ESPTOOLPY_FLASHMODE_DIO +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -740,22 +771,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -766,6 +805,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -784,5 +824,5 @@ #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32c3/dio_qspi/libspi_flash.a b/tools/sdk/esp32c3/dio_qspi/libspi_flash.a index 38bd64d470b..69ad1d7e7ea 100644 Binary files a/tools/sdk/esp32c3/dio_qspi/libspi_flash.a and b/tools/sdk/esp32c3/dio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32c3/dout_qspi/include/sdkconfig.h b/tools/sdk/esp32c3/dout_qspi/include/sdkconfig.h index a9eddf84fd4..020cb3dd198 100644 --- a/tools/sdk/esp32c3/dout_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32c3/dout_qspi/include/sdkconfig.h @@ -97,6 +97,12 @@ #define CONFIG_ARDUHAL_ESP_LOG 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME "default" +#define CONFIG_USE_AFE 1 +#define CONFIG_AFE_INTERFACE_V1 1 +#define CONFIG_USE_WAKENET 1 +#define CONFIG_USE_MULTINET 1 +#define CONFIG_SR_MN_CN_NONE 1 +#define CONFIG_SR_MN_EN_NONE 1 #define CONFIG_COMPILER_OPTIMIZATION_SIZE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL 2 @@ -126,8 +132,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -135,6 +141,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 @@ -150,9 +157,11 @@ #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_BLE_BLUFI_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -342,6 +351,7 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 @@ -378,10 +388,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 @@ -446,6 +452,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -597,8 +604,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -636,10 +641,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -668,26 +669,45 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND @@ -701,33 +721,44 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM #define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_DOUT CONFIG_ESPTOOLPY_FLASHMODE_DOUT +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -740,22 +771,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -766,6 +805,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -784,5 +824,5 @@ #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32c3/dout_qspi/libspi_flash.a b/tools/sdk/esp32c3/dout_qspi/libspi_flash.a index 0071527794f..6ab286d27a5 100644 Binary files a/tools/sdk/esp32c3/dout_qspi/libspi_flash.a and b/tools/sdk/esp32c3/dout_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32c3/include/bootloader_support/include/bootloader_common.h b/tools/sdk/esp32c3/include/bootloader_support/include/bootloader_common.h index 1a641be10ec..13334f2a7ff 100644 --- a/tools/sdk/esp32c3/include/bootloader_support/include/bootloader_common.h +++ b/tools/sdk/esp32c3/include/bootloader_support/include/bootloader_common.h @@ -187,13 +187,6 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata, */ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t *partition, esp_app_desc_t *app_desc); -/** - * @brief Get chip revision - * - * @return Chip revision number - */ -uint8_t bootloader_common_get_chip_revision(void); - /** * @brief Get chip package * diff --git a/tools/sdk/esp32c3/include/bootloader_support/include/esp_app_format.h b/tools/sdk/esp32c3/include/bootloader_support/include/esp_app_format.h index ef4f7f4f48f..1f547d3bfbf 100644 --- a/tools/sdk/esp32c3/include/bootloader_support/include/esp_app_format.h +++ b/tools/sdk/esp32c3/include/bootloader_support/include/esp_app_format.h @@ -6,6 +6,7 @@ #pragma once #include +#include "esp_assert.h" /** * @brief ESP chip ID @@ -21,7 +22,7 @@ typedef enum { } __attribute__((packed)) esp_chip_id_t; /** @cond */ -_Static_assert(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); +ESP_STATIC_ASSERT(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); /** @endcond */ /** @@ -88,7 +89,7 @@ typedef struct { } __attribute__((packed)) esp_image_header_t; /** @cond */ -_Static_assert(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); +ESP_STATIC_ASSERT(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); /** @endcond */ diff --git a/tools/sdk/esp32c3/include/bootloader_support/include/esp_image_format.h b/tools/sdk/esp32c3/include/bootloader_support/include/esp_image_format.h index 1db62442537..20545f5d7f6 100644 --- a/tools/sdk/esp32c3/include/bootloader_support/include/esp_image_format.h +++ b/tools/sdk/esp32c3/include/bootloader_support/include/esp_image_format.h @@ -9,6 +9,7 @@ #include #include "esp_flash_partitions.h" #include "esp_app_format.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -53,12 +54,18 @@ typedef struct { uint32_t crc; /*!< Check sum crc32 */ } rtc_retain_mem_t; + +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, crc) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t), "CRC field must be the last field of rtc_retain_mem_t structure"); + #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC -_Static_assert(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +/* The custom field must be the penultimate field */ +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, custom) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t) - CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE, + "custom field in rtc_retain_mem_t structure must be the field before the CRC one"); #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); #endif #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC @@ -68,7 +75,7 @@ _Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_R #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); +ESP_STATIC_ASSERT(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); #endif /** diff --git a/tools/sdk/esp32c3/include/bt/common/api/include/api/esp_blufi_api.h b/tools/sdk/esp32c3/include/bt/common/api/include/api/esp_blufi_api.h index 63109b20f12..ce7fe3a0d3c 100644 --- a/tools/sdk/esp32c3/include/bt/common/api/include/api/esp_blufi_api.h +++ b/tools/sdk/esp32c3/include/bt/common/api/include/api/esp_blufi_api.h @@ -57,6 +57,8 @@ typedef enum { typedef enum { ESP_BLUFI_STA_CONN_SUCCESS = 0x00, ESP_BLUFI_STA_CONN_FAIL = 0x01, + ESP_BLUFI_STA_CONNECTING = 0x02, + ESP_BLUFI_STA_NO_IP = 0x03, } esp_blufi_sta_conn_state_t; /// BLUFI init status @@ -82,6 +84,8 @@ typedef enum { ESP_BLUFI_READ_PARAM_ERROR, ESP_BLUFI_MAKE_PUBLIC_ERROR, ESP_BLUFI_DATA_FORMAT_ERROR, + ESP_BLUFI_CALC_MD5_ERROR, + ESP_BLUFI_WIFI_SCAN_FAIL, } esp_blufi_error_state_t; /** @@ -105,6 +109,12 @@ typedef struct { bool softap_max_conn_num_set; /*!< is max connection number of softap interface set */ uint8_t softap_channel; /*!< channel of softap interface */ bool softap_channel_set; /*!< is channel of softap interface set */ + uint8_t sta_max_conn_retry; /*!< max retry of sta establish connection */ + bool sta_max_conn_retry_set; /*!< is max retry of sta establish connection set */ + uint8_t sta_conn_end_reason; /*!< reason of sta connection end */ + bool sta_conn_end_reason_set; /*!< is reason of sta connection end set */ + int8_t sta_conn_rssi; /*!< rssi of sta connection */ + bool sta_conn_rssi_set; /*!< is rssi of sta connection set */ } esp_blufi_extra_info_t; /** @brief Description of an WiFi AP */ diff --git a/tools/sdk/esp32c3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h b/tools/sdk/esp32c3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h index 996621e0488..be2c72c78d5 100644 --- a/tools/sdk/esp32c3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h +++ b/tools/sdk/esp32c3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h @@ -20,7 +20,7 @@ #if (BLUFI_INCLUDED == TRUE) #define BTC_BLUFI_GREAT_VER 0x01 //Version + Subversion -#define BTC_BLUFI_SUB_VER 0x02 //Version + Subversion +#define BTC_BLUFI_SUB_VER 0x03 //Version + Subversion #define BTC_BLUFI_VERSION ((BTC_BLUFI_GREAT_VER<<8)|BTC_BLUFI_SUB_VER) //Version + Subversion typedef UINT8 tGATT_IF; @@ -129,6 +129,9 @@ extern tBLUFI_ENV *blufi_env_ptr; #define BLUFI_TYPE_DATA_SUBTYPE_WIFI_LIST 0x11 #define BLUFI_TYPE_DATA_SUBTYPE_ERROR_INFO 0x12 #define BLUFI_TYPE_DATA_SUBTYPE_CUSTOM_DATA 0x13 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_MAX_CONN_RETRY 0x14 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_END_REASON 0x15 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_RSSI 0x16 #define BLUFI_TYPE_IS_CTRL(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_CTRL) #define BLUFI_TYPE_IS_DATA(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_DATA) diff --git a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h index 39ed1a5c1a4..ce81b6c261f 100644 --- a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h +++ b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_config_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_config_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_config_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_config_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h index a5b586d5ab7..d06785094df 100644 --- a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h +++ b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_generic_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_generic_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_generic_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_generic_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h index 331f41c23d6..a04745485bf 100644 --- a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h +++ b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h @@ -41,6 +41,8 @@ typedef enum { void btc_ble_mesh_health_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_health_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_health_client_call_handler(btc_msg_t *msg); void btc_ble_mesh_health_client_cb_handler(btc_msg_t *msg); diff --git a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h index 854d6521612..45ca7ee14be 100644 --- a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h +++ b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_lighting_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_lighting_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_lighting_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_lighting_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h index ab54cc487b8..b9cd0156d54 100644 --- a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h +++ b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h @@ -336,8 +336,12 @@ typedef union { void btc_ble_mesh_prov_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_prov_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_model_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_model_arg_deep_free(btc_msg_t *msg); + const uint8_t *btc_ble_mesh_node_get_local_net_key(uint16_t net_idx); const uint8_t *btc_ble_mesh_node_get_local_app_key(uint16_t app_idx); diff --git a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h index a0dc29f3784..3d216c7fa95 100644 --- a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h +++ b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_sensor_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_sensor_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_sensor_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_sensor_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h index 0174c32741f..7bd95c78e0b 100644 --- a/tools/sdk/esp32c3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h +++ b/tools/sdk/esp32c3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h @@ -776,29 +776,28 @@ int bt_mesh_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], uint8_t enc_data[16]); enum { - BLE_MESH_EXCEP_LIST_ADD = 0, - BLE_MESH_EXCEP_LIST_REMOVE, - BLE_MESH_EXCEP_LIST_CLEAN, + BLE_MESH_EXCEP_LIST_SUB_CODE_ADD = 0, + BLE_MESH_EXCEP_LIST_SUB_CODE_REMOVE, + BLE_MESH_EXCEP_LIST_SUB_CODE_CLEAN, }; enum { - BLE_MESH_EXCEP_INFO_ADV_ADDR = 0, - BLE_MESH_EXCEP_INFO_MESH_LINK_ID, - BLE_MESH_EXCEP_INFO_MESH_BEACON, - BLE_MESH_EXCEP_INFO_MESH_PROV_ADV, - BLE_MESH_EXCEP_INFO_MESH_PROXY_ADV, + BLE_MESH_EXCEP_LIST_TYPE_ADV_ADDR = 0, + BLE_MESH_EXCEP_LIST_TYPE_MESH_LINK_ID, + BLE_MESH_EXCEP_LIST_TYPE_MESH_BEACON, + BLE_MESH_EXCEP_LIST_TYPE_MESH_PROV_ADV, + BLE_MESH_EXCEP_LIST_TYPE_MESH_PROXY_ADV, }; -enum { - BLE_MESH_EXCEP_CLEAN_ADDR_LIST = BIT(0), - BLE_MESH_EXCEP_CLEAN_MESH_LINK_ID_LIST = BIT(1), - BLE_MESH_EXCEP_CLEAN_MESH_BEACON_LIST = BIT(2), - BLE_MESH_EXCEP_CLEAN_MESH_PROV_ADV_LIST = BIT(3), - BLE_MESH_EXCEP_CLEAN_MESH_PROXY_ADV_LIST = BIT(4), - BLE_MESH_EXCEP_CLEAN_ALL_LIST = 0xFFFF, -}; +#define BLE_MESH_EXCEP_LIST_CLEAN_ADDR_LIST BIT(0) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_LINK_ID_LIST BIT(1) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_BEACON_LIST BIT(2) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_PROV_ADV_LIST BIT(3) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_PROXY_ADV_LIST BIT(4) +#define BLE_MESH_EXCEP_LIST_CLEAN_ALL_LIST (BIT(0) | BIT(1) | \ + BIT(2) | BIT(3) | BIT(4)) -int bt_mesh_update_exceptional_list(uint8_t sub_code, uint8_t type, void *info); +int bt_mesh_update_exceptional_list(uint8_t sub_code, uint32_t type, void *info); #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h index d0e1ec00950..b85eb18a78a 100644 --- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h +++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h @@ -27,6 +27,7 @@ extern "C" { return ESP_ERR_INVALID_STATE; \ } +#define ESP_BT_STATUS_BASE_FOR_HCI_ERR 0X0100 /* base for coverting HCI error code to ESP status */ /* relate to BT_STATUS_xxx in bt_def.h */ /// Status Return Value @@ -53,6 +54,71 @@ typedef enum { ESP_BT_STATUS_ERR_ILLEGAL_PARAMETER_FMT, /* relate to HCI_ERR_ILLEGAL_PARAMETER_FMT in stack/hcidefs.h */ ESP_BT_STATUS_MEMORY_FULL = 20, /* relate to BT_STATUS_MEMORY_FULL in bt_def.h */ ESP_BT_STATUS_EIR_TOO_LARGE, /* relate to BT_STATUS_EIR_TOO_LARGE in bt_def.h */ + ESP_BT_STATUS_HCI_SUCCESS = ESP_BT_STATUS_BASE_FOR_HCI_ERR, + ESP_BT_STATUS_HCI_PENDING, + ESP_BT_STATUS_HCI_ILLEGAL_COMMAND, + ESP_BT_STATUS_HCI_NO_CONNECTION, + ESP_BT_STATUS_HCI_HW_FAILURE, + ESP_BT_STATUS_HCI_PAGE_TIMEOUT, + ESP_BT_STATUS_HCI_AUTH_FAILURE, + ESP_BT_STATUS_HCI_KEY_MISSING, + ESP_BT_STATUS_HCI_MEMORY_FULL, + ESP_BT_STATUS_HCI_CONNECTION_TOUT, + ESP_BT_STATUS_HCI_MAX_NUM_OF_CONNECTIONS, + ESP_BT_STATUS_HCI_MAX_NUM_OF_SCOS, + ESP_BT_STATUS_HCI_CONNECTION_EXISTS, + ESP_BT_STATUS_HCI_COMMAND_DISALLOWED, + ESP_BT_STATUS_HCI_HOST_REJECT_RESOURCES, + ESP_BT_STATUS_HCI_HOST_REJECT_SECURITY, + ESP_BT_STATUS_HCI_HOST_REJECT_DEVICE, + ESP_BT_STATUS_HCI_HOST_TIMEOUT, + ESP_BT_STATUS_HCI_UNSUPPORTED_VALUE, + ESP_BT_STATUS_HCI_ILLEGAL_PARAMETER_FMT, + ESP_BT_STATUS_HCI_PEER_USER, + ESP_BT_STATUS_HCI_PEER_LOW_RESOURCES, + ESP_BT_STATUS_HCI_PEER_POWER_OFF, + ESP_BT_STATUS_HCI_CONN_CAUSE_LOCAL_HOST, + ESP_BT_STATUS_HCI_REPEATED_ATTEMPTS, + ESP_BT_STATUS_HCI_PAIRING_NOT_ALLOWED, + ESP_BT_STATUS_HCI_UNKNOWN_LMP_PDU, + ESP_BT_STATUS_HCI_UNSUPPORTED_REM_FEATURE, + ESP_BT_STATUS_HCI_SCO_OFFSET_REJECTED, + ESP_BT_STATUS_HCI_SCO_INTERVAL_REJECTED, + ESP_BT_STATUS_HCI_SCO_AIR_MODE, + ESP_BT_STATUS_HCI_INVALID_LMP_PARAM, + ESP_BT_STATUS_HCI_UNSPECIFIED, + ESP_BT_STATUS_HCI_UNSUPPORTED_LMP_PARAMETERS, + ESP_BT_STATUS_HCI_ROLE_CHANGE_NOT_ALLOWED, + ESP_BT_STATUS_HCI_LMP_RESPONSE_TIMEOUT, + ESP_BT_STATUS_HCI_LMP_ERR_TRANS_COLLISION, + ESP_BT_STATUS_HCI_LMP_PDU_NOT_ALLOWED, + ESP_BT_STATUS_HCI_ENCRY_MODE_NOT_ACCEPTABLE, + ESP_BT_STATUS_HCI_UNIT_KEY_USED, + ESP_BT_STATUS_HCI_QOS_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_INSTANT_PASSED, + ESP_BT_STATUS_HCI_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_DIFF_TRANSACTION_COLLISION, + ESP_BT_STATUS_HCI_UNDEFINED_0x2B, + ESP_BT_STATUS_HCI_QOS_UNACCEPTABLE_PARAM, + ESP_BT_STATUS_HCI_QOS_REJECTED, + ESP_BT_STATUS_HCI_CHAN_CLASSIF_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_INSUFFCIENT_SECURITY, + ESP_BT_STATUS_HCI_PARAM_OUT_OF_RANGE, + ESP_BT_STATUS_HCI_UNDEFINED_0x31, + ESP_BT_STATUS_HCI_ROLE_SWITCH_PENDING, + ESP_BT_STATUS_HCI_UNDEFINED_0x33, + ESP_BT_STATUS_HCI_RESERVED_SLOT_VIOLATION, + ESP_BT_STATUS_HCI_ROLE_SWITCH_FAILED, + ESP_BT_STATUS_HCI_INQ_RSP_DATA_TOO_LARGE, + ESP_BT_STATUS_HCI_SIMPLE_PAIRING_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_HOST_BUSY_PAIRING, + ESP_BT_STATUS_HCI_REJ_NO_SUITABLE_CHANNEL, + ESP_BT_STATUS_HCI_CONTROLLER_BUSY, + ESP_BT_STATUS_HCI_UNACCEPT_CONN_INTERVAL, + ESP_BT_STATUS_HCI_DIRECTED_ADVERTISING_TIMEOUT, + ESP_BT_STATUS_HCI_CONN_TOUT_DUE_TO_MIC_FAILURE, + ESP_BT_STATUS_HCI_CONN_FAILED_ESTABLISHMENT, + ESP_BT_STATUS_HCI_MAC_CONNECTION_FAILED, } esp_bt_status_t; diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h index 686ad1c63e8..6b89b45a840 100644 --- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h +++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h @@ -223,6 +223,8 @@ typedef enum { ESP_BT_GAP_MODE_CHG_EVT, ESP_BT_GAP_REMOVE_BOND_DEV_COMPLETE_EVT, /*!< remove bond device complete event */ ESP_BT_GAP_QOS_CMPL_EVT, /*!< QOS complete event */ + ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT, /*!< ACL connection complete status event */ + ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT, /*!< ACL disconnection complete status event */ ESP_BT_GAP_EVT_MAX, } esp_bt_gap_cb_event_t; @@ -376,6 +378,24 @@ typedef union { which from the master to a particular slave on the ACL logical transport. unit is 0.625ms. */ } qos_cmpl; /*!< QoS complete parameter struct */ + + /** + * @brief ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT + */ + struct acl_conn_cmpl_stat_param { + esp_bt_status_t stat; /*!< ACL connection status */ + uint16_t handle; /*!< ACL connection handle */ + esp_bd_addr_t bda; /*!< remote bluetooth device address */ + } acl_conn_cmpl_stat; /*!< ACL connection complete status parameter struct */ + + /** + * @brief ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT + */ + struct acl_disconn_cmpl_stat_param { + esp_bt_status_t reason; /*!< ACL disconnection reason */ + uint16_t handle; /*!< ACL connection handle */ + esp_bd_addr_t bda; /*!< remote bluetooth device address */ + } acl_disconn_cmpl_stat; /*!< ACL disconnection complete status parameter struct */ } esp_bt_gap_cb_param_t; /** diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h index 9177753bd9d..85d68b49d68 100644 --- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h +++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h @@ -26,7 +26,7 @@ extern "C" { /// GATT INVALID HANDLE #define ESP_GATT_ILLEGAL_HANDLE 0 /// GATT attribute max handle -#define ESP_GATT_ATTR_HANDLE_MAX 100 +#define ESP_GATT_ATTR_HANDLE_MAX UC_CONFIG_BT_GATT_MAX_SR_ATTRIBUTES #define ESP_GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */ @@ -285,6 +285,7 @@ typedef enum { #define ESP_GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 - 0x0100 */ /* relate to BTA_GATT_PERM_WRITE_SIGNED_MITM in bta/bta_gatt_api.h */ #define ESP_GATT_PERM_READ_AUTHORIZATION (1 << 9) /* bit 9 - 0x0200 */ #define ESP_GATT_PERM_WRITE_AUTHORIZATION (1 << 10) /* bit 10 - 0x0400 */ +#define ESP_GATT_PERM_ENCRYPT_KEY_SIZE(keysize) (((keysize - 6) & 0xF) << 12) /* bit 12:15 - 0xF000 */ typedef uint16_t esp_gatt_perm_t; /* relate to BTA_GATT_CHAR_PROP_BIT_xxx in bta/bta_gatt_api.h */ diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h index 558d5d62960..ec2a327a567 100644 --- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h +++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h @@ -360,7 +360,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatts_if, */ esp_err_t esp_ble_gatts_create_attr_tab(const esp_gatts_attr_db_t *gatts_attr_db, esp_gatt_if_t gatts_if, - uint8_t max_nb_attr, + uint16_t max_nb_attr, uint8_t srvc_inst_id); /** * @brief This function is called to add an included service. This function have to be called between diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h index c9278fbed29..239a23c3fee 100644 --- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h +++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h @@ -252,123 +252,144 @@ typedef union { } esp_hidd_cb_param_t; /** - * @brief HID device callback function type. - * @param event: Event type - * @param param: Point to callback parameter, currently is union type + * @brief HID device callback function type. + * @param event: Event type + * @param param: Point to callback parameter, currently is union type */ typedef void (*esp_hd_cb_t)(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param); /** - * @brief This function is called to init callbacks with HID device module. + * @brief This function is called to init callbacks with HID device module. * - * @param[in] callback: pointer to the init callback function. + * @param[in] callback: pointer to the init callback function. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_register_callback(esp_hd_cb_t callback); /** - * @brief This function initializes HIDD. This function should be called after esp_bluedroid_enable and - * esp_blueroid_init success, and should be called after esp_bt_hid_device_register_callback. - * When the operation is complete the callback function will be called with ESP_HIDD_INIT_EVT. + * @brief Initializes HIDD interface. This function should be called after esp_bluedroid_init() and + * esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_register_callback. + * When the operation is complete, the callback function will be called with ESP_HIDD_INIT_EVT. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_init(void); /** - * @brief This function de-initializes HIDD interface. This function should be called after esp_bluedroid_enable() and - * esp_blueroid_init() success, and should be called after esp_bt_hid_device_init(). When the operation is complete the callback - * function will be called with ESP_HIDD_DEINIT_EVT. + * @brief De-initializes HIDD interface. This function should be called after esp_bluedroid_init() and + * esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). When the + * operation is complete, the callback function will be called with ESP_HIDD_DEINIT_EVT. * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_deinit(void); /** - * @brief Registers HIDD parameters with SDP and sets l2cap Quality of Service. This function should be called after - * esp_bluedroid_enable and esp_blueroid_init success, and must be done after esp_bt_hid_device_init. When the operation is complete the callback - * function will be called with ESP_HIDD_REGISTER_APP_EVT. + * @brief Registers HIDD parameters with SDP and sets l2cap Quality of Service. This function should be + * called after esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after + * esp_bt_hid_device_init(). When the operation is complete, the callback function will be called + * with ESP_HIDD_REGISTER_APP_EVT. * - * @param[in] app_param: HIDD parameters - * @param[in] in_qos: incoming QoS parameters - * @param[in] out_qos: outgoing QoS parameters + * @param[in] app_param: HIDD parameters + * @param[in] in_qos: incoming QoS parameters + * @param[in] out_qos: outgoing QoS parameters * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_register_app(esp_hidd_app_param_t *app_param, esp_hidd_qos_param_t *in_qos, esp_hidd_qos_param_t *out_qos); /** - * @brief Removes HIDD parameters from SDP and resets l2cap Quality of Service. This function should be called after esp_bluedroid_enable and - * esp_blueroid_init success, and should be called after esp_bt_hid_device_init. When the operation is complete the callback - * function will be called with ESP_HIDD_UNREGISTER_APP_EVT. + * @brief Removes HIDD parameters from SDP and resets l2cap Quality of Service. This function should be + * called after esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after + * esp_bt_hid_device_init(). When the operation is complete, the callback function will be called + * with ESP_HIDD_UNREGISTER_APP_EVT. * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_unregister_app(void); /** - * @brief This function connects HIDD interface to connected bluetooth device, if not done already. When the operation is complete the callback - * function will be called with ESP_HIDD_OPEN_EVT. + * @brief Connects to the peer HID Host with virtual cable. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_OPEN_EVT. * - * @param[in] bd_addr: Remote host bluetooth device address. + * @param[in] bd_addr: Remote host bluetooth device address. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_connect(esp_bd_addr_t bd_addr); /** - * @brief This function disconnects HIDD interface. When the operation is complete the callback - * function will be called with ESP_HIDD_CLOSE_EVT. + * @brief Disconnects from the currently connected HID Host. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_CLOSE_EVT. + * + * @note The disconnect operation will not remove the virtually cabled device. If the connect request from the + * different HID Host, it will reject the request. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_disconnect(void); /** - * @brief Send HIDD report. When the operation is complete the callback - * function will be called with ESP_HIDD_SEND_REPORT_EVT. + * @brief Sends HID report to the currently connected HID Host. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_SEND_REPORT_EVT. * - * @param[in] type: type of report - * @param[in] id: report id as defined by descriptor - * @param[in] len: length of report - * @param[in] data: report data + * @param[in] type: type of report + * @param[in] id: report id as defined by descriptor + * @param[in] len: length of report + * @param[in] data: report data * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_send_report(esp_hidd_report_type_t type, uint8_t id, uint16_t len, uint8_t *data); /** - * @brief Sends HIDD handshake with error info for invalid set_report. When the operation is complete the callback - * function will be called with ESP_HIDD_REPORT_ERR_EVT. + * @brief Sends HID Handshake with error info for invalid set_report to the currently connected HID Host. + * This function should be called after esp_bluedroid_init() and esp_bluedroid_enable() success, and + * should be called after esp_bt_hid_device_init(). When the operation is complete, the callback + * function will be called with ESP_HIDD_REPORT_ERR_EVT. * - * @param[in] error: type of error + * @param[in] error: type of error * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_report_error(esp_hidd_handshake_error_t error); /** - * @brief Unplug virtual cable of HIDD. When the operation is complete the callback - * function will be called with ESP_HIDD_VC_UNPLUG_EVT. + * @brief Remove the virtually cabled device. This function should be called after esp_bluedroid_init() + * and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). When the + * operation is complete, the callback function will be called with ESP_HIDD_VC_UNPLUG_EVT. + * + * @note If the connection exists, then HID Device will send a `VIRTUAL_CABLE_UNPLUG` control command to + * the peer HID Host, and the connection will be destroyed. If the connection does not exist, then HID + * Device will only unplug on it's single side. Once the unplug operation is success, the related + * pairing and bonding information will be removed, then the HID Device can accept connection request + * from the different HID Host, * - * @return - ESP_OK: success - * - other: failed + * @return - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_virtual_cable_unplug(void); diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h index be827649745..24331991933 100644 --- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h +++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h @@ -77,6 +77,8 @@ typedef enum { ESP_SPP_WRITE_EVT = 33, /*!< When SPP write operation completes, the event comes, only for ESP_SPP_MODE_CB */ ESP_SPP_SRV_OPEN_EVT = 34, /*!< When SPP Server connection open, the event comes */ ESP_SPP_SRV_STOP_EVT = 35, /*!< When SPP server stopped, the event comes */ + ESP_SPP_VFS_REGISTER_EVT = 36, /*!< When SPP VFS register, the event comes */ + ESP_SPP_VFS_UNREGISTER_EVT = 37, /*!< When SPP VFS unregister, the event comes */ } esp_spp_cb_event_t; @@ -195,6 +197,20 @@ typedef union { uint32_t handle; /*!< The connection handle */ bool cong; /*!< TRUE, congested. FALSE, uncongested */ } cong; /*!< SPP callback param of ESP_SPP_CONG_EVT */ + + /** + * @brief ESP_SPP_VFS_REGISTER_EVT + */ + struct spp_vfs_register_evt_param { + esp_spp_status_t status; /*!< status */ + } vfs_register; /*!< SPP callback param of ESP_SPP_VFS_REGISTER_EVT */ + + /** + * @brief ESP_SPP_VFS_UNREGISTER_EVT + */ + struct spp_vfs_unregister_evt_param { + esp_spp_status_t status; /*!< status */ + } vfs_unregister; /*!< SPP callback param of ESP_SPP_VFS_UNREGISTER_EVT */ } esp_spp_cb_param_t; /*!< SPP callback parameter union type */ /** @@ -358,6 +374,8 @@ esp_err_t esp_spp_write(uint32_t handle, int len, uint8_t *p_data); /** * @brief This function is used to register VFS. * For now, SPP only supports write, read and close. + * When the operation is completed, the callback function will be called with ESP_SPP_VFS_REGISTER_EVT. + * This function must be called after esp_spp_init()/esp_spp_enhanced_init() successful and before esp_spp_deinit(). * * @return * - ESP_OK: success @@ -365,6 +383,17 @@ esp_err_t esp_spp_write(uint32_t handle, int len, uint8_t *p_data); */ esp_err_t esp_spp_vfs_register(void); +/** + * @brief This function is used to unregister VFS. + * When the operation is completed, the callback function will be called with ESP_SPP_VFS_UNREGISTER_EVT. + * This function must be called after esp_spp_vfs_register() successful and before esp_spp_deinit(). + * + * @return + * - ESP_OK: success + * - other: failed + */ +esp_err_t esp_spp_vfs_unregister(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32c3/include/bt/include/esp32c3/include/esp_bt.h b/tools/sdk/esp32c3/include/bt/include/esp32c3/include/esp_bt.h index 2fd4c24885f..934a857211c 100644 --- a/tools/sdk/esp32c3/include/bt/include/esp32c3/include/esp_bt.h +++ b/tools/sdk/esp32c3/include/bt/include/esp32c3/include/esp_bt.h @@ -12,13 +12,14 @@ #include "esp_err.h" #include "sdkconfig.h" #include "esp_task.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { #endif #define ESP_BT_CTRL_CONFIG_MAGIC_VAL 0x5A5AA5A5 -#define ESP_BT_CTRL_CONFIG_VERSION 0x02112280 +#define ESP_BT_CTRL_CONFIG_VERSION 0x02212090 #define ESP_BT_HCI_TL_MAGIC_VALUE 0xfadebead #define ESP_BT_HCI_TL_VERSION 0x00010000 @@ -129,6 +130,12 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status); #define MESH_DUPLICATE_SCAN_CACHE_SIZE 0 #endif +#ifndef CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD +#define DUPL_SCAN_CACHE_REFRESH_PERIOD 0 +#else +#define DUPL_SCAN_CACHE_REFRESH_PERIOD CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD +#endif + #ifdef CONFIG_BT_CTRL_AGC_RECORRECT_EN #define BT_CTRL_AGC_RECORRECT_EN CONFIG_BT_CTRL_AGC_RECORRECT_EN #else @@ -141,6 +148,12 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status); #define BT_CTRL_CODED_AGC_RECORRECT 0 #endif +#ifdef CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX +#define BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX +#else +#define BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX 0 +#endif + #define AGC_RECORRECT_EN ((BT_CTRL_AGC_RECORRECT_EN << 0) | (BT_CTRL_CODED_AGC_RECORRECT <<1)) @@ -181,10 +194,12 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status); .slave_ce_len_min = SLAVE_CE_LEN_MIN_DEFAULT, \ .hw_recorrect_en = AGC_RECORRECT_EN, \ .cca_thresh = CONFIG_BT_CTRL_HW_CCA_VAL, \ + .scan_backoff_upperlimitmax = BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX, \ + .dup_list_refresh_period = DUPL_SCAN_CACHE_REFRESH_PERIOD, \ } #else -#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; _Static_assert(0, "please enable bluetooth in menuconfig to use bt.h"); +#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; ESP_STATIC_ASSERT(0, "please enable bluetooth in menuconfig to use esp_bt.h"); #endif /** @@ -248,6 +263,8 @@ typedef struct { uint8_t slave_ce_len_min; uint8_t hw_recorrect_en; uint8_t cca_thresh; /*!< cca threshold*/ + uint16_t scan_backoff_upperlimitmax; /*!< scan backoff upperlimitmax value */ + uint16_t dup_list_refresh_period; /*!< duplicate scan list refresh time */ } esp_bt_controller_config_t; /** diff --git a/tools/sdk/esp32c3/include/console/argtable3/argtable3.h b/tools/sdk/esp32c3/include/console/argtable3/argtable3.h index abb2009cccf..95715b1907e 100644 --- a/tools/sdk/esp32c3/include/console/argtable3/argtable3.h +++ b/tools/sdk/esp32c3/include/console/argtable3/argtable3.h @@ -1,4 +1,11 @@ +/* + * SPDX-FileCopyrightText: 1998-2001,2003-2011,2013 Stewart Heitmann + * + * SPDX-License-Identifier: BSD-3-Clause + */ /******************************************************************************* + * argtable3: Declares the main interfaces of the library + * * This file is part of the argtable3 library. * * Copyright (C) 1998-2001,2003-2011,2013 Stewart Heitmann @@ -31,274 +38,240 @@ #ifndef ARGTABLE3 #define ARGTABLE3 -#include /* FILE */ -#include /* struct tm */ +#include /* FILE */ +#include /* struct tm */ #ifdef __cplusplus extern "C" { #endif #define ARG_REX_ICASE 1 +#define ARG_DSTR_SIZE 200 +#define ARG_CMD_NAME_LEN 100 +#define ARG_CMD_DESCRIPTION_LEN 256 + +#ifndef ARG_REPLACE_GETOPT +#define ARG_REPLACE_GETOPT 0 /* ESP-IDF-specific: use newlib-provided getopt instead of the embedded one */ +#endif /* ARG_REPLACE_GETOPT */ /* bit masks for arg_hdr.flag */ -enum -{ - ARG_TERMINATOR=0x1, - ARG_HASVALUE=0x2, - ARG_HASOPTVALUE=0x4 -}; +enum { ARG_TERMINATOR = 0x1, ARG_HASVALUE = 0x2, ARG_HASOPTVALUE = 0x4 }; + +#if defined(_WIN32) + #if defined(argtable3_EXPORTS) + #define ARG_EXTERN __declspec(dllexport) + #elif defined(argtable3_IMPORTS) + #define ARG_EXTERN __declspec(dllimport) + #else + #define ARG_EXTERN + #endif +#else + #define ARG_EXTERN +#endif -typedef void (arg_resetfn)(void *parent); -typedef int (arg_scanfn)(void *parent, const char *argval); -typedef int (arg_checkfn)(void *parent); -typedef void (arg_errorfn)(void *parent, FILE *fp, int error, const char *argval, const char *progname); +typedef struct _internal_arg_dstr* arg_dstr_t; +typedef void* arg_cmd_itr_t; +typedef void(arg_resetfn)(void* parent); +typedef int(arg_scanfn)(void* parent, const char* argval); +typedef int(arg_checkfn)(void* parent); +typedef void(arg_errorfn)(void* parent, arg_dstr_t ds, int error, const char* argval, const char* progname); +typedef void(arg_dstr_freefn)(char* buf); +typedef int(arg_cmdfn)(int argc, char* argv[], arg_dstr_t res); +typedef int(arg_comparefn)(const void* k1, const void* k2); /* -* The arg_hdr struct defines properties that are common to all arg_xxx structs. -* The argtable library requires each arg_xxx struct to have an arg_hdr -* struct as its first data member. -* The argtable library functions then use this data to identify the -* properties of the command line option, such as its option tags, -* datatype string, and glossary strings, and so on. -* Moreover, the arg_hdr struct contains pointers to custom functions that -* are provided by each arg_xxx struct which perform the tasks of parsing -* that particular arg_xxx arguments, performing post-parse checks, and -* reporting errors. -* These functions are private to the individual arg_xxx source code -* and are the pointer to them are initiliased by that arg_xxx struct's -* constructor function. The user could alter them after construction -* if desired, but the original intention is for them to be set by the -* constructor and left unaltered. -*/ -struct arg_hdr -{ - char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ - const char *shortopts; /* String defining the short options */ - const char *longopts; /* String defiing the long options */ - const char *datatype; /* Description of the argument data type */ - const char *glossary; /* Description of the option as shown by arg_print_glossary function */ - int mincount; /* Minimum number of occurences of this option accepted */ - int maxcount; /* Maximum number of occurences if this option accepted */ - void *parent; /* Pointer to parent arg_xxx struct */ - arg_resetfn *resetfn; /* Pointer to parent arg_xxx reset function */ - arg_scanfn *scanfn; /* Pointer to parent arg_xxx scan function */ - arg_checkfn *checkfn; /* Pointer to parent arg_xxx check function */ - arg_errorfn *errorfn; /* Pointer to parent arg_xxx error function */ - void *priv; /* Pointer to private header data for use by arg_xxx functions */ -}; - -struct arg_rem -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ -}; - -struct arg_lit -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ -}; - -struct arg_int -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - int *ival; /* Array of parsed argument values */ -}; - -struct arg_dbl -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - double *dval; /* Array of parsed argument values */ -}; - -struct arg_str -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_rex -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_file -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args*/ - const char **filename; /* Array of parsed filenames (eg: /home/foo.bar) */ - const char **basename; /* Array of parsed basenames (eg: foo.bar) */ - const char **extension; /* Array of parsed extensions (eg: .bar) */ -}; - -struct arg_date -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - const char *format; /* strptime format string used to parse the date */ - int count; /* Number of matching command line args */ - struct tm *tmval; /* Array of parsed time values */ -}; - -enum {ARG_ELIMIT=1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG}; -struct arg_end -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of errors encountered */ - int *error; /* Array of error codes */ - void **parent; /* Array of pointers to offending arg_xxx struct */ - const char **argval; /* Array of pointers to offending argv[] string */ -}; - + * The arg_hdr struct defines properties that are common to all arg_xxx structs. + * The argtable library requires each arg_xxx struct to have an arg_hdr + * struct as its first data member. + * The argtable library functions then use this data to identify the + * properties of the command line option, such as its option tags, + * datatype string, and glossary strings, and so on. + * Moreover, the arg_hdr struct contains pointers to custom functions that + * are provided by each arg_xxx struct which perform the tasks of parsing + * that particular arg_xxx arguments, performing post-parse checks, and + * reporting errors. + * These functions are private to the individual arg_xxx source code + * and are the pointer to them are initiliased by that arg_xxx struct's + * constructor function. The user could alter them after construction + * if desired, but the original intention is for them to be set by the + * constructor and left unaltered. + */ +typedef struct arg_hdr { + char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ + const char* shortopts; /* String defining the short options */ + const char* longopts; /* String defiing the long options */ + const char* datatype; /* Description of the argument data type */ + const char* glossary; /* Description of the option as shown by arg_print_glossary function */ + int mincount; /* Minimum number of occurences of this option accepted */ + int maxcount; /* Maximum number of occurences if this option accepted */ + void* parent; /* Pointer to parent arg_xxx struct */ + arg_resetfn* resetfn; /* Pointer to parent arg_xxx reset function */ + arg_scanfn* scanfn; /* Pointer to parent arg_xxx scan function */ + arg_checkfn* checkfn; /* Pointer to parent arg_xxx check function */ + arg_errorfn* errorfn; /* Pointer to parent arg_xxx error function */ + void* priv; /* Pointer to private header data for use by arg_xxx functions */ +} arg_hdr_t; + +typedef struct arg_rem { + struct arg_hdr hdr; /* The mandatory argtable header struct */ +} arg_rem_t; + +typedef struct arg_lit { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ +} arg_lit_t; + +typedef struct arg_int { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + int* ival; /* Array of parsed argument values */ +} arg_int_t; + +typedef struct arg_dbl { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + double* dval; /* Array of parsed argument values */ +} arg_dbl_t; + +typedef struct arg_str { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_str_t; + +typedef struct arg_rex { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_rex_t; + +typedef struct arg_file { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args*/ + const char** filename; /* Array of parsed filenames (eg: /home/foo.bar) */ + const char** basename; /* Array of parsed basenames (eg: foo.bar) */ + const char** extension; /* Array of parsed extensions (eg: .bar) */ +} arg_file_t; + +typedef struct arg_date { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + const char* format; /* strptime format string used to parse the date */ + int count; /* Number of matching command line args */ + struct tm* tmval; /* Array of parsed time values */ +} arg_date_t; + +enum { ARG_ELIMIT = 1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG }; +typedef struct arg_end { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of errors encountered */ + int* error; /* Array of error codes */ + void** parent; /* Array of pointers to offending arg_xxx struct */ + const char** argval; /* Array of pointers to offending argv[] string */ +} arg_end_t; + +typedef struct arg_cmd_info { + char name[ARG_CMD_NAME_LEN]; + char description[ARG_CMD_DESCRIPTION_LEN]; + arg_cmdfn* proc; +} arg_cmd_info_t; /**** arg_xxx constructor functions *********************************/ -struct arg_rem* arg_rem(const char* datatype, const char* glossary); - -struct arg_lit* arg_lit0(const char* shortopts, - const char* longopts, - const char* glossary); -struct arg_lit* arg_lit1(const char* shortopts, - const char* longopts, - const char *glossary); -struct arg_lit* arg_litn(const char* shortopts, - const char* longopts, - int mincount, - int maxcount, - const char *glossary); - -struct arg_key* arg_key0(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_key1(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_keyn(const char* keyword, - int flags, - int mincount, - int maxcount, - const char* glossary); - -struct arg_int* arg_int0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_int* arg_int1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_int* arg_intn(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_dbl* arg_dbl0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_dbl* arg_dbl1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_dbl* arg_dbln(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_str* arg_str0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_str* arg_str1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_str* arg_strn(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_rex* arg_rex0(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char* glossary); -struct arg_rex* arg_rex1(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char *glossary); -struct arg_rex* arg_rexn(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int mincount, - int maxcount, - int flags, - const char *glossary); - -struct arg_file* arg_file0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_file* arg_file1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_file* arg_filen(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_date* arg_date0(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char* glossary); -struct arg_date* arg_date1(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char *glossary); -struct arg_date* arg_daten(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_end* arg_end(int maxerrors); +ARG_EXTERN struct arg_rem* arg_rem(const char* datatype, const char* glossary); + +ARG_EXTERN struct arg_lit* arg_lit0(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_lit1(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_litn(const char* shortopts, const char* longopts, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_int* arg_int0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_int1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_intn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_dbl* arg_dbl0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbl1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbln(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_str* arg_str0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_str1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_strn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_rex* arg_rex0(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rex1(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rexn(const char* shortopts, + const char* longopts, + const char* pattern, + const char* datatype, + int mincount, + int maxcount, + int flags, + const char* glossary); + +ARG_EXTERN struct arg_file* arg_file0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_file1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_filen(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_date* arg_date0(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_date1(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_daten(const char* shortopts, const char* longopts, const char* format, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_end* arg_end(int maxcount); +#define ARG_DSTR_STATIC ((arg_dstr_freefn*)0) +#define ARG_DSTR_VOLATILE ((arg_dstr_freefn*)1) +#define ARG_DSTR_DYNAMIC ((arg_dstr_freefn*)3) /**** other functions *******************************************/ -int arg_nullcheck(void **argtable); -int arg_parse(int argc, char **argv, void **argtable); -void arg_print_option(FILE *fp, const char *shortopts, const char *longopts, const char *datatype, const char *suffix); -void arg_print_syntax(FILE *fp, void **argtable, const char *suffix); -void arg_print_syntaxv(FILE *fp, void **argtable, const char *suffix); -void arg_print_glossary(FILE *fp, void **argtable, const char *format); -void arg_print_glossary_gnu(FILE *fp, void **argtable); -void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); -void arg_freetable(void **argtable, size_t n); -void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN int arg_nullcheck(void** argtable); +ARG_EXTERN int arg_parse(int argc, char** argv, void** argtable); +ARG_EXTERN void arg_print_option(FILE* fp, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary(FILE* fp, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu(FILE* fp, void** argtable); +ARG_EXTERN void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_print_option_ds(arg_dstr_t ds, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary_ds(arg_dstr_t ds, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu_ds(arg_dstr_t ds, void** argtable); +ARG_EXTERN void arg_print_errors_ds(arg_dstr_t ds, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_freetable(void** argtable, size_t n); + +ARG_EXTERN arg_dstr_t arg_dstr_create(void); +ARG_EXTERN void arg_dstr_destroy(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_reset(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_free(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_set(arg_dstr_t ds, char* str, arg_dstr_freefn* free_proc); +ARG_EXTERN void arg_dstr_cat(arg_dstr_t ds, const char* str); +ARG_EXTERN void arg_dstr_catc(arg_dstr_t ds, char c); +ARG_EXTERN void arg_dstr_catf(arg_dstr_t ds, const char* fmt, ...); +ARG_EXTERN char* arg_dstr_cstr(arg_dstr_t ds); + +ARG_EXTERN void arg_cmd_init(void); +ARG_EXTERN void arg_cmd_uninit(void); +ARG_EXTERN void arg_cmd_register(const char* name, arg_cmdfn* proc, const char* description); +ARG_EXTERN void arg_cmd_unregister(const char* name); +ARG_EXTERN int arg_cmd_dispatch(const char* name, int argc, char* argv[], arg_dstr_t res); +ARG_EXTERN unsigned int arg_cmd_count(void); +ARG_EXTERN arg_cmd_info_t* arg_cmd_info(const char* name); +ARG_EXTERN arg_cmd_itr_t arg_cmd_itr_create(void); +ARG_EXTERN void arg_cmd_itr_destroy(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_advance(arg_cmd_itr_t itr); +ARG_EXTERN char* arg_cmd_itr_key(arg_cmd_itr_t itr); +ARG_EXTERN arg_cmd_info_t* arg_cmd_itr_value(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_search(arg_cmd_itr_t itr, void* k); +ARG_EXTERN void arg_mgsort(void* data, int size, int esize, int i, int k, arg_comparefn* comparefn); +ARG_EXTERN void arg_make_get_help_msg(arg_dstr_t res); +ARG_EXTERN void arg_make_help_msg(arg_dstr_t ds, char* cmd_name, void** argtable); +ARG_EXTERN void arg_make_syntax_err_msg(arg_dstr_t ds, void** argtable, struct arg_end* end); +ARG_EXTERN int arg_make_syntax_err_help_msg(arg_dstr_t ds, char* name, int help, int nerrors, void** argtable, struct arg_end* end, int* exitcode); +ARG_EXTERN void arg_set_module_name(const char* name); +ARG_EXTERN void arg_set_module_version(int major, int minor, int patch, const char* tag); /**** deprecated functions, for back-compatibility only ********/ -void arg_free(void **argtable); +ARG_EXTERN void arg_free(void** argtable); #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/console/argtable3/argtable3_private.h b/tools/sdk/esp32c3/include/console/argtable3/argtable3_private.h new file mode 100644 index 00000000000..5589fc7ffad --- /dev/null +++ b/tools/sdk/esp32c3/include/console/argtable3/argtable3_private.h @@ -0,0 +1,245 @@ +/* + * SPDX-FileCopyrightText: 2013-2019 Tom G. Huang + * + * SPDX-License-Identifier: BSD-3-Clause + */ +/******************************************************************************* + * argtable3_private: Declares private types, constants, and interfaces + * + * This file is part of the argtable3 library. + * + * Copyright (C) 2013-2019 Tom G. Huang + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of STEWART HEITMANN nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +#ifndef ARG_UTILS_H +#define ARG_UTILS_H + +#include + +#define ARG_ENABLE_TRACE 0 +#define ARG_ENABLE_LOG 0 + +#ifdef __cplusplus +extern "C" { +#endif + +enum { ARG_ERR_MINCOUNT = 1, ARG_ERR_MAXCOUNT, ARG_ERR_BADINT, ARG_ERR_OVERFLOW, ARG_ERR_BADDOUBLE, ARG_ERR_BADDATE, ARG_ERR_REGNOMATCH }; + +typedef void(arg_panicfn)(const char* fmt, ...); + +#if defined(_MSC_VER) +#define ARG_TRACE(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) + +#define ARG_LOG(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) +#else +#define ARG_TRACE(x) \ + do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } while (0) + +#define ARG_LOG(x) \ + do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } while (0) +#endif + +/* + * Rename a few generic names to unique names. + * They can be a problem for the platforms like NuttX, where + * the namespace is flat for everything including apps and libraries. + */ +#define xmalloc argtable3_xmalloc +#define xcalloc argtable3_xcalloc +#define xrealloc argtable3_xrealloc +#define xfree argtable3_xfree + +extern void dbg_printf(const char* fmt, ...); +extern void arg_set_panic(arg_panicfn* proc); +extern void* xmalloc(size_t size); +extern void* xcalloc(size_t count, size_t size); +extern void* xrealloc(void* ptr, size_t size); +extern void xfree(void* ptr); + +struct arg_hashtable_entry { + void *k, *v; + unsigned int h; + struct arg_hashtable_entry* next; +}; + +typedef struct arg_hashtable { + unsigned int tablelength; + struct arg_hashtable_entry** table; + unsigned int entrycount; + unsigned int loadlimit; + unsigned int primeindex; + unsigned int (*hashfn)(const void* k); + int (*eqfn)(const void* k1, const void* k2); +} arg_hashtable_t; + +/** + * @brief Create a hash table. + * + * @param minsize minimum initial size of hash table + * @param hashfn function for hashing keys + * @param eqfn function for determining key equality + * @return newly created hash table or NULL on failure + */ +arg_hashtable_t* arg_hashtable_create(unsigned int minsize, unsigned int (*hashfn)(const void*), int (*eqfn)(const void*, const void*)); + +/** + * @brief This function will cause the table to expand if the insertion would take + * the ratio of entries to table size over the maximum load factor. + * + * This function does not check for repeated insertions with a duplicate key. + * The value returned when using a duplicate key is undefined -- when + * the hash table changes size, the order of retrieval of duplicate key + * entries is reversed. + * If in doubt, remove before insert. + * + * @param h the hash table to insert into + * @param k the key - hash table claims ownership and will free on removal + * @param v the value - does not claim ownership + * @return non-zero for successful insertion + */ +void arg_hashtable_insert(arg_hashtable_t* h, void* k, void* v); + +#define ARG_DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \ + int fnname(arg_hashtable_t* h, keytype* k, valuetype* v) { return arg_hashtable_insert(h, k, v); } + +/** + * @brief Search the specified key in the hash table. + * + * @param h the hash table to search + * @param k the key to search for - does not claim ownership + * @return the value associated with the key, or NULL if none found + */ +void* arg_hashtable_search(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \ + valuetype* fnname(arg_hashtable_t* h, keytype* k) { return (valuetype*)(arg_hashtable_search(h, k)); } + +/** + * @brief Remove the specified key from the hash table. + * + * @param h the hash table to remove the item from + * @param k the key to search for - does not claim ownership + */ +void arg_hashtable_remove(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \ + void fnname(arg_hashtable_t* h, keytype* k) { arg_hashtable_remove(h, k); } + +/** + * @brief Return the number of keys in the hash table. + * + * @param h the hash table + * @return the number of items stored in the hash table + */ +unsigned int arg_hashtable_count(arg_hashtable_t* h); + +/** + * @brief Change the value associated with the key. + * + * function to change the value associated with a key, where there already + * exists a value bound to the key in the hash table. + * Source due to Holger Schemel. + * + * @name hashtable_change + * @param h the hash table + * @param key + * @param value + */ +int arg_hashtable_change(arg_hashtable_t* h, void* k, void* v); + +/** + * @brief Free the hash table and the memory allocated for each key-value pair. + * + * @param h the hash table + * @param free_values whether to call 'free' on the remaining values + */ +void arg_hashtable_destroy(arg_hashtable_t* h, int free_values); + +typedef struct arg_hashtable_itr { + arg_hashtable_t* h; + struct arg_hashtable_entry* e; + struct arg_hashtable_entry* parent; + unsigned int index; +} arg_hashtable_itr_t; + +arg_hashtable_itr_t* arg_hashtable_itr_create(arg_hashtable_t* h); + +void arg_hashtable_itr_destroy(arg_hashtable_itr_t* itr); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_key(arg_hashtable_itr_t* i); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_value(arg_hashtable_itr_t* i); + +/** + * @brief Advance the iterator to the next element. Returns zero if advanced to end of table. + */ +int arg_hashtable_itr_advance(arg_hashtable_itr_t* itr); + +/** + * @brief Remove current element and advance the iterator to the next element. + */ +int arg_hashtable_itr_remove(arg_hashtable_itr_t* itr); + +/** + * @brief Search and overwrite the supplied iterator, to point to the entry matching the supplied key. + * + * @return Zero if not found. + */ +int arg_hashtable_itr_search(arg_hashtable_itr_t* itr, arg_hashtable_t* h, void* k); + +#define ARG_DEFINE_HASHTABLE_ITERATOR_SEARCH(fnname, keytype) \ + int fnname(arg_hashtable_itr_t* i, arg_hashtable_t* h, keytype* k) { return (arg_hashtable_iterator_search(i, h, k)); } + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tools/sdk/esp32c3/include/driver/include/driver/gpio.h b/tools/sdk/esp32c3/include/driver/include/driver/gpio.h index b904def347b..90723c2100a 100644 --- a/tools/sdk/esp32c3/include/driver/include/driver/gpio.h +++ b/tools/sdk/esp32c3/include/driver/include/driver/gpio.h @@ -50,7 +50,9 @@ extern "C" { #define GPIO_IS_VALID_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_GPIO_MASK) != 0) /// Check whether it can be a valid GPIO number of output mode #define GPIO_IS_VALID_OUTPUT_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_OUTPUT_GPIO_MASK) != 0) - +/// Check whether it can be a valid digital I/O pad +#define GPIO_IS_VALID_DIGITAL_IO_PAD(gpio_num) ((gpio_num >= 0) && \ + (((1ULL << (gpio_num)) & SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK) != 0)) typedef intr_handle_t gpio_isr_handle_t; @@ -447,7 +449,6 @@ esp_err_t gpio_force_hold_all(void); esp_err_t gpio_force_unhold_all(void); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable SLP_SEL to change GPIO status automantically in lightsleep. * @param gpio_num GPIO number of the pad. @@ -494,7 +495,6 @@ esp_err_t gpio_sleep_set_direction(gpio_num_t gpio_num, gpio_mode_t mode); * - ESP_ERR_INVALID_ARG : Parameter error */ esp_err_t gpio_sleep_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull); -#endif #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32c3/include/driver/include/driver/ledc.h b/tools/sdk/esp32c3/include/driver/include/driver/ledc.h index d9b8df8edaf..599622a2c24 100644 --- a/tools/sdk/esp32c3/include/driver/include/driver/ledc.h +++ b/tools/sdk/esp32c3/include/driver/include/driver/ledc.h @@ -78,8 +78,9 @@ typedef struct { * @brief Type of LEDC event callback * @param param LEDC callback parameter * @param user_arg User registered data + * @return Whether a high priority task has been waken up by this function */ -typedef bool (* ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); +typedef bool (*ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); /** * @brief Group of supported LEDC callbacks @@ -99,7 +100,7 @@ typedef struct { * - ESP_OK Success * - ESP_ERR_INVALID_ARG Parameter error */ -esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); +esp_err_t ledc_channel_config(const ledc_channel_config_t *ledc_conf); /** * @brief LEDC timer configuration @@ -112,7 +113,7 @@ esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); * - ESP_ERR_INVALID_ARG Parameter error * - ESP_FAIL Can not find a proper pre-divider number base on the given frequency and the current duty_resolution. */ -esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf); +esp_err_t ledc_timer_config(const ledc_timer_config_t *timer_conf); /** * @brief LEDC update channel parameters @@ -285,7 +286,7 @@ esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t * - ESP_OK Success * - ESP_ERR_INVALID_ARG Function pointer error. */ -esp_err_t ledc_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, ledc_isr_handle_t *handle); +esp_err_t ledc_isr_register(void (*fn)(void *), void *arg, int intr_alloc_flags, ledc_isr_handle_t *handle); /** * @brief Configure LEDC settings @@ -496,6 +497,7 @@ esp_err_t ledc_set_fade_step_and_start(ledc_mode_t speed_mode, ledc_channel_t ch * - ESP_FAIL Fade function init error */ esp_err_t ledc_cb_register(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_cbs_t *cbs, void *user_arg); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32c3/include/driver/include/driver/mcpwm.h b/tools/sdk/esp32c3/include/driver/include/driver/mcpwm.h index fed2c3f326d..c80bca21d23 100644 --- a/tools/sdk/esp32c3/include/driver/include/driver/mcpwm.h +++ b/tools/sdk/esp32c3/include/driver/include/driver/mcpwm.h @@ -7,6 +7,7 @@ #pragma once #include "soc/soc_caps.h" +#include "esp_assert.h" #if SOC_MCPWM_SUPPORTED #include "esp_err.h" #include "soc/soc.h" @@ -74,7 +75,7 @@ typedef enum { MCPWM_UNIT_MAX, /*! #include "soc/gdma_channel.h" +#include "hal/gdma_types.h" #include "esp_err.h" #ifdef __cplusplus @@ -23,34 +24,6 @@ extern "C" { */ typedef struct gdma_channel_t *gdma_channel_handle_t; -/** - * @brief Enumeration of peripherals which have the DMA capability - * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. - * - */ -typedef enum { - GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ - GDMA_TRIG_PERIPH_UART, /*!< GDMA trigger peripheral: UART */ - GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ - GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ - GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ - GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ - GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ - GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ - GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ - GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ - GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ -} gdma_trigger_peripheral_t; - -/** - * @brief Enumeration of GDMA channel direction - * - */ -typedef enum { - GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ - GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ -} gdma_channel_direction_t; - /** * @brief Collection of configuration items that used for allocating GDMA channel * @@ -124,13 +97,13 @@ typedef struct { */ typedef struct { gdma_trigger_peripheral_t periph; /*!< Target peripheral which will trigger DMA operations */ - int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UART0 */ + int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UHCI0 */ } gdma_trigger_t; /** * @brief Helper macro to initialize GDMA trigger * @note value of `peri` must be selected from `gdma_trigger_peripheral_t` enum. - * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UART,0) + * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_I2S,0) * */ #define GDMA_MAKE_TRIGGER(peri, id) \ @@ -325,6 +298,22 @@ esp_err_t gdma_append(gdma_channel_handle_t dma_chan); */ esp_err_t gdma_reset(gdma_channel_handle_t dma_chan); +/** + * @brief Get the mask of free M2M trigger IDs + * + * @note On some ESP targets (e.g. ESP32C3/S3), DMA trigger used for memory copy can be any of valid peripheral's trigger ID, + * which can bring conflict if the peripheral is also using the same trigger ID. This function can return the free IDs + * for memory copy, at the runtime. + * + * @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel` + * @param[out] mask Returned mask of free M2M trigger IDs + * @return + * - ESP_OK: Get free M2M trigger IDs successfully + * - ESP_ERR_INVALID_ARG: Get free M2M trigger IDs failed because of invalid argument + * - ESP_FAIL: Get free M2M trigger IDs failed because of other error + */ +esp_err_t gdma_get_free_m2m_trig_id_mask(gdma_channel_handle_t dma_chan, uint32_t *mask); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32c3/include/driver/include/esp_private/gpio.h b/tools/sdk/esp32c3/include/driver/include/esp_private/gpio.h index c4227dc8c4f..65211a5e4e8 100644 --- a/tools/sdk/esp32c3/include/driver/include/esp_private/gpio.h +++ b/tools/sdk/esp32c3/include/driver/include/esp_private/gpio.h @@ -12,7 +12,6 @@ #include "soc/soc_caps.h" #include "driver/gpio.h" -#if SOC_GPIO_SUPPORT_SLP_SWITCH #if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Emulate ESP32S2 behaviour to backup FUN_PU, FUN_PD information @@ -34,4 +33,3 @@ esp_err_t gpio_sleep_pupd_config_apply(gpio_num_t gpio_num); */ esp_err_t gpio_sleep_pupd_config_unapply(gpio_num_t gpio_num); #endif -#endif diff --git a/tools/sdk/esp32c3/include/efuse/esp32c3/include/esp_efuse_table.h b/tools/sdk/esp32c3/include/efuse/esp32c3/include/esp_efuse_table.h index 5197a3e5da6..9f432c91423 100644 --- a/tools/sdk/esp32c3/include/efuse/esp32c3/include/esp_efuse_table.h +++ b/tools/sdk/esp32c3/include/efuse/esp32c3/include/esp_efuse_table.h @@ -9,7 +9,7 @@ extern "C" { #endif -// md5_digest_table 6614a99de35023cf9ba3849a2b80e9e7 +// md5_digest_table d006c80095638b5dbdc8649bf7e04dce // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. @@ -91,6 +91,8 @@ extern const esp_efuse_desc_t* ESP_EFUSE_UART_PRINT_CONTROL[]; extern const esp_efuse_desc_t* ESP_EFUSE_FORCE_SEND_RESUME[]; extern const esp_efuse_desc_t* ESP_EFUSE_SECURE_VERSION[]; extern const esp_efuse_desc_t* ESP_EFUSE_ERR_RST_ENABLE[]; +extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_WAFER_VERSION_MAJOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_BLK_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_CLK[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_Q_D1[]; @@ -103,11 +105,12 @@ extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D4[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D5[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D6[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D7[]; -extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MINOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[]; -extern const esp_efuse_desc_t* ESP_EFUSE_BLOCK1_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MINOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[]; -extern const esp_efuse_desc_t* ESP_EFUSE_BLOCK2_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_TEMP_CALIB[]; extern const esp_efuse_desc_t* ESP_EFUSE_OCODE[]; extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_INIT_CODE_ATTEN0[]; diff --git a/tools/sdk/esp32c3/include/efuse/include/esp_efuse.h b/tools/sdk/esp32c3/include/efuse/include/esp_efuse.h index 435b5e100fb..f2c08bad30e 100644 --- a/tools/sdk/esp32c3/include/efuse/include/esp_efuse.h +++ b/tools/sdk/esp32c3/include/efuse/include/esp_efuse.h @@ -276,13 +276,6 @@ esp_err_t esp_efuse_read_block(esp_efuse_block_t blk, void* dst_key, size_t offs */ esp_err_t esp_efuse_write_block(esp_efuse_block_t blk, const void* src_key, size_t offset_in_bits, size_t size_bits); -/** - * @brief Returns chip version from efuse - * - * @return chip version - */ -uint8_t esp_efuse_get_chip_ver(void); - /** * @brief Returns chip package from efuse * diff --git a/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts.h b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts.h new file mode 100644 index 00000000000..ad800303a17 --- /dev/null +++ b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts.h @@ -0,0 +1,135 @@ +// Copyright 2015-2019 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 +#ifndef _ESP_TTS_H_ +#define _ESP_TTS_H_ + +#include "stdlib.h" +#include "stdio.h" +#include "esp_tts_voice.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + NONE_MODE = 0, //do not play any word before playing a specific number + ALI_PAY_MODE, //play zhi fu bao shou kuan before playing a specific number + WEIXIN_PAY_MODE //play wei xin shou kuan before playing a specific number +} pay_mode_t; + +typedef void * esp_tts_handle_t; + + +/** + * @brief Init an instance of the TTS voice set structure. + * + * @param template The const esp_tts_voice_template. + * @param data The customize voice data + * @return + * - NULL: Init failed + * - Others: The instance of voice set + */ +esp_tts_voice_t *esp_tts_voice_set_init(const esp_tts_voice_t *template, void *data); + +/** + * @brief Init an instance of the TTS voice set structure. + * + * @param template The const esp_tts_voice_template. + * @param data The customize voice data + * @return + * - NULL: Init failed + * - Others: The instance of voice set + */ +void esp_tts_voice_set_free(esp_tts_voice_t *voice); + +/** + * @brief Creates an instance of the TTS structure. + * + * @param voice Voice set containing all basic phonemes. + * @return + * - NULL: Create failed + * - Others: The instance of TTS structure + */ +esp_tts_handle_t esp_tts_create(esp_tts_voice_t *voice); + +/** + * @brief parse money pronuciation. + * + * @param tts_handle Instance of TTS + * @param yuan The number of yuan + * @param jiao The number of jiao + * @param fen The number of fen + * @param mode The pay mode: please refer to pay_mode_t + * @return + * - 0: failed + * - 1: succeeded + */ +int esp_tts_parse_money(esp_tts_handle_t tts_handle, int yuan, int jiao, int fen, pay_mode_t mode); + +/** + * @brief parse Chinese PinYin pronuciation. + * + * @param tts_handle Instance of TTS + * @param pinyin PinYin string, like this "da4 jia1 hao3" + * @return + * - 0: failed + * - 1: succeeded + */ +int esp_tts_parse_pinyin(esp_tts_handle_t tts_handle, const char *pinyin); + +/** + * @brief parse Chinese string. + * + * @param tts_handle Instance of TTS + * @param str Chinese string, like this "大家好" + * @return + * - 0: failed + * - 1: succeeded + */ +int esp_tts_parse_chinese(esp_tts_handle_t tts_handle, const char *str); + +/** + * @brief output TTS voice data by stream. + * + * @Warning The output data should not be freed. + Once the output length is 0, the all voice data has been output. + * + * @param tts_handle Instance of TTS + * @param len The length of output data + * @param speed The speech speed speed of synthesized speech, + range:0~5, 0: the slowest speed, 5: the fastest speech + * @return + * - voice raw data + */ +short* esp_tts_stream_play(esp_tts_handle_t tts_handle, int *len, unsigned int speed); + +/** + * @brief reset tts stream and clean all cache of TTS instance. + * + * @param tts_handle Instance of TTS + */ +void esp_tts_stream_reset(esp_tts_handle_t tts_handle); + +/** + * @brief Free the TTS instance + * + * @param tts_handle The instance of TTS. + */ +void esp_tts_destroy(esp_tts_handle_t tts_handle); + +#ifdef __cplusplus +extern "C" { +#endif + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_parser.h b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_parser.h new file mode 100644 index 00000000000..ce71b04e319 --- /dev/null +++ b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_parser.h @@ -0,0 +1,25 @@ +#ifndef _ESP_TTS_PARSER_H_ +#define _ESP_TTS_PARSER_H_ + +#include "stdlib.h" +#include "esp_tts_voice.h" + + +typedef struct { + int *syll_idx; + int syll_num; + int total_num; + esp_tts_voice_t *voice; +}esp_tts_utt_t; + +esp_tts_utt_t* esp_tts_parser_chinese (const char* str, esp_tts_voice_t *voice); + +esp_tts_utt_t* esp_tts_parser_money(char *play_tag, int yuan, int jiao, int fen, esp_tts_voice_t *voice); + +esp_tts_utt_t* esp_tts_parser_pinyin(char* pinyin, esp_tts_voice_t *voice); + +esp_tts_utt_t* esp_tts_utt_alloc(int syll_num, esp_tts_voice_t *voice); + +void esp_tts_utt_free(esp_tts_utt_t *utt); + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_player.h b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_player.h new file mode 100644 index 00000000000..2070011af41 --- /dev/null +++ b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_player.h @@ -0,0 +1,67 @@ +// Copyright 2015-2019 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 +#ifndef _ESP_TTS_PLAYER_H_ +#define _ESP_TTS_PLAYER_H_ + +#include "stdlib.h" +#include "stdio.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef void * esp_tts_player_handle_t; + +/** + * @brief Creates an instance of the TTS Player structure. + * + * @param mode mode of player, default:0 + * @return + * - NULL: Create failed + * - Others: The instance of TTS Player + */ +esp_tts_player_handle_t esp_tts_player_create(int mode); + + + +/** + * @brief Concatenate audio files. + * + * @Warning Just support mono audio data. + * + * @param player The handle of TTS player + * @param file_list The dir of files + * @param file_num The number of file + * @param len The length of return audio buffer + * @param sample_rate The sample rate of input audio file + * @param sample_width The sample width of input audio file, sample_width=1:8-bit, sample_width=2:16-bit,... + * @return + * - audio data buffer + */ +unsigned char* esp_tts_stream_play_by_concat(esp_tts_player_handle_t player, const char **file_list, int file_num, int *len, int *sample_rate, int *sample_width); + + +/** + * @brief Free the TTS Player instance + * + * @param player The instance of TTS Player. + */ +void esp_tts_player_destroy(esp_tts_player_handle_t player); + +#ifdef __cplusplus +extern "C" { +#endif + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_stretcher.h b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_stretcher.h new file mode 100644 index 00000000000..ab47b272c0d --- /dev/null +++ b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_stretcher.h @@ -0,0 +1,48 @@ +//////////////////////////////////////////////////////////////////////////// +// **** AUDIO-STRETCH **** // +// Time Domain Harmonic Scaler // +// Copyright (c) 2019 David Bryant // +// All Rights Reserved. // +// Distributed under the BSD Software License (see license.txt) // +//////////////////////////////////////////////////////////////////////////// + +// stretch.h + +// Time Domain Harmonic Compression and Expansion +// +// This library performs time domain harmonic scaling with pitch detection +// to stretch the timing of a 16-bit PCM signal (either mono or stereo) from +// 1/2 to 2 times its original length. This is done without altering any of +// its tonal characteristics. + +#ifndef STRETCH_H +#define STRETCH_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *StretchHandle; + +/* extern function */ +StretchHandle stretch_init (int shortest_period, int longest_period, int num_chans, int fast_mode); +int stretch_samples (StretchHandle handle, short *samples, int num_samples, short *output, float ratio); +int stretch_flush (StretchHandle handle, short *output); +void stretch_deinit (StretchHandle handle); + +/* internel function */ +StretchHandle stretcher_init_internal(int shortest_period, int longest_period, int buff_len); +void stretcher_deinit (StretchHandle handle); +int stretcher_is_empty(StretchHandle handle); +int stretcher_is_full(StretchHandle handle, int num_samples); +int stretcher_push_data(StretchHandle handle, short *samples, int num_samples); +int stretcher_stretch_samples(StretchHandle handle, short *output, float ratio); +int stretcher_stretch_samples_flash(StretchHandle handle, short *output, float ratio, const short *period_data, + int *start_idx, int end_idx); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice.h b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice.h new file mode 100644 index 00000000000..77f263e3935 --- /dev/null +++ b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice.h @@ -0,0 +1,20 @@ +#ifndef _ESP_TTS_VOICE_H_ +#define _ESP_TTS_VOICE_H_ + +typedef struct { + char *voice_name; // voice set name + char *format; // the format of voice data, currently support pcm and amrwb + int sample_rate; // the sample rate of voice data, just for pcm format + int bit_width; // the bit width of voice data, just for pcm format + int syll_num; // the syllable mumber + char **sylls; // the syllable names + int *syll_pos; // the position of syllable in syllable audio data array + short *pinyin_idx; // the index of pinyin + short *phrase_dict; // the pinyin dictionary of common phrase + short *extern_idx; // the idx of extern phrases + short *extern_dict; // the extern phrase dictionary + unsigned char *data; // the audio data of all syllables +} esp_tts_voice_t; + + +#endif \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_template.h b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_template.h new file mode 100644 index 00000000000..ce5f5b6f455 --- /dev/null +++ b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_template.h @@ -0,0 +1,5 @@ +#pragma once + + +#include "esp_tts.h" +extern const esp_tts_voice_t esp_tts_voice_template; diff --git a/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_xiaole.h b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_xiaole.h new file mode 100644 index 00000000000..f87866ae6cb --- /dev/null +++ b/tools/sdk/esp32c3/include/esp-sr/esp-tts/esp_tts_chinese/include/esp_tts_voice_xiaole.h @@ -0,0 +1,5 @@ +#pragma once + + +#include "esp_tts.h" +extern const esp_tts_voice_t esp_tts_voice_xiaole; diff --git a/tools/sdk/esp32c3/include/esp_common/include/esp_assert.h b/tools/sdk/esp32c3/include/esp_common/include/esp_assert.h index 39d6a32843f..17e4b928f83 100644 --- a/tools/sdk/esp32c3/include/esp_common/include/esp_assert.h +++ b/tools/sdk/esp32c3/include/esp_common/include/esp_assert.h @@ -16,15 +16,21 @@ #include "assert.h" +#ifndef __cplusplus + #define ESP_STATIC_ASSERT _Static_assert +#else // __cplusplus + #define ESP_STATIC_ASSERT static_assert +#endif // __cplusplus + /* Assert at compile time if possible, runtime otherwise */ #ifndef __cplusplus /* __builtin_choose_expr() is only in C, makes this a lot cleaner */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ - _Static_assert(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ + ESP_STATIC_ASSERT(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ assert(#MSG && (CONDITION)); \ } while(0) #else -/* for C++, use __attribute__((error)) - works almost as well as _Static_assert */ +/* for C++, use __attribute__((error)) - works almost as well as ESP_STATIC_ASSERT */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ if (__builtin_constant_p(CONDITION) && !(CONDITION)) { \ extern __attribute__((error(#MSG))) void failed_compile_time_assert(void); \ diff --git a/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h index 74dda44cbdc..4caac067f95 100644 --- a/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32c3/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 3 +#define ESP_IDF_VERSION_PATCH 4 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32c3/include/esp_diagnostics/include/esp_diagnostics.h b/tools/sdk/esp32c3/include/esp_diagnostics/include/esp_diagnostics.h index 0e0fb50da36..682f316db7b 100644 --- a/tools/sdk/esp32c3/include/esp_diagnostics/include/esp_diagnostics.h +++ b/tools/sdk/esp32c3/include/esp_diagnostics/include/esp_diagnostics.h @@ -238,7 +238,7 @@ esp_err_t esp_diag_log_event(const char *tag, const char *format, ...) __attribu */ #define ESP_DIAG_EVENT(tag, format, ...) \ { \ - esp_diag_log_event(tag, "EV (%" PRIu32 ") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ + esp_diag_log_event(tag, "EV (%"PRIu32") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ ESP_LOGI(tag, format, ##__VA_ARGS__); \ } diff --git a/tools/sdk/esp32c3/include/esp_https_server/include/esp_https_server.h b/tools/sdk/esp32c3/include/esp_https_server/include/esp_https_server.h index 75720bd1ce7..f5159207216 100644 --- a/tools/sdk/esp32c3/include/esp_https_server/include/esp_https_server.h +++ b/tools/sdk/esp32c3/include/esp_https_server/include/esp_https_server.h @@ -119,6 +119,8 @@ typedef struct httpd_ssl_config httpd_ssl_config_t; .global_user_ctx_free_fn = NULL, \ .global_transport_ctx = NULL, \ .global_transport_ctx_free_fn = NULL, \ + .enable_so_linger = false, \ + .linger_timeout = 0, \ .open_fn = NULL, \ .close_fn = NULL, \ .uri_match_fn = NULL \ diff --git a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_chip_info.h b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_chip_info.h index 0b081d37e1b..a99863d7718 100644 --- a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_chip_info.h +++ b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_chip_info.h @@ -41,6 +41,7 @@ typedef enum { typedef struct { esp_chip_model_t model; //!< chip model, one of esp_chip_model_t uint32_t features; //!< bit mask of CHIP_FEATURE_x feature flags + uint16_t full_revision; //!< chip revision number (in format MXX; where M - wafer major version, XX - wafer minor version) uint8_t cores; //!< number of CPU cores uint8_t revision; //!< chip revision number } esp_chip_info_t; diff --git a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_intr_alloc.h b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_intr_alloc.h index a26fde9394f..a800c94fe86 100644 --- a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_intr_alloc.h +++ b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_intr_alloc.h @@ -64,6 +64,7 @@ extern "C" { #define ETS_INTERNAL_SW0_INTR_SOURCE -4 ///< Software int source 1 #define ETS_INTERNAL_SW1_INTR_SOURCE -5 ///< Software int source 2 #define ETS_INTERNAL_PROFILING_INTR_SOURCE -6 ///< Int source for profiling +#define ETS_INTERNAL_UNUSED_INTR_SOURCE -99 ///< Interrupt is not assigned to any source /**@}*/ diff --git a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h index ee0b72953f0..5eb5081b562 100644 --- a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h +++ b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h @@ -6,6 +6,7 @@ #pragma once #include +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { @@ -20,6 +21,15 @@ extern "C" { */ void esp_sleep_enable_adc_tsens_monitor(bool enable); +// IDF does not officially support esp32h2 in v4.4 +#if !CONFIG_IDF_TARGET_ESP32H2 +/** + * @brief Isolate all digital IOs except those that are held during deep sleep + * + * Reduce digital IOs current leakage during deep sleep. + */ +void esp_sleep_isolate_digital_gpio(void); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/sleep_gpio.h b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/sleep_gpio.h index abab21871a4..493687ec32d 100644 --- a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/sleep_gpio.h +++ b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_private/sleep_gpio.h @@ -18,7 +18,7 @@ extern "C" { * This file contains declarations of GPIO related functions in light sleep mode. */ -#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Save GPIO pull-up and pull-down configuration information in the wake-up state @@ -39,7 +39,7 @@ void gpio_sleep_mode_config_apply(void); */ void gpio_sleep_mode_config_unapply(void); -#endif // SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_sleep.h b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_sleep.h index 8090fe85211..1c1b51d3519 100644 --- a/tools/sdk/esp32c3/include/esp_hw_support/include/esp_sleep.h +++ b/tools/sdk/esp32c3/include/esp_hw_support/include/esp_sleep.h @@ -80,6 +80,11 @@ typedef enum { /* Leave this type define for compatibility */ typedef esp_sleep_source_t esp_sleep_wakeup_cause_t; +enum { + ESP_ERR_SLEEP_REJECT = ESP_ERR_INVALID_STATE, + ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION = ESP_ERR_INVALID_ARG, +}; + /** * @brief Disable wakeup source * @@ -101,10 +106,8 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source); #if SOC_ULP_SUPPORTED /** * @brief Enable wakeup by ULP coprocessor - * @note In revisions 0 and 1 of the ESP32, ULP wakeup source - * cannot be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when - * ext0 wakeup source is used. + * @note On ESP32, ULP wakeup source cannot be used when RTC_PERIPH power domain is forced, + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * @return * - ESP_OK on success * - ESP_ERR_NOT_SUPPORTED if additional current by touch (CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT) is enabled. @@ -128,10 +131,8 @@ esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us); /** * @brief Enable wakeup by touch sensor * - * @note In revisions 0 and 1 of the ESP32, touch wakeup source - * can not be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup - * source is used. + * @note On ESP32, touch wakeup source can not be used when RTC_PERIPH power domain is forced + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * * @note The FSM mode of the touch button should be configured * as the timer trigger mode. @@ -179,8 +180,7 @@ bool esp_sleep_is_valid_wakeup_gpio(gpio_num_t gpio_num); * @note This function does not modify pin configuration. The pin is * configured in esp_sleep_start, immediately before entering sleep mode. * - * @note In revisions 0 and 1 of the ESP32, ext0 wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, ext0 wakeup source can not be used together with touch or ULP wakeup sources. * * @param gpio_num GPIO number used as wakeup source. Only GPIOs which are have RTC * functionality can be used: 0,2,4,12-15,25-27,32-39. @@ -265,8 +265,7 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee * wakeup level, for each GPIO which is used for wakeup. * Then call this function to enable wakeup feature. * - * @note In revisions 0 and 1 of the ESP32, GPIO wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources. * * @return * - ESP_OK on success @@ -351,7 +350,10 @@ void esp_deep_sleep_start(void) __attribute__((noreturn)); * * @return * - ESP_OK on success (returned after wakeup) - * - ESP_ERR_INVALID_STATE if WiFi or BT is not stopped + * - ESP_ERR_SLEEP_REJECT sleep request is rejected(wakeup source set before the sleep request) + * - ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION after deducting the sleep flow overhead, the final sleep duration + * is too short to cover the minimum sleep duration of the chip, when + * rtc timer wakeup source enabled */ esp_err_t esp_light_sleep_start(void); @@ -456,7 +458,6 @@ void esp_deep_sleep_disable_rom_logging(void); esp_err_t esp_sleep_cpu_pd_low_init(bool enable); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Configure to isolate all GPIO pins in sleep state */ @@ -467,7 +468,6 @@ void esp_sleep_config_gpio_isolate(void); * @param enable decide whether to switch status or not */ void esp_sleep_enable_gpio_switch(bool enable); -#endif #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_io.h b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_io.h index 2f2c613f1a8..9bc140870e4 100644 --- a/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_io.h +++ b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_io.h @@ -19,11 +19,35 @@ typedef void *esp_lcd_spi_bus_handle_t; /*!< Type of LCD S typedef void *esp_lcd_i2c_bus_handle_t; /*!< Type of LCD I2C bus handle */ typedef struct esp_lcd_i80_bus_t *esp_lcd_i80_bus_handle_t; /*!< Type of LCD intel 8080 bus handle */ +/** + * @brief Type of LCD panel IO event data + */ +typedef struct { +} esp_lcd_panel_io_event_data_t; + +/** + * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * + * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] edata Panel IO event data, fed by driver + * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` + * @return Whether a high priority task has been waken up by this function + */ +typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); + +/** + * @brief Type of LCD panel IO callbacks + */ +typedef struct { + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ +} esp_lcd_panel_io_callbacks_t; + + /** * @brief Transmit LCD command and receive corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -42,7 +66,7 @@ esp_err_t esp_lcd_panel_io_rx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, v * @brief Transmit LCD command and corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -65,7 +89,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c * Recycling of color buffer should be done in the callback `on_color_trans_done()`. * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] lcd_cmd The specific LCD command + * @param[in] lcd_cmd The specific LCD command, set to -1 if no command needed * @param[in] color Buffer that holds the RGB color data * @param[in] color_size Size of `color` in memory, in bytes * @return @@ -75,7 +99,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, const void *color, size_t color_size); /** - * @brief Destory LCD panel IO handle (deinitialize panel and free all corresponding resource) + * @brief Destroy LCD panel IO handle (deinitialize panel and free all corresponding resource) * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` * @return @@ -85,20 +109,16 @@ esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t io); /** - * @brief Type of LCD panel IO event data - */ -typedef struct { -} esp_lcd_panel_io_event_data_t; - -/** - * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * @brief Register LCD panel IO callbacks * - * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] edata Panel IO event data, fed by driver - * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` - * @return Whether a high priority task has been waken up by this function + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success */ -typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); +esp_err_t esp_lcd_panel_io_register_event_callbacks(esp_lcd_panel_io_handle_t io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); /** * @brief Panel IO configuration structure, for SPI interface @@ -142,7 +162,7 @@ typedef struct { uint32_t dev_addr; /*!< I2C device address */ esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ - size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C seclection) into control phase, in several bytes */ + size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C selection) into control phase, in several bytes */ unsigned int dc_bit_offset; /*!< Offset of the D/C selection bit in control phase */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ @@ -194,7 +214,7 @@ typedef struct { esp_err_t esp_lcd_new_i80_bus(const esp_lcd_i80_bus_config_t *bus_config, esp_lcd_i80_bus_handle_t *ret_bus); /** - * @brief Destory Intel 8080 bus handle + * @brief Destroy Intel 8080 bus handle * * @param[in] bus Intel 8080 bus handle, created by `esp_lcd_new_i80_bus()` * @return @@ -211,7 +231,7 @@ typedef struct { int cs_gpio_num; /*!< GPIO used for CS line, set to -1 will declaim exclusively use of I80 bus */ unsigned int pclk_hz; /*!< Frequency of pixel clock */ size_t trans_queue_depth; /*!< Transaction queue size, larger queue, higher throughput */ - esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was tranferred done */ + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was transferred done */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ diff --git a/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_ops.h b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_ops.h index 5099233ce83..63bc6fe2742 100644 --- a/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_ops.h +++ b/tools/sdk/esp32c3/include/esp_lcd/include/esp_lcd_panel_ops.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -110,9 +110,22 @@ esp_err_t esp_lcd_panel_set_gap(esp_lcd_panel_handle_t panel, int x_gap, int y_g */ esp_err_t esp_lcd_panel_invert_color(esp_lcd_panel_handle_t panel, bool invert_color_data); +/** + * @brief Turn on or off the display + * + * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` + * @param[in] on_off True to turns on display, False to turns off display + * @return + * - ESP_OK on success + * - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel + */ +esp_err_t esp_lcd_panel_disp_on_off(esp_lcd_panel_handle_t panel, bool on_off); + /** * @brief Turn off the display * + * @deprecated This function has similar functionality to `esp_lcd_panel_disp_on_off`. + * * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` * @param[in] off Whether to turn off the screen * @return diff --git a/tools/sdk/esp32c3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h b/tools/sdk/esp32c3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h index 9f2226587e5..88bf9db0d47 100644 --- a/tools/sdk/esp32c3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h +++ b/tools/sdk/esp32c3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h @@ -7,6 +7,7 @@ #include #include "esp_err.h" +#include "esp_lcd_panel_io.h" #ifdef __cplusplus extern "C" { @@ -73,6 +74,18 @@ struct esp_lcd_panel_io_t { * - ESP_OK on success */ esp_err_t (*del)(esp_lcd_panel_io_t *io); + + /** + * @brief Register LCD panel IO callbacks + * + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success + */ + esp_err_t (*register_event_callbacks)(esp_lcd_panel_io_t *io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); }; #ifdef __cplusplus diff --git a/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h index 60409b1b689..c41da24e963 100644 --- a/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32c3/include/esp_littlefs/include/esp_littlefs.h @@ -8,10 +8,10 @@ extern "C" { #endif -#define ESP_LITTLEFS_VERSION_NUMBER "1.5.1" +#define ESP_LITTLEFS_VERSION_NUMBER "1.5.2" #define ESP_LITTLEFS_VERSION_MAJOR 1 #define ESP_LITTLEFS_VERSION_MINOR 5 -#define ESP_LITTLEFS_VERSION_PATCH 1 +#define ESP_LITTLEFS_VERSION_PATCH 2 /** *Configuration structure for esp_vfs_littlefs_register. diff --git a/tools/sdk/esp32c3/include/esp_phy/include/esp_phy_init.h b/tools/sdk/esp32c3/include/esp_phy/include/esp_phy_init.h index efefd114d4f..bcf3e289d3d 100644 --- a/tools/sdk/esp32c3/include/esp_phy/include/esp_phy_init.h +++ b/tools/sdk/esp32c3/include/esp_phy/include/esp_phy_init.h @@ -178,12 +178,13 @@ void esp_phy_load_cal_and_init(void); /** * @brief Initialize backup memory for Phy power up/down */ -void esp_phy_pd_mem_init(void); +void esp_phy_modem_init(void); /** * @brief Deinitialize backup memory for Phy power up/down + * Set phy_init_flag if all modems deinit on ESP32C3 */ -void esp_phy_pd_mem_deinit(void); +void esp_phy_modem_deinit(void); #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_mqtt.h index eba3615a70c..8775eb8696f 100644 --- a/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ b/tools/sdk/esp32c3/include/esp_rainmaker/include/esp_rmaker_mqtt.h @@ -100,6 +100,17 @@ esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); */ void esp_rmaker_create_mqtt_topic(char *buf, size_t buf_size, const char *topic_suffix, const char *rule); +/** + * @brief Check if budget is available to publish an mqtt message + * + * @return true if budget is available + * @return false if budget is exhausted + * + * @note `esp_rmaker_mqtt_publish` API already does this check. In addition to that, + * some use-cases might still need to check for this. + */ +bool esp_rmaker_mqtt_is_budget_available(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32c3/include/esp_rom/esp32c3/esp_rom_caps.h b/tools/sdk/esp32c3/include/esp_rom/esp32c3/esp_rom_caps.h index 977d73fc90f..034a5c19d95 100644 --- a/tools/sdk/esp32c3/include/esp_rom/esp32c3/esp_rom_caps.h +++ b/tools/sdk/esp32c3/include/esp_rom/esp32c3/esp_rom_caps.h @@ -22,3 +22,4 @@ #define ESP_ROM_HAS_RETARGETABLE_LOCKING (1) // ROM was built with retargetable locking #define ESP_ROM_HAS_ERASE_0_REGION_BUG (1) // ROM has esp_flash_erase_region(size=0) bug #define ESP_ROM_NEEDS_SWSETUP_WORKAROUND (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing +#define ESP_ROM_HAS_ETS_PRINTF_BUG (1) // ROM has ets_printf bug when disable the ROM log either by eFuse or RTC storage register diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/rtc.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/rtc.h index 2be040aa99d..7410180da3a 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/rtc.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -100,17 +101,17 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/secure_boot.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/secure_boot.h index 50a3fcd4948..04c3c509f78 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/secure_boot.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -62,7 +63,7 @@ typedef struct { uint32_t block_crc; uint8_t _padding[16]; } ets_secure_boot_sig_block_t; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); /* ROM supports up to 3, but IDF only checks the first one (SECURE_BOOT_NUM_BLOCKS) */ #define SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE 3 @@ -73,7 +74,7 @@ typedef struct { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE)]; } ets_secure_boot_signature_t; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); typedef struct { const void *key_digests[SECURE_BOOT_NUM_BLOCKS]; diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/rtc.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/rtc.h index 2a7f6cb6140..1e6100cb106 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/rtc.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/rtc.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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ROM_RTC_H_ #define _ROM_RTC_H_ @@ -19,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -105,24 +98,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/secure_boot.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/secure_boot.h index a9d417283b7..26cd0b4b842 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/secure_boot.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32c3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/rtc.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/rtc.h index e3a8d9d63e2..2629fd9a6d9 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/rtc.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/rtc.h @@ -11,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -98,25 +99,25 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); -_Static_assert((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/secure_boot.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/secure_boot.h index 36a490d8584..b7dd24b00cb 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/secure_boot.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32h2/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/rtc.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/rtc.h index 2de02a88c8e..2c5b1b2a631 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/rtc.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -101,20 +102,21 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/secure_boot.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/secure_boot.h index a0fcecfd3c5..49edf7d6fd7 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/secure_boot.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,6 +9,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -92,7 +93,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -102,7 +103,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/rtc.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/rtc.h index d395ce3976e..168ca7997a7 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/rtc.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/rtc.h @@ -8,6 +8,7 @@ #include #include +#include "esp_assert.h" #include "soc/rtc_cntl_reg.h" #include "soc/reset_reasons.h" @@ -91,24 +92,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/secure_boot.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/secure_boot.h index a372517b7a1..3c374fe3016 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/secure_boot.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -80,7 +81,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -90,7 +91,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h b/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h +++ b/tools/sdk/esp32c3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32c3/include/esp_wifi/include/esp_mesh_internal.h b/tools/sdk/esp32c3/include/esp_wifi/include/esp_mesh_internal.h index e967dbaafbc..af602bb5480 100644 --- a/tools/sdk/esp32c3/include/esp_wifi/include/esp_mesh_internal.h +++ b/tools/sdk/esp32c3/include/esp_wifi/include/esp_mesh_internal.h @@ -1,16 +1,8 @@ -// Copyright 2017-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: 2017-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __ESP_MESH_INTERNAL_H__ #define __ESP_MESH_INTERNAL_H__ @@ -107,6 +99,9 @@ typedef struct { mesh_chain_layer_t chain; } __attribute__((packed)) mesh_chain_assoc_t; +/* mesh max connections */ +#define MESH_MAX_CONNECTIONS (10) + /** * @brief Mesh PS duties */ @@ -117,7 +112,7 @@ typedef struct { bool used; uint8_t duty; uint8_t mac[6]; - } child[ESP_WIFI_MAX_CONN_NUM]; + } child[MESH_MAX_CONNECTIONS]; } esp_mesh_ps_duties_t; /******************************************************* 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 08be53cf6a4..ab138a96926 100644 --- a/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi.h +++ b/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi.h @@ -108,6 +108,7 @@ typedef struct { int mgmt_sbuf_num; /**< WiFi management short buffer number, the minimum value is 6, the maximum value is 32 */ uint64_t feature_caps; /**< Enables additional WiFi features and capabilities */ bool sta_disconnected_pm; /**< WiFi Power Management for station at disconnected status */ + int espnow_max_encrypt_num; /**< Maximum encrypt number of peers supported by espnow */ int magic; /**< WiFi init magic number, it should be the last field */ } wifi_init_config_t; @@ -227,6 +228,7 @@ extern uint64_t g_wifi_feature_caps; .mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \ .feature_caps = g_wifi_feature_caps, \ .sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \ + .espnow_max_encrypt_num = CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM, \ .magic = WIFI_INIT_CONFIG_MAGIC\ } @@ -455,6 +457,21 @@ esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number); esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records); +/** + * @brief Clear AP list found in last scan + * + * @attention When the obtained ap list fails,bss info must be cleared,otherwise it may cause memory leakage. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_MODE: WiFi mode is wrong + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_clear_ap_list(void); + + /** * @brief Get information of AP which the ESP32 station is associated with * @@ -567,6 +584,8 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); * @attention 2. When ESP32 is in STA mode, this API should not be called when STA is scanning or connecting to an external AP * @attention 3. When ESP32 is in softAP mode, this API should not be called when softAP has connected to external STAs * @attention 4. When ESP32 is in STA+softAP mode, this API should not be called when in the scenarios described above + * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remeber the channel used before wifi stop, + * you need to call this API again after wifi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. * * @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel * @param second for HT20, second is ignored, for HT40, second is the second channel @@ -776,6 +795,7 @@ esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter * @attention 2. For station configuration, bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. * @attention 3. ESP32 is limited to only one channel, so when in the soft-AP+station mode, the soft-AP will adjust its channel automatically to be the same as * the channel of the ESP32 station. + * @attention 4. The configuration will be stored in NVS * * @param interface interface * @param conf station or soft-AP configuration @@ -1161,7 +1181,9 @@ esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi); * @brief Start an FTM Initiator session by sending FTM request * If successful, event WIFI_EVENT_FTM_REPORT is generated with the result of the FTM procedure * - * @attention Use this API only in Station mode + * @attention 1. Use this API only in Station mode. + * @attention 2. If FTM is initiated on a different channel than Station is connected in or internal SoftAP is started in, + * FTM defaults to a single burst in ASAP mode. * * @param cfg FTM Initiator session configuration * @@ -1219,7 +1241,7 @@ esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable); * @attention 3. This configuration would influence nothing until some module configure wake_window * @attention 4. A sensible interval which is not too small is recommended (e.g. 100ms) * - * @param interval how much micriosecond would the chip wake up, from 1 to 65535. + * @param interval how much milliseconds would the chip wake up, from 1 to 65535. */ esp_err_t esp_wifi_set_connectionless_wake_interval(uint16_t interval); diff --git a/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi_types.h b/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi_types.h index 4dae6a8c3fa..60b22707c15 100644 --- a/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi_types.h +++ b/tools/sdk/esp32c3/include/esp_wifi/include/esp_wifi_types.h @@ -61,41 +61,63 @@ typedef enum { } wifi_auth_mode_t; typedef enum { - WIFI_REASON_UNSPECIFIED = 1, - WIFI_REASON_AUTH_EXPIRE = 2, - WIFI_REASON_AUTH_LEAVE = 3, - WIFI_REASON_ASSOC_EXPIRE = 4, - WIFI_REASON_ASSOC_TOOMANY = 5, - WIFI_REASON_NOT_AUTHED = 6, - WIFI_REASON_NOT_ASSOCED = 7, - WIFI_REASON_ASSOC_LEAVE = 8, - WIFI_REASON_ASSOC_NOT_AUTHED = 9, - WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, - WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, - WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, - WIFI_REASON_IE_INVALID = 13, - WIFI_REASON_MIC_FAILURE = 14, - WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, - WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, - WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, - WIFI_REASON_GROUP_CIPHER_INVALID = 18, - WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, - WIFI_REASON_AKMP_INVALID = 20, - WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, - WIFI_REASON_INVALID_RSN_IE_CAP = 22, - WIFI_REASON_802_1X_AUTH_FAILED = 23, - WIFI_REASON_CIPHER_SUITE_REJECTED = 24, - - WIFI_REASON_INVALID_PMKID = 53, - - WIFI_REASON_BEACON_TIMEOUT = 200, - WIFI_REASON_NO_AP_FOUND = 201, - WIFI_REASON_AUTH_FAIL = 202, - WIFI_REASON_ASSOC_FAIL = 203, - WIFI_REASON_HANDSHAKE_TIMEOUT = 204, - WIFI_REASON_CONNECTION_FAIL = 205, - WIFI_REASON_AP_TSF_RESET = 206, - WIFI_REASON_ROAMING = 207, + WIFI_REASON_UNSPECIFIED = 1, + WIFI_REASON_AUTH_EXPIRE = 2, + WIFI_REASON_AUTH_LEAVE = 3, + WIFI_REASON_ASSOC_EXPIRE = 4, + WIFI_REASON_ASSOC_TOOMANY = 5, + WIFI_REASON_NOT_AUTHED = 6, + WIFI_REASON_NOT_ASSOCED = 7, + WIFI_REASON_ASSOC_LEAVE = 8, + WIFI_REASON_ASSOC_NOT_AUTHED = 9, + WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, + WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, + WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, + WIFI_REASON_IE_INVALID = 13, + WIFI_REASON_MIC_FAILURE = 14, + WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, + WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, + WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, + WIFI_REASON_GROUP_CIPHER_INVALID = 18, + WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, + WIFI_REASON_AKMP_INVALID = 20, + WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, + WIFI_REASON_INVALID_RSN_IE_CAP = 22, + WIFI_REASON_802_1X_AUTH_FAILED = 23, + WIFI_REASON_CIPHER_SUITE_REJECTED = 24, + WIFI_REASON_TDLS_PEER_UNREACHABLE = 25, + WIFI_REASON_TDLS_UNSPECIFIED = 26, + WIFI_REASON_SSP_REQUESTED_DISASSOC = 27, + WIFI_REASON_NO_SSP_ROAMING_AGREEMENT = 28, + WIFI_REASON_BAD_CIPHER_OR_AKM = 29, + WIFI_REASON_NOT_AUTHORIZED_THIS_LOCATION = 30, + WIFI_REASON_SERVICE_CHANGE_PERCLUDES_TS = 31, + WIFI_REASON_UNSPECIFIED_QOS = 32, + WIFI_REASON_NOT_ENOUGH_BANDWIDTH = 33, + WIFI_REASON_MISSING_ACKS = 34, + WIFI_REASON_EXCEEDED_TXOP = 35, + WIFI_REASON_STA_LEAVING = 36, + WIFI_REASON_END_BA = 37, + WIFI_REASON_UNKNOWN_BA = 38, + WIFI_REASON_TIMEOUT = 39, + WIFI_REASON_PEER_INITIATED = 46, + WIFI_REASON_AP_INITIATED = 47, + WIFI_REASON_INVALID_FT_ACTION_FRAME_COUNT = 48, + WIFI_REASON_INVALID_PMKID = 49, + WIFI_REASON_INVALID_MDE = 50, + WIFI_REASON_INVALID_FTE = 51, + WIFI_REASON_TRANSMISSION_LINK_ESTABLISH_FAILED = 67, + WIFI_REASON_ALTERATIVE_CHANNEL_OCCUPIED = 68, + + WIFI_REASON_BEACON_TIMEOUT = 200, + WIFI_REASON_NO_AP_FOUND = 201, + WIFI_REASON_AUTH_FAIL = 202, + WIFI_REASON_ASSOC_FAIL = 203, + WIFI_REASON_HANDSHAKE_TIMEOUT = 204, + WIFI_REASON_CONNECTION_FAIL = 205, + WIFI_REASON_AP_TSF_RESET = 206, + WIFI_REASON_ROAMING = 207, + WIFI_REASON_ASSOC_COMEBACK_TIME_TOO_LONG = 208, } wifi_err_reason_t; typedef enum { @@ -235,7 +257,7 @@ typedef struct { uint8_t channel; /**< Channel of ESP32 soft-AP */ wifi_auth_mode_t authmode; /**< Auth mode of ESP32 soft-AP. Do not support AUTH_WEP in soft-AP mode */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ - uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 10 */ + uint8_t max_connection; /**< Max number of stations allowed to connect in */ uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */ wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of SoftAP, group cipher will be derived using this. cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */ bool ftm_responder; /**< Enable FTM Responder mode */ @@ -256,8 +278,10 @@ typedef struct { uint32_t rm_enabled:1; /**< Whether Radio Measurements are enabled for the connection */ uint32_t btm_enabled:1; /**< Whether BSS Transition Management is enabled for the connection */ uint32_t mbo_enabled:1; /**< Whether MBO is enabled for the connection */ - uint32_t reserved:29; /**< Reserved for future feature set */ + uint32_t transition_disable:1; /**< Whether to enable transition disable feature */ + uint32_t reserved:28; /**< Reserved for future feature set */ wifi_sae_pwe_method_t sae_pwe_h2e; /**< Whether SAE hash to element is enabled */ + uint8_t failure_retry_cnt; /**< Number of connection retries station will do before moving to next AP. scan_method should be set as WIFI_ALL_CHANNEL_SCAN to use this config. Note: Enabling this may cause connection time to increase incase best AP doesn't behave properly. */ } wifi_sta_config_t; /** @brief Configuration data for ESP32 AP or STA. @@ -283,7 +307,11 @@ typedef struct { uint32_t reserved:27; /**< bit: 5..31 reserved */ } wifi_sta_info_t; -#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32 soft-AP */ +#if CONFIG_IDF_TARGET_ESP32C3 +#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */ +#else +#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */ +#endif /** @brief List of stations associated with the ESP32 Soft-AP */ typedef struct { @@ -640,6 +668,7 @@ typedef struct { uint8_t ssid_len; /**< SSID length of disconnected AP */ uint8_t bssid[6]; /**< BSSID of disconnected AP */ uint8_t reason; /**< reason of disconnection */ + int8_t rssi; /**< rssi of disconnection */ } wifi_event_sta_disconnected_t; /** Argument structure for WIFI_EVENT_STA_AUTHMODE_CHANGE event */ diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_common.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_common.h similarity index 83% rename from tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_common.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_common.h index bc8dc619544..988fdf35f57 100644 --- a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_common.h +++ b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_common.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -52,6 +52,19 @@ bool dsp_is_power_of_two(int x); */ int dsp_power_of_two(int x); + +/** + * @brief Logginng for esp32s3 TIE core + * Registers covered q0 to q7, ACCX and SAR_BYTE + * + * @param n_regs: number of registers to be logged at once + * @param ...: register codes 0, 1, 2, 3, 4, 5, 6, 7, 'a', 's' + * + * @return ESP_OK + * + */ +esp_err_t tie_log(int n_regs, ...); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_err.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_err.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_err.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_err.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_err_codes.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h similarity index 89% rename from tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_err_codes.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h index c8827781a80..a4176e5a818 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/common/include/dsp_err_codes.h +++ b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -22,6 +22,7 @@ #define ESP_ERR_DSP_PARAM_OUTOFRANGE (ESP_ERR_DSP_BASE + 3) #define ESP_ERR_DSP_UNINITIALIZED (ESP_ERR_DSP_BASE + 4) #define ESP_ERR_DSP_REINITIALIZED (ESP_ERR_DSP_BASE + 5) +#define ESP_ERR_DSP_ARRAY_NOT_ALIGNED (ESP_ERR_DSP_BASE + 6) #endif // _dsp_error_codes_H_ \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_tests.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_tests.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_tests.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_tests.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_types.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_types.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_types.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/dsp_types.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/esp_dsp.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/esp_dsp.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/common/include/esp_dsp.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/common/include/esp_dsp.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_ccorr.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_ccorr.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_conv.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_conv.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_conv_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_conv_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_corr.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/conv/include/dsps_corr.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/dct/include/dsps_dct.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/dct/include/dsps_dct.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft2r.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft2r.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft4r.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft4r.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft_tables.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/fft/include/dsps_fft_tables.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/fir/include/dsps_fir.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h similarity index 71% rename from tools/sdk/esp32s2/include/esp-dsp/modules/fir/include/dsps_fir.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h index a7d3d09003e..c06b1f34b77 100644 --- a/tools/sdk/esp32s2/include/esp-dsp/modules/fir/include/dsps_fir.h +++ b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h @@ -19,6 +19,7 @@ #include "dsp_err.h" #include "dsps_fir_platform.h" +#include "dsp_common.h" #ifdef __cplusplus extern "C" @@ -49,13 +50,16 @@ typedef struct fir_f32_s { * All fields of this structure are initialized by the dsps_fir_init_s16(...) function. */ typedef struct fir_s16_s{ - int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ - int16_t *delay; /*!< Pointer to the delay line buffer.*/ - int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ - int16_t pos; /*!< Position in delay line.*/ - int16_t decim; /*!< Decimation factor.*/ - int16_t d_pos; /*!< Actual decimation counter.*/ - int16_t shift; /*!< shift value of the result.*/ + int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ + int16_t *delay; /*!< Pointer to the delay line buffer.*/ + int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ + int16_t pos; /*!< Position in delay line.*/ + int16_t decim; /*!< Decimation factor.*/ + int16_t d_pos; /*!< Actual decimation counter.*/ + int16_t shift; /*!< Shift value of the result.*/ + int32_t *rounding_buff; /*!< Rounding buffer for the purposes of esp32s3 ee.ld.accx.ip assembly instruction */ + int32_t rounding_val; /*!< Rounding value*/ + int16_t free_status; /*!< Indicator for dsps_fird_s16_aes3_free() function*/ }fir_s16_t; /** @@ -173,7 +177,43 @@ int dsps_fird_f32_ae32(fir_f32_t *fir, const float *input, float *output, int le */ int32_t dsps_fird_s16_ansi(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); +int32_t dsps_fird_s16_aes3(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); + + /**@}*/ +/** + * @brief support arrays freeing function + * + * Function frees all the arrays, which were created during the initialization of the fir_s16_t structure + * 1. frees allocated memory for rounding buffer, for the purposes of esp32s3 ee.ld.accx.ip assembly instruction + * 2. frees allocated memory in case the delay line is NULL + * 3. frees allocated memory in case the length of the filter (and the delay line) is not divisible by 8 + * and new delay line and filter coefficients arrays are created for the purpose of the esp32s3 assembly + * + * @param fir: pointer to fir filter structure, that must be initialized before + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_fird_s16_aexx_free(fir_s16_t *fir); +/**@}*/ + + +/**@{*/ +/** + * @brief Array reversal + * + * Function reverses 16-bit long array members for the purpose of the dsps_fird_s16_aes3 implementation + * The function has to be called either during the fir struct initialization or every time the coefficients change + * + * @param fir: pointer to the array to be reversed + * @param len: length of the array to be reversed + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_16_array_rev(int16_t *arr, int16_t len); +/**@{*/ #ifdef __cplusplus } @@ -182,28 +222,34 @@ int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output #if CONFIG_DSP_OPTIMIZED -#if (dsps_fir_f32_ae32_enabled == 1) -#define dsps_fir_f32 dsps_fir_f32_ae32 -#else -#define dsps_fir_f32 dsps_fir_f32_ansi -#endif + #if (dsps_fir_f32_ae32_enabled == 1) + #define dsps_fir_f32 dsps_fir_f32_ae32 + #else + #define dsps_fir_f32 dsps_fir_f32_ansi + #endif -#if (dsps_fird_f32_ae32_enabled == 1) -#define dsps_fird_f32 dsps_fird_f32_ae32 -#else -#define dsps_fird_f32 dsps_fird_f32_ansi -#endif + #if (dsps_fird_f32_ae32_enabled == 1) + #define dsps_fird_f32 dsps_fird_f32_ae32 + #else + #define dsps_fird_f32 dsps_fird_f32_ansi + #endif -#if (dsps_fird_s16_ae32_enabled == 1) -#define dsps_fird_s16 dsps_fird_s16_ae32 -#else -#define dsps_fird_s16 dsps_fird_s16_ansi -#endif + #if (dsps_fird_s16_ae32_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_ae32 + + #elif (dsps_fird_s16_aes3_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_aes3 + + #else + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif #else // CONFIG_DSP_OPTIMIZED -#define dsps_fir_f32 dsps_fir_f32_ansi -#define dsps_fird_f32 dsps_fird_f32_ansi -#define dsps_fird_s16 dsps_fird_s16_ansi + + #define dsps_fir_f32 dsps_fir_f32_ansi + #define dsps_fird_f32 dsps_fird_f32_ansi + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif // CONFIG_DSP_OPTIMIZED #endif // _dsps_fir_H_ \ No newline at end of file diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/fir/include/dsps_fir_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h similarity index 64% rename from tools/sdk/esp32s3/include/esp-dsp/modules/fir/include/dsps_fir_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h index f352fa85fc4..a20fa0a6bb6 100644 --- a/tools/sdk/esp32s3/include/esp-dsp/modules/fir/include/dsps_fir_platform.h +++ b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h @@ -12,8 +12,14 @@ #define dsps_fir_f32_ae32_enabled 1 #define dsps_fird_f32_ae32_enabled 1 -#define dsps_fird_s16_ae32_enabled 1 -#define dsps_fird_s16_ae32_mul_enabled 1 + +#if CONFIG_IDF_TARGET_ESP32S3 + #define dsps_fird_s16_aes3_enabled 1 + #define dsps_fird_s16_ae32_enabled 0 +#else + #define dsps_fird_s16_aes3_enabled 0 + #define dsps_fird_s16_ae32_enabled 1 +#endif #endif // #endif // __XTENSA__ diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/iir/include/dsps_biquad.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/iir/include/dsps_biquad.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/kalman/ekf/include/ekf.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/kalman/ekf/include/ekf.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/add/include/dsps_add.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/add/include/dsps_add.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/add/include/dsps_add_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/add/include/dsps_add_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/addc/include/dsps_addc.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/addc/include/dsps_addc.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/include/dsps_math.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/include/dsps_math.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/include/dsps_math.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/include/dsps_math.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/mul/include/dsps_mul.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/mul/include/dsps_mul.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/sub/include/dsps_sub.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/sub/include/dsps_sub.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/matrix/include/dspm_mult.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/matrix/include/dspm_mult.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/matrix/include/mat.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/matrix/include/mat.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/matrix/include/mat.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/matrix/include/mat.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_d_gen.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_d_gen.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_h_gen.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_h_gen.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_sfdr.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_sfdr.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_snr.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_snr.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_snr.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_snr.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_tone_gen.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_tone_gen.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_view.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_view.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/support/include/dsps_view.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/support/include/dsps_view.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/windows/include/dsps_wind.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/windows/include/dsps_wind.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h b/tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h similarity index 100% rename from tools/sdk/esp32c3/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h rename to tools/sdk/esp32c3/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h diff --git a/tools/sdk/esp32c3/include/expat/expat/expat/lib/expat.h b/tools/sdk/esp32c3/include/expat/expat/expat/lib/expat.h index e2020a4a29e..1c83563cbf6 100644 --- a/tools/sdk/esp32c3/include/expat/expat/expat/lib/expat.h +++ b/tools/sdk/esp32c3/include/expat/expat/expat/lib/expat.h @@ -1054,8 +1054,8 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold( See http://semver.org. */ #define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 4 -#define XML_MICRO_VERSION 8 +#define XML_MINOR_VERSION 5 +#define XML_MICRO_VERSION 0 #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/expat/expat/expat/lib/internal.h b/tools/sdk/esp32c3/include/expat/expat/expat/lib/internal.h index 444eba0fb03..e09f533b23c 100644 --- a/tools/sdk/esp32c3/include/expat/expat/expat/lib/internal.h +++ b/tools/sdk/esp32c3/include/expat/expat/expat/lib/internal.h @@ -28,7 +28,7 @@ Copyright (c) 2002-2003 Fred L. Drake, Jr. Copyright (c) 2002-2006 Karl Waclawek Copyright (c) 2003 Greg Stein - Copyright (c) 2016-2021 Sebastian Pipping + Copyright (c) 2016-2022 Sebastian Pipping Copyright (c) 2018 Yury Gribov Copyright (c) 2019 David Loffredo Licensed under the MIT license: @@ -107,7 +107,9 @@ #include // ULONG_MAX -#if defined(_WIN32) && ! defined(__USE_MINGW_ANSI_STDIO) +#if defined(_WIN32) \ + && (! defined(__USE_MINGW_ANSI_STDIO) \ + || (1 - __USE_MINGW_ANSI_STDIO - 1 == 0)) # define EXPAT_FMT_ULL(midpart) "%" midpart "I64u" # if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW # define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d" diff --git a/tools/sdk/esp32c3/include/expat/expat/expat/lib/siphash.h b/tools/sdk/esp32c3/include/expat/expat/expat/lib/siphash.h index e5406d7ee9e..303283ad2de 100644 --- a/tools/sdk/esp32c3/include/expat/expat/expat/lib/siphash.h +++ b/tools/sdk/esp32c3/include/expat/expat/expat/lib/siphash.h @@ -106,7 +106,7 @@ * if this code is included and compiled as C++; related GCC warning is: * warning: use of C++11 long long integer constant [-Wlong-long] */ -#define _SIP_ULL(high, low) (((uint64_t)high << 32) | low) +#define _SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low)) #define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) diff --git a/tools/sdk/esp32c3/include/expat/expat/expat/lib/xmltok_impl.h b/tools/sdk/esp32c3/include/expat/expat/expat/lib/xmltok_impl.h index c518aada013..3469c4ae138 100644 --- a/tools/sdk/esp32c3/include/expat/expat/expat/lib/xmltok_impl.h +++ b/tools/sdk/esp32c3/include/expat/expat/expat/lib/xmltok_impl.h @@ -45,7 +45,7 @@ enum { BT_LF, /* line feed = "\n" */ BT_GT, /* greater than = ">" */ BT_QUOT, /* quotation character = "\"" */ - BT_APOS, /* aposthrophe = "'" */ + BT_APOS, /* apostrophe = "'" */ BT_EQUALS, /* equal sign = "=" */ BT_QUEST, /* question mark = "?" */ BT_EXCL, /* exclamation mark = "!" */ diff --git a/tools/sdk/esp32c3/include/expat/port/include/expat_config.h b/tools/sdk/esp32c3/include/expat/port/include/expat_config.h index 42acb52a5ca..c5a086c1357 100644 --- a/tools/sdk/esp32c3/include/expat/port/include/expat_config.h +++ b/tools/sdk/esp32c3/include/expat/port/include/expat_config.h @@ -63,7 +63,7 @@ #define PACKAGE_NAME "expat" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "expat 2.4.8" +#define PACKAGE_STRING "expat 2.5.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "expat" @@ -72,13 +72,13 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.4.8" +#define PACKAGE_VERSION "2.5.0" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "2.4.8" +#define VERSION "2.5.0" /* whether byteorder is bigendian */ /* #undef WORDS_BIGENDIAN */ diff --git a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_common.h b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_common.h similarity index 87% rename from tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_common.h rename to tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_common.h index 9c65f08b90d..f443286ae87 100644 --- a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_common.h +++ b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_common.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _MB_IFACE_COMMON_H @@ -24,6 +15,7 @@ extern "C" { #if __has_include("esp_check.h") #include "esp_check.h" +#include "esp_log.h" #define MB_RETURN_ON_FALSE(a, err_code, tag, format, ...) ESP_RETURN_ON_FALSE(a, err_code, tag, format __VA_OPT__(,) __VA_ARGS__) @@ -44,10 +36,10 @@ extern "C" { #define MB_CONTROLLER_PRIORITY (CONFIG_FMB_PORT_TASK_PRIO - 1) // priority of MB controller task // Default port defines -#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus -#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined +#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus +#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined #define MB_UART_PORT (UART_NUM_MAX - 1) // Default UART port number -#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info +#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info #define MB_PARITY_NONE (UART_PARITY_DISABLE) // The Macros below handle the endianness while transfer N byte data into buffer diff --git a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_master.h b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_master.h similarity index 95% rename from tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_master.h rename to tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_master.h index 8084e689027..d11ade7a4d8 100644 --- a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_master.h +++ b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_master.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_MASTER_INTERFACE_H diff --git a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_slave.h b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h similarity index 88% rename from tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_slave.h rename to tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h index 040d18265bf..7d79b513a67 100644 --- a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_slave.h +++ b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_SLAVE_INTERFACE_H diff --git a/tools/sdk/esp32s3/include/freemodbus/common/include/mbcontroller.h b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/mbcontroller.h similarity index 51% rename from tools/sdk/esp32s3/include/freemodbus/common/include/mbcontroller.h rename to tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/mbcontroller.h index 08b3c183c8f..10205f8951a 100644 --- a/tools/sdk/esp32s3/include/freemodbus/common/include/mbcontroller.h +++ b/tools/sdk/esp32c3/include/freemodbus/freemodbus/common/include/mbcontroller.h @@ -1,17 +1,8 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 + */ // mbcontroller.h // mbcontroller - common Modbus controller header file 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 6bb81894593..3d0c3380556 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 @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H diff --git a/tools/sdk/esp32c3/include/freertos/include/freertos/FreeRTOS.h b/tools/sdk/esp32c3/include/freertos/include/freertos/FreeRTOS.h index eb0ee6be357..296b2878377 100644 --- a/tools/sdk/esp32c3/include/freertos/include/freertos/FreeRTOS.h +++ b/tools/sdk/esp32c3/include/freertos/include/freertos/FreeRTOS.h @@ -1296,7 +1296,9 @@ typedef struct xSTATIC_QUEUE UBaseType_t uxDummy8; uint8_t ucDummy9; #endif - portMUX_TYPE xDummy10; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy10; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticQueue_t; typedef StaticQueue_t StaticSemaphore_t; @@ -1326,7 +1328,9 @@ typedef struct xSTATIC_EVENT_GROUP #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) uint8_t ucDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticEventGroup_t; /* @@ -1378,7 +1382,9 @@ typedef struct xSTATIC_STREAM_BUFFER #if ( configUSE_TRACE_FACILITY == 1 ) UBaseType_t uxDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticStreamBuffer_t; /* Message buffers are built on stream buffers. */ diff --git a/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/FreeRTOSConfig_arch.h b/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/FreeRTOSConfig_arch.h index a7d534343fb..9121af5d0cb 100644 --- a/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/FreeRTOSConfig_arch.h +++ b/tools/sdk/esp32c3/include/freertos/port/riscv/include/freertos/FreeRTOSConfig_arch.h @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_RISCV_H #define FREERTOS_CONFIG_RISCV_H diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/clk_gate_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/clk_gate_ll.h index b90813919fa..239baa990ce 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/clk_gate_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/clk_gate_ll.h @@ -97,6 +97,8 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en return SYSTEM_RMT_RST; case PERIPH_LEDC_MODULE: return SYSTEM_LEDC_RST; + case PERIPH_WIFI_MODULE: + return SYSTEM_WIFIMAC_RST; case PERIPH_BT_MODULE: return (SYSTEM_BTBB_RST | SYSTEM_BTBB_REG_RST | SYSTEM_RW_BTMAC_RST | SYSTEM_RW_BTLP_RST | SYSTEM_RW_BTMAC_REG_RST | SYSTEM_RW_BTLP_REG_RST); case PERIPH_UART0_MODULE: diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/efuse_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/efuse_ll.h new file mode 100644 index 00000000000..6274fe7e67b --- /dev/null +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/efuse_ll.h @@ -0,0 +1,132 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include "soc/efuse_periph.h" +#include "hal/assert.h" +#include "esp32c3/rom/efuse.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Always inline these functions even no gcc optimization is applied. + +/******************* eFuse fields *************************/ + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_flash_crypt_cnt(void) +{ + return EFUSE.rd_repeat_data1.spi_boot_crypt_cnt; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_wdt_delay_sel(void) +{ + return EFUSE.rd_repeat_data1.wdt_delay_sel; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac0(void) +{ + return EFUSE.rd_mac_spi_sys_0; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac1(void) +{ + return EFUSE.rd_mac_spi_sys_1.mac_1; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_secure_boot_v2_en(void) +{ + return EFUSE.rd_repeat_data2.secure_boot_en; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_err_rst_enable(void) +{ + return EFUSE.rd_repeat_data3.err_rst_enable; +} + +// use efuse_hal_get_major_chip_version() to get major chip version +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_major(void) +{ + return EFUSE.rd_mac_spi_sys_5.wafer_version_major; +} + +// use efuse_hal_get_minor_chip_version() to get minor chip version +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_minor(void) +{ + return (EFUSE.rd_mac_spi_sys_5.wafer_version_minor_high << 3) + EFUSE.rd_mac_spi_sys_3.wafer_version_minor_low; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_wafer_version_major(void) +{ + return EFUSE.rd_repeat_data4.disable_wafer_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_blk_version_major(void) +{ + return EFUSE.rd_sys_part1_data4.blk_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_blk_version_minor(void) +{ + return EFUSE.rd_mac_spi_sys_3.blk_version_minor; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_blk_version_major(void) +{ + return EFUSE.rd_repeat_data4.disable_blk_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_ver_pkg(void) +{ + return EFUSE.rd_mac_spi_sys_3.pkg_version; +} + +/******************* eFuse control functions *************************/ + +__attribute__((always_inline)) static inline bool efuse_ll_get_read_cmd(void) +{ + return EFUSE.cmd.read_cmd; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_pgm_cmd(void) +{ + return EFUSE.cmd.pgm_cmd; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_read_cmd(void) +{ + EFUSE.cmd.read_cmd = 1; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_pgm_cmd(uint32_t block) +{ + HAL_ASSERT(block < ETS_EFUSE_BLOCK_MAX); + EFUSE.cmd.val = ((block << EFUSE_BLK_NUM_S) & EFUSE_BLK_NUM_M) | EFUSE_PGM_CMD; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_read_op_code(void) +{ + EFUSE.conf.op_code = EFUSE_READ_OP_CODE; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_write_op_code(void) +{ + EFUSE.conf.op_code = EFUSE_WRITE_OP_CODE; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_pwr_off_num(uint16_t value) +{ + EFUSE.wr_tim_conf2.pwr_off_num = value; +} + +/******************* eFuse control functions *************************/ + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gdma_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gdma_ll.h index fb7a8713be2..c46d720da87 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gdma_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gdma_ll.h @@ -7,6 +7,7 @@ #include #include +#include "hal/gdma_types.h" #include "soc/gdma_struct.h" #include "soc/gdma_reg.h" @@ -19,6 +20,10 @@ extern "C" { #define GDMA_LL_RX_EVENT_MASK (0x06A7) #define GDMA_LL_TX_EVENT_MASK (0x1958) +// any "valid" peripheral ID can be used for M2M mode +#define GDMA_LL_M2M_FREE_PERIPH_ID_MASK (0x1CD) +#define GDMA_LL_INVALID_PERIPH_ID (0x3F) + #define GDMA_LL_EVENT_TX_FIFO_UDF (1<<12) #define GDMA_LL_EVENT_TX_FIFO_OVF (1<<11) #define GDMA_LL_EVENT_RX_FIFO_UDF (1<<10) @@ -34,19 +39,6 @@ extern "C" { #define GDMA_LL_EVENT_RX_DONE (1<<0) ///////////////////////////////////// Common ///////////////////////////////////////// -/** - * @brief Enable DMA channel M2M mode (TX channel n forward data to RX channel n), disabled by default - */ -static inline void gdma_ll_enable_m2m_mode(gdma_dev_t *dev, uint32_t channel, bool enable) -{ - dev->channel[channel].in.in_conf0.mem_trans_en = enable; - if (enable) { - // to enable m2m mode, the tx chan has to be the same to rx chan, and set to a valid value - dev->channel[channel].in.in_peri_sel.sel = 0; - dev->channel[channel].out.out_peri_sel.sel = 0; - } -} - /** * @brief Enable DMA clock gating */ @@ -254,9 +246,19 @@ static inline void gdma_ll_rx_set_priority(gdma_dev_t *dev, uint32_t channel, ui /** * @brief Connect DMA RX channel to a given peripheral */ -static inline void gdma_ll_rx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, int periph_id) +static inline void gdma_ll_rx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, gdma_trigger_peripheral_t periph, int periph_id) { dev->channel[channel].in.in_peri_sel.sel = periph_id; + dev->channel[channel].in.in_conf0.mem_trans_en = (periph == GDMA_TRIG_PERIPH_M2M); +} + +/** + * @brief Disconnect DMA RX channel from peripheral + */ +static inline void gdma_ll_rx_disconnect_from_periph(gdma_dev_t *dev, uint32_t channel) +{ + dev->channel[channel].in.in_peri_sel.sel = GDMA_LL_INVALID_PERIPH_ID; + dev->channel[channel].in.in_conf0.mem_trans_en = false; } ///////////////////////////////////// TX ///////////////////////////////////////// @@ -457,11 +459,20 @@ static inline void gdma_ll_tx_set_priority(gdma_dev_t *dev, uint32_t channel, ui /** * @brief Connect DMA TX channel to a given peripheral */ -static inline void gdma_ll_tx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, int periph_id) +static inline void gdma_ll_tx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, gdma_trigger_peripheral_t periph, int periph_id) { + (void)periph; dev->channel[channel].out.out_peri_sel.sel = periph_id; } +/** + * @brief Disconnect DMA TX channel from peripheral + */ +static inline void gdma_ll_tx_disconnect_from_periph(gdma_dev_t *dev, uint32_t channel) +{ + dev->channel[channel].out.out_peri_sel.sel = GDMA_LL_INVALID_PERIPH_ID; +} + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gpio_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gpio_ll.h index 0b577859557..20e65ce4fce 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gpio_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/gpio_ll.h @@ -14,13 +14,14 @@ #pragma once +#include +#include #include "soc/soc.h" #include "soc/gpio_periph.h" #include "soc/gpio_struct.h" #include "soc/rtc_cntl_reg.h" #include "soc/usb_serial_jtag_reg.h" #include "hal/gpio_types.h" -#include "stdlib.h" #ifdef __cplusplus extern "C" { @@ -48,6 +49,7 @@ static inline void gpio_ll_pullup_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pullup_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { // The pull-up value of the USB pins are controlled by the pins’ pull-up value together with USB pull-up value @@ -56,7 +58,7 @@ static inline void gpio_ll_pullup_dis(gpio_dev_t *hw, gpio_num_t gpio_num) SET_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_PAD_PULL_OVERRIDE); CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_DP_PULLUP); } - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PU); + REG_CLR_BIT(IO_MUX_GPIO0_REG + (gpio_num * 4), FUN_PU); } /** @@ -76,9 +78,10 @@ static inline void gpio_ll_pulldown_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pulldown_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PD); + REG_CLR_BIT(IO_MUX_GPIO0_REG + (gpio_num * 4), FUN_PD); } /** @@ -172,9 +175,10 @@ static inline void gpio_ll_intr_disable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_input_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { - PIN_INPUT_DISABLE(GPIO_PIN_MUX_REG[gpio_num]); + PIN_INPUT_DISABLE(IO_MUX_GPIO0_REG + (gpio_num * 4)); } /** @@ -194,6 +198,7 @@ static inline void gpio_ll_input_enable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_output_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { hw->enable_w1tc.enable_w1tc = (0x1 << gpio_num); @@ -235,6 +240,22 @@ static inline void gpio_ll_od_enable(gpio_dev_t *hw, gpio_num_t gpio_num) hw->pin[gpio_num].pad_driver = 1; } +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +static inline __attribute__((always_inline)) void gpio_ll_func_sel(gpio_dev_t *hw, uint8_t gpio_num, uint32_t func) +{ + // Disable USB Serial JTAG if pins 18 or pins 19 needs to select an IOMUX function + if (gpio_num == 18 || gpio_num == 19) { + CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE); + } + PIN_FUNC_SELECT(IO_MUX_GPIO0_REG + (gpio_num * 4), func); +} + /** * @brief GPIO set output level * @@ -334,7 +355,22 @@ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) */ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) { - SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD); + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); +} + +/** + * @brief Get deep sleep hold status + * + * @param hw Peripheral GPIO hardware instance address. + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +__attribute__((always_inline)) +static inline bool gpio_ll_deep_sleep_hold_is_en(gpio_dev_t *hw) +{ + return !GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD) && GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } /** @@ -367,6 +403,24 @@ static inline void gpio_ll_hold_dis(gpio_dev_t *hw, gpio_num_t gpio_num) } } +/** + * @brief Get digital gpio pad hold status. + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number, only support output GPIOs + * + * @note caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +__attribute__((always_inline)) +static inline bool gpio_ll_is_digital_io_hold(gpio_dev_t *hw, uint32_t gpio_num) +{ + return GET_PERI_REG_MASK(RTC_CNTL_DIG_PAD_HOLD_REG, BIT(gpio_num)); +} + /** * @brief Set pad input to a peripheral signal through the IOMUX. * diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2c_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2c_ll.h index c2aee7b27f9..c6273a5f511 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2c_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2c_ll.h @@ -134,6 +134,7 @@ static inline void i2c_ll_cal_bus_clk(uint32_t source_clk, uint32_t bus_freq, i2 * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_update(i2c_dev_t *hw) { hw->ctr.conf_upgate = 1; @@ -259,6 +260,7 @@ static inline void i2c_ll_disable_intr_mask(i2c_dev_t *hw, uint32_t mask) * * @return I2C interrupt status */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_intsts_mask(i2c_dev_t *hw) { return hw->int_status.val; @@ -314,6 +316,7 @@ static inline void i2c_ll_set_slave_addr(i2c_dev_t *hw, uint16_t slave_addr, boo * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_write_cmd_reg(i2c_dev_t *hw, i2c_hw_cmd_t cmd, int cmd_idx) { hw->command[cmd_idx].val = cmd.val; @@ -478,6 +481,7 @@ static inline bool i2c_ll_is_master_mode(i2c_dev_t *hw) * * @return RxFIFO readable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) { return hw->sr.rx_fifo_cnt; @@ -490,6 +494,7 @@ static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) * * @return TxFIFO writable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_txfifo_len(i2c_dev_t *hw) { return SOC_I2C_FIFO_LEN - hw->sr.tx_fifo_cnt; @@ -514,6 +519,7 @@ static inline uint32_t i2c_ll_get_tout(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_trans_start(i2c_dev_t *hw) { hw->ctr.trans_start = 1; @@ -573,6 +579,7 @@ static inline void i2c_ll_get_scl_timing(i2c_dev_t *hw, int *high_period, int *l * * @return None. */ +__attribute__((always_inline)) static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { for (int i = 0; i< len; i++) { @@ -589,6 +596,7 @@ static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_read_rxfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { for(int i = 0; i < len; i++) { @@ -637,6 +645,7 @@ static inline uint8_t i2c_ll_get_filter(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -650,6 +659,7 @@ static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -663,6 +673,7 @@ static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_TX_INT); @@ -675,6 +686,7 @@ static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_RX_INT); @@ -687,6 +699,7 @@ static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_TX_INT; @@ -699,6 +712,7 @@ static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_rx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_RX_INT; @@ -735,6 +749,7 @@ static inline void i2c_ll_slave_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_SLAVE_TX_INT); @@ -759,6 +774,7 @@ static inline void i2c_ll_slave_disable_rx_it(i2c_dev_t *hw) * * @return None */ + __attribute__((always_inline)) static inline void i2c_ll_slave_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_SLAVE_TX_INT; @@ -836,6 +852,7 @@ static inline void i2c_ll_set_source_clk(i2c_dev_t *hw, i2c_sclk_t src_clk) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; @@ -862,6 +879,7 @@ static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *even * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2s_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2s_ll.h index 53a42136214..fa8bd5683be 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2s_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/i2s_ll.h @@ -308,8 +308,8 @@ static inline void i2s_ll_rx_set_clk(i2s_dev_t *hw, i2s_ll_mclk_div_t *set) */ static inline void i2s_ll_tx_start(i2s_dev_t *hw) { - hw->tx_conf.tx_update = 0; hw->tx_conf.tx_update = 1; + while (hw->tx_conf.tx_update); hw->tx_conf.tx_start = 1; } @@ -320,8 +320,8 @@ static inline void i2s_ll_tx_start(i2s_dev_t *hw) */ static inline void i2s_ll_rx_start(i2s_dev_t *hw) { - hw->rx_conf.rx_update = 0; hw->rx_conf.rx_update = 1; + while (hw->rx_conf.rx_update); hw->rx_conf.rx_start = 1; } diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/interrupt_controller_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/interrupt_controller_ll.h index 70afe314cfe..cf32d23fa12 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/interrupt_controller_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/interrupt_controller_ll.h @@ -124,7 +124,7 @@ static inline void intr_cntrl_ll_set_int_level(int intr, int level) */ static inline void intr_cntrl_ll_set_int_type(int intr, int_type_t type) { - esprv_intc_int_set_type(BIT(intr), type); + esprv_intc_int_set_type(intr, type); } #ifdef __cplusplus diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/mwdt_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/mwdt_ll.h index 944108439e9..bd51dbc318b 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/mwdt_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/mwdt_ll.h @@ -23,25 +23,26 @@ extern "C" { #include #include +#include "esp_assert.h" #include "soc/timer_periph.h" #include "soc/timer_group_struct.h" #include "hal/wdt_types.h" #include "esp_attr.h" //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == TIMG_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == TIMG_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == TIMG_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == TIMG_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == TIMG_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == TIMG_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == TIMG_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == TIMG_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == TIMG_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == TIMG_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == TIMG_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == TIMG_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == TIMG_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == TIMG_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == TIMG_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == TIMG_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == TIMG_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == TIMG_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == TIMG_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == TIMG_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); #define FORCE_MODIFY_WHOLE_REG(i, j, k) \ { \ diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rmt_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rmt_ll.h index 662e63f784e..4201a142291 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rmt_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rmt_ll.h @@ -25,18 +25,21 @@ extern "C" { // Note: TX and RX channel number are all index from zero in the LL driver // i.e. tx_channel belongs to [0,2], and rx_channel belongs to [0,2] +__attribute__((always_inline)) static inline void rmt_ll_enable_drive_clock(rmt_dev_t *dev, bool enable) { dev->sys_conf.clk_en = enable; // register clock gating dev->sys_conf.mem_clk_force_on = enable; // memory clock gating } +__attribute__((always_inline)) static inline void rmt_ll_power_down_mem(rmt_dev_t *dev, bool enable) { dev->sys_conf.mem_force_pu = !enable; dev->sys_conf.mem_force_pd = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_mem_power_down(rmt_dev_t *dev) { // the RTC domain can also power down RMT memory @@ -45,11 +48,13 @@ static inline bool rmt_ll_is_mem_power_down(rmt_dev_t *dev) return (dev->sys_conf.mem_force_pd) || !(dev->sys_conf.mem_force_pu); } +__attribute__((always_inline)) static inline void rmt_ll_enable_mem_access(rmt_dev_t *dev, bool enable) { dev->sys_conf.fifo_mask = enable; } +__attribute__((always_inline)) static inline void rmt_ll_set_group_clock_src(rmt_dev_t *dev, uint32_t channel, uint8_t src, uint8_t div_num, uint8_t div_a, uint8_t div_b) { // Formula: rmt_sclk = module_clock_src / (1 + div_num + div_a / div_b) @@ -61,26 +66,31 @@ static inline void rmt_ll_set_group_clock_src(rmt_dev_t *dev, uint32_t channel, dev->sys_conf.sclk_active = 1; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_group_clock_src(rmt_dev_t *dev, uint32_t channel) { return dev->sys_conf.sclk_sel; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->ref_cnt_rst.val |= (1 << channel); } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_channels_clock_div(rmt_dev_t *dev, uint32_t channel_mask) { dev->ref_cnt_rst.val |= channel_mask; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->ref_cnt_rst.val |= (1 << (channel + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->tx_conf[channel].mem_rd_rst = 1; @@ -89,6 +99,7 @@ static inline void rmt_ll_tx_reset_pointer(rmt_dev_t *dev, uint32_t channel) dev->tx_conf[channel].mem_rst = 0; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->rx_conf[channel].conf1.mem_wr_rst = 1; @@ -97,185 +108,221 @@ static inline void rmt_ll_rx_reset_pointer(rmt_dev_t *dev, uint32_t channel) dev->rx_conf[channel].conf1.mem_rst = 0; } +__attribute__((always_inline)) static inline void rmt_ll_tx_start(rmt_dev_t *dev, uint32_t channel) { dev->tx_conf[channel].conf_update = 1; dev->tx_conf[channel].tx_start = 1; } +__attribute__((always_inline)) static inline void rmt_ll_tx_stop(rmt_dev_t *dev, uint32_t channel) { dev->tx_conf[channel].tx_stop = 1; dev->tx_conf[channel].conf_update = 1; } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->rx_conf[channel].conf1.rx_en = enable; dev->rx_conf[channel].conf1.conf_update = 1; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->tx_conf[channel].mem_size = block_num; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->rx_conf[channel].conf0.mem_size = block_num; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->tx_conf[channel].mem_size; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->rx_conf[channel].conf0.mem_size; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->tx_conf[channel], div_cnt, div); } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->rx_conf[channel].conf0, div_cnt, div); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { return HAL_FORCE_READ_U32_REG_FIELD(dev->tx_conf[channel], div_cnt); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { return HAL_FORCE_READ_U32_REG_FIELD(dev->rx_conf[channel].conf0, div_cnt); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_pingpong(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->tx_conf[channel].mem_tx_wrap_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_idle_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { dev->rx_conf[channel].conf0.idle_thres = thres; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_idle_thres(rmt_dev_t *dev, uint32_t channel) { return dev->rx_conf[channel].conf0.idle_thres; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_owner(rmt_dev_t *dev, uint32_t channel, uint8_t owner) { dev->rx_conf[channel].conf1.mem_owner = owner; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_owner(rmt_dev_t *dev, uint32_t channel) { return dev->rx_conf[channel].conf1.mem_owner; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->tx_conf[channel].tx_conti_mode = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_loop_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->tx_conf[channel].tx_conti_mode; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_loop_count(rmt_dev_t *dev, uint32_t channel, uint32_t count) { dev->tx_lim[channel].tx_loop_num = count; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_loop(rmt_dev_t *dev, uint32_t channel) { dev->tx_lim[channel].loop_count_reset = 1; dev->tx_lim[channel].loop_count_reset = 0; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop_count(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->tx_lim[channel].tx_loop_cnt_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_sync(rmt_dev_t *dev, bool enable) { dev->tx_sim.en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_add_to_sync_group(rmt_dev_t *dev, uint32_t channel) { dev->tx_sim.val |= 1 << channel; } +__attribute__((always_inline)) static inline void rmt_ll_tx_remove_from_sync_group(rmt_dev_t *dev, uint32_t channel) { dev->tx_sim.val &= ~(1 << channel); } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_filter(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->rx_conf[channel].conf1.rx_filter_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_filter_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->rx_conf[channel].conf1, rx_filter_thres, thres); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_idle(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->tx_conf[channel].idle_out_en = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_idle_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->tx_conf[channel].idle_out_en; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_idle_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->tx_conf[channel].idle_out_lv = level; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_idle_level(rmt_dev_t *dev, uint32_t channel) { return dev->tx_conf[channel].idle_out_lv; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->rx_status[channel].val; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->tx_status[channel].val; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_limit(rmt_dev_t *dev, uint32_t channel, uint32_t limit) { dev->tx_lim[channel].limit = limit; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_limit(rmt_dev_t *dev, uint32_t channel, uint32_t limit) { dev->rx_lim[channel].rx_lim = limit; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_limit(rmt_dev_t *dev, uint32_t channel) { return dev->rx_lim[channel].rx_lim; } +__attribute__((always_inline)) static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool enable) { if (enable) { @@ -285,6 +332,7 @@ static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool e } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -294,6 +342,7 @@ static inline void rmt_ll_enable_tx_end_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -303,6 +352,7 @@ static inline void rmt_ll_enable_tx_err_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -312,6 +362,7 @@ static inline void rmt_ll_enable_rx_end_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -321,6 +372,7 @@ static inline void rmt_ll_enable_rx_err_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -330,6 +382,7 @@ static inline void rmt_ll_enable_tx_thres_interrupt(rmt_dev_t *dev, uint32_t cha } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_loop_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -339,6 +392,7 @@ static inline void rmt_ll_enable_tx_loop_interrupt(rmt_dev_t *dev, uint32_t chan } } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_thres_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -348,76 +402,91 @@ static inline void rmt_ll_enable_rx_thres_interrupt(rmt_dev_t *dev, uint32_t cha } } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 4)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 6)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 8)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_loop_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 12)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_thres_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 10)); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_end_interrupt_status(rmt_dev_t *dev) { return dev->int_st.val & 0x03; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_end_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 2) & 0x03; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_err_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 4) & 0x03; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_err_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 6) & 0x03; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_thres_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 8) & 0x03; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_thres_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 10) & 0x03; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_loop_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 12) & 0x03; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { // In case the compiler optimise a 32bit instruction (e.g. s32i) into two 16bit instruction (e.g. s16i, which is not allowed to access a register) @@ -428,6 +497,7 @@ static inline void rmt_ll_tx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t dev->tx_carrier[channel].val = reg.val; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { typeof(dev->rx_carrier[0]) reg; @@ -436,33 +506,39 @@ static inline void rmt_ll_rx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t dev->rx_carrier[channel].val = reg.val; } +__attribute__((always_inline)) static inline void rmt_ll_tx_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t *high_ticks, uint32_t *low_ticks) { *high_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->tx_carrier[channel], high); *low_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->tx_carrier[channel], low); } +__attribute__((always_inline)) static inline void rmt_ll_rx_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t *high_ticks, uint32_t *low_ticks) { *high_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->rx_carrier[channel], high_thres); *low_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->rx_carrier[channel], low_thres); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_carrier_modulation(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->tx_conf[channel].carrier_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_carrier_demodulation(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->rx_conf[channel].conf0.carrier_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->tx_conf[channel].carrier_out_lv = level; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->rx_conf[channel].conf0.carrier_out_lv = level; @@ -470,6 +546,7 @@ static inline void rmt_ll_rx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, // set true, enable carrier in all RMT state (idle, reading, sending) // set false, enable carrier only in sending state (i.e. there're effective data in RAM to be sent) +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_always_on(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->tx_conf[channel].carrier_eff_en = !enable; @@ -477,6 +554,7 @@ static inline void rmt_ll_tx_set_carrier_always_on(rmt_dev_t *dev, uint32_t chan //Writes items to the specified TX channel memory with the given offset and length. //the caller should ensure that (length + off) <= (memory block * SOC_RMT_MEM_WORDS_PER_CHANNEL) +__attribute__((always_inline)) static inline void rmt_ll_write_memory(rmt_mem_t *mem, uint32_t channel, const void *data, size_t length_in_words, size_t off) { volatile uint32_t *to = (volatile uint32_t *)&mem->chan[channel].data32[off]; @@ -486,6 +564,7 @@ static inline void rmt_ll_write_memory(rmt_mem_t *mem, uint32_t channel, const v } } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_pingpong(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->rx_conf[channel].conf1.mem_rx_wrap_en = enable; diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rwdt_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rwdt_ll.h index 0986ce3dec5..e20307c8726 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rwdt_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/rwdt_ll.h @@ -29,22 +29,23 @@ extern "C" { #include "soc/rtc_cntl_struct.h" #include "soc/efuse_reg.h" #include "esp_attr.h" +#include "esp_assert.h" //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == RTC_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == RTC_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_RTC == RTC_WDT_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == RTC_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == RTC_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_RTC == RTC_WDT_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == RTC_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == RTC_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == RTC_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == RTC_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == RTC_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == RTC_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == RTC_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == RTC_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == RTC_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == RTC_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == RTC_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == RTC_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == RTC_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == RTC_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == RTC_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == RTC_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); /** * @brief Enable the RWDT diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/twai_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/twai_ll.h index 371d4dd361d..722f0690e56 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/twai_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/twai_ll.h @@ -28,6 +28,7 @@ extern "C" { #include #include +#include "esp_assert.h" #include "hal/misc.h" #include "hal/twai_types.h" #include "soc/twai_periph.h" @@ -85,7 +86,7 @@ typedef union { uint8_t bytes[13]; } __attribute__((packed)) twai_ll_frame_buffer_t; -_Static_assert(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); +ESP_STATIC_ASSERT(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); /* ---------------------------- Mode Register ------------------------------- */ diff --git a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/uart_ll.h b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/uart_ll.h index f94296327a2..1fe368dad63 100644 --- a/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/uart_ll.h +++ b/tools/sdk/esp32c3/include/hal/esp32c3/include/hal/uart_ll.h @@ -180,7 +180,8 @@ static inline void uart_ll_set_baudrate(uart_dev_t *hw, uint32_t baud) static inline uint32_t uart_ll_get_baudrate(uart_dev_t *hw) { uint32_t sclk_freq = uart_ll_get_sclk_freq(hw); - typeof(hw->clk_div) div_reg = hw->clk_div; + typeof(hw->clk_div) div_reg; + div_reg.val = hw->clk_div.val; return ((sclk_freq << 4)) / (((div_reg.div_int << 4) | div_reg.div_frag) * (HAL_FORCE_READ_U32_REG_FIELD(hw->clk_conf, sclk_div_num) + 1)); } @@ -352,7 +353,7 @@ static inline void uart_ll_set_stop_bits(uart_dev_t *hw, uart_stop_bits_t stop_b */ static inline void uart_ll_get_stop_bits(uart_dev_t *hw, uart_stop_bits_t *stop_bit) { - *stop_bit = hw->conf0.stop_bit_num; + *stop_bit = (uart_stop_bits_t)hw->conf0.stop_bit_num; } /** @@ -382,7 +383,7 @@ static inline void uart_ll_set_parity(uart_dev_t *hw, uart_parity_t parity_mode) static inline void uart_ll_get_parity(uart_dev_t *hw, uart_parity_t *parity_mode) { if (hw->conf0.parity_en) { - *parity_mode = 0X2 | hw->conf0.parity; + *parity_mode = (uart_parity_t)(0x2 | hw->conf0.parity); } else { *parity_mode = UART_PARITY_DISABLE; } @@ -498,10 +499,10 @@ static inline void uart_ll_get_hw_flow_ctrl(uart_dev_t *hw, uart_hw_flowcontrol_ { *flow_ctrl = UART_HW_FLOWCTRL_DISABLE; if (hw->conf1.rx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_RTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_RTS); } if (hw->conf0.tx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_CTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_CTS); } } @@ -763,7 +764,7 @@ static inline uint32_t uart_ll_get_wakeup_thrd(uart_dev_t *hw) */ static inline void uart_ll_get_data_bit_num(uart_dev_t *hw, uart_word_length_t *data_bit) { - *data_bit = hw->conf0.bit_num; + *data_bit = (uart_word_length_t)hw->conf0.bit_num; } /** @@ -834,7 +835,8 @@ static inline void uart_ll_xon_force_on(uart_dev_t *hw, bool always_on) */ static inline void uart_ll_inverse_signal(uart_dev_t *hw, uint32_t inv_mask) { - typeof(hw->conf0) conf0_reg = hw->conf0; + typeof(hw->conf0) conf0_reg; + conf0_reg.val = hw->conf0.val; conf0_reg.irda_tx_inv = (inv_mask & UART_SIGNAL_IRDA_TX_INV) ? 1 : 0; conf0_reg.irda_rx_inv = (inv_mask & UART_SIGNAL_IRDA_RX_INV) ? 1 : 0; conf0_reg.rxd_inv = (inv_mask & UART_SIGNAL_RXD_INV) ? 1 : 0; diff --git a/tools/sdk/esp32c3/include/hal/include/hal/dma_types.h b/tools/sdk/esp32c3/include/hal/include/hal/dma_types.h index 66c8677e98f..5a832950999 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/dma_types.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/dma_types.h @@ -15,6 +15,7 @@ #pragma once #include +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -38,7 +39,7 @@ typedef struct dma_descriptor_s { struct dma_descriptor_s *next; /*!< Pointer to the next descriptor (set to NULL if the descriptor is the last one, e.g. suc_eof=1) */ } dma_descriptor_t; -_Static_assert(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); #define DMA_DESCRIPTOR_BUFFER_OWNER_CPU (0) /*!< DMA buffer is allowed to be accessed by CPU */ #define DMA_DESCRIPTOR_BUFFER_OWNER_DMA (1) /*!< DMA buffer is allowed to be accessed by DMA engine */ diff --git a/tools/sdk/esp32c3/include/hal/include/hal/efuse_hal.h b/tools/sdk/esp32c3/include/hal/include/hal/efuse_hal.h new file mode 100644 index 00000000000..ca7fcd2003e --- /dev/null +++ b/tools/sdk/esp32c3/include/hal/include/hal/efuse_hal.h @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @brief Returns chip version + * + * @return Chip version in format: Major * 100 + Minor + */ +uint32_t efuse_hal_chip_revision(void); + +/** + * @brief Returns major chip version + */ +uint32_t efuse_hal_get_major_chip_version(void); + +/** + * @brief Returns minor chip version + */ +uint32_t efuse_hal_get_minor_chip_version(void); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32c3/include/hal/include/hal/emac_hal.h b/tools/sdk/esp32c3/include/hal/include/hal/emac_hal.h index 27cd38456dc..fbf0a8ebd66 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/emac_hal.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/emac_hal.h @@ -12,6 +12,7 @@ extern "C" { #include #include +#include "esp_assert.h" #include "esp_err.h" #include "hal/eth_types.h" #include "soc/emac_dma_struct.h" @@ -76,7 +77,7 @@ typedef struct { #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPSEGMENT 2 /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */ #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPFULL 3 /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */ -_Static_assert(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); /** * @brief Ethernet DMA RX Descriptor @@ -150,7 +151,7 @@ typedef struct { uint32_t TimeStampHigh; /*!< Receive frame timestamp high */ } eth_dma_rx_descriptor_t; -_Static_assert(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); typedef struct { emac_mac_dev_t *mac_regs; diff --git a/tools/sdk/esp32c3/include/hal/include/hal/gdma_types.h b/tools/sdk/esp32c3/include/hal/include/hal/gdma_types.h new file mode 100644 index 00000000000..eb1447a78f4 --- /dev/null +++ b/tools/sdk/esp32c3/include/hal/include/hal/gdma_types.h @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumeration of peripherals which have the DMA capability + * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. + * + */ +typedef enum { + GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ + GDMA_TRIG_PERIPH_UHCI, /*!< GDMA trigger peripheral: UHCI */ + GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ + GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ + GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ + GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ + GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ + GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ + GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ + GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ + GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ +} gdma_trigger_peripheral_t; + +/** + * @brief Enumeration of GDMA channel direction + * + */ +typedef enum { + GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ + GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ +} gdma_channel_direction_t; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32c3/include/hal/include/hal/gpio_hal.h b/tools/sdk/esp32c3/include/hal/include/hal/gpio_hal.h index 018b4be1288..5a3ce27b0b4 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/gpio_hal.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/gpio_hal.h @@ -187,6 +187,15 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_od_enable(hal, gpio_num) gpio_ll_od_enable((hal)->dev, gpio_num) +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +#define gpio_hal_func_sel(hal, gpio_num, func) gpio_ll_func_sel((hal)->dev, gpio_num, func) + /** * @brief GPIO set output level * @@ -280,6 +289,22 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_hold_dis(hal, gpio_num) gpio_ll_hold_dis((hal)->dev, gpio_num) +/** + * @brief Get wether digital gpio pad is held + * + * @param hal Context of the HAL layer + * @param gpio_num GPIO number, only support output GPIOs + * + * @note digital io means io pad powered by VDD3P3_CPU or VDD_SPI + * rtc io means io pad powered by VDD3P3_RTC + * caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +#define gpio_hal_is_digital_io_hold(hal, gpio_num) gpio_ll_is_digital_io_hold((hal)->dev, gpio_num) + /** * @brief Enable all digital gpio pad hold function during Deep-sleep. * @@ -300,6 +325,17 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_deep_sleep_hold_dis(hal) gpio_ll_deep_sleep_hold_dis((hal)->dev) +/** + * @brief Get whether all digital gpio pad hold function during Deep-sleep is enabled. + * + * @param hal Context of the HAL layer + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +#define gpio_hal_deep_sleep_hold_is_en(hal) gpio_ll_deep_sleep_hold_is_en((hal)->dev) + /** * @brief Set pad input to a peripheral signal through the IOMUX. * @@ -322,7 +358,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #if SOC_GPIO_SUPPORT_FORCE_HOLD /** - * @brief Force hold digital and rtc gpio pad. + * @brief Force hold digital gpio pad. * @note GPIO force hold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -330,7 +366,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_hold_all(hal) gpio_ll_force_hold_all((hal)->dev) /** - * @brief Force unhold digital and rtc gpio pad. + * @brief Force unhold digital gpio pad. * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -338,7 +374,6 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_unhold_all() gpio_ll_force_unhold_all() #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable pull-up on GPIO when system sleep. * @@ -436,7 +471,6 @@ void gpio_hal_sleep_pupd_config_apply(gpio_hal_context_t *hal, gpio_num_t gpio_n */ void gpio_hal_sleep_pupd_config_unapply(gpio_hal_context_t *hal, gpio_num_t gpio_num); #endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL -#endif //SOC_GPIO_SUPPORT_SLP_SWITCH #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32c3/include/hal/include/hal/spi_flash_hal.h b/tools/sdk/esp32c3/include/hal/include/hal/spi_flash_hal.h index ae37016fa2d..e51251b4593 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/spi_flash_hal.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/spi_flash_hal.h @@ -26,6 +26,7 @@ #include "hal/spi_types.h" #include "hal/spi_flash_types.h" #include "soc/soc_memory_types.h" +#include "esp_assert.h" /* Hardware host-specific constants */ #define SPI_FLASH_HAL_MAX_WRITE_BYTES 64 @@ -56,7 +57,7 @@ typedef struct { uint32_t slicer_flags; /// Slicer flags for configuring how to slice data correctly while reading or writing. #define SPI_FLASH_HOST_CONTEXT_SLICER_FLAG_DTR BIT(0) ///< Slice data according to DTR mode, the address and length must be even (A0=0). } spi_flash_hal_context_t; -_Static_assert(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); +ESP_STATIC_ASSERT(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); /// This struct provide MSPI Flash necessary timing related config, should be consistent with that in union in `spi_flash_hal_config_t`. typedef struct { diff --git a/tools/sdk/esp32c3/include/hal/include/hal/spi_slave_hal.h b/tools/sdk/esp32c3/include/hal/include/hal/spi_slave_hal.h index 3ad5f485f1f..49d8b0ca12c 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/spi_slave_hal.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/spi_slave_hal.h @@ -150,6 +150,7 @@ void spi_slave_hal_store_result(spi_slave_hal_context_t *hal); */ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); +#if CONFIG_IDF_TARGET_ESP32 /** * Check whether we need to reset the DMA according to the status of last transactions. * @@ -161,3 +162,4 @@ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); * @return true if reset is needed, else false. */ bool spi_slave_hal_dma_need_reset(const spi_slave_hal_context_t *hal); +#endif //#if CONFIG_IDF_TARGET_ESP32 diff --git a/tools/sdk/esp32c3/include/hal/include/hal/spi_types.h b/tools/sdk/esp32c3/include/hal/include/hal/spi_types.h index 9c008838a19..c7caa95df9a 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/spi_types.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/spi_types.h @@ -27,7 +27,9 @@ typedef enum { //SPI1 can be used as GPSPI only on ESP32 SPI1_HOST=0, ///< SPI1 SPI2_HOST=1, ///< SPI2 +#if SOC_SPI_PERIPH_NUM > 2 SPI3_HOST=2, ///< SPI3 +#endif } spi_host_device_t; /// SPI Events diff --git a/tools/sdk/esp32c3/include/hal/include/hal/systimer_types.h b/tools/sdk/esp32c3/include/hal/include/hal/systimer_types.h index d4583dc7ae0..0ed44feb4eb 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/systimer_types.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/systimer_types.h @@ -16,6 +16,7 @@ #include #include "soc/soc_caps.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -39,7 +40,7 @@ typedef struct { } systimer_counter_value_t; /** @cond */ -_Static_assert(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); /** @endcond */ /** diff --git a/tools/sdk/esp32s2/include/hal/include/hal/usbh_hal.h b/tools/sdk/esp32c3/include/hal/include/hal/usb_dwc_hal.h similarity index 67% rename from tools/sdk/esp32s2/include/hal/include/hal/usbh_hal.h rename to tools/sdk/esp32c3/include/hal/include/hal/usb_dwc_hal.h index 5326deb2dca..d52e882cb9f 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/usbh_hal.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/usb_dwc_hal.h @@ -17,8 +17,8 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL #include #include -#include "soc/usbh_struct.h" -#include "hal/usbh_ll.h" +#include "soc/usb_dwc_struct.h" +#include "hal/usb_dwc_ll.h" #include "hal/usb_types_private.h" #include "hal/assert.h" @@ -26,11 +26,11 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL // ------------------ Constants/Configs -------------------- -#define USBH_HAL_DMA_MEM_ALIGN 512 -#define USBH_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) -#define USBH_HAL_NUM_CHAN 8 -#define USBH_HAL_XFER_DESC_SIZE (sizeof(usbh_ll_dma_qtd_t)) -#define USBH_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL +#define USB_DWC_HAL_DMA_MEM_ALIGN 512 +#define USB_DWC_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) +#define USB_DWC_HAL_NUM_CHAN 8 +#define USB_DWC_HAL_XFER_DESC_SIZE (sizeof(usb_dwc_ll_dma_qtd_t)) +#define USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL /** * @brief FIFO size configuration structure @@ -39,7 +39,7 @@ typedef struct { uint32_t rx_fifo_lines; /**< Size of the RX FIFO in terms the number of FIFO lines */ uint32_t nptx_fifo_lines; /**< Size of the Non-periodic FIFO in terms the number of FIFO lines */ uint32_t ptx_fifo_lines; /**< Size of the Periodic FIFO in terms the number of FIFO lines */ -} usbh_hal_fifo_config_t; +} usb_dwc_hal_fifo_config_t; // --------------------- HAL Events ------------------------ @@ -47,25 +47,25 @@ typedef struct { * @brief Host port HAL events */ typedef enum { - USBH_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ - USBH_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ - USBH_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ - USBH_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ - USBH_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ - USBH_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ - USBH_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ - USBH_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ -} usbh_hal_port_event_t; + USB_DWC_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ + USB_DWC_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ + USB_DWC_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ + USB_DWC_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ + USB_DWC_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ + USB_DWC_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ + USB_DWC_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ + USB_DWC_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ +} usb_dwc_hal_port_event_t; /** * @brief Channel events */ typedef enum { - USBH_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USBH_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ - USBH_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ - USBH_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ - USBH_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ -} usbh_hal_chan_event_t; + USB_DWC_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USB_DWC_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ + USB_DWC_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ + USB_DWC_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ + USB_DWC_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ +} usb_dwc_hal_chan_event_t; // --------------------- HAL Errors ------------------------ @@ -73,20 +73,20 @@ typedef enum { * @brief Channel errors */ typedef enum { - USBH_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ - USBH_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ - USBH_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ - USBH_HAL_CHAN_ERROR_STALL, /**< STALL response received */ -} usbh_hal_chan_error_t; + USB_DWC_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ + USB_DWC_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ + USB_DWC_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ + USB_DWC_HAL_CHAN_ERROR_STALL, /**< STALL response received */ +} usb_dwc_hal_chan_error_t; // ------------- Transfer Descriptor Related --------------- /** * @brief Flags used to describe the type of transfer descriptor to fill */ -#define USBH_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ -#define USBH_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ -#define USBH_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ +#define USB_DWC_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ +#define USB_DWC_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ +#define USB_DWC_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ /** * @brief Status value of a transfer descriptor @@ -95,10 +95,10 @@ typedef enum { * or an error). Therefore, if a channel halt is requested before a transfer descriptor completes, the transfer * descriptor remains unexecuted. */ -#define USBH_HAL_XFER_DESC_STS_SUCCESS USBH_LL_QTD_STATUS_SUCCESS -#define USBH_HAL_XFER_DESC_STS_PKTERR USBH_LL_QTD_STATUS_PKTERR -#define USBH_HAL_XFER_DESC_STS_BUFFER_ERR USBH_LL_QTD_STATUS_BUFFER -#define USBH_HAL_XFER_DESC_STS_NOT_EXECUTED USBH_LL_QTD_STATUS_NOT_EXECUTED +#define USB_DWC_HAL_XFER_DESC_STS_SUCCESS USB_DWC_LL_QTD_STATUS_SUCCESS +#define USB_DWC_HAL_XFER_DESC_STS_PKTERR USB_DWC_LL_QTD_STATUS_PKTERR +#define USB_DWC_HAL_XFER_DESC_STS_BUFFER_ERR USB_DWC_LL_QTD_STATUS_BUFFER +#define USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED USB_DWC_LL_QTD_STATUS_NOT_EXECUTED // -------------------- Object Types ----------------------- @@ -122,7 +122,7 @@ typedef struct { usb_hal_interval_t interval; /**< The interval of the endpoint */ uint32_t phase_offset_frames; /**< Phase offset in number of frames */ } periodic; /**< Characteristic for periodic (interrupt/isochronous) endpoints only */ -} usbh_hal_ep_char_t; +} usb_dwc_hal_ep_char_t; /** * @brief Channel object @@ -139,18 +139,18 @@ typedef struct { }; uint32_t val; } flags; /**< Flags regarding channel's status and information */ - usb_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ - usbh_hal_chan_error_t error; /**< The last error that occurred on the channel */ + usb_dwc_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ + usb_dwc_hal_chan_error_t error; /**< The last error that occurred on the channel */ usb_priv_xfer_type_t type; /**< The transfer type of the channel */ void *chan_ctx; /**< Context variable for the owner of the channel */ -} usbh_hal_chan_t; +} usb_dwc_hal_chan_t; /** * @brief HAL context structure */ typedef struct { //Context - usbh_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ + usb_dwc_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ //Host Port related uint32_t *periodic_frame_list; /**< Pointer to scheduling frame list */ usb_hal_frame_list_len_t frame_list_len; /**< Length of the periodic scheduling frame list */ @@ -168,9 +168,9 @@ typedef struct { struct { int num_allocd; /**< Number of channels currently allocated */ uint32_t chan_pend_intrs_msk; /**< Bit mask of channels with pending interrupts */ - usbh_hal_chan_t *hdls[USBH_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ + usb_dwc_hal_chan_t *hdls[USB_DWC_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ } channels; -} usbh_hal_context_t; +} usb_dwc_hal_context_t; // -------------------------------------------------- Core (Global) ---------------------------------------------------- @@ -188,12 +188,12 @@ typedef struct { * - Sets default values to some global and OTG registers (GAHBCFG and GUSBCFG) * - Umask global interrupt signal * - Put DWC_OTG into host mode. Require 25ms delay before this takes effect. - * - State -> USBH_HAL_PORT_STATE_OTG + * - State -> USB_DWC_HAL_PORT_STATE_OTG * - Interrupts cleared. Users can now enable their ISR * * @param[inout] hal Context of the HAL layer */ -void usbh_hal_init(usbh_hal_context_t *hal); +void usb_dwc_hal_init(usb_dwc_hal_context_t *hal); /** * @brief Deinitialize the HAL context @@ -206,20 +206,20 @@ void usbh_hal_init(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -void usbh_hal_deinit(usbh_hal_context_t *hal); +void usb_dwc_hal_deinit(usb_dwc_hal_context_t *hal); /** * @brief Issue a soft reset to the controller * * This should be called when the host port encounters an error event or has been disconnected. Before calling this, * users are responsible for safely freeing all channels as a soft reset will wipe all host port and channel registers. - * This function will result in the host port being put back into same state as after calling usbh_hal_init(). + * This function will result in the host port being put back into same state as after calling usb_dwc_hal_init(). * * @note This has nothing to do with a USB bus reset. It simply resets the peripheral * * @param hal Context of the HAL layer */ -void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); +void usb_dwc_hal_core_soft_reset(usb_dwc_hal_context_t *hal); /** * @brief Set FIFO sizes @@ -229,14 +229,14 @@ void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); * may be situations where this function may need to be called again to resize the FIFOs. If resizing FIFOs dynamically, * it is the user's responsibility to ensure there are no active channels when this function is called. * - * @note The totol size of all the FIFOs must be less than or equal to USBH_HAL_FIFO_TOTAL_USABLE_LINES + * @note The totol size of all the FIFOs must be less than or equal to USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES * @note After a port reset, the FIFO size registers will reset to their default values, so this function must be called * again post reset. * * @param hal Context of the HAL layer * @param fifo_config FIFO configuration */ -void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_t *fifo_config); +void usb_dwc_hal_set_fifo_size(usb_dwc_hal_context_t *hal, const usb_dwc_hal_fifo_config_t *fifo_config); // ---------------------------------------------------- Host Port ------------------------------------------------------ @@ -249,11 +249,11 @@ void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_ * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_init(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_init(usb_dwc_hal_context_t *hal) { //Configure Host related interrupts - usbh_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -263,10 +263,10 @@ static inline void usbh_hal_port_init(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_deinit(usb_dwc_hal_context_t *hal) { //Disable Host port and channel interrupts - usb_ll_dis_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_gintmsk_dis_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -275,12 +275,12 @@ static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param power_on Whether to power ON or OFF the port */ -static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool power_on) +static inline void usb_dwc_hal_port_toggle_power(usb_dwc_hal_context_t *hal, bool power_on) { if (power_on) { - usbh_ll_hprt_en_pwr(hal->dev); + usb_dwc_ll_hprt_en_pwr(hal->dev); } else { - usbh_ll_hprt_dis_pwr(hal->dev); + usb_dwc_ll_hprt_dis_pwr(hal->dev); } } @@ -291,19 +291,19 @@ static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool powe * Entry: * - Host port detects a device connection or Host port is already enabled * Exit: - * - On release of the reset signal, a USBH_HAL_PORT_EVENT_ENABLED will be generated + * - On release of the reset signal, a USB_DWC_HAL_PORT_EVENT_ENABLED will be generated * * @note If the host port is already enabled, then issuing a reset will cause it be disabled and generate a - * USBH_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus - * generating the USBH_HAL_PORT_EVENT_ENABLED event) + * USB_DWC_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus + * generating the USB_DWC_HAL_PORT_EVENT_ENABLED event) * * @param hal Context of the HAL layer * @param enable Enable/disable reset signal */ -static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_reset(usb_dwc_hal_context_t *hal, bool enable) { HAL_ASSERT(hal->channels.num_allocd == 0); //Cannot reset if there are still allocated channels - usbh_ll_hprt_set_port_reset(hal->dev, enable); + usb_dwc_ll_hprt_set_port_reset(hal->dev, enable); } /** @@ -317,7 +317,7 @@ static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enab * * @param hal Context of the HAL layer */ -void usbh_hal_port_enable(usbh_hal_context_t *hal); +void usb_dwc_hal_port_enable(usb_dwc_hal_context_t *hal); /** * @brief Disable the host port @@ -327,9 +327,9 @@ void usbh_hal_port_enable(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_disable(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_port_dis(hal->dev); + usb_dwc_ll_hprt_port_dis(hal->dev); } /** @@ -337,9 +337,9 @@ static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layers */ -static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_suspend(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_set_port_suspend(hal->dev); + usb_dwc_ll_hprt_set_port_suspend(hal->dev); } /** @@ -352,12 +352,12 @@ static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param enable Enable/disable resume signal */ -static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_resume(usb_dwc_hal_context_t *hal, bool enable) { if (enable) { - usbh_ll_hprt_set_port_resume(hal->dev); + usb_dwc_ll_hprt_set_port_resume(hal->dev); } else { - usbh_ll_hprt_clr_port_resume(hal->dev); + usb_dwc_ll_hprt_clr_port_resume(hal->dev); } } @@ -371,9 +371,9 @@ static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool ena * @return true Resume signal is still being driven * @return false Resume signal is no longer driven */ -static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_resume(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_port_resume(hal->dev); + return usb_dwc_ll_hprt_get_port_resume(hal->dev); } // ---------------- Host Port Scheduling ------------------- @@ -382,13 +382,13 @@ static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) * @brief Sets the periodic scheduling frame list * * @note This function must be called before attempting configuring any channels to be period via - * usbh_hal_chan_set_ep_char() + * usb_dwc_hal_chan_set_ep_char() * * @param hal Context of the HAL layer * @param frame_list Base address of the frame list * @param frame_list_len Number of entries in the frame list (can only be 8, 16, 32, 64) */ -static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) +static inline void usb_dwc_hal_port_set_frame_list(usb_dwc_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) { //Clear and save frame list hal->periodic_frame_list = frame_list; @@ -401,7 +401,7 @@ static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_ * @param hal Context of the HAL layer * @return uint32_t* Base address of the periodic scheduling frame list */ -static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) +static inline uint32_t *usb_dwc_hal_port_get_frame_list(usb_dwc_hal_context_t *hal) { return hal->periodic_frame_list; } @@ -409,18 +409,18 @@ static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) /** * @brief Enable periodic scheduling * - * @note The periodic frame list must be set via usbh_hal_port_set_frame_list() should be set before calling this + * @note The periodic frame list must be set via usb_dwc_hal_port_set_frame_list() should be set before calling this * function * @note This function must be called before activating any periodic channels * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_enable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->periodic_frame_list != NULL); - usbh_ll_set_frame_list_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); - usbh_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); - usbh_ll_hcfg_en_perio_sched(hal->dev); + usb_dwc_ll_hflbaddr_set_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); + usb_dwc_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); + usb_dwc_ll_hcfg_en_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 1; } @@ -435,16 +435,16 @@ static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_disable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->flags.periodic_sched_enabled); - usbh_ll_hcfg_dis_perio_sched(hal->dev); + usb_dwc_ll_hcfg_dis_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 0; } -static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) +static inline uint32_t usb_dwc_hal_port_get_cur_frame_num(usb_dwc_hal_context_t *hal) { - return usbh_ll_get_frm_num(hal->dev); + return usb_dwc_ll_hfnum_get_frame_num(hal->dev); } // --------------- Host Port Status/State ------------------ @@ -453,19 +453,19 @@ static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) * @brief Check if a device is currently connected to the host port * * This function is intended to be called after one of the following events followed by an adequate debounce delay - * - USBH_HAL_PORT_EVENT_CONN - * - USBH_HAL_PORT_EVENT_DISCONN + * - USB_DWC_HAL_PORT_EVENT_CONN + * - USB_DWC_HAL_PORT_EVENT_DISCONN * * @note No other connection/disconnection event will occur again until the debounce lock is disabled via - * usbh_hal_disable_debounce_lock() + * usb_dwc_hal_disable_debounce_lock() * * @param hal Context of the HAL layer * @return true A device is connected to the host port * @return false A device is not connected to the host port */ -static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_if_connected(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_conn_status(hal->dev); + return usb_dwc_ll_hprt_get_conn_status(hal->dev); } /** @@ -476,27 +476,27 @@ static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @return usb_priv_speed_t Speed of the connected device (FS or LS only on the esp32-s2 and esp32-s3) */ -static inline usb_priv_speed_t usbh_hal_port_get_conn_speed(usbh_hal_context_t *hal) +static inline usb_priv_speed_t usb_dwc_hal_port_get_conn_speed(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_speed(hal->dev); + return usb_dwc_ll_hprt_get_speed(hal->dev); } /** * @brief Disable the debounce lock * - * This function must be called after calling usbh_hal_port_check_if_connected() and will allow connection/disconnection + * This function must be called after calling usb_dwc_hal_port_check_if_connected() and will allow connection/disconnection * events to occur again. Any pending connection or disconenction interrupts are cleared. * * @param hal Context of the HAL layer */ -static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_disable_debounce_lock(usb_dwc_hal_context_t *hal) { hal->flags.dbnc_lock_enabled = 0; //Clear Conenction and disconenction interrupt in case it triggered again - usb_ll_intr_clear(hal->dev, USB_LL_INTR_CORE_DISCONNINT); - usbh_ll_hprt_intr_clear(hal->dev, USBH_LL_INTR_HPRT_PRTCONNDET); + usb_dwc_ll_gintsts_clear_intrs(hal->dev, USB_DWC_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_hprt_intr_clear(hal->dev, USB_DWC_LL_INTR_HPRT_PRTCONNDET); //Reenable the hprt (connection) and disconnection interrupts - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_DISCONNINT); } // ----------------------------------------------------- Channel ------------------------------------------------------- @@ -512,7 +512,7 @@ static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) * @return true Channel successfully allocated * @return false Failed to allocate channel */ -bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, void *chan_ctx); +bool usb_dwc_hal_chan_alloc(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, void *chan_ctx); /** * @brief Free a channel @@ -520,7 +520,7 @@ bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, voi * @param[in] hal Context of the HAL layer * @param[in] chan_obj Channel object */ -void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); +void usb_dwc_hal_chan_free(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj); // ---------------- Channel Configuration ------------------ @@ -530,7 +530,7 @@ void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); * @param[in] chan_obj Channel object * @return void* The context variable of the channel */ -static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) +static inline void *usb_dwc_hal_chan_get_context(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->chan_ctx; } @@ -547,7 +547,7 @@ static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) * @param chan_obj Channel object * @param ep_char Endpoint characteristics */ -void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, usbh_hal_ep_char_t *ep_char); +void usb_dwc_hal_chan_set_ep_char(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, usb_dwc_hal_ep_char_t *ep_char); /** * @brief Set the direction of the channel @@ -561,11 +561,11 @@ void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_ob * @param chan_obj Channel object * @param is_in Whether the direction is IN */ -static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) +static inline void usb_dwc_hal_chan_set_dir(usb_dwc_hal_chan_t *chan_obj, bool is_in) { //Cannot change direction whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); - usbh_ll_chan_set_dir(chan_obj->regs, is_in); + usb_dwc_ll_hcchar_set_dir(chan_obj->regs, is_in); } /** @@ -580,12 +580,12 @@ static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) * @param chan_obj Channel object * @param pid PID of the next DATA packet (DATA0 or DATA1) */ -static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) +static inline void usb_dwc_hal_chan_set_pid(usb_dwc_hal_chan_t *chan_obj, int pid) { //Cannot change pid whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); //Update channel object and set the register - usbh_ll_chan_set_pid(chan_obj->regs, pid); + usb_dwc_ll_hctsiz_set_pid(chan_obj->regs, pid); } /** @@ -598,10 +598,10 @@ static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) * @param chan_obj Channel object * @return uint32_t Starting PID of the next transfer (DATA0 or DATA1) */ -static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) +static inline uint32_t usb_dwc_hal_chan_get_pid(usb_dwc_hal_chan_t *chan_obj) { HAL_ASSERT(!chan_obj->flags.active); - return usbh_ll_chan_get_pid(chan_obj->regs); + return usb_dwc_ll_hctsiz_get_pid(chan_obj->regs); } // ------------------- Channel Control --------------------- @@ -619,7 +619,7 @@ static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) * @param desc_list_len Transfer descriptor list length * @param start_idx Index of the starting transfer descriptor in the list */ -void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); +void usb_dwc_hal_chan_activate(usb_dwc_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); /** * @brief Get the index of the current transfer descriptor @@ -627,9 +627,9 @@ void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int * @param chan_obj Channel object * @return int Descriptor index */ -static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) +static inline int usb_dwc_hal_chan_get_qtd_idx(usb_dwc_hal_chan_t *chan_obj) { - return usbh_ll_chan_get_ctd(chan_obj->regs); + return usb_dwc_ll_hcdam_get_cur_qtd_idx(chan_obj->regs); } /** @@ -637,24 +637,24 @@ static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) * * This function should be called in order to halt a channel. If the channel is already halted, this function will * return true. If the channel is still active, this function will return false and users must wait for the - * USBH_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. + * USB_DWC_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. * * @note When a transfer is in progress (i.e., the channel is active) and a halt is requested, the channel will halt * after the next USB packet is completed. If the transfer has more pending packets, the transfer will just be - * marked as USBH_HAL_XFER_DESC_STS_NOT_EXECUTED. + * marked as USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED. * * @param chan_obj Channel object * @return true The channel is already halted - * @return false The halt was requested, wait for USBH_HAL_CHAN_EVENT_HALT_REQ + * @return false The halt was requested, wait for USB_DWC_HAL_CHAN_EVENT_HALT_REQ */ -bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); +bool usb_dwc_hal_chan_request_halt(usb_dwc_hal_chan_t *chan_obj); /** * @brief Indicate that a channel is halted after a port error * * When a port error occurs (e.g., discconect, overcurrent): * - Any previously active channels will remain active (i.e., they will not receive a channel interrupt) - * - Attempting to disable them using usbh_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels + * - Attempting to disable them using usb_dwc_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels * (probalby something to do with the periodic scheduling) * * However, the channel's enable bit can be left as 1 since after a port error, a soft reset will be done anyways. @@ -663,7 +663,7 @@ bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); * * @param chan_obj Channel object */ -static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) +static inline void usb_dwc_hal_chan_mark_halted(usb_dwc_hal_chan_t *chan_obj) { chan_obj->flags.active = 0; } @@ -672,9 +672,9 @@ static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) * @brief Get a channel's error * * @param chan_obj Channel object - * @return usbh_hal_chan_error_t The type of error the channel has encountered + * @return usb_dwc_hal_chan_error_t The type of error the channel has encountered */ -static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *chan_obj) +static inline usb_dwc_hal_chan_error_t usb_dwc_hal_chan_get_error(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->error; } @@ -688,8 +688,8 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * - A stage of a transfer (for control transfers) * - A frame of a transfer interval (for interrupt and isoc) * - An entire transfer (for bulk transfers) - * - Check the various USBH_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor - * - For IN transfer entries, set the USBH_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of + * - Check the various USB_DWC_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor + * - For IN transfer entries, set the USB_DWC_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of * the endpoint's MPS * * @note Critical section is not required for this function @@ -700,19 +700,19 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * @param xfer_len Transfer length * @param flags Transfer flags */ -static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) +static inline void usb_dwc_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - if (flags & USBH_HAL_XFER_DESC_FLAG_IN) { - usbh_ll_set_qtd_in(&qtd_list[desc_idx], + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + if (flags & USB_DWC_HAL_XFER_DESC_FLAG_IN) { + usb_dwc_ll_qtd_set_in(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC); } else { - usbh_ll_set_qtd_out(&qtd_list[desc_idx], + usb_dwc_ll_qtd_set_out(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC, - flags & USBH_HAL_XFER_DESC_FLAG_SETUP); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC, + flags & USB_DWC_HAL_XFER_DESC_FLAG_SETUP); } } @@ -722,10 +722,10 @@ static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, u * @param desc_list Transfer descriptor list * @param desc_idx Transfer descriptor index */ -static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) +static inline void usb_dwc_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } /** @@ -738,12 +738,12 @@ static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) * * @note Critical section is not required for this function */ -static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) +static inline void usb_dwc_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_get_qtd_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_get_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); //Clear the QTD to prevent it from being read again - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } // ------------------------------------------------- Event Handling ---------------------------------------------------- @@ -757,9 +757,9 @@ static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, * @note This should be the first interrupt decode function to be run * * @param hal Context of the HAL layer - * @return usbh_hal_port_event_t Host port event + * @return usb_dwc_hal_port_event_t Host port event */ -usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); +usb_dwc_hal_port_event_t usb_dwc_hal_decode_intr(usb_dwc_hal_context_t *hal); /** * @brief Gets the next channel with a pending interrupt @@ -768,9 +768,9 @@ usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); * interrupt, this function returns one of the channel's objects. Call this function repeatedly until it returns NULL. * * @param hal Context of the HAL layer - * @return usbh_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. + * @return usb_dwc_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. */ -usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); +usb_dwc_hal_chan_t *usb_dwc_hal_get_chan_pending_intr(usb_dwc_hal_context_t *hal); /** * @brief Decode a particular channel's interrupt @@ -781,9 +781,9 @@ usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); * @param chan_obj Channel object * @note If the host port has an error (e.g., a sudden disconnect or an port error), any active channels will not * receive an interrupt. Each active channel must be manually halted. - * @return usbh_hal_chan_event_t Channel event + * @return usb_dwc_hal_chan_event_t Channel event */ -usbh_hal_chan_event_t usbh_hal_chan_decode_intr(usbh_hal_chan_t *chan_obj); +usb_dwc_hal_chan_event_t usb_dwc_hal_chan_decode_intr(usb_dwc_hal_chan_t *chan_obj); #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/hal/include/hal/usbh_ll.h b/tools/sdk/esp32c3/include/hal/include/hal/usb_dwc_ll.h similarity index 59% rename from tools/sdk/esp32/include/hal/include/hal/usbh_ll.h rename to tools/sdk/esp32c3/include/hal/include/hal/usb_dwc_ll.h index 4320ead0a3b..3bbaeca4c2e 100644 --- a/tools/sdk/esp32/include/hal/include/hal/usbh_ll.h +++ b/tools/sdk/esp32c3/include/hal/include/hal/usb_dwc_ll.h @@ -12,7 +12,7 @@ extern "C" { #include #include -#include "soc/usbh_struct.h" +#include "soc/usb_dwc_struct.h" #include "hal/usb_types_private.h" #include "hal/misc.h" @@ -24,48 +24,48 @@ extern "C" { /* * Interrupt bit masks of the GINTSTS and GINTMSK registers */ -#define USB_LL_INTR_CORE_WKUPINT (1 << 31) -#define USB_LL_INTR_CORE_SESSREQINT (1 << 30) -#define USB_LL_INTR_CORE_DISCONNINT (1 << 29) -#define USB_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) -#define USB_LL_INTR_CORE_PTXFEMP (1 << 26) -#define USB_LL_INTR_CORE_HCHINT (1 << 25) -#define USB_LL_INTR_CORE_PRTINT (1 << 24) -#define USB_LL_INTR_CORE_RESETDET (1 << 23) -#define USB_LL_INTR_CORE_FETSUSP (1 << 22) -#define USB_LL_INTR_CORE_INCOMPIP (1 << 21) -#define USB_LL_INTR_CORE_INCOMPISOIN (1 << 20) -#define USB_LL_INTR_CORE_OEPINT (1 << 19) -#define USB_LL_INTR_CORE_IEPINT (1 << 18) -#define USB_LL_INTR_CORE_EPMIS (1 << 17) -#define USB_LL_INTR_CORE_EOPF (1 << 15) -#define USB_LL_INTR_CORE_ISOOUTDROP (1 << 14) -#define USB_LL_INTR_CORE_ENUMDONE (1 << 13) -#define USB_LL_INTR_CORE_USBRST (1 << 12) -#define USB_LL_INTR_CORE_USBSUSP (1 << 11) -#define USB_LL_INTR_CORE_ERLYSUSP (1 << 10) -#define USB_LL_INTR_CORE_GOUTNAKEFF (1 << 7) -#define USB_LL_INTR_CORE_GINNAKEFF (1 << 6) -#define USB_LL_INTR_CORE_NPTXFEMP (1 << 5) -#define USB_LL_INTR_CORE_RXFLVL (1 << 4) -#define USB_LL_INTR_CORE_SOF (1 << 3) -#define USB_LL_INTR_CORE_OTGINT (1 << 2) -#define USB_LL_INTR_CORE_MODEMIS (1 << 1) -#define USB_LL_INTR_CORE_CURMOD (1 << 0) +#define USB_DWC_LL_INTR_CORE_WKUPINT (1 << 31) +#define USB_DWC_LL_INTR_CORE_SESSREQINT (1 << 30) +#define USB_DWC_LL_INTR_CORE_DISCONNINT (1 << 29) +#define USB_DWC_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) +#define USB_DWC_LL_INTR_CORE_PTXFEMP (1 << 26) +#define USB_DWC_LL_INTR_CORE_HCHINT (1 << 25) +#define USB_DWC_LL_INTR_CORE_PRTINT (1 << 24) +#define USB_DWC_LL_INTR_CORE_RESETDET (1 << 23) +#define USB_DWC_LL_INTR_CORE_FETSUSP (1 << 22) +#define USB_DWC_LL_INTR_CORE_INCOMPIP (1 << 21) +#define USB_DWC_LL_INTR_CORE_INCOMPISOIN (1 << 20) +#define USB_DWC_LL_INTR_CORE_OEPINT (1 << 19) +#define USB_DWC_LL_INTR_CORE_IEPINT (1 << 18) +#define USB_DWC_LL_INTR_CORE_EPMIS (1 << 17) +#define USB_DWC_LL_INTR_CORE_EOPF (1 << 15) +#define USB_DWC_LL_INTR_CORE_ISOOUTDROP (1 << 14) +#define USB_DWC_LL_INTR_CORE_ENUMDONE (1 << 13) +#define USB_DWC_LL_INTR_CORE_USBRST (1 << 12) +#define USB_DWC_LL_INTR_CORE_USBSUSP (1 << 11) +#define USB_DWC_LL_INTR_CORE_ERLYSUSP (1 << 10) +#define USB_DWC_LL_INTR_CORE_GOUTNAKEFF (1 << 7) +#define USB_DWC_LL_INTR_CORE_GINNAKEFF (1 << 6) +#define USB_DWC_LL_INTR_CORE_NPTXFEMP (1 << 5) +#define USB_DWC_LL_INTR_CORE_RXFLVL (1 << 4) +#define USB_DWC_LL_INTR_CORE_SOF (1 << 3) +#define USB_DWC_LL_INTR_CORE_OTGINT (1 << 2) +#define USB_DWC_LL_INTR_CORE_MODEMIS (1 << 1) +#define USB_DWC_LL_INTR_CORE_CURMOD (1 << 0) /* * Bit mask of interrupt generating bits of the the HPRT register. These bits - * are ORd into the USB_LL_INTR_CORE_PRTINT interrupt. + * are ORd into the USB_DWC_LL_INTR_CORE_PRTINT interrupt. * * Note: Some fields of the HPRT are W1C (write 1 clear), this we cannot do a * simple read and write-back to clear the HPRT interrupt bits. Instead we need * a W1C mask the non-interrupt related bits */ -#define USBH_LL_HPRT_W1C_MSK (0x2E) -#define USBH_LL_HPRT_ENA_MSK (0x04) -#define USBH_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) -#define USBH_LL_INTR_HPRT_PRTENCHNG (1 << 3) -#define USBH_LL_INTR_HPRT_PRTCONNDET (1 << 1) +#define USB_DWC_LL_HPRT_W1C_MSK (0x2E) +#define USB_DWC_LL_HPRT_ENA_MSK (0x04) +#define USB_DWC_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) +#define USB_DWC_LL_INTR_HPRT_PRTENCHNG (1 << 3) +#define USB_DWC_LL_INTR_HPRT_PRTCONNDET (1 << 1) /* * Bit mask of channel interrupts (HCINTi and HCINTMSKi registers) @@ -78,22 +78,22 @@ extern "C" { * - XFERCOMPL * The remaining interrupt bits will still be set (when the corresponding event occurs) * but will not generate an interrupt. Therefore we must proxy through the - * USBH_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. + * USB_DWC_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. */ -#define USBH_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) -#define USBH_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) -#define USBH_LL_INTR_CHAN_BNAINTR (1 << 11) -#define USBH_LL_INTR_CHAN_DATATGLERR (1 << 10) -#define USBH_LL_INTR_CHAN_FRMOVRUN (1 << 9) -#define USBH_LL_INTR_CHAN_BBLEER (1 << 8) -#define USBH_LL_INTR_CHAN_XACTERR (1 << 7) -#define USBH_LL_INTR_CHAN_NYET (1 << 6) -#define USBH_LL_INTR_CHAN_ACK (1 << 5) -#define USBH_LL_INTR_CHAN_NAK (1 << 4) -#define USBH_LL_INTR_CHAN_STALL (1 << 3) -#define USBH_LL_INTR_CHAN_AHBERR (1 << 2) -#define USBH_LL_INTR_CHAN_CHHLTD (1 << 1) -#define USBH_LL_INTR_CHAN_XFERCOMPL (1 << 0) +#define USB_DWC_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) +#define USB_DWC_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) +#define USB_DWC_LL_INTR_CHAN_BNAINTR (1 << 11) +#define USB_DWC_LL_INTR_CHAN_DATATGLERR (1 << 10) +#define USB_DWC_LL_INTR_CHAN_FRMOVRUN (1 << 9) +#define USB_DWC_LL_INTR_CHAN_BBLEER (1 << 8) +#define USB_DWC_LL_INTR_CHAN_XACTERR (1 << 7) +#define USB_DWC_LL_INTR_CHAN_NYET (1 << 6) +#define USB_DWC_LL_INTR_CHAN_ACK (1 << 5) +#define USB_DWC_LL_INTR_CHAN_NAK (1 << 4) +#define USB_DWC_LL_INTR_CHAN_STALL (1 << 3) +#define USB_DWC_LL_INTR_CHAN_AHBERR (1 << 2) +#define USB_DWC_LL_INTR_CHAN_CHHLTD (1 << 1) +#define USB_DWC_LL_INTR_CHAN_XFERCOMPL (1 << 0) /* * QTD (Queue Transfer Descriptor) structure used in Scatter/Gather DMA mode. @@ -150,7 +150,7 @@ typedef struct { uint32_t buffer_status_val; }; uint8_t *buffer; -} usbh_ll_dma_qtd_t; +} usb_dwc_ll_dma_qtd_t; /* ----------------------------------------------------------------------------- @@ -159,61 +159,61 @@ typedef struct { // --------------------------- GAHBCFG Register -------------------------------- -static inline void usb_ll_en_dma_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_dma_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 1; } -static inline void usb_ll_en_slave_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_slave_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 0; } -static inline void usb_ll_set_hbstlen(usbh_dev_t *hw, uint32_t burst_len) +static inline void usb_dwc_ll_gahbcfg_set_hbstlen(usb_dwc_dev_t *hw, uint32_t burst_len) { hw->gahbcfg_reg.hbstlen = burst_len; } -static inline void usb_ll_en_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 1; } -static inline void usb_ll_dis_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_dis_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 0; } // --------------------------- GUSBCFG Register -------------------------------- -static inline void usb_ll_set_host_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_force_host_mode(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.forcehstmode = 1; } -static inline void usb_ll_dis_hnp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_hnp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.hnpcap = 0; } -static inline void usb_ll_dis_srp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_srp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.srpcap = 0; } // --------------------------- GRSTCTL Register -------------------------------- -static inline bool usb_ll_check_ahb_idle(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_ahb_idle(usb_dwc_dev_t *hw) { return hw->grstctl_reg.ahbidle; } -static inline bool usb_ll_check_dma_req_in_progress(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_dma_req_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.dmareq; } -static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_nptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 0; //Set the TX FIFO number to 0 to select the non-periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //Flush the selected TX FIFO @@ -223,7 +223,7 @@ static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_ptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 1; //Set the TX FIFO number to 1 to select the periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //FLush the select TX FIFO @@ -233,7 +233,7 @@ static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_rx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.rxfflsh = 1; //Wait for the flushing to complete @@ -242,17 +242,17 @@ static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_reset_frame_counter(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_reset_frame_counter(usb_dwc_dev_t *hw) { hw->grstctl_reg.frmcntrrst = 1; } -static inline void usb_ll_core_soft_reset(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_core_soft_reset(usb_dwc_dev_t *hw) { hw->grstctl_reg.csftrst = 1; } -static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_core_soft_reset_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.csftrst; } @@ -265,9 +265,9 @@ static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @return uint32_t Mask of interrupts */ -static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_gintsts_read_and_clear_intrs(usb_dwc_dev_t *hw) { - usb_gintsts_reg_t gintsts; + usb_dwc_gintsts_reg_t gintsts; gintsts.val = hw->gintsts_reg.val; hw->gintsts_reg.val = gintsts.val; //Write back to clear return gintsts.val; @@ -279,7 +279,7 @@ static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param intr_msk Mask of interrupts to clear */ -static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) +static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t intr_msk) { //All GINTSTS fields are either W1C or read only. So safe to write directly hw->gintsts_reg.val = intr_msk; @@ -287,19 +287,19 @@ static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) // --------------------------- GINTMSK Register -------------------------------- -static inline void usb_ll_en_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val |= intr_mask; } -static inline void usb_ll_dis_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_dis_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val &= ~intr_mask; } // --------------------------- GRXFSIZ Register -------------------------------- -static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) +static inline void usb_dwc_ll_grxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t num_lines) { //Set size in words HAL_FORCE_MODIFY_U32_REG_FIELD(hw->grxfsiz_reg, rxfdep, num_lines); @@ -307,20 +307,24 @@ static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) // -------------------------- GNPTXFSIZ Register ------------------------------- -static inline void usb_ll_set_nptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_gnptxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_gnptxfsiz_reg_t gnptxfsiz; + usb_dwc_gnptxfsiz_reg_t gnptxfsiz; gnptxfsiz.val = hw->gnptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfdep, num_lines); hw->gnptxfsiz_reg.val = gnptxfsiz.val; } -static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) +// --------------------------- GSNPSID Register -------------------------------- + +static inline uint32_t usb_dwc_ll_gsnpsid_get_id(usb_dwc_dev_t *hw) { return hw->gsnpsid_reg.val; } +// --------------------------- GHWCFGx Register -------------------------------- + /** * @brief Get the hardware configuration regiters of the DWC_OTG controller * @@ -333,7 +337,7 @@ static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) * @param[out] ghwcfg3 Hardware configuration registesr 3 * @param[out] ghwcfg4 Hardware configuration registesr 4 */ -static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) +static inline void usb_dwc_ll_ghwcfg_get_hw_config(usb_dwc_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) { *ghwcfg1 = hw->ghwcfg1_reg.val; *ghwcfg2 = hw->ghwcfg2_reg.val; @@ -343,9 +347,9 @@ static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, // --------------------------- HPTXFSIZ Register ------------------------------- -static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_hptxfsiz_set_ptx_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_hptxfsiz_reg_t hptxfsiz; + usb_dwc_hptxfsiz_reg_t hptxfsiz; hptxfsiz.val = hw->hptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfsize, num_lines); @@ -358,12 +362,12 @@ static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint // ----------------------------- HCFG Register --------------------------------- -static inline void usbh_ll_hcfg_en_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 1; } -static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_dis_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 0; } @@ -373,7 +377,7 @@ static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) * * @param num_entires Number of entires in the frame list */ -static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_hal_frame_list_len_t num_entries) +static inline void usb_dwc_ll_hcfg_set_num_frame_list_entries(usb_dwc_dev_t *hw, usb_hal_frame_list_len_t num_entries) { uint32_t frlisten; switch (num_entries) { @@ -393,17 +397,17 @@ static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_h hw->hcfg_reg.frlisten = frlisten; } -static inline void usbh_ll_hcfg_en_scatt_gatt_dma(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_scatt_gatt_dma(usb_dwc_dev_t *hw) { hw->hcfg_reg.descdma = 1; } -static inline void usbh_ll_hcfg_set_fsls_supp_only(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_supp_only(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslssupp = 1; } -static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_pclk_sel(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslspclksel = 1; } @@ -414,7 +418,7 @@ static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param speed Speed to initialize the host port at */ -static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hcfg_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { hw->hcfg_reg.descdma = 1; //Enable scatt/gatt hw->hcfg_reg.fslssupp = 1; //FS/LS support only @@ -429,9 +433,9 @@ static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFIR Register --------------------------------- -static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hfir_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { - usb_hfir_reg_t hfir; + usb_dwc_hfir_reg_t hfir; hfir.val = hw->hfir_reg.val; hfir.hfirrldctrl = 0; //Disable dynamic loading /* @@ -445,49 +449,49 @@ static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFNUM Register -------------------------------- -static inline uint32_t usbh_ll_get_frm_time_rem(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_time_rem(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hfnum_reg, frrem); } -static inline uint32_t usbh_ll_get_frm_num(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_num(usb_dwc_dev_t *hw) { return hw->hfnum_reg.frnum; } // ---------------------------- HPTXSTS Register ------------------------------- -static inline uint32_t usbh_ll_get_p_tx_queue_top(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_top(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxqtop); } -static inline uint32_t usbh_ll_get_p_tx_queue_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_space_avail(usb_dwc_dev_t *hw) { return hw->hptxsts_reg.ptxqspcavail; } -static inline uint32_t usbh_ll_get_p_tx_fifo_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_ptxsts_get_ptxf_space_avail(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxfspcavail); } // ----------------------------- HAINT Register -------------------------------- -static inline uint32_t usbh_ll_get_chan_intrs_msk(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_haint_get_chan_intrs(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->haint_reg, haint); } // --------------------------- HAINTMSK Register ------------------------------- -static inline void usbh_ll_haintmsk_en_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_en_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val |= mask; } -static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_dis_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val &= ~mask; } @@ -504,7 +508,7 @@ static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) * @param hw Start address of the DWC_OTG registers * @param addr Base address of the scheduling frame list */ -static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t addr) +static inline void usb_dwc_ll_hflbaddr_set_base_addr(usb_dwc_dev_t *hw, uint32_t addr) { hw->hflbaddr_reg.hflbaddr = addr; } @@ -515,14 +519,14 @@ static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t add * @param hw Start address of the DWC_OTG registers * @return uint32_t Base address of the scheduling frame list */ -static inline uint32_t usbh_ll_get_frame_list_base_addr(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hflbaddr_get_base_addr(usb_dwc_dev_t *hw) { return hw->hflbaddr_reg.hflbaddr; } // ----------------------------- HPRT Register --------------------------------- -static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) +static inline usb_priv_speed_t usb_dwc_ll_hprt_get_speed(usb_dwc_dev_t *hw) { usb_priv_speed_t speed; //esp32-s2 and esp32-s3 only support FS or LS @@ -537,163 +541,163 @@ static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) return speed; } -static inline uint32_t usbh_ll_hprt_get_test_ctl(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_test_ctl(usb_dwc_dev_t *hw) { return hw->hprt_reg.prttstctl; } -static inline void usbh_ll_hprt_set_test_ctl(usbh_dev_t *hw, uint32_t test_mode) +static inline void usb_dwc_ll_hprt_set_test_ctl(usb_dwc_dev_t *hw, uint32_t test_mode) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prttstctl = test_mode; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_en_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_en_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_dis_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_dis_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline uint32_t usbh_ll_hprt_get_pwr_line_status(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_pwr_line_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtlnsts; } -static inline void usbh_ll_hprt_set_port_reset(usbh_dev_t *hw, bool reset) +static inline void usb_dwc_ll_hprt_set_port_reset(usb_dwc_dev_t *hw, bool reset) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtrst = reset; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_reset(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtrst; } -static inline void usbh_ll_hprt_set_port_suspend(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_suspend(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtsusp = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_suspend(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_suspend(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtsusp; } -static inline void usbh_ll_hprt_set_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_clr_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_clr_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_resume(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_resume(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtres; } -static inline bool usbh_ll_hprt_get_port_overcur(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_overcur(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtovrcurract; } -static inline bool usbh_ll_hprt_get_port_en(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_en(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtena; } -static inline void usbh_ll_hprt_port_dis(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_port_dis(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtena = 1; //W1C to disable //we want to W1C ENA but not W1C the interrupt bits - hw->hprt_reg.val = hprt.val & ((~USBH_LL_HPRT_W1C_MSK) | USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & ((~USB_DWC_LL_HPRT_W1C_MSK) | USB_DWC_LL_HPRT_ENA_MSK); } -static inline bool usbh_ll_hprt_get_conn_status(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_conn_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtconnsts; } -static inline uint32_t usbh_ll_hprt_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_intr_read_and_clear(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; //We want to W1C the interrupt bits but not that ENA - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_ENA_MSK); //Return only the interrupt bits - return (hprt.val & (USBH_LL_HPRT_W1C_MSK & ~(USBH_LL_HPRT_ENA_MSK))); + return (hprt.val & (USB_DWC_LL_HPRT_W1C_MSK & ~(USB_DWC_LL_HPRT_ENA_MSK))); } -static inline void usbh_ll_hprt_intr_clear(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_hprt_intr_clear(usb_dwc_dev_t *hw, uint32_t intr_mask) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; - hw->hprt_reg.val = ((hprt.val & ~USBH_LL_HPRT_ENA_MSK) & ~USBH_LL_HPRT_W1C_MSK) | intr_mask; + hw->hprt_reg.val = ((hprt.val & ~USB_DWC_LL_HPRT_ENA_MSK) & ~USB_DWC_LL_HPRT_W1C_MSK) | intr_mask; } //Per Channel registers // --------------------------- HCCHARi Register -------------------------------- -static inline void usbh_ll_chan_start(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_enable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chena = 1; } -static inline bool usbh_ll_chan_is_active(volatile usb_host_chan_regs_t *chan) +static inline bool usb_dwc_ll_hcchar_chan_is_enabled(volatile usb_dwc_host_chan_regs_t *chan) { return chan->hcchar_reg.chena; } -static inline void usbh_ll_chan_halt(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_disable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chdis = 1; } -static inline void usbh_ll_chan_xfer_odd_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_odd_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 1; } -static inline void usbh_ll_chan_xfer_even_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_even_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 0; } -static inline void usbh_ll_chan_set_dev_addr(volatile usb_host_chan_regs_t *chan, uint32_t addr) +static inline void usb_dwc_ll_hcchar_set_dev_addr(volatile usb_dwc_host_chan_regs_t *chan, uint32_t addr) { chan->hcchar_reg.devaddr = addr; } -static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, usb_priv_xfer_type_t type) +static inline void usb_dwc_ll_hcchar_set_ep_type(volatile usb_dwc_host_chan_regs_t *chan, usb_priv_xfer_type_t type) { uint32_t ep_type; switch (type) { @@ -715,42 +719,42 @@ static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, //Indicates whether channel is commuunicating with a LS device connected via a FS hub. Setting this bit to 1 will cause //each packet to be preceded by a PREamble packet -static inline void usbh_ll_chan_set_lspddev(volatile usb_host_chan_regs_t *chan, bool is_ls) +static inline void usb_dwc_ll_hcchar_set_lspddev(volatile usb_dwc_host_chan_regs_t *chan, bool is_ls) { chan->hcchar_reg.lspddev = is_ls; } -static inline void usbh_ll_chan_set_dir(volatile usb_host_chan_regs_t *chan, bool is_in) +static inline void usb_dwc_ll_hcchar_set_dir(volatile usb_dwc_host_chan_regs_t *chan, bool is_in) { chan->hcchar_reg.epdir = is_in; } -static inline void usbh_ll_chan_set_ep_num(volatile usb_host_chan_regs_t *chan, uint32_t num) +static inline void usb_dwc_ll_hcchar_set_ep_num(volatile usb_dwc_host_chan_regs_t *chan, uint32_t num) { chan->hcchar_reg.epnum = num; } -static inline void usbh_ll_chan_set_mps(volatile usb_host_chan_regs_t *chan, uint32_t mps) +static inline void usb_dwc_ll_hcchar_set_mps(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mps) { chan->hcchar_reg.mps = mps; } -static inline void usbh_ll_chan_hcchar_init(volatile usb_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) +static inline void usb_dwc_ll_hcchar_init(volatile usb_dwc_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) { //Sets all persistent fields of the channel over its lifetimez - usbh_ll_chan_set_dev_addr(chan, dev_addr); - usbh_ll_chan_set_ep_type(chan, type); - usbh_ll_chan_set_lspddev(chan, is_ls); - usbh_ll_chan_set_dir(chan, is_in); - usbh_ll_chan_set_ep_num(chan, ep_num); - usbh_ll_chan_set_mps(chan, mps); + usb_dwc_ll_hcchar_set_dev_addr(chan, dev_addr); + usb_dwc_ll_hcchar_set_ep_type(chan, type); + usb_dwc_ll_hcchar_set_lspddev(chan, is_ls); + usb_dwc_ll_hcchar_set_dir(chan, is_in); + usb_dwc_ll_hcchar_set_ep_num(chan, ep_num); + usb_dwc_ll_hcchar_set_mps(chan, mps); } // ---------------------------- HCINTi Register -------------------------------- -static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_regs_t *chan) +static inline uint32_t usb_dwc_ll_hcint_read_and_clear_intrs(volatile usb_dwc_host_chan_regs_t *chan) { - usb_hcint_reg_t hcint; + usb_dwc_hcint_reg_t hcint; hcint.val = chan->hcint_reg.val; chan->hcint_reg.val = hcint.val; return hcint.val; @@ -758,14 +762,14 @@ static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_r // --------------------------- HCINTMSKi Register ------------------------------ -static inline void usbh_ll_chan_set_intr_mask(volatile usb_host_chan_regs_t *chan, uint32_t mask) +static inline void usb_dwc_ll_hcintmsk_set_intr_mask(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mask) { chan->hcintmsk_reg.val = mask; } -// ---------------------- HCTSIZi and HCDMAi Registers ------------------------- +// ---------------------------- HCTSIZi Register ------------------------------- -static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uint32_t data_pid) +static inline void usb_dwc_ll_hctsiz_set_pid(volatile usb_dwc_host_chan_regs_t *chan, uint32_t data_pid) { if (data_pid == 0) { chan->hctsiz_reg.pid = 0; @@ -774,7 +778,8 @@ static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uin } } -static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) { +static inline uint32_t usb_dwc_ll_hctsiz_get_pid(volatile usb_dwc_host_chan_regs_t *chan) +{ if (chan->hctsiz_reg.pid == 0) { return 0; //DATA0 } else { @@ -782,35 +787,35 @@ static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) } } -static inline void usbh_ll_chan_set_dma_addr_non_iso(volatile usb_host_chan_regs_t *chan, - void *dmaaddr, - uint32_t qtd_idx) +static inline void usb_dwc_ll_hctsiz_set_qtd_list_len(volatile usb_dwc_host_chan_regs_t *chan, int qtd_list_len) { - //Set HCDMAi - chan->hcdma_reg.val = 0; - chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address - chan->hcdma_reg.non_iso.ctd = qtd_idx; + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list } -static inline int usbh_ll_chan_get_ctd(usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hctsiz_init(volatile usb_dwc_host_chan_regs_t *chan) { - return chan->hcdma_reg.non_iso.ctd; + chan->hctsiz_reg.dopng = 0; //Don't do ping + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels } -static inline void usbh_ll_chan_hctsiz_init(volatile usb_host_chan_regs_t *chan) +// ---------------------------- HCDMAi Register -------------------------------- + +static inline void usb_dwc_ll_hcdma_set_qtd_list_addr(volatile usb_dwc_host_chan_regs_t *chan, void *dmaaddr, uint32_t qtd_idx) { - chan->hctsiz_reg.dopng = 0; //Don't do ping - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels + //Set HCDMAi + chan->hcdma_reg.val = 0; + chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address + chan->hcdma_reg.non_iso.ctd = qtd_idx; } -static inline void usbh_ll_chan_set_qtd_list_len(volatile usb_host_chan_regs_t *chan, int qtd_list_len) +static inline int usb_dwc_ll_hcdam_get_cur_qtd_idx(usb_dwc_host_chan_regs_t *chan) { - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list + return chan->hcdma_reg.non_iso.ctd; } // ---------------------------- HCDMABi Register ------------------------------- -static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t *chan) +static inline void *usb_dwc_ll_hcdmab_get_buff_addr(volatile usb_dwc_host_chan_regs_t *chan) { return (void *)chan->hcdmab_reg.hcdmab; } @@ -826,20 +831,20 @@ static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t * * @param dev Start address of the DWC_OTG registers * @param chan_idx The channel's index - * @return usb_host_chan_regs_t* Pointer to channel's registers + * @return usb_dwc_host_chan_regs_t* Pointer to channel's registers */ -static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int chan_idx) +static inline usb_dwc_host_chan_regs_t *usb_dwc_ll_chan_get_regs(usb_dwc_dev_t *dev, int chan_idx) { return &dev->host_chans[chan_idx]; } // ------------------------------ QTD related ---------------------------------- -#define USBH_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully -#define USBH_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). +#define USB_DWC_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully +#define USB_DWC_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). //Note: 0x2 is reserved -#define USBH_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. -#define USBH_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed +#define USB_DWC_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. +#define USB_DWC_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed /** * @brief Set a QTD for a non isochronous IN transfer @@ -850,7 +855,7 @@ static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int c * Non zero length must be mulitple of the endpoint's MPS. * @param hoc Halt on complete (will generate an interrupt and halt the channel) */ -static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) +static inline void usb_dwc_ll_qtd_set_in(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -873,7 +878,7 @@ static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff * @param is_setup Indicates whether this is a control transfer setup packet or a normal OUT Data transfer. * (As per the USB protocol, setup packets cannot be STALLd or NAKd by the device) */ -static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) +static inline void usb_dwc_ll_qtd_set_out(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -896,7 +901,7 @@ static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buf * * @param qtd Pointer to the QTD */ -static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) +static inline void usb_dwc_ll_qtd_set_null(usb_dwc_ll_dma_qtd_t *qtd) { qtd->buffer = NULL; qtd->buffer_status_val = 0; //Disable qtd by clearing it to zero. Used by interrupt/isoc as an unscheudled frame @@ -911,12 +916,12 @@ static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) * @param[out] rem_len Number of bytes ramining in the QTD * @param[out] status Status of the QTD */ -static inline void usbh_ll_get_qtd_status(usbh_ll_dma_qtd_t *qtd, int *rem_len, int *status) +static inline void usb_dwc_ll_qtd_get_status(usb_dwc_ll_dma_qtd_t *qtd, int *rem_len, int *status) { //Status is the same regardless of IN or OUT if (qtd->in_non_iso.active) { //QTD was never processed - *status = USBH_LL_QTD_STATUS_NOT_EXECUTED; + *status = USB_DWC_LL_QTD_STATUS_NOT_EXECUTED; } else { *status = qtd->in_non_iso.rx_status; } diff --git a/tools/sdk/esp32c3/include/hal/platform_port/include/hal/check.h b/tools/sdk/esp32c3/include/hal/platform_port/include/hal/check.h index 3ad02946c71..df2d4af46ed 100644 --- a/tools/sdk/esp32c3/include/hal/platform_port/include/hal/check.h +++ b/tools/sdk/esp32c3/include/hal/platform_port/include/hal/check.h @@ -1,17 +1,11 @@ -// Copyright 2021 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: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once -#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) _Static_assert((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") +#include "esp_assert.h" + +#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) ESP_STATIC_ASSERT((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") diff --git a/tools/sdk/esp32c3/include/lwip/include/apps/ping/ping_sock.h b/tools/sdk/esp32c3/include/lwip/include/apps/ping/ping_sock.h index fb946f7e162..6abe6f77bd7 100644 --- a/tools/sdk/esp32c3/include/lwip/include/apps/ping/ping_sock.h +++ b/tools/sdk/esp32c3/include/lwip/include/apps/ping/ping_sock.h @@ -88,7 +88,7 @@ typedef struct { .tos = 0, \ .ttl = IP_DEFAULT_TTL, \ .target_addr = *(IP_ANY_TYPE), \ - .task_stack_size = 2048, \ + .task_stack_size = 2048 + TASK_EXTRA_STACK_SIZE, \ .task_prio = 2, \ .interface = 0,\ } diff --git a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/dhcp.h b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/dhcp.h index 8a528219da6..56e35223df3 100644 --- a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/dhcp.h +++ b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/dhcp.h @@ -151,6 +151,9 @@ u8_t dhcp_supplied_address(const struct netif *netif); void dhcp_coarse_tmr(void); /* to be called every half second */ void dhcp_fine_tmr(void); +#if ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND +void dhcp_fine_timeout_cb(void *arg); +#endif #if LWIP_DHCP_GET_NTP_SRV /** This function must exist, in other to add offered NTP servers to diff --git a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/ip4_napt.h b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/ip4_napt.h index 8d98e120dfa..8246d6fd36e 100644 --- a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/ip4_napt.h +++ b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/ip4_napt.h @@ -60,16 +60,21 @@ extern "C" { #include "lwip/err.h" #include "lwip/ip4.h" + +#ifndef NAPT_TMR_INTERVAL +#define NAPT_TMR_INTERVAL 2000 +#endif + /** -* NAPT for a forwarded packet. It checks weather we need NAPT and modify -* the packet source address and port if needed. -* -* @param p the packet to forward (p->payload points to IP header) -* @param iphdr the IP header of the input packet -* @param inp the netif on which this packet was received -* @param outp the netif on which this packet will be sent -* @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped -*/ + * NAPT for a forwarded packet. It checks weather we need NAPT and modify + * the packet source address and port if needed. + * + * @param p the packet to forward (p->payload points to IP header) + * @param iphdr the IP header of the input packet + * @param inp the netif on which this packet was received + * @param outp the netif on which this packet will be sent + * @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped + */ err_t ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct netif *outp); @@ -79,7 +84,6 @@ ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct * * @param p the packet to forward (p->payload points to IP header) * @param iphdr the IP header of the input packet - * @param inp the netif on which this packet was received */ void ip_napt_recv(struct pbuf *p, struct ip_hdr *iphdr); diff --git a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/lwip_napt.h b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/lwip_napt.h index a1816d42034..ccea172585a 100644 --- a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/lwip_napt.h +++ b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/lwip_napt.h @@ -59,13 +59,24 @@ extern "C" { #endif /* Timeouts in sec for the various protocol types */ +#ifndef IP_NAPT_TIMEOUT_MS_TCP #define IP_NAPT_TIMEOUT_MS_TCP (30*60*1000) -#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (20*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_TCP_DISCON +#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (TCP_MSL) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_UDP #define IP_NAPT_TIMEOUT_MS_UDP (2*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_ICMP #define IP_NAPT_TIMEOUT_MS_ICMP (2*1000) - +#endif +#ifndef IP_NAPT_PORT_RANGE_START #define IP_NAPT_PORT_RANGE_START 49152 +#endif +#ifndef IP_NAPT_PORT_RANGE_END #define IP_NAPT_PORT_RANGE_END 61439 +#endif /** * Enable/Disable NAPT for a specified interface. @@ -80,13 +91,12 @@ ip_napt_enable(u32_t addr, int enable); /** * Enable/Disable NAPT for a specified interface. * - * @param netif number of the interface + * @param number number of the interface * @param enable non-zero to enable NAPT, or 0 to disable. */ void ip_napt_enable_no(u8_t number, int enable); - /** * Register port mapping on the external interface to internal interface. * When the same port mapping is registered again, the old mapping is overwritten. @@ -101,16 +111,31 @@ ip_napt_enable_no(u8_t number, int enable); u8_t ip_portmap_add(u8_t proto, u32_t maddr, u16_t mport, u32_t daddr, u16_t dport); +u8_t +ip_portmap_get(u8_t proto, u16_t mport, u32_t *maddr, u32_t *daddr, u16_t *dport); + /** * Unregister port mapping on the external interface to internal interface. * * @param proto target protocol - * @param maddr ip address of the external interface + * @param mport mapped port on the external interface, in host byte order. */ u8_t ip_portmap_remove(u8_t proto, u16_t mport); + + +#if LWIP_STATS +/** + * Get statistics. + * + * @param stats struct to receive current stats + */ +void +ip_napt_get_stats(struct stats_ip_napt *stats); +#endif + #endif /* IP_NAPT */ #endif /* IP_FORWARD */ #endif /* ESP_LWIP */ diff --git a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/opt.h b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/opt.h index b314c59a439..11c9b10b886 100644 --- a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/opt.h +++ b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/opt.h @@ -506,7 +506,7 @@ * The default number of timeouts is calculated here for all enabled modules. */ #if ESP_LWIP -#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) +#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND ? LWIP_DHCP : 2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + (ESP_LWIP_DNS_TIMERS_ONDEMAND ? 0 : LWIP_DNS) + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #else #define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #endif @@ -2273,6 +2273,14 @@ #define MIB2_STATS 0 #endif +/** + * IP_NAPT_STATS==1: Stats for IP NAPT. + */ +#if !defined IP_NAPT_STATS || defined __DOXYGEN__ +#define IP_NAPT_STATS (IP_NAPT) +#endif + + #else #define LINK_STATS 0 @@ -2293,6 +2301,7 @@ #define MLD6_STATS 0 #define ND6_STATS 0 #define MIB2_STATS 0 +#define IP_NAPT_STATS 0 #endif /* LWIP_STATS */ /** diff --git a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h index 72f9126d465..92e582448aa 100644 --- a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h +++ b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h @@ -128,7 +128,9 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb); #define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in milliseconds */ #endif /* TCP_SLOW_INTERVAL */ +#ifndef TCP_FIN_WAIT_TIMEOUT #define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ +#endif /* TCP_FIN_WAIT_TIMEOUT */ #define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */ #define TCP_OOSEQ_TIMEOUT 6U /* x RTO */ diff --git a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/stats.h b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/stats.h index b570dbacf58..94e16691ca4 100644 --- a/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/stats.h +++ b/tools/sdk/esp32c3/include/lwip/lwip/src/include/lwip/stats.h @@ -228,6 +228,18 @@ struct stats_mib2_netif_ctrs { u32_t ifouterrors; }; +#if ESP_LWIP && IP_NAPT_STATS +/** + * IP NAPT stats + */ +struct stats_ip_napt { + STAT_COUNTER nr_active_tcp; + STAT_COUNTER nr_active_udp; + STAT_COUNTER nr_active_icmp; + STAT_COUNTER nr_forced_evictions; +}; +#endif /* ESP_LWIP && IP_NAPT */ + /** lwIP stats container */ struct stats_ { #if LINK_STATS @@ -298,6 +310,11 @@ struct stats_ { /** SNMP MIB2 */ struct stats_mib2 mib2; #endif +#if ESP_LWIP && IP_NAPT_STATS + /** IP NAPT */ + struct stats_ip_napt ip_napt; +#endif + }; /** Global variable containing lwIP internal statistics. Add this to your debugger's watchlist. */ @@ -467,6 +484,19 @@ void stats_init(void); #define MIB2_STATS_INC(x) #endif +#if IP_NAPT_STATS +#define IP_NAPT_STATS_INC(x) STATS_INC(x) +#else +#define IP_NAPT_STATS_INC(x) +#endif + +#if LWIP_STATS_DISPLAY && IP_NAPT_STATS +void stats_display_ip_napt(struct stats_ip_napt *napt); +#define IP_NAPT_STATS_DISPLAY() stats_display_ip_napt(&lwip_stats.ip_napt) +#else +#define IP_NAPT_STATS_DISPLAY() +#endif + /* Display of statistics */ #if LWIP_STATS_DISPLAY void stats_display(void); diff --git a/tools/sdk/esp32c3/include/lwip/port/esp32/include/lwipopts.h b/tools/sdk/esp32c3/include/lwip/port/esp32/include/lwipopts.h index bb0d371c6ee..bbae6d42412 100644 --- a/tools/sdk/esp32c3/include/lwip/port/esp32/include/lwipopts.h +++ b/tools/sdk/esp32c3/include/lwip/port/esp32/include/lwipopts.h @@ -254,6 +254,14 @@ */ #define ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +#define DHCP_DEFINE_CUSTOM_TIMEOUTS 1 +/* Since for embedded devices it's not that hard to miss a discover packet, so lower + * the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s. + */ + #define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \ + (uint16_t)(1 * 1000) : \ + (uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250)) + /* ------------------------------------ ---------- AUTOIP options ---------- @@ -359,6 +367,11 @@ */ #define TCP_MSL CONFIG_LWIP_TCP_MSL +/** + * TCP_FIN_WAIT_TIMEOUT: The maximum FIN segment lifetime in milliseconds + */ +#define TCP_FIN_WAIT_TIMEOUT CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT + /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ @@ -1021,9 +1034,25 @@ #ifdef CONFIG_LWIP_TIMERS_ONDEMAND #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 1 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 1 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* LWIP_IPV6_REASS */ #else #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 0 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 0 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* LWIP_IPV6_REASS */ #endif #define TCP_SND_BUF CONFIG_LWIP_TCP_SND_BUF_DEFAULT diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h index 44afae0e560..5da7654bb40 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h @@ -90,7 +90,7 @@ int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start, #if defined(MBEDTLS_BIGNUM_C) /** - * \brief Write a arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) + * \brief Write an arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) * in ASN.1 format. * * \note This function works backwards in data buffer. diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bignum.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bignum.h index c71a1d40227..95b9485acf1 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bignum.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bignum.h @@ -184,6 +184,20 @@ #endif /* !MBEDTLS_NO_UDBL_DIVISION */ #endif /* !MBEDTLS_HAVE_INT64 */ +/** \typedef mbedtls_mpi_uint + * \brief The type of machine digits in a bignum, called _limbs_. + * + * This is always an unsigned integer type with no padding bits. The size + * is platform-dependent. + */ + +/** \typedef mbedtls_mpi_sint + * \brief The signed type corresponding to #mbedtls_mpi_uint. + * + * This is always a signed integer type with no padding bits. The size + * is platform-dependent. + */ + #ifdef __cplusplus extern "C" { #endif @@ -193,9 +207,27 @@ extern "C" { */ typedef struct mbedtls_mpi { - int s; /*!< Sign: -1 if the mpi is negative, 1 otherwise */ - size_t n; /*!< total # of limbs */ - mbedtls_mpi_uint *p; /*!< pointer to limbs */ + /** Sign: -1 if the mpi is negative, 1 otherwise. + * + * The number 0 must be represented with `s = +1`. Although many library + * functions treat all-limbs-zero as equivalent to a valid representation + * of 0 regardless of the sign bit, there are exceptions, so bignum + * functions and external callers must always set \c s to +1 for the + * number zero. + * + * Note that this implies that calloc() or `... = {0}` does not create + * a valid MPI representation. You must call mbedtls_mpi_init(). + */ + int s; + + /** Total number of limbs in \c p. */ + size_t n; + + /** Pointer to limbs. + * + * This may be \c NULL if \c n is 0. + */ + mbedtls_mpi_uint *p; } mbedtls_mpi; @@ -282,7 +314,7 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * \param Y The MPI to be assigned from. This must point to an * initialized MPI. * \param assign The condition deciding whether to perform the - * assignment or not. Possible values: + * assignment or not. Must be either 0 or 1: * * \c 1: Perform the assignment `X = Y`. * * \c 0: Keep the original value of \p X. * @@ -293,6 +325,10 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p assign is neither 0 nor 1, the result of this function + * is indeterminate, and the resulting value in \p X might be + * neither its original value nor the value in \p Y. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. @@ -305,24 +341,28 @@ int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned * * \param X The first MPI. This must be initialized. * \param Y The second MPI. This must be initialized. - * \param assign The condition deciding whether to perform - * the swap or not. Possible values: + * \param swap The condition deciding whether to perform + * the swap or not. Must be either 0 or 1: * * \c 1: Swap the values of \p X and \p Y. * * \c 0: Keep the original values of \p X and \p Y. * * \note This function is equivalent to - * if( assign ) mbedtls_mpi_swap( X, Y ); + * if( swap ) mbedtls_mpi_swap( X, Y ); * except that it avoids leaking any information about whether - * the assignment was done or not (the above code may leak + * the swap was done or not (the above code may leak * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p swap is neither 0 nor 1, the result of this function + * is indeterminate, and both \p X and \p Y might end up with + * values different to either of the original ones. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. * */ -int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign ); +int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char swap ); /** * \brief Store integer value in MPI. @@ -755,11 +795,11 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A or B. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. - * \param A The dividend. This must point to an initialized MPi. + * remainder is not needed. This must not alias A or B. + * \param A The dividend. This must point to an initialized MPI. * \param B The divisor. This must point to an initialized MPI. * * \return \c 0 if successful. @@ -776,10 +816,10 @@ int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. + * remainder is not needed. This must not alias A. * \param A The dividend. This must point to an initialized MPi. * \param b The divisor. * @@ -834,6 +874,7 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, * \brief Perform a sliding-window exponentiation: X = A^E mod N * * \param X The destination MPI. This must point to an initialized MPI. + * This must not alias E or N. * \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. diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h index 31137cd4c23..a3fc3638150 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h @@ -94,13 +94,29 @@ #if defined(__GNUC__) && \ ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) +/* + * GCC < 5.0 treated the x86 ebx (which is used for the GOT) as a + * fixed reserved register when building as PIC, leading to errors + * like: bn_mul.h:46:13: error: PIC register clobbered by 'ebx' in 'asm' + * + * This is fixed by an improved register allocator in GCC 5+. From the + * release notes: + * Register allocation improvements: Reuse of the PIC hard register, + * instead of using a fixed register, was implemented on x86/x86-64 + * targets. This improves generated PIC code performance as more hard + * registers can be used. + */ +#if defined(__GNUC__) && __GNUC__ < 5 && defined(__PIC__) +#define MULADDC_CANNOT_USE_EBX +#endif + /* * Disable use of the i386 assembly code below if option -O0, to disable all * compiler optimisations, is passed, detected with __OPTIMIZE__ * This is done as the number of registers used in the assembly code doesn't * work with the -O0 option. */ -#if defined(__i386__) && defined(__OPTIMIZE__) +#if defined(__i386__) && defined(__OPTIMIZE__) && !defined(MULADDC_CANNOT_USE_EBX) #define MULADDC_INIT \ asm( \ @@ -563,10 +579,20 @@ "andi r7, r6, 0xffff \n\t" \ "bsrli r6, r6, 16 \n\t" -#define MULADDC_CORE \ +#if(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#define MULADDC_LHUI \ + "lhui r9, r3, 0 \n\t" \ + "addi r3, r3, 2 \n\t" \ + "lhui r8, r3, 0 \n\t" +#else +#define MULADDC_LHUI \ "lhui r8, r3, 0 \n\t" \ "addi r3, r3, 2 \n\t" \ - "lhui r9, r3, 0 \n\t" \ + "lhui r9, r3, 0 \n\t" +#endif + +#define MULADDC_CORE \ + MULADDC_LHUI \ "addi r3, r3, 2 \n\t" \ "mul r10, r9, r6 \n\t" \ "mul r11, r8, r7 \n\t" \ diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/check_config.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/check_config.h index be5c548e561..7ae1ff94db9 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/check_config.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/check_config.h @@ -525,6 +525,20 @@ #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously" #endif +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_ALT defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) &&\ + ( defined(MBEDTLS_PLATFORM_STD_VSNPRINTF) ||\ + defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) ) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_VSNPRINTF/MBEDTLS_PLATFORM_VSNPRINTF_ALT cannot be defined simultaneously" +#endif + #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\ !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites" @@ -650,10 +664,9 @@ MBEDTLS_ECDSA_C requires MBEDTLS_PK_WRITE_C to be defined." #endif -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PKCS1_V15) && \ - !defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_PSA_CRYPTO_C) -#error "MBEDTLS_PSA_CRYPTO_C, MBEDTLS_RSA_C and MBEDTLS_PKCS1_V15 defined, \ - but not all prerequisites" +#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_RSA_C) && \ + !( defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_PK_WRITE_C) ) +#error "MBEDTLS_PSA_CRYPTO_C with MBEDTLS_RSA_C requires MBEDTLS_PK_PARSE_C and MBEDTLS_PK_WRITE_C" #endif #if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ @@ -812,6 +825,11 @@ #error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_TICKET_C) && \ + !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" +#endif + #if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) && \ !defined(MBEDTLS_SSL_PROTO_SSL3) && !defined(MBEDTLS_SSL_PROTO_TLS1) #error "MBEDTLS_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites" @@ -926,6 +944,10 @@ #error "MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) && !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites" +#endif + /* * Avoid warning from -pedantic. This is a convenient place for this * workaround since this is included by every single file before the diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config.h index 1cd6eb66348..61db79362f7 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config.h @@ -1329,7 +1329,7 @@ * Include backtrace information with each allocated block. * * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * GLIBC-compatible backtrace() an backtrace_symbols() support + * GLIBC-compatible backtrace() and backtrace_symbols() support * * Uncomment this macro to include backtrace information */ @@ -1620,6 +1620,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #define MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -2425,7 +2427,7 @@ * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * * \warning ARC4 is considered a weak cipher and its use constitutes a - * security risk. If possible, we recommend avoidng dependencies on + * security risk. If possible, we recommend avoiding dependencies on * it, and considering stronger ciphers instead. * */ @@ -3030,7 +3032,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/net_sockets.c * @@ -3400,7 +3402,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #define MBEDTLS_SSL_TICKET_C @@ -3456,7 +3459,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * @@ -3488,7 +3491,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h index 1bf750ad5ee..d27fb54b033 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h @@ -7,7 +7,7 @@ * those definitions to define symbols used in the library code. * * Users and integrators should not edit this file, please edit - * include/mbedtls/config.h for MBETLS_XXX settings or + * include/mbedtls/config.h for MBEDTLS_XXX settings or * include/psa/crypto_config.h for PSA_WANT_XXX settings. */ /* @@ -446,6 +446,8 @@ extern "C" { #if !defined(MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305) #if defined(PSA_WANT_KEY_TYPE_CHACHA20) #define MBEDTLS_CHACHAPOLY_C +#define MBEDTLS_CHACHA20_C +#define MBEDTLS_POLY1305_C #define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1 #endif /* PSA_WANT_KEY_TYPE_CHACHA20 */ #endif /* !MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 */ diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h index 264a638bb52..118f7cedb1e 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h @@ -309,10 +309,8 @@ int mbedtls_ecdsa_sign_det_ext( mbedtls_ecp_group *grp, mbedtls_mpi *r, * This must be initialized. * * \return \c 0 on success. - * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the signature - * is invalid. * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX - * error code on failure for any other reason. + * error code on failure. */ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp, const unsigned char *buf, size_t blen, diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/md.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/md.h index 84fafd2ac77..9cea40a89c6 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/md.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/md.h @@ -215,7 +215,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ); /** - * \brief This function clones the state of an message-digest + * \brief This function clones the state of a message-digest * context. * * \note You must call mbedtls_md_setup() on \c dst before calling diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/platform.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/platform.h index 06dd192eab9..eaf5122bec7 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/platform.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/platform.h @@ -11,6 +11,13 @@ * implementations of these functions, or implementations specific to * their platform, which can be statically linked to the library or * dynamically configured at runtime. + * + * When all compilation options related to platform abstraction are + * disabled, this header just defines `mbedtls_xxx` function names + * as aliases to the standard `xxx` function. + * + * Most modules in the library and example programs are expected to + * include this header. */ /* * Copyright The Mbed TLS Contributors diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h index 63270d12394..f890aefaeec 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h @@ -74,7 +74,7 @@ void mbedtls_ripemd160_init( mbedtls_ripemd160_context *ctx ); void mbedtls_ripemd160_free( mbedtls_ripemd160_context *ctx ); /** - * \brief Clone (the state of) an RIPEMD-160 context + * \brief Clone (the state of) a RIPEMD-160 context * * \param dst The destination context * \param src The context to be cloned diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/rsa.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/rsa.h index 062df73aa06..8559f67bb97 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/rsa.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/rsa.h @@ -491,7 +491,7 @@ int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx ); * the current function does not have access to them, * and therefore cannot check them. See mbedtls_rsa_complete(). * If you want to check the consistency of the entire - * content of an PKCS1-encoded RSA private key, for example, you + * content of a PKCS1-encoded RSA private key, for example, you * should use mbedtls_rsa_validate_params() before setting * up the RSA context. * Additionally, if the implementation performs empirical checks, diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl.h index 5064ec56891..aecac93f334 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl.h @@ -624,7 +624,7 @@ typedef int mbedtls_ssl_recv_t( void *ctx, * \param ctx Context for the receive callback (typically a file descriptor) * \param buf Buffer to write the received data to * \param len Length of the receive buffer - * \param timeout Maximum nomber of millisecondes to wait for data + * \param timeout Maximum number of milliseconds to wait for data * 0 means no timeout (potentially waiting forever) * * \return The callback must return the number of bytes received, @@ -652,7 +652,7 @@ typedef int mbedtls_ssl_recv_timeout_t( void *ctx, * for the associated \c mbedtls_ssl_get_timer_t callback to * return correct information. * - * \note If using a event-driven style of programming, an event must + * \note If using an event-driven style of programming, an event must * be generated when the final delay is passed. The event must * cause a call to \c mbedtls_ssl_handshake() with the proper * SSL context to be scheduled. Care must be taken to ensure @@ -2000,7 +2000,7 @@ int mbedtls_ssl_check_record( mbedtls_ssl_context const *ssl, * here, except if using an event-driven style. * * \note See also the "DTLS tutorial" article in our knowledge base. - * https://tls.mbed.org/kb/how-to/dtls-tutorial + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/dtls-tutorial */ void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, void *p_timer, diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h index 46ade67b9c4..77ad755477a 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h @@ -782,7 +782,7 @@ struct mbedtls_ssl_transform #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) uint8_t in_cid_len; uint8_t out_cid_len; - unsigned char in_cid [ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; + unsigned char in_cid [ MBEDTLS_SSL_CID_IN_LEN_MAX ]; unsigned char out_cid[ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/version.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/version.h index 44adcbfe037..b3b441d46b6 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/version.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/mbedtls/version.h @@ -38,16 +38,16 @@ */ #define MBEDTLS_VERSION_MAJOR 2 #define MBEDTLS_VERSION_MINOR 28 -#define MBEDTLS_VERSION_PATCH 1 +#define MBEDTLS_VERSION_PATCH 2 /** * The single version number has the following structure: * MMNNPP00 * Major version | Minor version | Patch version */ -#define MBEDTLS_VERSION_NUMBER 0x021C0100 -#define MBEDTLS_VERSION_STRING "2.28.1" -#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.1" +#define MBEDTLS_VERSION_NUMBER 0x021C0200 +#define MBEDTLS_VERSION_STRING "2.28.2" +#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.2" #if defined(MBEDTLS_VERSION_C) diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto.h index d6d3e4f559f..faa3b9e3fb0 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto.h @@ -551,7 +551,7 @@ psa_status_t psa_copy_key(mbedtls_svc_key_id_t source_key, * \retval #PSA_ERROR_INVALID_HANDLE * \p key is not a valid identifier nor \c 0. * \retval #PSA_ERROR_COMMUNICATION_FAILURE - * There was an failure in communication with the cryptoprocessor. + * There was a failure in communication with the cryptoprocessor. * The key material may still be present in the cryptoprocessor. * \retval #PSA_ERROR_DATA_INVALID * This error is typically a result of either storage corruption on a diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h index a875b237041..711c43df785 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h @@ -43,6 +43,12 @@ #define MBEDTLS_PSA_BUILTIN_MAC #endif +#if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305) +#define MBEDTLS_PSA_BUILTIN_AEAD 1 +#endif + #if defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC) || defined(PSA_CRYPTO_DRIVER_TEST) typedef struct { diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_compat.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_compat.h index 09ac488398f..0d184042e34 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_compat.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_compat.h @@ -44,7 +44,7 @@ typedef mbedtls_svc_key_id_t psa_key_handle_t; #define PSA_KEY_HANDLE_INIT MBEDTLS_SVC_KEY_ID_INIT -/** Check whether an handle is null. +/** Check whether a handle is null. * * \param handle Handle * diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_extra.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_extra.h index a48a4bb5eb9..a34d5516458 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_extra.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_extra.h @@ -356,7 +356,7 @@ psa_status_t mbedtls_psa_inject_entropy(const uint8_t *seed, */ #define PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) -/** Whether a key type is an DSA key (pair or public-only). */ +/** Whether a key type is a DSA key (pair or public-only). */ #define PSA_KEY_TYPE_IS_DSA(type) \ (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_platform.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_platform.h index 66f46879305..d3f518e3276 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_platform.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_platform.h @@ -60,8 +60,8 @@ * * The function psa_its_identifier_of_slot() in psa_crypto_storage.c that * translates a key identifier to a key storage file name assumes that - * mbedtls_key_owner_id_t is an 32 bits integer. This function thus needs - * reworking if mbedtls_key_owner_id_t is not defined as a 32 bits integer + * mbedtls_key_owner_id_t is a 32-bit integer. This function thus needs + * reworking if mbedtls_key_owner_id_t is not defined as a 32-bit integer * here anymore. */ typedef int32_t mbedtls_key_owner_id_t; diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h index 1dc8f9b5c40..f8f8c92e883 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h @@ -225,7 +225,7 @@ typedef psa_status_t (*psa_drv_se_mac_finish_t)(void *op_context, * operation by comparing the resulting MAC against a provided value * * \param[in,out] op_context A hardware-specific structure for the previously - * started MAC operation to be fiinished + * started MAC operation to be finished * \param[in] p_mac The MAC value against which the resulting MAC * will be compared against * \param[in] mac_length The size in bytes of the value stored in `p_mac` @@ -336,7 +336,7 @@ typedef struct { /** Function that completes a MAC operation with a verify check */ psa_drv_se_mac_finish_verify_t p_finish_verify; - /** Function that aborts a previoustly started MAC operation + /** Function that aborts a previously started MAC operation */ psa_drv_se_mac_abort_t p_abort; /** Function that performs a MAC operation in one call @@ -394,7 +394,7 @@ typedef psa_status_t (*psa_drv_se_cipher_setup_t)(psa_drv_se_context_t *drv_cont psa_encrypt_or_decrypt_t direction); /** \brief A function that sets the initialization vector (if - * necessary) for an secure element cipher operation + * necessary) for a secure element cipher operation * * Rationale: The `psa_se_cipher_*` operation in the PSA Cryptographic API has * two IV functions: one to set the IV, and one to generate it internally. The @@ -745,7 +745,7 @@ typedef psa_status_t (*psa_drv_se_aead_encrypt_t)(psa_drv_se_context_t *drv_cont size_t ciphertext_size, size_t *p_ciphertext_length); -/** A function that peforms a secure element authenticated decryption operation +/** A function that performs a secure element authenticated decryption operation * * \param[in,out] drv_context The driver context structure. * \param[in] key_slot Slot containing the key to use @@ -1156,7 +1156,7 @@ typedef struct { * * Different key derivation algorithms require a different number of inputs. * Instead of having an API that takes as input variable length arrays, which - * can be problemmatic to manage on embedded platforms, the inputs are passed + * can be problematic to manage on embedded platforms, the inputs are passed * to the driver via a function, `psa_drv_se_key_derivation_collateral`, that * is called multiple times with different `collateral_id`s. Thus, for a key * derivation algorithm that required 3 parameter inputs, the flow would look @@ -1270,7 +1270,7 @@ typedef struct { psa_drv_se_key_derivation_collateral_t p_collateral; /** Function that performs a final key derivation step */ psa_drv_se_key_derivation_derive_t p_derive; - /** Function that perforsm a final key derivation or agreement and + /** Function that performs a final key derivation or agreement and * exports the key */ psa_drv_se_key_derivation_export_t p_export; } psa_drv_se_key_derivation_t; diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h index 0d4532200e7..a0a52876bef 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h @@ -716,7 +716,7 @@ (PSA_KEY_EXPORT_ASN1_INTEGER_MAX_SIZE(key_bits) + 11) /* Maximum size of the export encoding of an RSA key pair. - * Assumes thatthe public exponent is less than 2^32 and that the size + * Assumes that the public exponent is less than 2^32 and that the size * difference between the two primes is at most 1 bit. * * RSAPrivateKey ::= SEQUENCE { diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_types.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_types.h index 8f23021a45a..679cbc48e6a 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_types.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_types.h @@ -104,7 +104,7 @@ typedef uint8_t psa_ecc_family_t; * Values of this type are generally constructed by macros called * `PSA_DH_FAMILY_xxx`. * - * The group identifier is required to create an Diffie-Hellman key using the + * The group identifier is required to create a Diffie-Hellman key using the * PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY() * macros. * @@ -296,7 +296,7 @@ typedef psa_key_id_t mbedtls_svc_key_id_t; #else /* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */ /* Implementation-specific: The Mbed Cryptography library can be built as - * part of a multi-client service that exposes the PSA Cryptograpy API in each + * part of a multi-client service that exposes the PSA Cryptography API in each * client and encodes the client identity in the key identifier argument of * functions such as psa_open_key(). */ diff --git a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_values.h b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_values.h index 8b3a815ac19..a4b4927e9d0 100644 --- a/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_values.h +++ b/tools/sdk/esp32c3/include/mbedtls/mbedtls/include/psa/crypto_values.h @@ -1195,7 +1195,7 @@ */ #define PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x05100500) -/* In the encoding of a AEAD algorithm, the bits corresponding to +/* In the encoding of an AEAD algorithm, the bits corresponding to * PSA_ALG_AEAD_TAG_LENGTH_MASK encode the length of the AEAD tag. * The constants for default lengths follow this encoding. */ @@ -1330,9 +1330,11 @@ * This is the signature scheme defined by RFC 8017 * (PKCS#1: RSA Cryptography Specifications) under the name * RSASSA-PSS, with the message generation function MGF1, and with - * a salt length equal to the length of the hash. The specified - * hash algorithm is used to hash the input message, to create the - * salted hash, and for the mask generation. + * a salt length equal to the length of the hash, or the largest + * possible salt length for the algorithm and key size if that is + * smaller than the hash length. The specified hash algorithm is + * used to hash the input message, to create the salted hash, and + * for the mask generation. * * \param hash_alg A hash algorithm (\c PSA_ALG_XXX value such that * #PSA_ALG_IS_HASH(\p hash_alg) is true). 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 607d35ffc69..95bd65883c4 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 @@ -44,7 +44,12 @@ * The time does not need to be correct, only time differences are used, * by contrast with MBEDTLS_HAVE_TIME_DATE * - * Comment if your system does not support time functions + * Comment if your system does not support time functions. + * + * \note If MBEDTLS_TIMING_C is set - to enable the semi-portable timing + * interface - timing.c will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. */ #ifdef CONFIG_MBEDTLS_HAVE_TIME #define MBEDTLS_HAVE_TIME @@ -253,9 +258,8 @@ #define MBEDTLS_CIPHER_PADDING_ZEROS /** - * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES & MBEDTLS_ARC4_C + * \def MBEDTLS_ARC4_C * - * MBEDTLS_ARC4_C * Enable the ARCFOUR stream cipher. * * This module enables/disables the following ciphersuites @@ -270,7 +274,14 @@ * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * - * MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * \warning ARC4 is considered a weak cipher and its use constitutes a + * security risk. If possible, we recommend avoiding dependencies on + * it, and considering stronger ciphers instead. + * + * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * + * Remove RC4 ciphersuites by default in SSL / TLS. + * * This flag removes the ciphersuites based on RC4 from the default list as * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them @@ -941,6 +952,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #ifdef CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -976,7 +989,7 @@ * Enable support for RFC 7627: Session Hash and Extended Master Secret * Extension. * - * This was introduced as "the proper fix" to the Triple Handshake familiy of + * This was introduced as "the proper fix" to the Triple Handshake family of * attacks, but it is recommended to always use it (even if you disable * renegotiation), since it actually fixes a more fundamental issue in the * original SSL/TLS design, and has implications beyond Triple Handshake. @@ -1026,7 +1039,7 @@ * \note This option has no influence on the protection against the * triple handshake attack. Even if it is disabled, Mbed TLS will * still ensure that certificates do not change during renegotiation, - * for exaple by keeping a hash of the peer's certificate. + * for example by keeping a hash of the peer's certificate. * * Comment this macro to disable storing the peer's certificate * after the handshake. @@ -1209,7 +1222,7 @@ * unless you know for sure amplification cannot be a problem in the * environment in which your server operates. * - * \warning Disabling this can ba a security risk! (see above) + * \warning Disabling this can be a security risk! (see above) * * Requires: MBEDTLS_SSL_PROTO_DTLS * @@ -1944,7 +1957,7 @@ * * Requires: MBEDTLS_MD_C * - * Uncomment to enable the HMAC_DRBG random number geerator. + * Uncomment to enable the HMAC_DRBG random number generator. */ #define MBEDTLS_HMAC_DRBG_C @@ -1978,11 +1991,19 @@ /** * \def MBEDTLS_NET_C * - * Enable the TCP/IP networking routines. + * Enable the TCP and UDP over IPv6/IPv4 networking routines. * - * Module: library/net.c + * \note This module only works on POSIX/Unix (including Linux, BSD and OS X) + * and Windows. For other platforms, you'll want to disable it, and write your + * own networking callbacks to be passed to \c mbedtls_ssl_set_bio(). * - * This module provides TCP/IP networking routines. + * \note See also our Knowledge Base article about porting to a new + * environment: + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * + * Module: library/net_sockets.c + * + * This module provides networking routines. */ #ifdef MBEDTLS_NET_C #undef MBEDTLS_NET_C @@ -2070,7 +2091,7 @@ /** * \def MBEDTLS_PK_C * - * Enable the generic public (asymetric) key layer. + * Enable the generic public (asymmetric) key layer. * * Module: library/pk.c * Caller: library/ssl_tls.c @@ -2086,7 +2107,7 @@ /** * \def MBEDTLS_PK_PARSE_C * - * Enable the generic public (asymetric) key parser. + * Enable the generic public (asymmetric) key parser. * * Module: library/pkparse.c * Caller: library/mbedtls_x509_crt.c @@ -2101,7 +2122,7 @@ /** * \def MBEDTLS_PK_WRITE_C * - * Enable the generic public (asymetric) key writer. + * Enable the generic public (asymmetric) key writer. * * Module: library/pkwrite.c * Caller: library/x509write.c @@ -2290,7 +2311,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #ifdef CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS #define MBEDTLS_SSL_TICKET_C @@ -2366,9 +2388,13 @@ * your own implementation of the whole module by setting * \c MBEDTLS_TIMING_ALT in the current file. * + * \note The timing module will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. + * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c @@ -2680,7 +2706,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * diff --git a/tools/sdk/esp32c3/include/riscv/include/riscv/csr.h b/tools/sdk/esp32c3/include/riscv/include/riscv/csr.h index dae9d5b5560..d967af6c7d1 100644 --- a/tools/sdk/esp32c3/include/riscv/include/riscv/csr.h +++ b/tools/sdk/esp32c3/include/riscv/include/riscv/csr.h @@ -36,6 +36,7 @@ extern "C" { #include #include #include "encoding.h" +#include "esp_assert.h" /******************************************************** Physical Memory Protection (PMP) register fields @@ -60,8 +61,8 @@ extern "C" { register. The PMP_ENTRY_SET macro will do this. */ #define PMPADDR_NAPOT(START, END) ({ \ - _Static_assert(__builtin_popcount((END)-(START)) == 1, "Size must be a power of 2"); \ - _Static_assert((START) % ((END)-(START)) == 0, "Start must be aligned to size"); \ + ESP_STATIC_ASSERT(__builtin_popcount((END)-(START)) == 1, "Size must be a power of 2"); \ + ESP_STATIC_ASSERT((START) % ((END)-(START)) == 0, "Start must be aligned to size"); \ (((START)) | (((END)-(START)-1)>>1)); \ }) diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_reg.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_reg.h index 2522821041e..0b612fd64fb 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_reg.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_reg.h @@ -1807,6 +1807,9 @@ extern "C" { #define EFUSE_MEM_FORCE_PD_V 0x1 #define EFUSE_MEM_FORCE_PD_S 0 +#define EFUSE_WRITE_OP_CODE 0x5a5a +#define EFUSE_READ_OP_CODE 0x5aa5 + #define EFUSE_CONF_REG (DR_REG_EFUSE_BASE + 0x1CC) /* EFUSE_OP_CODE : R/W ;bitpos:[15:0] ;default: 16'h0 ; */ /*description: 0x5A5A: Operate programming command 0x5AA5: Operate read command.*/ diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_struct.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_struct.h index 9cb4b01e449..d0a804aca6c 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_struct.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/efuse_struct.h @@ -172,7 +172,9 @@ typedef volatile struct efuse_dev_s { } rd_repeat_data3; union { struct { - uint32_t rpt4_reserved4:24; /*Reserved.*/ + uint32_t disable_wafer_version_major: 1; + uint32_t disable_blk_version_major: 1; + uint32_t rpt4_reserved4:22; /*Reserved.*/ uint32_t reserved24: 8; /*Reserved.*/ }; uint32_t val; @@ -189,17 +191,34 @@ typedef volatile struct efuse_dev_s { union { struct { uint32_t spi_pad_conf_2: 18; /*Stores the second part of SPI_PAD_CONF.*/ - uint32_t sys_data_part0_0:14; /*Stores the fist 14 bits of the zeroth part of system data.*/ + uint32_t wafer_version_minor_low: 3; + uint32_t pkg_version: 3; + uint32_t blk_version_minor:3; + uint32_t sys_data_part0_0: 5; }; uint32_t val; } rd_mac_spi_sys_3; uint32_t rd_mac_spi_sys_4; /*BLOCK1 data register $n.*/ - uint32_t rd_mac_spi_sys_5; /*BLOCK1 data register $n.*/ + union { + struct { + uint32_t reserved1: 23; + uint32_t wafer_version_minor_high: 1; + uint32_t wafer_version_major: 2; + uint32_t reserved2: 6; + }; + uint32_t val; + } rd_mac_spi_sys_5; /*BLOCK1 data register $n.*/ uint32_t rd_sys_part1_data0; /*Register $n of BLOCK2 (system).*/ uint32_t rd_sys_part1_data1; /*Register $n of BLOCK2 (system).*/ uint32_t rd_sys_part1_data2; /*Register $n of BLOCK2 (system).*/ uint32_t rd_sys_part1_data3; /*Register $n of BLOCK2 (system).*/ - uint32_t rd_sys_part1_data4; /*Register $n of BLOCK2 (system).*/ + union { + struct { + uint32_t blk_version_major : 2; + uint32_t reserved1: 30; + }; + uint32_t val; + } rd_sys_part1_data4; /*Register $n of BLOCK2 (system).*/ uint32_t rd_sys_part1_data5; /*Register $n of BLOCK2 (system).*/ uint32_t rd_sys_part1_data6; /*Register $n of BLOCK2 (system).*/ uint32_t rd_sys_part1_data7; /*Register $n of BLOCK2 (system).*/ diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/gdma_channel.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/gdma_channel.h index 9108df78f20..7c2e802e900 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/gdma_channel.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/gdma_channel.h @@ -17,7 +17,7 @@ // The following macros have a format SOC_[periph][instance_id] to make it work with `GDMA_MAKE_TRIGGER` #define SOC_GDMA_TRIG_PERIPH_M2M0 (-1) #define SOC_GDMA_TRIG_PERIPH_SPI2 (0) -#define SOC_GDMA_TRIG_PERIPH_UART0 (2) +#define SOC_GDMA_TRIG_PERIPH_UHCI0 (2) #define SOC_GDMA_TRIG_PERIPH_I2S0 (3) #define SOC_GDMA_TRIG_PERIPH_AES0 (6) #define SOC_GDMA_TRIG_PERIPH_SHA0 (7) diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc.h index 75a19cc0944..995b4ba9220 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc.h @@ -103,6 +103,7 @@ extern "C" { #define RTC_CNTL_WAKEUP_DELAY_CYCLES (5) #define RTC_CNTL_OTHER_BLOCKS_POWERUP_CYCLES (1) #define RTC_CNTL_OTHER_BLOCKS_WAIT_CYCLES (1) +#define RTC_CNTL_MIN_SLP_VAL_MIN (2) /* set sleep_init default param diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc_cntl_reg.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc_cntl_reg.h index a8953eeff4e..1255f3994c6 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc_cntl_reg.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/rtc_cntl_reg.h @@ -388,7 +388,6 @@ extern "C" { #define RTC_CNTL_MIN_SLP_VAL_M ((RTC_CNTL_MIN_SLP_VAL_V)<<(RTC_CNTL_MIN_SLP_VAL_S)) #define RTC_CNTL_MIN_SLP_VAL_V 0xFF #define RTC_CNTL_MIN_SLP_VAL_S 8 -#define RTC_CNTL_MIN_SLP_VAL_MIN 2 #define RTC_CNTL_TIMER6_REG (DR_REG_RTCCNTL_BASE + 0x0030) /* RTC_CNTL_DG_PERI_POWERUP_TIMER : R/W ;bitpos:[31:25] ;default: 7'h5 ; */ diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/soc_caps.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/soc_caps.h index 91aee64f270..f5e98085864 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/soc_caps.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/soc_caps.h @@ -116,8 +116,8 @@ #define SOC_GPIO_VALID_OUTPUT_GPIO_MASK SOC_GPIO_VALID_GPIO_MASK #define SOC_GPIO_DEEP_SLEEP_WAKEUP_VALID_GPIO_MASK (0ULL | BIT0 | BIT1 | BIT2 | BIT3 | BIT4 | BIT5) -// Support to configure sleep status -#define SOC_GPIO_SUPPORT_SLP_SWITCH (1) +// digital I/O pad powered by VDD3P3_CPU or VDD_SPI(GPIO_NUM_6~GPIO_NUM_21) +#define SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK 0x00000000003FFFC0ULL /*-------------------------- Dedicated GPIO CAPS -----------------------------*/ #define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */ diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/spi_mem_struct.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/spi_mem_struct.h index cde08c0207d..60f881951de 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/spi_mem_struct.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/spi_mem_struct.h @@ -560,7 +560,9 @@ typedef volatile struct spi_mem_dev_s { extern spi_mem_dev_t SPIMEM0; extern spi_mem_dev_t SPIMEM1; +#ifndef __cplusplus _Static_assert(sizeof(spi_mem_dev_t) == 0x400, "spi_mem_dev_t size error!"); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/syscon_reg.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/syscon_reg.h index c8719754d81..e61f84eda35 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/syscon_reg.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/syscon_reg.h @@ -193,6 +193,7 @@ extern "C" { #define SYSTEM_CORE_RST_EN_REG SYSTEM_WIFI_RST_EN_REG #define SYSTEM_WIFI_RST_EN_REG SYSCON_WIFI_RST_EN_REG + /* SYSTEM_WIFI_RST_EN : R/W ;bitpos:[31:0] ;default: 32'h0 ; */ /*description: */ #define SYSTEM_WIFIBB_RST BIT(0) @@ -209,6 +210,15 @@ extern "C" { #define SYSTEM_RW_BTLP_REG_RST BIT(12) /* Bluetooth Low Power Registers */ #define SYSTEM_BTBB_REG_RST BIT(13) /* Bluetooth Baseband Registers */ +#define MODEM_RESET_FIELD_WHEN_PU (SYSTEM_WIFIBB_RST | \ + SYSTEM_FE_RST | \ + SYSTEM_WIFIMAC_RST | \ + SYSTEM_BTBB_RST | \ + SYSTEM_BTMAC_RST | \ + SYSTEM_RW_BTMAC_RST | \ + SYSTEM_RW_BTMAC_REG_RST | \ + SYSTEM_BTBB_REG_RST) + #define SYSCON_HOST_INF_SEL_REG (DR_REG_SYSCON_BASE + 0x01C) /* SYSCON_PERI_IO_SWAP : R/W ;bitpos:[7:0] ;default: 8'h0 ; */ /*description: */ diff --git a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/twai_struct.h b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/twai_struct.h index fafc36393a7..f5e075e1246 100644 --- a/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/twai_struct.h +++ b/tools/sdk/esp32c3/include/soc/esp32c3/include/soc/twai_struct.h @@ -206,7 +206,9 @@ typedef volatile struct twai_dev_s { } clock_divider_reg; /* Address 0x007C */ } twai_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(twai_dev_t) == 128, "TWAI registers should be 32 * 4 bytes"); +#endif extern twai_dev_t TWAI; diff --git a/tools/sdk/esp32c3/include/soc/include/soc/efuse_periph.h b/tools/sdk/esp32c3/include/soc/include/soc/efuse_periph.h index 76a118e3b68..a7fc65042c6 100644 --- a/tools/sdk/esp32c3/include/soc/include/soc/efuse_periph.h +++ b/tools/sdk/esp32c3/include/soc/include/soc/efuse_periph.h @@ -14,3 +14,4 @@ #pragma once #include "soc/efuse_reg.h" +#include "soc/efuse_struct.h" diff --git a/tools/sdk/esp32c3/include/spi_flash/include/esp_flash.h b/tools/sdk/esp32c3/include/spi_flash/include/esp_flash.h index c5adb279dcd..3529898bce6 100644 --- a/tools/sdk/esp32c3/include/spi_flash/include/esp_flash.h +++ b/tools/sdk/esp32c3/include/spi_flash/include/esp_flash.h @@ -103,7 +103,8 @@ struct esp_flash_t { uint32_t size; ///< Size of SPI flash in bytes. If 0, size will be detected during initialisation. uint32_t chip_id; ///< Detected chip id. uint32_t busy :1; ///< This flag is used to verify chip's status. - uint32_t reserved_flags :31; ///< reserved. + uint32_t hpm_dummy_ena :1; ///< This flag is used to verify whether flash works under HPM status. + uint32_t reserved_flags :30; ///< reserved. }; diff --git a/tools/sdk/esp32c3/include/spi_flash/include/esp_private/spi_flash_os.h b/tools/sdk/esp32c3/include/spi_flash/include/esp_private/spi_flash_os.h index 996606dbcee..f2a89112eb6 100644 --- a/tools/sdk/esp32c3/include/spi_flash/include/esp_private/spi_flash_os.h +++ b/tools/sdk/esp32c3/include/spi_flash/include/esp_private/spi_flash_os.h @@ -35,6 +35,7 @@ #include "esp_flash.h" #include "hal/spi_flash_hal.h" #include "soc/soc_caps.h" +#include "spi_flash_override.h" #ifdef __cplusplus extern "C" { @@ -138,6 +139,28 @@ bool spi_timing_is_tuned(void); */ void spi_flash_set_vendor_required_regs(void); +/** + * @brief Enable SPI flash high performance mode. + * + * @return ESP_OK if success. + */ +esp_err_t spi_flash_enable_high_performance_mode(void); + +/** + * @brief Get the flash dummy through this function + * This can be used when one flash has several dummy configurations to enable the high performance mode. + * @note Don't forget to subtract one when assign to the register of mspi e.g. if the value you get is 4, (4-1=3) should be assigned to the register. + * + * @return Pointer to spi_flash_hpm_dummy_conf_t. + */ +const spi_flash_hpm_dummy_conf_t *spi_flash_hpm_get_dummy(void); + +/** + * @brief Used to judge whether flash works under HPM mode with dummy adjustment. + * + * @return true Yes, and work under HPM with adjusting dummy. Otherwise, false. + */ +bool spi_flash_hpm_dummy_adjust(void); #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/spi_flash/include/spi_flash/spi_flash_defs.h b/tools/sdk/esp32c3/include/spi_flash/include/spi_flash/spi_flash_defs.h index 1ff0bfdea5c..b248b24dcde 100644 --- a/tools/sdk/esp32c3/include/spi_flash/include/spi_flash/spi_flash_defs.h +++ b/tools/sdk/esp32c3/include/spi_flash/include/spi_flash/spi_flash_defs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2019 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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once @@ -52,6 +44,7 @@ #define CMD_PROGRAM_PAGE_4B 0x12 #define CMD_SUSPEND 0x75 #define CMD_RESUME 0x7A +#define CMD_HPMEN 0xA3 /* Enable High Performance mode on flash */ #define CMD_RST_EN 0x66 #define CMD_RST_DEV 0x99 @@ -72,3 +65,5 @@ #define SPI_FLASH_OPISTR_DUMMY_BITLEN 20 #define SPI_FLASH_OPIDTR_ADDR_BITLEN 32 #define SPI_FLASH_OPIDTR_DUMMY_BITLEN 40 +#define SPI_FLASH_QIO_HPM_DUMMY_BITLEN 10 +#define SPI_FLASH_DIO_HPM_DUMMY_BITLEN 8 diff --git a/tools/sdk/esp32c3/include/spi_flash/include/spi_flash_override.h b/tools/sdk/esp32c3/include/spi_flash/include/spi_flash_override.h new file mode 100644 index 00000000000..7f01576deed --- /dev/null +++ b/tools/sdk/esp32c3/include/spi_flash/include/spi_flash_override.h @@ -0,0 +1,62 @@ +/* + * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "sdkconfig.h" +#include "esp_err.h" + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Structure for flash dummy bits. + * For some flash chips, dummy bits are configurable under different conditions. + */ +typedef struct { + uint8_t dio_dummy; + uint8_t dout_dummy; + uint8_t qio_dummy; + uint8_t qout_dummy; + uint8_t fastrd_dummy; +} spi_flash_hpm_dummy_conf_t; + +typedef enum { + SPI_FLASH_HPM_CMD_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by command. + SPI_FLASH_HPM_DUMMY_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by adjusting dummy. + SPI_FLASH_HPM_WRITE_SR_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by writing status register. + SPI_FLASH_HPM_UNNEEDED, // Means that flash doesn't need to enter the high performance mode. + SPI_FLASH_HPM_BEYOND_LIMIT, // Means that flash has no capability to meet that condition. +} spi_flash_requirement_t; + +typedef void (*spi_flash_hpm_enable_fn_t)(void); +typedef esp_err_t (*spi_flash_hpf_check_fn_t)(void); +typedef void (*spi_flash_get_chip_dummy_fn_t)(spi_flash_hpm_dummy_conf_t *dummy_conf); +typedef esp_err_t (*spi_flash_hpm_probe_fn_t)(uint32_t flash_id); +typedef spi_flash_requirement_t (*spi_flash_hpm_chip_requirement_check_t)(uint32_t flash_id, uint32_t freq_mhz, int voltage_mv, int temperature); + +typedef struct __attribute__((packed)) +{ + const char *method; /* Flash HPM method */ + spi_flash_hpm_probe_fn_t probe; + spi_flash_hpm_chip_requirement_check_t chip_hpm_requirement_check; + spi_flash_hpm_enable_fn_t flash_hpm_enable; + spi_flash_hpf_check_fn_t flash_hpf_check; + spi_flash_get_chip_dummy_fn_t flash_get_dummy; +} spi_flash_hpm_info_t; + +/** + * Array of known flash chips and method to enable flash high performance mode. + * + * Users can override this array. + */ +extern const spi_flash_hpm_info_t __attribute__((weak)) spi_flash_hpm_enable_list[]; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32c3/include/spiffs/include/spiffs_config.h b/tools/sdk/esp32c3/include/spiffs/include/spiffs_config.h index 5cc3d78049c..5e915039215 100644 --- a/tools/sdk/esp32c3/include/spiffs/include/spiffs_config.h +++ b/tools/sdk/esp32c3/include/spiffs/include/spiffs_config.h @@ -20,6 +20,7 @@ #include #include #include +#include "esp_assert.h" // compile time switches #define SPIFFS_TAG "SPIFFS" @@ -161,7 +162,7 @@ extern void spiffs_api_unlock(struct spiffs_t *fs); // spiffs_object_ix_header fields + at least some LUT entries) #define SPIFFS_OBJ_META_LEN (CONFIG_SPIFFS_META_LENGTH) #define SPIFFS_PAGE_EXTRA_SIZE (64) -_Static_assert(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE +ESP_STATIC_ASSERT(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE <= CONFIG_SPIFFS_PAGE_SIZE, "SPIFFS_OBJ_META_LEN or SPIFFS_OBJ_NAME_LEN too long"); // Size of buffer allocated on stack used when copying data. diff --git a/tools/sdk/esp32c3/ld/esp32c3.peripherals.ld b/tools/sdk/esp32c3/ld/esp32c3.peripherals.ld index 710ae9aeea6..c64266b54be 100644 --- a/tools/sdk/esp32c3/ld/esp32c3.peripherals.ld +++ b/tools/sdk/esp32c3/ld/esp32c3.peripherals.ld @@ -6,6 +6,7 @@ PROVIDE ( GPIO = 0x60004000 ); PROVIDE ( SIGMADELTA = 0x60004f00 ); PROVIDE ( RTCCNTL = 0x60008000 ); PROVIDE ( RTCIO = 0x60008400 ); +PROVIDE ( EFUSE = 0x60008800 ); PROVIDE ( HINF = 0x6000B000 ); PROVIDE ( I2S0 = 0x6002d000 ); PROVIDE ( I2C0 = 0x60013000 ); diff --git a/tools/sdk/esp32c3/ld/esp32c3.rom.ld b/tools/sdk/esp32c3/ld/esp32c3.rom.ld index 61d7034aeb6..c6a0f07058c 100644 --- a/tools/sdk/esp32c3/ld/esp32c3.rom.ld +++ b/tools/sdk/esp32c3/ld/esp32c3.rom.ld @@ -1548,7 +1548,7 @@ pm_keep_alive = 0x40001678; /* pm_on_beacon_rx = 0x4000167c; */ pm_on_data_rx = 0x40001680; pm_on_tbtt = 0x40001684; -pm_parse_beacon = 0x40001688; +/* pm_parse_beacon = 0x40001688;*/ pm_process_tim = 0x4000168c; /*pm_rx_beacon_process = 0x40001690;*/ pm_rx_data_process = 0x40001694; @@ -1716,7 +1716,7 @@ ic_reset_rx_ba = 0x4000184c; ieee80211_align_eb = 0x40001850; ieee80211_ampdu_reorder = 0x40001854; ieee80211_ampdu_start_age_timer = 0x40001858; -ieee80211_encap_esfbuf = 0x4000185c; +/*ieee80211_encap_esfbuf = 0x4000185c;*/ ieee80211_is_tx_allowed = 0x40001860; ieee80211_output_pending_eb = 0x40001864; ieee80211_output_process = 0x40001868; @@ -1732,7 +1732,7 @@ ieee80211_recycle_cache_eb = 0x4000188c; ieee80211_search_node = 0x40001890; roundup2 = 0x40001894; ieee80211_crypto_encap = 0x40001898; -ieee80211_crypto_decap = 0x4000189c; +/* ieee80211_crypto_decap = 0x4000189c; */ /* ieee80211_decap = 0x400018a0; */ ieee80211_set_tx_pti = 0x400018a4; wifi_is_started = 0x400018a8; diff --git a/tools/sdk/esp32c3/ld/libbtbb.a b/tools/sdk/esp32c3/ld/libbtbb.a index b529a825fec..b97be700ed5 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/libbtdm_app.a b/tools/sdk/esp32c3/ld/libbtdm_app.a index dcba8f5d98b..75defbb697e 100644 Binary files a/tools/sdk/esp32c3/ld/libbtdm_app.a and b/tools/sdk/esp32c3/ld/libbtdm_app.a differ diff --git a/tools/sdk/esp32c3/ld/libesp_tts_chinese.a b/tools/sdk/esp32c3/ld/libesp_tts_chinese.a new file mode 100644 index 00000000000..5a21b9a3982 Binary files /dev/null and b/tools/sdk/esp32c3/ld/libesp_tts_chinese.a differ diff --git a/tools/sdk/esp32c3/ld/libphy.a b/tools/sdk/esp32c3/ld/libphy.a index b5997e90314..f35f230c149 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/libvoice_set_xiaole.a b/tools/sdk/esp32c3/ld/libvoice_set_xiaole.a new file mode 100644 index 00000000000..935ca2c9e20 Binary files /dev/null and b/tools/sdk/esp32c3/ld/libvoice_set_xiaole.a differ diff --git a/tools/sdk/esp32c3/ld/sections.ld b/tools/sdk/esp32c3/ld/sections.ld index bc4892e6432..c4a25bb1c2a 100644 --- a/tools/sdk/esp32c3/ld/sections.ld +++ b/tools/sdk/esp32c3/ld/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32c3/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32c3/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -175,9 +175,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -236,10 +271,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -261,13 +298,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -309,22 +344,40 @@ SECTIONS . = ALIGN (8); _bss_start = ABSOLUTE(.); - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -362,6 +415,9 @@ SECTIONS *libesp_system.a:esp_system.*(.text .text.esp_get_free_heap_size .text.esp_get_free_internal_heap_size .text.esp_get_idf_version .text.esp_get_minimum_free_heap_size .text.esp_register_shutdown_handler .text.esp_unregister_shutdown_handler) *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.text .text.esp_log_system_timestamp) @@ -425,7 +481,7 @@ SECTIONS _flash_rodata_start = ABSOLUTE(.); *(.rodata_wlog_error .rodata_wlog_error.*) - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata.*) + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:save-restore.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) diff --git a/tools/sdk/esp32c3/lib/libapp_trace.a b/tools/sdk/esp32c3/lib/libapp_trace.a index 0aa1aea81bb..d8d1e3b1885 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 85a9f62f511..21c219f54d8 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 8edcb880d40..db69cdee545 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 62c42012164..face9ad3b7b 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 bcdaa73c9d2..c1f28cb9e90 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/libcbor.a b/tools/sdk/esp32c3/lib/libcbor.a index 0b94615225f..a5e01f8daae 100644 Binary files a/tools/sdk/esp32c3/lib/libcbor.a and b/tools/sdk/esp32c3/lib/libcbor.a differ diff --git a/tools/sdk/esp32c3/lib/libcmock.a b/tools/sdk/esp32c3/lib/libcmock.a index 0cde875bf3c..ae67e026de4 100644 Binary files a/tools/sdk/esp32c3/lib/libcmock.a and b/tools/sdk/esp32c3/lib/libcmock.a differ diff --git a/tools/sdk/esp32c3/lib/libcoap.a b/tools/sdk/esp32c3/lib/libcoap.a index 7413a0bff75..50d5c782e80 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 91354dcb869..54ed24a6223 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 2cd518a81e6..d8ee2a733bd 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 77c4b01926c..418313decd1 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 45fb23f4cff..4ba05dddeb3 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 4c6860ceb8a..1431e3b7b69 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 247ba0e4848..09624df5875 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 1cea74126c8..b7965799ffb 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/libesp32-camera.a b/tools/sdk/esp32c3/lib/libesp32-camera.a index 27fa9e13fe1..0d771a1dc5a 100644 Binary files a/tools/sdk/esp32c3/lib/libesp32-camera.a and b/tools/sdk/esp32c3/lib/libesp32-camera.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_adc_cal.a b/tools/sdk/esp32c3/lib/libesp_adc_cal.a index 7321dd60f3f..6c6f9778732 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_adc_cal.a and b/tools/sdk/esp32c3/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_common.a b/tools/sdk/esp32c3/lib/libesp_common.a index 799318c0252..4c00a4336a2 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_diagnostics.a b/tools/sdk/esp32c3/lib/libesp_diagnostics.a index cb940d31cfc..45595fa871a 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_diagnostics.a and b/tools/sdk/esp32c3/lib/libesp_diagnostics.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_eth.a b/tools/sdk/esp32c3/lib/libesp_eth.a index 291bc9a10ac..c2aa1d05940 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 3f2b238cbb3..b83460ce531 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 1bad075cbd0..4638b4250b7 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 5dcfb0440fa..9ac4adc2c6b 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 e59f798c0cd..9d4404c757c 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 7a07f2569cc..e45de1a4d93 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 9aaccf8c228..1c78aee6ce9 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 565efddfb0b..b98b1a84345 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 586432c1aea..10d31a82b56 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_insights.a b/tools/sdk/esp32c3/lib/libesp_insights.a index ecaa27dfce7..8f4b67f0954 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_insights.a and b/tools/sdk/esp32c3/lib/libesp_insights.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_ipc.a b/tools/sdk/esp32c3/lib/libesp_ipc.a index fe1ac0ffd7e..ead1e08467e 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_ipc.a and b/tools/sdk/esp32c3/lib/libesp_ipc.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_lcd.a b/tools/sdk/esp32c3/lib/libesp_lcd.a index 164296786f9..e7b0435c038 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 93a3774147f..adf8eeafb93 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 53a533be576..5c4aa3cfa7c 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 0f56f7ee64f..9a921fbd838 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 a14f34c3e4b..d2c2f4a7cf5 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 e659c1f57e8..c16e53809f7 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_rainmaker.a b/tools/sdk/esp32c3/lib/libesp_rainmaker.a index a45d86a1f28..e9f0afb7152 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_rainmaker.a and b/tools/sdk/esp32c3/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_ringbuf.a b/tools/sdk/esp32c3/lib/libesp_ringbuf.a index d01e40e580c..4d272f107c2 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_rom.a b/tools/sdk/esp32c3/lib/libesp_rom.a index a3da84b2ff1..b4013cbf96c 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_rom.a and b/tools/sdk/esp32c3/lib/libesp_rom.a differ diff --git a/tools/sdk/esp32c3/lib/libesp_schedule.a b/tools/sdk/esp32c3/lib/libesp_schedule.a index 7527b198d5e..7c9ca3f67f2 100644 Binary files a/tools/sdk/esp32c3/lib/libesp_schedule.a and b/tools/sdk/esp32c3/lib/libesp_schedule.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 3790af9f411..292e6f6199d 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 8d97f71f6f8..d4253912b18 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 2b1962464e2..7ff62fe5738 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 ac57ff7242e..116138bc16c 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 0c3aa9d16e2..3628a2814e6 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 6d6ef464aba..2cb255cee17 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 5d90d0d6a36..6fb0a864e9f 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/libesp-dsp.a b/tools/sdk/esp32c3/lib/libespressif__esp-dsp.a similarity index 67% rename from tools/sdk/esp32c3/lib/libesp-dsp.a rename to tools/sdk/esp32c3/lib/libespressif__esp-dsp.a index 9b6ec317567..7713c8deb5e 100644 Binary files a/tools/sdk/esp32c3/lib/libesp-dsp.a and b/tools/sdk/esp32c3/lib/libespressif__esp-dsp.a differ diff --git a/tools/sdk/esp32c3/lib/libexpat.a b/tools/sdk/esp32c3/lib/libexpat.a index 3420373e18c..dadaa7f0c7c 100644 Binary files a/tools/sdk/esp32c3/lib/libexpat.a and b/tools/sdk/esp32c3/lib/libexpat.a differ diff --git a/tools/sdk/esp32c3/lib/libfatfs.a b/tools/sdk/esp32c3/lib/libfatfs.a index f945b17f250..176413653f5 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/libfb_gfx.a b/tools/sdk/esp32c3/lib/libfb_gfx.a index f26a3898a2e..5e61e22d1c4 100644 Binary files a/tools/sdk/esp32c3/lib/libfb_gfx.a and b/tools/sdk/esp32c3/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32c3/lib/libfreemodbus.a b/tools/sdk/esp32c3/lib/libfreemodbus.a index cbde0048525..5abdb513440 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 ff2fd473c6f..63cef8dd93c 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/libgpio_button.a b/tools/sdk/esp32c3/lib/libgpio_button.a index 053c6fa82c6..18c9824bb96 100644 Binary files a/tools/sdk/esp32c3/lib/libgpio_button.a and b/tools/sdk/esp32c3/lib/libgpio_button.a differ diff --git a/tools/sdk/esp32c3/lib/libhal.a b/tools/sdk/esp32c3/lib/libhal.a index 34ee839e76d..38bf18a1a73 100644 Binary files a/tools/sdk/esp32c3/lib/libhal.a and b/tools/sdk/esp32c3/lib/libhal.a differ diff --git a/tools/sdk/esp32c3/lib/libheap.a b/tools/sdk/esp32c3/lib/libheap.a index d7662ef5f53..5c6761dbefd 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/libjsmn.a b/tools/sdk/esp32c3/lib/libjsmn.a index fa0ca03f7ee..827c9750310 100644 Binary files a/tools/sdk/esp32c3/lib/libjsmn.a and b/tools/sdk/esp32c3/lib/libjsmn.a differ diff --git a/tools/sdk/esp32c3/lib/libjson.a b/tools/sdk/esp32c3/lib/libjson.a index 52f3fc25483..2276a4e0b71 100644 Binary files a/tools/sdk/esp32c3/lib/libjson.a and b/tools/sdk/esp32c3/lib/libjson.a differ diff --git a/tools/sdk/esp32c3/lib/libjson_generator.a b/tools/sdk/esp32c3/lib/libjson_generator.a index 3c0ce42b5ec..eaea166dd72 100644 Binary files a/tools/sdk/esp32c3/lib/libjson_generator.a and b/tools/sdk/esp32c3/lib/libjson_generator.a differ diff --git a/tools/sdk/esp32c3/lib/libjson_parser.a b/tools/sdk/esp32c3/lib/libjson_parser.a index 9662b871c81..18d6117d9f9 100644 Binary files a/tools/sdk/esp32c3/lib/libjson_parser.a and b/tools/sdk/esp32c3/lib/libjson_parser.a differ diff --git a/tools/sdk/esp32c3/lib/liblibsodium.a b/tools/sdk/esp32c3/lib/liblibsodium.a index d4b96e72a9a..3563373b769 100644 Binary files a/tools/sdk/esp32c3/lib/liblibsodium.a and b/tools/sdk/esp32c3/lib/liblibsodium.a differ diff --git a/tools/sdk/esp32c3/lib/liblog.a b/tools/sdk/esp32c3/lib/liblog.a index 9175623223c..f6fd68ffb0e 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 9da9917aa13..7cb36691b4e 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 afd69e4764e..5e1754440a1 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 a8ea79d87a8..da44b8204f2 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/libmbedtls_2.a b/tools/sdk/esp32c3/lib/libmbedtls_2.a index 6ad139dc3ae..c2e5e5683b7 100644 Binary files a/tools/sdk/esp32c3/lib/libmbedtls_2.a and b/tools/sdk/esp32c3/lib/libmbedtls_2.a differ diff --git a/tools/sdk/esp32c3/lib/libmbedx509.a b/tools/sdk/esp32c3/lib/libmbedx509.a index 1a547303b11..e9f5c0901cd 100644 Binary files a/tools/sdk/esp32c3/lib/libmbedx509.a and b/tools/sdk/esp32c3/lib/libmbedx509.a differ diff --git a/tools/sdk/esp32c3/lib/libmdns.a b/tools/sdk/esp32c3/lib/libmdns.a index 67a3f23d125..9d96c91658c 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 2ea73dd23b7..31e755338b9 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 5240047a41c..faec6152ea8 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 e941bc42c53..0d81c31a4f4 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 44f55c66dfe..3e591b48cb8 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/libnghttp.a b/tools/sdk/esp32c3/lib/libnghttp.a index e5968170fe3..6eb16f34832 100644 Binary files a/tools/sdk/esp32c3/lib/libnghttp.a and b/tools/sdk/esp32c3/lib/libnghttp.a differ diff --git a/tools/sdk/esp32c3/lib/libnvs_flash.a b/tools/sdk/esp32c3/lib/libnvs_flash.a index 6698097f671..c0b4d8531df 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/libopenssl.a b/tools/sdk/esp32c3/lib/libopenssl.a index c0ffbdb63c9..7e90b427b37 100644 Binary files a/tools/sdk/esp32c3/lib/libopenssl.a and b/tools/sdk/esp32c3/lib/libopenssl.a differ diff --git a/tools/sdk/esp32c3/lib/libpp.a b/tools/sdk/esp32c3/lib/libpp.a index 592f4f2e2cd..9cc3a578190 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/libprotobuf-c.a b/tools/sdk/esp32c3/lib/libprotobuf-c.a index 247ff9c9058..19a73ae4250 100644 Binary files a/tools/sdk/esp32c3/lib/libprotobuf-c.a and b/tools/sdk/esp32c3/lib/libprotobuf-c.a differ diff --git a/tools/sdk/esp32c3/lib/libprotocomm.a b/tools/sdk/esp32c3/lib/libprotocomm.a index 03034b5009a..bfb76831396 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 e99282f39cd..5eab67a0521 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/libqrcode.a b/tools/sdk/esp32c3/lib/libqrcode.a index 89a54fd2de9..7b9f26b275a 100644 Binary files a/tools/sdk/esp32c3/lib/libqrcode.a and b/tools/sdk/esp32c3/lib/libqrcode.a differ diff --git a/tools/sdk/esp32c3/lib/libriscv.a b/tools/sdk/esp32c3/lib/libriscv.a index a58067acc07..40b2af64169 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/librmaker_common.a b/tools/sdk/esp32c3/lib/librmaker_common.a index c8033b09ec1..0db31ddddbe 100644 Binary files a/tools/sdk/esp32c3/lib/librmaker_common.a and b/tools/sdk/esp32c3/lib/librmaker_common.a differ diff --git a/tools/sdk/esp32c3/lib/librtc_store.a b/tools/sdk/esp32c3/lib/librtc_store.a index 2d45d2e2975..4ce85e62831 100644 Binary files a/tools/sdk/esp32c3/lib/librtc_store.a and b/tools/sdk/esp32c3/lib/librtc_store.a differ diff --git a/tools/sdk/esp32c3/lib/libsdmmc.a b/tools/sdk/esp32c3/lib/libsdmmc.a index 062a09d9d0a..2f63fa7e5ba 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 73843b74201..55a770eb6cc 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/libsoc.a b/tools/sdk/esp32c3/lib/libsoc.a index f51949f8de6..b3133e5b5e3 100644 Binary files a/tools/sdk/esp32c3/lib/libsoc.a and b/tools/sdk/esp32c3/lib/libsoc.a differ diff --git a/tools/sdk/esp32c3/lib/libspiffs.a b/tools/sdk/esp32c3/lib/libspiffs.a index 76822774a41..a9e045b0bfb 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 9857f6913cc..10729eaa9cc 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 3ed5e4d8200..2f6a1c82098 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/libunity.a b/tools/sdk/esp32c3/lib/libunity.a index 41be56ccb47..7c42f554263 100644 Binary files a/tools/sdk/esp32c3/lib/libunity.a and b/tools/sdk/esp32c3/lib/libunity.a differ diff --git a/tools/sdk/esp32c3/lib/libvfs.a b/tools/sdk/esp32c3/lib/libvfs.a index 9caeed7b9b1..74618340300 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 8ae9bd0f122..8890b13240b 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/libwear_levelling.a b/tools/sdk/esp32c3/lib/libwear_levelling.a index 11fec91d0a4..d2361ede9e0 100644 Binary files a/tools/sdk/esp32c3/lib/libwear_levelling.a and b/tools/sdk/esp32c3/lib/libwear_levelling.a differ diff --git a/tools/sdk/esp32c3/lib/libwifi_provisioning.a b/tools/sdk/esp32c3/lib/libwifi_provisioning.a index e9a38643614..ffe9b50e715 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 a62c356917c..c583ae4f1f5 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/lib/libws2812_led.a b/tools/sdk/esp32c3/lib/libws2812_led.a index e614166ecc8..0dc0237850a 100644 Binary files a/tools/sdk/esp32c3/lib/libws2812_led.a and b/tools/sdk/esp32c3/lib/libws2812_led.a differ diff --git a/tools/sdk/esp32c3/qio_qspi/include/sdkconfig.h b/tools/sdk/esp32c3/qio_qspi/include/sdkconfig.h index 504a9d67518..2fb1a72015a 100644 --- a/tools/sdk/esp32c3/qio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32c3/qio_qspi/include/sdkconfig.h @@ -97,6 +97,12 @@ #define CONFIG_ARDUHAL_ESP_LOG 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME "default" +#define CONFIG_USE_AFE 1 +#define CONFIG_AFE_INTERFACE_V1 1 +#define CONFIG_USE_WAKENET 1 +#define CONFIG_USE_MULTINET 1 +#define CONFIG_SR_MN_CN_NONE 1 +#define CONFIG_SR_MN_EN_NONE 1 #define CONFIG_COMPILER_OPTIMIZATION_SIZE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL 2 @@ -126,8 +132,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -135,6 +141,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 @@ -150,9 +157,11 @@ #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_BLE_BLUFI_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -342,6 +351,7 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 @@ -378,10 +388,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 @@ -446,6 +452,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -597,8 +604,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -636,10 +641,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -668,26 +669,45 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND @@ -701,33 +721,44 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM #define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_QIO CONFIG_ESPTOOLPY_FLASHMODE_QIO +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -740,22 +771,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -766,6 +805,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -784,5 +824,5 @@ #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32c3/qio_qspi/libspi_flash.a b/tools/sdk/esp32c3/qio_qspi/libspi_flash.a index 2ee7f978db5..4880e6d6b73 100644 Binary files a/tools/sdk/esp32c3/qio_qspi/libspi_flash.a and b/tools/sdk/esp32c3/qio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32c3/qout_qspi/include/sdkconfig.h b/tools/sdk/esp32c3/qout_qspi/include/sdkconfig.h index 38f5819707c..b6e5df47be1 100644 --- a/tools/sdk/esp32c3/qout_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32c3/qout_qspi/include/sdkconfig.h @@ -97,6 +97,12 @@ #define CONFIG_ARDUHAL_ESP_LOG 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME_DEFAULT 1 #define CONFIG_ARDUHAL_PARTITION_SCHEME "default" +#define CONFIG_USE_AFE 1 +#define CONFIG_AFE_INTERFACE_V1 1 +#define CONFIG_USE_WAKENET 1 +#define CONFIG_USE_MULTINET 1 +#define CONFIG_SR_MN_CN_NONE 1 +#define CONFIG_SR_MN_EN_NONE 1 #define CONFIG_COMPILER_OPTIMIZATION_SIZE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL 2 @@ -126,8 +132,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -135,6 +141,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN 1 #define CONFIG_BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE 100 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 @@ -150,9 +157,11 @@ #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_BLE_BLUFI_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -342,6 +351,7 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 @@ -378,10 +388,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 @@ -446,6 +452,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -597,8 +604,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -636,10 +641,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -668,26 +669,45 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE #define CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND @@ -701,33 +721,44 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM #define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_QOUT CONFIG_ESPTOOLPY_FLASHMODE_QOUT +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -740,22 +771,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -766,6 +805,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -784,5 +824,5 @@ #define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX #define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE #define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_ARDUINO_IDF_COMMIT "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32c3/qout_qspi/libspi_flash.a b/tools/sdk/esp32c3/qout_qspi/libspi_flash.a index f0ca4b56750..bfd74fcc9a7 100644 Binary files a/tools/sdk/esp32c3/qout_qspi/libspi_flash.a and b/tools/sdk/esp32c3/qout_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32c3/sdkconfig b/tools/sdk/esp32c3/sdkconfig index cd76db9f00e..82232444d18 100644 --- a/tools/sdk/esp32c3/sdkconfig +++ b/tools/sdk/esp32c3/sdkconfig @@ -257,6 +257,17 @@ CONFIG_ARDUHAL_PARTITION_SCHEME="default" # # end of Arduino TinyUSB +# +# ESP Speech Recognition +# +CONFIG_USE_AFE=y +CONFIG_AFE_INTERFACE_V1=y +CONFIG_USE_WAKENET=y +CONFIG_USE_MULTINET=y +CONFIG_SR_MN_CN_NONE=y +CONFIG_SR_MN_EN_NONE=y +# end of ESP Speech Recognition + # # Compiler options # @@ -342,14 +353,14 @@ CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF=0 # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N6 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N3 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N0 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3=y +# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P6 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 is not set +CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9=y # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P12 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P15 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P18 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P21 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=9 +CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=11 CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 @@ -359,6 +370,7 @@ CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE=y # CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE is not set CONFIG_BT_CTRL_SCAN_DUPL_TYPE=0 CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE=100 +CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD=0 CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN=y CONFIG_BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE=100 # CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN is not set @@ -375,6 +387,7 @@ CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 CONFIG_BT_CTRL_HCI_TL_EFF=1 # CONFIG_BT_CTRL_AGC_RECORRECT_EN is not set +# CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX is not set # end of Bluetooth controller CONFIG_BT_BLUEDROID_ENABLED=y @@ -393,10 +406,12 @@ CONFIG_BT_GATTS_ENABLE=y # CONFIG_BT_GATTS_PPCP_CHAR_GAP is not set CONFIG_BT_BLE_BLUFI_ENABLE=y CONFIG_BT_GATT_MAX_SR_PROFILES=8 +CONFIG_BT_GATT_MAX_SR_ATTRIBUTES=100 # CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL is not set CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0 CONFIG_BT_GATTC_ENABLE=y +CONFIG_BT_GATTC_MAX_CACHE_CHAR=40 # CONFIG_BT_GATTC_CACHE_NVS_FLASH is not set CONFIG_BT_GATTC_CONNECT_RETRY_COUNT=3 CONFIG_BT_BLE_SMP_ENABLE=y @@ -582,6 +597,7 @@ CONFIG_BT_MULTI_CONNECTION_ENBALE=y # CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY is not set # CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set CONFIG_BT_SMP_ENABLE=y +# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30 CONFIG_BT_MAX_DEVICE_NAME_LEN=32 CONFIG_BT_BLE_RPA_SUPPORTED=y @@ -623,6 +639,7 @@ CONFIG_BLE_MESH_CRPL=10 CONFIG_BLE_MESH_MSG_CACHE_SIZE=10 CONFIG_BLE_MESH_ADV_BUF_COUNT=60 CONFIG_BLE_MESH_IVU_DIVIDER=4 +# CONFIG_BLE_MESH_IVU_RECOVERY_IVI is not set CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=1 CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=1 CONFIG_BLE_MESH_RX_SDU_MAX=384 @@ -1050,6 +1067,7 @@ CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT=y # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set +CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7 # end of Wi-Fi # @@ -1131,11 +1149,7 @@ CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 CONFIG_FMB_TIMER_PORT_ENABLED=y -CONFIG_FMB_TIMER_GROUP=0 -CONFIG_FMB_TIMER_INDEX=0 -CONFIG_FMB_MASTER_TIMER_GROUP=0 -CONFIG_FMB_MASTER_TIMER_INDEX=0 -# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# CONFIG_FMB_TIMER_USE_ISR_DISPATCH_METHOD is not set # end of Modbus configuration # @@ -1298,6 +1312,7 @@ CONFIG_LWIP_TCP_SYNMAXRTX=6 CONFIG_LWIP_TCP_MSS=1436 CONFIG_LWIP_TCP_TMR_INTERVAL=250 CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=20000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 CONFIG_LWIP_TCP_WND_DEFAULT=5744 CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 @@ -1718,8 +1733,8 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 -CONFIG_WIFI_PROV_BLE_BONDING=y -CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y +# CONFIG_WIFI_PROV_BLE_BONDING is not set +# CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION is not set # CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV is not set # end of Wi-Fi Provisioning Manager @@ -1812,21 +1827,6 @@ CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT=80 # CONFIG_RTC_STORE_OVERWRITE_NON_CRITICAL_DATA is not set # end of RTC Store -# -# DSP Library -# -CONFIG_DSP_ANSI=y -CONFIG_DSP_OPTIMIZATION=0 -# CONFIG_DSP_MAX_FFT_SIZE_512 is not set -# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set -# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set -CONFIG_DSP_MAX_FFT_SIZE_4096=y -# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set -# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set -# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set -CONFIG_DSP_MAX_FFT_SIZE=4096 -# end of DSP Library - # # Camera configuration # @@ -1875,6 +1875,21 @@ CONFIG_LITTLEFS_MTIME_USE_SECONDS=y # CONFIG_LITTLEFS_SPIFFS_COMPAT is not set # CONFIG_LITTLEFS_FLUSH_FILE_EVERY_WRITE is not set # end of LittleFS + +# +# DSP Library +# +CONFIG_DSP_ANSI=y +CONFIG_DSP_OPTIMIZATION=0 +# CONFIG_DSP_MAX_FFT_SIZE_512 is not set +# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set +# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set +CONFIG_DSP_MAX_FFT_SIZE_4096=y +# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set +# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set +# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set +CONFIG_DSP_MAX_FFT_SIZE=4096 +# end of DSP Library # end of Component config # @@ -2103,6 +2118,7 @@ CONFIG_BLUFI_TRACE_LEVEL_WARNING=y CONFIG_BLUFI_INITIAL_TRACE_LEVEL=2 # CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK is not set CONFIG_SMP_ENABLE=y +# CONFIG_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY is not set CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT=30 CONFIG_ADC2_DISABLE_DAC=y # CONFIG_EVENT_LOOP_PROFILING is not set @@ -2162,8 +2178,6 @@ CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_MB_CONTROLLER_STACK_SIZE=4096 CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 CONFIG_MB_TIMER_PORT_ENABLED=y -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048 diff --git a/tools/sdk/esp32s2/bin/bootloader_dio_40m.elf b/tools/sdk/esp32s2/bin/bootloader_dio_40m.elf index bf5b0d7da03..7337c30b340 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_dio_40m.elf and b/tools/sdk/esp32s2/bin/bootloader_dio_40m.elf differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dio_80m.elf b/tools/sdk/esp32s2/bin/bootloader_dio_80m.elf index a4ce1c26f1a..29ba3621e3d 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_dio_80m.elf and b/tools/sdk/esp32s2/bin/bootloader_dio_80m.elf differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dout_40m.elf b/tools/sdk/esp32s2/bin/bootloader_dout_40m.elf index bf5b0d7da03..7337c30b340 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_dout_40m.elf and b/tools/sdk/esp32s2/bin/bootloader_dout_40m.elf differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dout_80m.elf b/tools/sdk/esp32s2/bin/bootloader_dout_80m.elf index a4ce1c26f1a..29ba3621e3d 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_dout_80m.elf and b/tools/sdk/esp32s2/bin/bootloader_dout_80m.elf differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qio_40m.elf b/tools/sdk/esp32s2/bin/bootloader_qio_40m.elf index 5f4c46e2d92..7656b4c01e3 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_qio_40m.elf and b/tools/sdk/esp32s2/bin/bootloader_qio_40m.elf differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qio_80m.elf b/tools/sdk/esp32s2/bin/bootloader_qio_80m.elf index 14e6bde6b37..0ca1f686b8e 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_qio_80m.elf and b/tools/sdk/esp32s2/bin/bootloader_qio_80m.elf differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qout_40m.elf b/tools/sdk/esp32s2/bin/bootloader_qout_40m.elf index 25f3b85db79..0335ecb5a3e 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_qout_40m.elf and b/tools/sdk/esp32s2/bin/bootloader_qout_40m.elf differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qout_80m.elf b/tools/sdk/esp32s2/bin/bootloader_qout_80m.elf index d529374aa73..1cb99e4c2a0 100755 Binary files a/tools/sdk/esp32s2/bin/bootloader_qout_80m.elf and b/tools/sdk/esp32s2/bin/bootloader_qout_80m.elf differ diff --git a/tools/sdk/esp32s2/dio_qspi/include/sdkconfig.h b/tools/sdk/esp32s2/dio_qspi/include/sdkconfig.h index 54b4c573737..c425c752eb0 100644 --- a/tools/sdk/esp32s2/dio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s2/dio_qspi/include/sdkconfig.h @@ -152,8 +152,8 @@ #define CONFIG_ESP32S2_SPIRAM_SUPPORT 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 @@ -252,12 +252,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -287,10 +289,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 @@ -356,6 +354,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -510,7 +509,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -548,10 +546,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -580,14 +574,23 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32C3_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE #define CONFIG_ESP32C3_MEMPROT_FEATURE_LOCK CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK #define CONFIG_ESP32H2_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE @@ -598,14 +601,19 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -615,6 +623,7 @@ #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -627,16 +636,18 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -646,6 +657,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -673,5 +685,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s2/dio_qspi/libspi_flash.a b/tools/sdk/esp32s2/dio_qspi/libspi_flash.a index 16db795ed01..4a6dc32735c 100644 Binary files a/tools/sdk/esp32s2/dio_qspi/libspi_flash.a and b/tools/sdk/esp32s2/dio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32s2/dout_qspi/include/sdkconfig.h b/tools/sdk/esp32s2/dout_qspi/include/sdkconfig.h index 46137f0c542..b41bd500c01 100644 --- a/tools/sdk/esp32s2/dout_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s2/dout_qspi/include/sdkconfig.h @@ -152,8 +152,8 @@ #define CONFIG_ESP32S2_SPIRAM_SUPPORT 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 @@ -252,12 +252,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -287,10 +289,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 @@ -356,6 +354,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -510,7 +509,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -548,10 +546,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -580,14 +574,23 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32C3_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE #define CONFIG_ESP32C3_MEMPROT_FEATURE_LOCK CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK #define CONFIG_ESP32H2_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE @@ -598,14 +601,19 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -615,6 +623,7 @@ #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -627,16 +636,18 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -646,6 +657,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -673,5 +685,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s2/dout_qspi/libspi_flash.a b/tools/sdk/esp32s2/dout_qspi/libspi_flash.a index f6c598d25dd..7c5390114e7 100644 Binary files a/tools/sdk/esp32s2/dout_qspi/libspi_flash.a and b/tools/sdk/esp32s2/dout_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h index 6f9c1a6b582..ba497906b3b 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h @@ -721,11 +721,13 @@ typedef struct TU_ATTR_PACKED uint8_t bLength ; ///< Size of this descriptor, in bytes: 17. uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_INPUT_TERMINAL. + uint8_t bTerminalID ; ///< Constant uniquely identifying the Terminal within the audio function. This value is used in all requests to address this terminal. uint16_t wTerminalType ; ///< Constant characterizing the type of Terminal. See: audio_terminal_type_t for USB streaming and audio_terminal_input_type_t for other input types. uint8_t bAssocTerminal ; ///< ID of the Output Terminal to which this Input Terminal is associated. uint8_t bCSourceID ; ///< ID of the Clock Entity to which this Input Terminal is connected. uint8_t bNrChannels ; ///< Number of logical output channels in the Terminal’s output audio channel cluster. uint32_t bmChannelConfig ; ///< Describes the spatial location of the logical channels. See:audio_channel_config_t. + uint8_t iChannelNames ; ///< Index of a string descriptor, describing the name of the first logical channel. uint16_t bmControls ; ///< See: audio_terminal_input_control_pos_t. uint8_t iTerminal ; ///< Index of a string descriptor, describing the Input Terminal. } audio_desc_input_terminal_t; diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h index c428af86506..4658e43afe4 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h @@ -41,16 +41,6 @@ /** \defgroup ClassDriver_CDC_Common Common Definitions * @{ */ -// TODO remove -/// CDC Pipe ID, used to indicate which pipe the API is addressing to (Notification, Out, In) -typedef enum -{ - CDC_PIPE_NOTIFICATION , ///< Notification pipe - CDC_PIPE_DATA_IN , ///< Data in pipe - CDC_PIPE_DATA_OUT , ///< Data out pipe - CDC_PIPE_ERROR , ///< Invalid Pipe ID -}cdc_pipeid_t; - //--------------------------------------------------------------------+ // CDC Communication Interface Class //--------------------------------------------------------------------+ @@ -192,6 +182,28 @@ typedef enum CDC_REQUEST_MDLM_SEMANTIC_MODEL = 0x60, }cdc_management_request_t; +enum +{ + CDC_CONTROL_LINE_STATE_DTR = 0x01, + CDC_CONTROL_LINE_STATE_RTS = 0x02, +}; + +enum +{ + CDC_LINE_CONDING_STOP_BITS_1 = 0, // 1 bit + CDC_LINE_CONDING_STOP_BITS_1_5 = 1, // 1.5 bits + CDC_LINE_CONDING_STOP_BITS_2 = 2, // 2 bits +}; + +enum +{ + CDC_LINE_CODING_PARITY_NONE = 0, + CDC_LINE_CODING_PARITY_ODD = 1, + CDC_LINE_CODING_PARITY_EVEN = 2, + CDC_LINE_CODING_PARITY_MARK = 3, + CDC_LINE_CODING_PARITY_SPACE = 4, +}; + //--------------------------------------------------------------------+ // Management Element Notification (Notification Endpoint) //--------------------------------------------------------------------+ @@ -365,7 +377,9 @@ typedef struct TU_ATTR_PACKED uint32_t incoming_distinctive : 1; ///< 0 : Reports only incoming ringing. 1 : Reports incoming distinctive ringing patterns. uint32_t dual_tone_multi_freq : 1; ///< 0 : Cannot report dual tone multi-frequency (DTMF) digits input remotely over the telephone line. 1 : Can report DTMF digits input remotely over the telephone line. uint32_t line_state_change : 1; ///< 0 : Does not support line state change notification. 1 : Does support line state change notification - uint32_t TU_RESERVED : 26; + uint32_t TU_RESERVED0 : 2; + uint32_t TU_RESERVED1 : 16; + uint32_t TU_RESERVED2 : 8; } bmCapabilities; }cdc_desc_func_telephone_call_state_reporting_capabilities_t; @@ -390,9 +404,10 @@ TU_VERIFY_STATIC(sizeof(cdc_line_coding_t) == 7, "size is not correct"); typedef struct TU_ATTR_PACKED { - uint16_t dte_is_present : 1; ///< Indicates to DCE if DTE is presentor not. This signal corresponds to V.24 signal 108/2 and RS-232 signal DTR. - uint16_t half_duplex_carrier_control : 1; - uint16_t : 14; + uint16_t dtr : 1; + uint16_t rts : 1; + uint16_t : 6; + uint16_t : 8; } cdc_line_control_state_t; TU_VERIFY_STATIC(sizeof(cdc_line_control_state_t) == 2, "size is not correct"); diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h index fbc7162a366..f8a004df438 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h @@ -27,7 +27,6 @@ #ifndef _TUSB_CDC_DEVICE_H_ #define _TUSB_CDC_DEVICE_H_ -#include "common/tusb_common.h" #include "cdc.h" //--------------------------------------------------------------------+ @@ -81,7 +80,7 @@ int32_t tud_cdc_n_read_char (uint8_t itf); // Clear the received FIFO void tud_cdc_n_read_flush (uint8_t itf); -// Get a byte from FIFO at the specified position without removing it +// Get a byte from FIFO without removing it bool tud_cdc_n_peek (uint8_t itf, uint8_t* ui8); // Write bytes to TX FIFO, data may remain in the FIFO for a while @@ -135,7 +134,7 @@ TU_ATTR_WEAK void tud_cdc_rx_cb(uint8_t itf); // Invoked when received `wanted_char` TU_ATTR_WEAK void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char); -// Invoked when space becomes available in TX buffer +// Invoked when a TX is complete and therefore space becomes available in TX buffer TU_ATTR_WEAK void tud_cdc_tx_complete_cb(uint8_t itf); // Invoked when line state DTR & RTS are changed via SET_CONTROL_LINE_STATE diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h index 33dbd2efb4d..c759527e6aa 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h @@ -34,89 +34,156 @@ #endif //--------------------------------------------------------------------+ -// CDC APPLICATION PUBLIC API +// Class Driver Configuration //--------------------------------------------------------------------+ -/** \ingroup ClassDriver_CDC Communication Device Class (CDC) - * \addtogroup CDC_Serial Serial - * @{ - * \defgroup CDC_Serial_Host Host - * @{ */ -bool tuh_cdc_set_control_line_state(uint8_t dev_addr, bool dtr, bool rts, tuh_xfer_cb_t complete_cb); +// Set Line Control state on enumeration/mounted: DTR ( bit 0), RTS (bit 1) +#ifndef CFG_TUH_CDC_LINE_CONTROL_ON_ENUM +#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM 0 +#endif + +// Set Line Coding on enumeration/mounted, value for cdc_line_coding_t +//#ifndef CFG_TUH_CDC_LINE_CODING_ON_ENUM +//#define CFG_TUH_CDC_LINE_CODING_ON_ENUM { 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 } +//#endif + +// RX FIFO size +#ifndef CFG_TUH_CDC_RX_BUFSIZE +#define CFG_TUH_CDC_RX_BUFSIZE USBH_EPSIZE_BULK_MAX +#endif + +// RX Endpoint size +#ifndef CFG_TUH_CDC_RX_EPSIZE +#define CFG_TUH_CDC_RX_EPSIZE USBH_EPSIZE_BULK_MAX +#endif + +// TX FIFO size +#ifndef CFG_TUH_CDC_TX_BUFSIZE +#define CFG_TUH_CDC_TX_BUFSIZE USBH_EPSIZE_BULK_MAX +#endif + +// TX Endpoint size +#ifndef CFG_TUH_CDC_TX_EPSIZE +#define CFG_TUH_CDC_TX_EPSIZE USBH_EPSIZE_BULK_MAX +#endif + +//--------------------------------------------------------------------+ +// Application API +//--------------------------------------------------------------------+ -static inline bool tuh_cdc_connect(uint8_t dev_addr, tuh_xfer_cb_t complete_cb) +typedef struct { - return tuh_cdc_set_control_line_state(dev_addr, true, true, complete_cb); + uint8_t daddr; + uint8_t bInterfaceNumber; + uint8_t bInterfaceSubClass; + uint8_t bInterfaceProtocol; +} tuh_cdc_itf_info_t; + +// Get Interface index from device address + interface number +// return TUSB_INDEX_INVALID (0xFF) if not found +uint8_t tuh_cdc_itf_get_index(uint8_t daddr, uint8_t itf_num); + +// Get Interface information +// return true if index is correct and interface is currently mounted +bool tuh_cdc_itf_get_info(uint8_t idx, tuh_cdc_itf_info_t* info); + +// Check if a interface is mounted +bool tuh_cdc_mounted(uint8_t idx); + +// Get current DTR status +bool tuh_cdc_get_dtr(uint8_t idx); + +// Get current RTS status +bool tuh_cdc_get_rts(uint8_t idx); + +// Check if interface is connected (DTR active) +TU_ATTR_ALWAYS_INLINE static inline bool tuh_cdc_connected(uint8_t idx) +{ + return tuh_cdc_get_dtr(idx); } -static inline bool tuh_cdc_disconnect(uint8_t dev_addr, tuh_xfer_cb_t complete_cb) +// Get local (saved/cached) version of line coding. +// This function should return correct values if tuh_cdc_set_line_coding() / tuh_cdc_get_line_coding() +// are invoked previously or CFG_TUH_CDC_LINE_CODING_ON_ENUM is defined. +// NOTE: This function does not make any USB transfer request to device. +bool tuh_cdc_get_local_line_coding(uint8_t idx, cdc_line_coding_t* line_coding); + +//--------------------------------------------------------------------+ +// Write API +//--------------------------------------------------------------------+ + +// Get the number of bytes available for writing +uint32_t tuh_cdc_write_available(uint8_t idx); + +// Write to cdc interface +uint32_t tuh_cdc_write(uint8_t idx, void const* buffer, uint32_t bufsize); + +// Force sending data if possible, return number of forced bytes +uint32_t tuh_cdc_write_flush(uint8_t idx); + +// Clear the transmit FIFO +bool tuh_cdc_write_clear(uint8_t idx); + +//--------------------------------------------------------------------+ +// Read API +//--------------------------------------------------------------------+ + +// Get the number of bytes available for reading +uint32_t tuh_cdc_read_available(uint8_t idx); + +// Read from cdc interface +uint32_t tuh_cdc_read (uint8_t idx, void* buffer, uint32_t bufsize); + +// Get a byte from RX FIFO without removing it +bool tuh_cdc_peek(uint8_t idx, uint8_t* ch); + +// Clear the received FIFO +bool tuh_cdc_read_clear (uint8_t idx); + +//--------------------------------------------------------------------+ +// Control Endpoint (Request) API +// Each Function will make a USB transfer request to/from device +//--------------------------------------------------------------------+ + +// Request to Set Control Line State: DTR (bit 0), RTS (bit 1) +bool tuh_cdc_set_control_line_state(uint8_t idx, uint16_t line_state, tuh_xfer_cb_t complete_cb, uintptr_t user_data); + +// Request to Set Line Coding +bool tuh_cdc_set_line_coding(uint8_t idx, cdc_line_coding_t const* line_coding, tuh_xfer_cb_t complete_cb, uintptr_t user_data); + +// Request to Get Line Coding +// Should only use if tuh_cdc_set_line_coding() / tuh_cdc_get_line_coding() never got invoked and +// CFG_TUH_CDC_LINE_CODING_ON_ENUM is not defined +// bool tuh_cdc_get_line_coding(uint8_t idx, cdc_line_coding_t* coding); + +// Connect by set both DTR, RTS +static inline bool tuh_cdc_connect(uint8_t idx, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { - return tuh_cdc_set_control_line_state(dev_addr, false, false, complete_cb); + return tuh_cdc_set_control_line_state(idx, CDC_CONTROL_LINE_STATE_DTR | CDC_CONTROL_LINE_STATE_RTS, complete_cb, user_data); } -/** \brief Check if device support CDC Serial interface or not - * \param[in] dev_addr device address - * \retval true if device supports - * \retval false if device does not support or is not mounted - */ -bool tuh_cdc_serial_is_mounted(uint8_t dev_addr); - -/** \brief Check if the interface is currently busy or not - * \param[in] dev_addr device address - * \param[in] pipeid value from \ref cdc_pipeid_t to indicate target pipe. - * \retval true if the interface is busy, meaning the stack is still transferring/waiting data from/to device - * \retval false if the interface is not busy, meaning the stack successfully transferred data from/to device - * \note This function is used to check if previous transfer is complete (success or error), so that the next transfer - * can be scheduled. User needs to make sure the corresponding interface is mounted - * (by \ref tuh_cdc_serial_is_mounted) before calling this function. - */ -bool tuh_cdc_is_busy(uint8_t dev_addr, cdc_pipeid_t pipeid); - -/** \brief Perform USB OUT transfer to device - * \param[in] dev_addr device address - * \param[in] p_data Buffer containing data. Must be accessible by USB controller (see \ref CFG_TUSB_MEM_SECTION) - * \param[in] length Number of bytes to be transferred via USB bus - * \retval TUSB_ERROR_NONE on success - * \retval TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device - * \retval TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request) - * \retval TUSB_ERROR_INVALID_PARA if input parameters are not correct - * \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the - * interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION. - */ -bool tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify); - -/** \brief Perform USB IN transfer to get data from device - * \param[in] dev_addr device address - * \param[in] p_buffer Buffer containing received data. Must be accessible by USB controller (see \ref CFG_TUSB_MEM_SECTION) - * \param[in] length Number of bytes to be transferred via USB bus - * \retval TUSB_ERROR_NONE on success - * \retval TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device - * \retval TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request) - * \retval TUSB_ERROR_INVALID_PARA if input parameters are not correct - * \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the - * interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION. - */ -bool tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify); +// Disconnect by clear both DTR, RTS +static inline bool tuh_cdc_disconnect(uint8_t idx, tuh_xfer_cb_t complete_cb, uintptr_t user_data) +{ + return tuh_cdc_set_control_line_state(idx, 0x00, complete_cb, user_data); +} //--------------------------------------------------------------------+ // CDC APPLICATION CALLBACKS //--------------------------------------------------------------------+ -/** \brief Callback function that is invoked when an transferring event occurred - * \param[in] dev_addr Address of device - * \param[in] event an value from \ref xfer_result_t - * \param[in] pipe_id value from \ref cdc_pipeid_t indicate the pipe - * \param[in] xferred_bytes Number of bytes transferred via USB bus - * \note event can be one of following - * - XFER_RESULT_SUCCESS : previously scheduled transfer completes successfully. - * - XFER_RESULT_FAILED : previously scheduled transfer encountered a transaction error. - * - XFER_RESULT_STALLED : previously scheduled transfer is stalled by device. - * \note - */ -void tuh_cdc_xfer_isr(uint8_t dev_addr, xfer_result_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes); +// Invoked when a device with CDC interface is mounted +// idx is index of cdc interface in the internal pool. +TU_ATTR_WEAK extern void tuh_cdc_mount_cb(uint8_t idx); + +// Invoked when a device with CDC interface is unmounted +TU_ATTR_WEAK extern void tuh_cdc_umount_cb(uint8_t idx); + +// Invoked when received new data +TU_ATTR_WEAK extern void tuh_cdc_rx_cb(uint8_t idx); -/// @} // group CDC_Serial_Host -/// @} +// Invoked when a TX is complete and therefore space becomes available in TX buffer +TU_ATTR_WEAK extern void tuh_cdc_tx_complete_cb(uint8_t idx); //--------------------------------------------------------------------+ // Internal Class Driver API 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 eeef6d3bade..17b24def111 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 @@ -116,7 +116,7 @@ TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t instance, uint8_t idle_rate); // Invoked when sent REPORT successfully to host // Application can use this to send the next report // Note: For composite reports, report[0] is report ID -TU_ATTR_WEAK void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, /*uint16_t*/ uint8_t len ); +TU_ATTR_WEAK void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, uint16_t len); //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h index 2c30daf6fc7..a0a49d7ec70 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h @@ -76,9 +76,9 @@ * - ##__VA_ARGS__ is used to deal with 0 paramerter (swallows comma) *------------------------------------------------------------------*/ #if !defined(__CCRX__) -#define TU_ARGS_NUM(...) _TU_NARG(_0, ##__VA_ARGS__,_RSEQ_N()) +#define TU_ARGS_NUM(...) _TU_NARG(_0, ##__VA_ARGS__, _RSEQ_N()) #else -#define TU_ARGS_NUM(...) _TU_NARG(_0, __VA_ARGS__,_RSEQ_N()) +#define TU_ARGS_NUM(...) _TU_NARG(_0, __VA_ARGS__, _RSEQ_N()) #endif #define _TU_NARG(...) _GET_NTH_ARG(__VA_ARGS__) diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h index ac5bee6ece6..65fd1920dd5 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h @@ -66,7 +66,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG(n, ...) TU_XSTRCAT(TU_LOG, n)(__VA_ARGS__) #define TU_LOG_MEM(n, ...) TU_XSTRCAT3(TU_LOG, n, _MEM)(__VA_ARGS__) #define TU_LOG_ARR(n, ...) TU_XSTRCAT3(TU_LOG, n, _ARR)(__VA_ARGS__) -#define TU_LOG_VAR(n, ...) TU_XSTRCAT3(TU_LOG, n, _VAR)(__VA_ARGS__) +#define TU_LOG_PTR(n, ...) TU_XSTRCAT3(TU_LOG, n, _PTR)(__VA_ARGS__) #define TU_LOG_INT(n, ...) TU_XSTRCAT3(TU_LOG, n, _INT)(__VA_ARGS__) #define TU_LOG_HEX(n, ...) TU_XSTRCAT3(TU_LOG, n, _HEX)(__VA_ARGS__) #define TU_LOG_LOCATION() tu_printf("%s: %d:\r\n", __PRETTY_FUNCTION__, __LINE__) @@ -76,7 +76,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG1 tu_printf #define TU_LOG1_MEM tu_print_mem #define TU_LOG1_ARR(_x, _n) tu_print_arr((uint8_t const*)(_x), _n) -#define TU_LOG1_VAR(_x) tu_print_arr((uint8_t const*)(_x), sizeof(*(_x))) +#define TU_LOG1_PTR(_x) tu_print_arr((uint8_t const*)(_x), sizeof(*(_x))) #define TU_LOG1_INT(_x) tu_printf(#_x " = %ld\r\n", (unsigned long) (_x) ) #define TU_LOG1_HEX(_x) tu_printf(#_x " = %lX\r\n", (unsigned long) (_x) ) @@ -85,7 +85,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG2 TU_LOG1 #define TU_LOG2_MEM TU_LOG1_MEM #define TU_LOG2_ARR TU_LOG1_ARR - #define TU_LOG2_VAR TU_LOG1_VAR + #define TU_LOG2_PTR TU_LOG1_PTR #define TU_LOG2_INT TU_LOG1_INT #define TU_LOG2_HEX TU_LOG1_HEX #endif @@ -95,7 +95,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG3 TU_LOG1 #define TU_LOG3_MEM TU_LOG1_MEM #define TU_LOG3_ARR TU_LOG1_ARR - #define TU_LOG3_VAR TU_LOG1_VAR + #define TU_LOG3_PTR TU_LOG1_PTR #define TU_LOG3_INT TU_LOG1_INT #define TU_LOG3_HEX TU_LOG1_HEX #endif @@ -132,7 +132,7 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #ifndef TU_LOG #define TU_LOG(n, ...) #define TU_LOG_MEM(n, ...) - #define TU_LOG_VAR(n, ...) + #define TU_LOG_PTR(n, ...) #define TU_LOG_INT(n, ...) #define TU_LOG_HEX(n, ...) #define TU_LOG_LOCATION() @@ -143,14 +143,14 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #define TU_LOG0(...) #define TU_LOG0_MEM(...) -#define TU_LOG0_VAR(...) +#define TU_LOG0_PTR(...) #define TU_LOG0_INT(...) #define TU_LOG0_HEX(...) #ifndef TU_LOG1 #define TU_LOG1(...) #define TU_LOG1_MEM(...) - #define TU_LOG1_VAR(...) + #define TU_LOG1_PTR(...) #define TU_LOG1_INT(...) #define TU_LOG1_HEX(...) #endif @@ -158,7 +158,7 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #ifndef TU_LOG2 #define TU_LOG2(...) #define TU_LOG2_MEM(...) - #define TU_LOG2_VAR(...) + #define TU_LOG2_PTR(...) #define TU_LOG2_INT(...) #define TU_LOG2_HEX(...) #endif @@ -166,7 +166,7 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #ifndef TU_LOG3 #define TU_LOG3(...) #define TU_LOG3_MEM(...) - #define TU_LOG3_VAR(...) + #define TU_LOG3_PTR(...) #define TU_LOG3_INT(...) #define TU_LOG3_HEX(...) #endif diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h index e36e3a7f3c3..2f60ec2f49d 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h @@ -44,28 +44,82 @@ extern "C" { #include "common/tusb_common.h" #include "osal/osal.h" -#define tu_fifo_mutex_t osal_mutex_t - // mutex is only needed for RTOS // for OS None, we don't get preempted #define CFG_FIFO_MUTEX OSAL_MUTEX_REQUIRED +/* Write/Read index is always in the range of: + * 0 .. 2*depth-1 + * The extra window allow us to determine the fifo state of empty or full with only 2 indices + * Following are examples with depth = 3 + * + * - empty: W = R + * | + * ------------------------- + * | 0 | RW| 2 | 3 | 4 | 5 | + * + * - full 1: W > R + * | + * ------------------------- + * | 0 | R | 2 | 3 | W | 5 | + * + * - full 2: W < R + * | + * ------------------------- + * | 0 | 1 | W | 3 | 4 | R | + * + * - Number of items in the fifo can be determined in either cases: + * - case W >= R: Count = W - R + * - case W < R: Count = 2*depth - (R - W) + * + * In non-overwritable mode, computed Count (in above 2 cases) is at most equal to depth. + * However, in over-writable mode, write index can be repeatedly increased and count can be + * temporarily larger than depth (overflowed condition) e.g + * + * - Overflowed 1: write(3), write(1) + * In this case we will adjust Read index when read()/peek() is called so that count = depth. + * | + * ------------------------- + * | R | 1 | 2 | 3 | W | 5 | + * + * - Double Overflowed i.e index is out of allowed range [0,2*depth) + * This occurs when we continue to write after 1st overflowed to 2nd overflowed. e.g: + * write(3), write(1), write(2) + * This must be prevented since it will cause unrecoverable state, in above example + * if not handled the fifo will be empty instead of continue-to-be full. Since we must not modify + * read index in write() function, which cause race condition. We will re-position write index so that + * after data is written it is a full fifo i.e W = depth - R + * + * re-position W = 1 before write(2) + * Note: we should also move data from mem[3] to read index as well, but deliberately skipped here + * since it is an expensive operation !!! + * | + * ------------------------- + * | R | W | 2 | 3 | 4 | 5 | + * + * perform write(2), result is still a full fifo. + * + * | + * ------------------------- + * | R | 1 | 2 | W | 4 | 5 | + + */ typedef struct { - uint8_t* buffer ; ///< buffer pointer - uint16_t depth ; ///< max items - uint16_t item_size ; ///< size of each item - bool overwritable ; + uint8_t* buffer ; // buffer pointer + uint16_t depth ; // max items - uint16_t non_used_index_space ; ///< required for non-power-of-two buffer length - uint16_t max_pointer_idx ; ///< maximum absolute pointer index + struct TU_ATTR_PACKED { + uint16_t item_size : 15; // size of each item + bool overwritable : 1 ; // ovwerwritable when full + }; - volatile uint16_t wr_idx ; ///< write pointer - volatile uint16_t rd_idx ; ///< read pointer + volatile uint16_t wr_idx ; // write index + volatile uint16_t rd_idx ; // read index #if OSAL_MUTEX_REQUIRED - tu_fifo_mutex_t mutex_wr; - tu_fifo_mutex_t mutex_rd; + osal_mutex_t mutex_wr; + osal_mutex_t mutex_rd; #endif } tu_fifo_t; @@ -84,8 +138,6 @@ typedef struct .depth = _depth, \ .item_size = sizeof(_type), \ .overwritable = _overwritable, \ - .non_used_index_space = UINT16_MAX - (2*(_depth)-1), \ - .max_pointer_idx = 2*(_depth)-1, \ } #define TU_FIFO_DEF(_name, _depth, _type, _overwritable) \ @@ -99,10 +151,10 @@ bool tu_fifo_config(tu_fifo_t *f, void* buffer, uint16_t depth, uint16_t item_si #if OSAL_MUTEX_REQUIRED TU_ATTR_ALWAYS_INLINE static inline -void tu_fifo_config_mutex(tu_fifo_t *f, tu_fifo_mutex_t write_mutex_hdl, tu_fifo_mutex_t read_mutex_hdl) +void tu_fifo_config_mutex(tu_fifo_t *f, osal_mutex_t wr_mutex, osal_mutex_t rd_mutex) { - f->mutex_wr = write_mutex_hdl; - f->mutex_rd = read_mutex_hdl; + f->mutex_wr = wr_mutex; + f->mutex_rd = rd_mutex; } #else diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h index bb4225ad596..0b10c5118ce 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h @@ -275,6 +275,10 @@ #elif TU_CHECK_MCU(OPT_MCU_F1C100S) #define TUP_DCD_ENDPOINT_MAX 4 +//------------- WCH -------------// +#elif TU_CHECK_MCU(OPT_MCU_CH32V307) + #define TUP_DCD_ENDPOINT_MAX 16 + #define TUP_RHPORT_HIGHSPEED 1 #endif //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h index b34506f6500..d5541856cbf 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h @@ -28,6 +28,8 @@ #ifndef _TUSB_PRIVATE_H_ #define _TUSB_PRIVATE_H_ +// Internal Helper used by Host and Device Stack + #ifdef __cplusplus extern "C" { #endif @@ -39,8 +41,31 @@ typedef struct TU_ATTR_PACKED volatile uint8_t claimed : 1; }tu_edpt_state_t; +typedef struct { + bool is_host; // host or device most + union { + uint8_t daddr; + uint8_t rhport; + uint8_t hwid; + }; + uint8_t ep_addr; + uint8_t ep_speed; + + uint16_t ep_packetsize; + uint16_t ep_bufsize; + + // TODO xfer_fifo can skip this buffer + uint8_t* ep_buf; + + tu_fifo_t ff; + + // mutex: read if ep rx, write if e tx + OSAL_MUTEX_DEF(ff_mutex); + +}tu_edpt_stream_t; + //--------------------------------------------------------------------+ -// Internal Helper used by Host and Device Stack +// Endpoint //--------------------------------------------------------------------+ // Check if endpoint descriptor is valid per USB specs @@ -58,6 +83,89 @@ bool tu_edpt_claim(tu_edpt_state_t* ep_state, osal_mutex_t mutex); // Release an endpoint with provided mutex bool tu_edpt_release(tu_edpt_state_t* ep_state, osal_mutex_t mutex); +//--------------------------------------------------------------------+ +// Endpoint Stream +//--------------------------------------------------------------------+ + +// Init an stream, should only be called once +bool tu_edpt_stream_init(tu_edpt_stream_t* s, bool is_host, bool is_tx, bool overwritable, + void* ff_buf, uint16_t ff_bufsize, uint8_t* ep_buf, uint16_t ep_bufsize); + +// Open an stream for an endpoint +// hwid is either device address (host mode) or rhport (device mode) +TU_ATTR_ALWAYS_INLINE static inline +void tu_edpt_stream_open(tu_edpt_stream_t* s, uint8_t hwid, tusb_desc_endpoint_t const *desc_ep) +{ + tu_fifo_clear(&s->ff); + s->hwid = hwid; + s->ep_addr = desc_ep->bEndpointAddress; + s->ep_packetsize = tu_edpt_packet_size(desc_ep); +} + +TU_ATTR_ALWAYS_INLINE static inline +void tu_edpt_stream_close(tu_edpt_stream_t* s) +{ + s->hwid = 0; + s->ep_addr = 0; +} + +// Clear fifo +TU_ATTR_ALWAYS_INLINE static inline +bool tu_edpt_stream_clear(tu_edpt_stream_t* s) +{ + return tu_fifo_clear(&s->ff); +} + +//--------------------------------------------------------------------+ +// Stream Write +//--------------------------------------------------------------------+ + +// Write to stream +uint32_t tu_edpt_stream_write(tu_edpt_stream_t* s, void const *buffer, uint32_t bufsize); + +// Start an usb transfer if endpoint is not busy +uint32_t tu_edpt_stream_write_xfer(tu_edpt_stream_t* s); + +// Start an zero-length packet if needed +bool tu_edpt_stream_write_zlp_if_needed(tu_edpt_stream_t* s, uint32_t last_xferred_bytes); + +// Get the number of bytes available for writing +TU_ATTR_ALWAYS_INLINE static inline +uint32_t tu_edpt_stream_write_available(tu_edpt_stream_t* s) +{ + return (uint32_t) tu_fifo_remaining(&s->ff); +} + +//--------------------------------------------------------------------+ +// Stream Read +//--------------------------------------------------------------------+ + +// Read from stream +uint32_t tu_edpt_stream_read(tu_edpt_stream_t* s, void* buffer, uint32_t bufsize); + +// Start an usb transfer if endpoint is not busy +uint32_t tu_edpt_stream_read_xfer(tu_edpt_stream_t* s); + +// Must be called in the transfer complete callback +TU_ATTR_ALWAYS_INLINE static inline +void tu_edpt_stream_read_xfer_complete(tu_edpt_stream_t* s, uint32_t xferred_bytes) +{ + tu_fifo_write_n(&s->ff, s->ep_buf, (uint16_t) xferred_bytes); +} + +// Get the number of bytes available for reading +TU_ATTR_ALWAYS_INLINE static inline +uint32_t tu_edpt_stream_read_available(tu_edpt_stream_t* s) +{ + return (uint32_t) tu_fifo_count(&s->ff); +} + +TU_ATTR_ALWAYS_INLINE static inline +bool tu_edpt_stream_peek(tu_edpt_stream_t* s, uint8_t* ch) +{ + return tu_fifo_peek(&s->ff, ch); +} + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h index 1bfa7c7d12f..82798a484a7 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h @@ -69,6 +69,15 @@ typedef enum TUSB_DIR_IN_MASK = 0x80 }tusb_dir_t; +enum +{ + TUSB_EPSIZE_BULK_FS = 64, + TUSB_EPSIZE_BULK_HS= 512, + + TUSB_EPSIZE_ISO_FS_MAX = 1023, + TUSB_EPSIZE_ISO_HS_MAX = 1024, +}; + /// Isochronous End Point Attributes typedef enum { @@ -243,7 +252,6 @@ enum INTERFACE_INVALID_NUMBER = 0xff }; - typedef enum { MS_OS_20_SET_HEADER_DESCRIPTOR = 0x00, @@ -265,6 +273,11 @@ enum CONTROL_STAGE_ACK }; +enum +{ + TUSB_INDEX_INVALID = 0xff +}; + //--------------------------------------------------------------------+ // USB Descriptors //--------------------------------------------------------------------+ @@ -530,22 +543,35 @@ TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_type_str(tusb_xfer_type_ //--------------------------------------------------------------------+ // Descriptor helper //--------------------------------------------------------------------+ + +// return next descriptor TU_ATTR_ALWAYS_INLINE static inline uint8_t const * tu_desc_next(void const* desc) { uint8_t const* desc8 = (uint8_t const*) desc; return desc8 + desc8[DESC_OFFSET_LEN]; } +// get descriptor type TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_desc_type(void const* desc) { return ((uint8_t const*) desc)[DESC_OFFSET_TYPE]; } +// get descriptor length TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_desc_len(void const* desc) { return ((uint8_t const*) desc)[DESC_OFFSET_LEN]; } +// find descriptor that match byte1 (type) +uint8_t const * tu_desc_find(uint8_t const* desc, uint8_t const* end, uint8_t byte1); + +// find descriptor that match byte1 (type) and byte2 +uint8_t const * tu_desc_find2(uint8_t const* desc, uint8_t const* end, uint8_t byte1, uint8_t byte2); + +// find descriptor that match byte1 (type) and byte2 +uint8_t const * tu_desc_find3(uint8_t const* desc, uint8_t const* end, uint8_t byte1, uint8_t byte2, uint8_t byte3); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h index c156afea048..be9811641e4 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h @@ -29,11 +29,16 @@ #include "osal/osal.h" #include "common/tusb_fifo.h" +#include "common/tusb_private.h" #ifdef __cplusplus extern "C" { #endif +enum { + USBH_EPSIZE_BULK_MAX = (TUH_OPT_HIGH_SPEED ? TUSB_EPSIZE_BULK_HS : TUSB_EPSIZE_BULK_FS) +}; + //--------------------------------------------------------------------+ // Class Driver API //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal.h index 9cdab288271..afa3826fc4c 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal.h @@ -44,7 +44,7 @@ typedef void (*osal_task_func_t)( void * ); // Mutex is required when using a preempted RTOS or MCU has multiple cores #if (CFG_TUSB_OS == OPT_OS_NONE) && !TUP_MCU_MULTIPLE_CORE #define OSAL_MUTEX_REQUIRED 0 - #define OSAL_MUTEX_DEF(_name) + #define OSAL_MUTEX_DEF(_name) uint8_t :0 #else #define OSAL_MUTEX_REQUIRED 1 #define OSAL_MUTEX_DEF(_name) osal_mutex_def_t _name diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h index f8452bfb201..18eb9c69304 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h @@ -63,7 +63,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_semaphore_wait(osal_semaphore_t se } TU_ATTR_ALWAYS_INLINE static inline void osal_semaphore_reset(osal_semaphore_t const sem_hdl) { - // TODO: implement + rt_sem_control(sem_hdl, RT_IPC_CMD_RESET, 0); } //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h index b65d32fd4b1..a06407f2348 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h @@ -11,11 +11,21 @@ #include "hardware/structs/usb.h" #include "hardware/irq.h" #include "hardware/resets.h" +#include "hardware/timer.h" #if defined(PICO_RP2040_USB_DEVICE_ENUMERATION_FIX) && !defined(TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX) #define TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX PICO_RP2040_USB_DEVICE_ENUMERATION_FIX #endif +#if defined(PICO_RP2040_USB_DEVICE_UFRAME_FIX) && !defined(TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX) +#define TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX PICO_RP2040_USB_DEVICE_UFRAME_FIX +#endif + +#if TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX +#undef PICO_RP2040_USB_FAST_IRQ +#define PICO_RP2040_USB_FAST_IRQ 1 +#endif + #ifndef PICO_RP2040_USB_FAST_IRQ #define PICO_RP2040_USB_FAST_IRQ 0 #endif @@ -26,6 +36,9 @@ #define __tusb_irq_path_func(x) x #endif +#define usb_hw_set hw_set_alias(usb_hw) +#define usb_hw_clear hw_clear_alias(usb_hw) + #define pico_info(...) TU_LOG(2, __VA_ARGS__) #define pico_trace(...) TU_LOG(3, __VA_ARGS__) @@ -38,7 +51,7 @@ typedef struct hw_endpoint // Transfer direction (i.e. IN is rx for host but tx for device) // allows us to common up transfer functions bool rx; - + uint8_t ep_addr; uint8_t next_pid; @@ -51,20 +64,25 @@ typedef struct hw_endpoint // Buffer pointer in usb dpram uint8_t *hw_data_buf; + // User buffer in main memory + uint8_t *user_buf; + // Current transfer information - bool active; uint16_t remaining_len; uint16_t xferred_len; - // User buffer in main memory - uint8_t *user_buf; - // Data needed from EP descriptor uint16_t wMaxPacketSize; + // Endpoint is in use + bool active; + // Interrupt, bulk, etc uint8_t transfer_type; - + + // Transfer scheduled but not active + uint8_t pending; + #if CFG_TUH_ENABLED // Only needed for host uint8_t dev_addr; @@ -72,13 +90,25 @@ typedef struct hw_endpoint // If interrupt endpoint uint8_t interrupt_num; #endif + } hw_endpoint_t; +#if TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX +extern volatile uint32_t e15_last_sof; +#endif + void rp2040_usb_init(void); void hw_endpoint_xfer_start(struct hw_endpoint *ep, uint8_t *buffer, uint16_t total_len); bool hw_endpoint_xfer_continue(struct hw_endpoint *ep); void hw_endpoint_reset_transfer(struct hw_endpoint *ep); +void hw_endpoint_start_next_buffer(struct hw_endpoint *ep); + +TU_ATTR_ALWAYS_INLINE static inline void hw_endpoint_lock_update(__unused struct hw_endpoint * ep, __unused int delta) { + // todo add critsec as necessary to prevent issues between worker and IRQ... + // note that this is perhaps as simple as disabling IRQs because it would make + // sense to have worker and IRQ on same core, however I think using critsec is about equivalent. +} void _hw_endpoint_buffer_control_update32(struct hw_endpoint *ep, uint32_t and_mask, uint32_t or_mask); diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h index b63d1fcd0fa..cb455bd9083 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h @@ -122,13 +122,13 @@ static const dwc2_controller_t _dwc2_controller[] = TU_ATTR_ALWAYS_INLINE static inline void dwc2_dcd_int_enable(uint8_t rhport) { - NVIC_EnableIRQ(_dwc2_controller[rhport].irqnum); + NVIC_EnableIRQ((IRQn_Type)_dwc2_controller[rhport].irqnum); } TU_ATTR_ALWAYS_INLINE static inline void dwc2_dcd_int_disable (uint8_t rhport) { - NVIC_DisableIRQ(_dwc2_controller[rhport].irqnum); + NVIC_DisableIRQ((IRQn_Type)_dwc2_controller[rhport].irqnum); } TU_ATTR_ALWAYS_INLINE diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/wch/ch32v307/ch32_usbhs_reg.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/wch/ch32v307/ch32_usbhs_reg.h new file mode 100644 index 00000000000..5a2c1fbc9a2 --- /dev/null +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/portable/wch/ch32v307/ch32_usbhs_reg.h @@ -0,0 +1,345 @@ +#ifndef _USB_CH32_USBHS_REG_H +#define _USB_CH32_USBHS_REG_H + +#include + +/******************* GLOBAL ******************/ + +// USB CONTROL +#define USBHS_CONTROL_OFFSET 0x00 +#define USBHS_DMA_EN (1 << 0) +#define USBHS_ALL_CLR (1 << 1) +#define USBHS_FORCE_RST (1 << 2) +#define USBHS_INT_BUSY_EN (1 << 3) +#define USBHS_DEV_PU_EN (1 << 4) +#define USBHS_SPEED_MASK (3 << 5) +#define USBHS_FULL_SPEED (0 << 5) +#define USBHS_HIGH_SPEED (1 << 5) +#define USBHS_LOW_SPEED (2 << 5) +#define USBHS_HOST_MODE (1 << 7) + +// USB_INT_EN +#define USBHS_INT_EN_OFFSET 0x02 +#define USBHS_BUS_RST_EN (1 << 0) +#define USBHS_DETECT_EN (1 << 0) +#define USBHS_TRANSFER_EN (1 << 1) +#define USBHS_SUSPEND_EN (1 << 2) +#define USBHS_SOF_ACT_EN (1 << 3) +#define USBHS_FIFO_OV_EN (1 << 4) +#define USBHS_SETUP_ACT_EN (1 << 5) +#define USBHS_ISO_ACT_EN (1 << 6) +#define USBHS_DEV_NAK_EN (1 << 7) + +// USB DEV AD +#define USBHS_DEV_AD_OFFSET 0x03 +// USB FRAME_NO +#define USBHS_FRAME_NO_OFFSET 0x04 +// USB SUSPEND +#define USBHS_SUSPEND_OFFSET 0x06 +#define USBHS_DEV_REMOTE_WAKEUP (1 << 2) +#define USBHS_LINESTATE_MASK (2 << 4) /* Read Only */ + +// RESERVED0 + +// USB SPEED TYPE +#define USBHS_SPEED_TYPE_OFFSET 0x08 +#define USBSPEED_MASK (0x03) + +// USB_MIS_ST +#define USBHS_MIS_ST_OFFSET 0x09 +#define USBHS_SPLIT_CAN (1 << 0) +#define USBHS_ATTACH (1 << 1) +#define USBHS_SUSPEND (1 << 2) +#define USBHS_BUS_RESET (1 << 3) +#define USBHS_R_FIFO_RDY (1 << 4) +#define USBHS_SIE_FREE (1 << 5) +#define USBHS_SOF_ACT (1 << 6) +#define USBHS_SOF_PRES (1 << 7) + +// INT_FLAG +#define USBHS_INT_FLAG_OFFSET 0x0A +#define USBHS_BUS_RST_FLAG (1 << 0) +#define USBHS_DETECT_FLAG (1 << 0) +#define USBHS_TRANSFER_FLAG (1 << 1) +#define USBHS_SUSPEND_FLAG (1 << 2) +#define USBHS_HST_SOF_FLAG (1 << 3) +#define USBHS_FIFO_OV_FLAG (1 << 4) +#define USBHS_SETUP_FLAG (1 << 5) +#define USBHS_ISO_ACT_FLAG (1 << 6) + +// INT_ST +#define USBHS_INT_ST_OFFSET 0x0B +#define USBHS_DEV_UIS_IS_NAK (1 << 7) +#define USBHS_DEV_UIS_TOG_OK (1 << 6) +#define MASK_UIS_TOKEN (3 << 4) +#define MASK_UIS_ENDP (0x0F) +#define MASK_UIS_H_RES (0x0F) + +#define USBHS_TOGGLE_OK (0x40) +#define USBHS_HOST_RES (0x0f) + +//USB_RX_LEN +#define USBHS_RX_LEN_OFFSET 0x0C +/******************* DEVICE ******************/ + +//UEP_CONFIG +#define USBHS_UEP_CONFIG_OFFSET 0x10 +#define USBHS_EP0_T_EN (1 << 0) +#define USBHS_EP0_R_EN (1 << 16) + +#define USBHS_EP1_T_EN (1 << 1) +#define USBHS_EP1_R_EN (1 << 17) + +#define USBHS_EP2_T_EN (1 << 2) +#define USBHS_EP2_R_EN (1 << 18) + +#define USBHS_EP3_T_EN (1 << 3) +#define USBHS_EP3_R_EN (1 << 19) + +#define USBHS_EP4_T_EN (1 << 4) +#define USBHS_EP4_R_EN (1 << 20) + +#define USBHS_EP5_T_EN (1 << 5) +#define USBHS_EP5_R_EN (1 << 21) + +#define USBHS_EP6_T_EN (1 << 6) +#define USBHS_EP6_R_EN (1 << 22) + +#define USBHS_EP7_T_EN (1 << 7) +#define USBHS_EP7_R_EN (1 << 23) + +#define USBHS_EP8_T_EN (1 << 8) +#define USBHS_EP8_R_EN (1 << 24) + +#define USBHS_EP9_T_EN (1 << 9) +#define USBHS_EP9_R_EN (1 << 25) + +#define USBHS_EP10_T_EN (1 << 10) +#define USBHS_EP10_R_EN (1 << 26) + +#define USBHS_EP11_T_EN (1 << 11) +#define USBHS_EP11_R_EN (1 << 27) + +#define USBHS_EP12_T_EN (1 << 12) +#define USBHS_EP12_R_EN (1 << 28) + +#define USBHS_EP13_T_EN (1 << 13) +#define USBHS_EP13_R_EN (1 << 29) + +#define USBHS_EP14_T_EN (1 << 14) +#define USBHS_EP14_R_EN (1 << 30) + +#define USBHS_EP15_T_EN (1 << 15) +#define USBHS_EP15_R_EN (1 << 31) + +//UEP_TYPE +#define USBHS_UEP_TYPE_OFFSET 0x14 +#define USBHS_EP0_T_TYP (1 << 0) +#define USBHS_EP0_R_TYP (1 << 16) + +#define USBHS_EP1_T_TYP (1 << 1) +#define USBHS_EP1_R_TYP (1 << 17) + +#define USBHS_EP2_T_TYP (1 << 2) +#define USBHS_EP2_R_TYP (1 << 18) + +#define USBHS_EP3_T_TYP (1 << 3) +#define USBHS_EP3_R_TYP (1 << 19) + +#define USBHS_EP4_T_TYP (1 << 4) +#define USBHS_EP4_R_TYP (1 << 20) + +#define USBHS_EP5_T_TYP (1 << 5) +#define USBHS_EP5_R_TYP (1 << 21) + +#define USBHS_EP6_T_TYP (1 << 6) +#define USBHS_EP6_R_TYP (1 << 22) + +#define USBHS_EP7_T_TYP (1 << 7) +#define USBHS_EP7_R_TYP (1 << 23) + +#define USBHS_EP8_T_TYP (1 << 8) +#define USBHS_EP8_R_TYP (1 << 24) + +#define USBHS_EP9_T_TYP (1 << 8) +#define USBHS_EP9_R_TYP (1 << 25) + +#define USBHS_EP10_T_TYP (1 << 10) +#define USBHS_EP10_R_TYP (1 << 26) + +#define USBHS_EP11_T_TYP (1 << 11) +#define USBHS_EP11_R_TYP (1 << 27) + +#define USBHS_EP12_T_TYP (1 << 12) +#define USBHS_EP12_R_TYP (1 << 28) + +#define USBHS_EP13_T_TYP (1 << 13) +#define USBHS_EP13_R_TYP (1 << 29) + +#define USBHS_EP14_T_TYP (1 << 14) +#define USBHS_EP14_R_TYP (1 << 30) + +#define USBHS_EP15_T_TYP (1 << 15) +#define USBHS_EP15_R_TYP (1 << 31) + +/* BUF_MOD UEP1~15 */ +#define USBHS_BUF_MOD_OFFSET 0x18 +#define USBHS_EP0_BUF_MOD (1 << 0) +#define USBHS_EP0_ISO_BUF_MOD (1 << 16) + +#define USBHS_EP1_BUF_MOD (1 << 1) +#define USBHS_EP1_ISO_BUF_MOD (1 << 17) + +#define USBHS_EP2_BUF_MOD (1 << 2) +#define USBHS_EP2_ISO_BUF_MOD (1 << 18) + +#define USBHS_EP3_BUF_MOD (1 << 3) +#define USBHS_EP3_ISO_BUF_MOD (1 << 19) + +#define USBHS_EP4_BUF_MOD (1 << 4) +#define USBHS_EP4_ISO_BUF_MOD (1 << 20) + +#define USBHS_EP5_BUF_MOD (1 << 5) +#define USBHS_EP5_ISO_BUF_MOD (1 << 21) + +#define USBHS_EP6_BUF_MOD (1 << 6) +#define USBHS_EP6_ISO_BUF_MOD (1 << 22) + +#define USBHS_EP7_BUF_MOD (1 << 7) +#define USBHS_EP7_ISO_BUF_MOD (1 << 23) + +#define USBHS_EP8_BUF_MOD (1 << 8) +#define USBHS_EP8_ISO_BUF_MOD (1 << 24) + +#define USBHS_EP9_BUF_MOD (1 << 9) +#define USBHS_EP9_ISO_BUF_MOD (1 << 25) + +#define USBHS_EP10_BUF_MOD (1 << 10) +#define USBHS_EP10_ISO_BUF_MOD (1 << 26) + +#define USBHS_EP11_BUF_MOD (1 << 11) +#define USBHS_EP11_ISO_BUF_MOD (1 << 27) + +#define USBHS_EP12_BUF_MOD (1 << 12) +#define USBHS_EP12_ISO_BUF_MOD (1 << 28) + +#define USBHS_EP13_BUF_MOD (1 << 13) +#define USBHS_EP13_ISO_BUF_MOD (1 << 29) + +#define USBHS_EP14_BUF_MOD (1 << 14) +#define USBHS_EP14_ISO_BUF_MOD (1 << 30) + +#define USBHS_EP15_BUF_MOD (1 << 15) +#define USBHS_EP15_ISO_BUF_MOD (1 << 31) +//USBHS_EPn_T_EN USBHS_EPn_R_EN USBHS_EPn_BUF_MOD Description: Arrange from low to high with UEPn_DMA as the starting address +// 0 0 x The endpoint is disabled and the UEPn_*_DMA buffers are not used. +// 1 0 0 The first address of the receive (OUT) buffer is UEPn_RX_DMA +// 1 0 1 RB_UEPn_RX_TOG[0]=0, use buffer UEPn_RX_DMA RB_UEPn_RX_TOG[0]=1, use buffer UEPn_TX_DMA +// 0 1 0 The first address of the transmit (IN) buffer is UEPn_TX_DMA. +// 0 1 1 RB_UEPn_TX_TOG[0]=0, use buffer UEPn_TX_DMA RB_UEPn_TX_TOG[0]=1, use buffer UEPn_RX_DMA + +/* USB0_DMA */ +#define USBHS_UEP0_DMA_OFFSET(n) (0x1C) // endpoint 0 DMA buffer address + +/* USBX_RX_DMA */ +#define USBHS_UEPx_RX_DMA_OFFSET(n) (0x1C + 4 * (n)) // endpoint x DMA buffer address + +#define USBHS_UEPx_TX_DMA_OFFSET(n) (0x58 + 4 * (n)) // endpoint x DMA buffer address + +#define USBHS_UEPx_MAX_LEN_OFFSET(n) (0x98 + 4 * (n)) // endpoint x DMA buffer address + +#define USBHS_UEPx_T_LEN_OFFSET(n) (0xD8 + 4 * (n)) // endpoint x DMA buffer address +#define USBHS_UEPx_TX_CTRL_OFFSET(n) (0xD8 + 4 * (n) + 2) // endpoint x DMA buffer address +#define USBHS_UEPx_RX_CTRL_OFFSET(n) (0xD8 + 4 * (n) + 3) // endpoint x DMA buffer address + +// UEPn_T_LEN +#define USBHS_EP_T_LEN_MASK (0x7FF) + +//UEPn_TX_CTRL +#define USBHS_EP_T_RES_MASK (3 << 0) +#define USBHS_EP_T_RES_ACK (0 << 0) +#define USBHS_EP_T_RES_NYET (1 << 0) +#define USBHS_EP_T_RES_NAK (2 << 0) +#define USBHS_EP_T_RES_STALL (3 << 0) + +#define USBHS_EP_T_TOG_MASK (3 << 3) +#define USBHS_EP_T_TOG_0 (0 << 3) +#define USBHS_EP_T_TOG_1 (1 << 3) +#define USBHS_EP_T_TOG_2 (2 << 3) +#define USBHS_EP_T_TOG_M (3 << 3) + +#define USBHS_EP_T_AUTOTOG (1 << 5) + +//UEPn_RX_CTRL +#define USBHS_EP_R_RES_MASK (3 << 0) +#define USBHS_EP_R_RES_ACK (0 << 0) +#define USBHS_EP_R_RES_NYET (1 << 0) +#define USBHS_EP_R_RES_NAK (2 << 0) +#define USBHS_EP_R_RES_STALL (3 << 0) + +#define USBHS_EP_R_TOG_MASK (3 << 3) +#define USBHS_EP_R_TOG_0 (0 << 3) +#define USBHS_EP_R_TOG_1 (1 << 3) +#define USBHS_EP_R_TOG_2 (2 << 3) +#define USBHS_EP_R_TOG_M (3 << 3) + +#define USBHS_EP_R_AUTOTOG (1 << 5) + +#define USBHS_TOG_MATCH (1 << 6) + +/******************* HOST ******************/ +// USB HOST_CTRL +#define USBHS_SEND_BUS_RESET (1 << 0) +#define USBHS_SEND_BUS_SUSPEND (1 << 1) +#define USBHS_SEND_BUS_RESUME (1 << 2) +#define USBHS_REMOTE_WAKE (1 << 3) +#define USBHS_PHY_SUSPENDM (1 << 4) +#define USBHS_UH_SOFT_FREE (1 << 6) +#define USBHS_SEND_SOF_EN (1 << 7) + +//UH_CONFIG +#define USBHS_HOST_TX_EN (1 << 3) +#define USBHS_HOST_RX_EN (1 << 18) + +// HOST_EP_TYPE +#define USBHS_ENDP_TX_ISO (1 << 3) +#define USBHS_ENDP_RX_ISO (1 << (16 + 2)) + +// R32_UH_EP_PID +#define USBHS_HOST_MASK_TOKEN (0x0f) +#define USBHS_HOST_MASK_ENDP (0x0f << 4) + +//R8_UH_RX_CTRL +#define USBHS_EP_R_RES_MASK (3 << 0) +#define USBHS_EP_R_RES_ACK (0 << 0) +#define USBHS_EP_R_RES_NYET (1 << 0) +#define USBHS_EP_R_RES_NAK (2 << 0) +#define USBHS_EP_R_RES_STALL (3 << 0) + +#define USBHS_UH_R_RES_NO (1 << 2) +#define USBHS_UH_R_TOG_1 (1 << 3) +#define USBHS_UH_R_TOG_2 (2 << 3) +#define USBHS_UH_R_TOG_3 (3 << 3) +#define USBHS_UH_R_TOG_AUTO (1 << 5) +#define USBHS_UH_R_DATA_NO (1 << 6) +//R8_UH_TX_CTRL +#define USBHS_UH_T_RES_MASK (3 << 0) +#define USBHS_UH_T_RES_ACK (0 << 0) +#define USBHS_UH_T_RES_NYET (1 << 0) +#define USBHS_UH_T_RES_NAK (2 << 0) +#define USBHS_UH_T_RES_STALL (3 << 0) + +#define USBHS_UH_T_RES_NO (1 << 2) +#define USBHS_UH_T_TOG_1 (1 << 3) +#define USBHS_UH_T_TOG_2 (2 << 3) +#define USBHS_UH_T_TOG_3 (3 << 3) +#define USBHS_UH_T_TOG_AUTO (1 << 5) +#define USBHS_UH_T_DATA_NO (1 << 6) + +// 00: OUT, 01:SOF, 10:IN, 11:SETUP +#define PID_OUT 0 +#define PID_SOF 1 +#define PID_IN 2 +#define PID_SETUP 3 + +#endif diff --git a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/tusb_option.h b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/tusb_option.h index 9ca6c794bda..eb46ce295b9 100644 --- a/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/tusb_option.h +++ b/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/tusb_option.h @@ -27,13 +27,10 @@ #ifndef _TUSB_OPTION_H_ #define _TUSB_OPTION_H_ -// To avoid GCC compiler warnings when -pedantic option is used (strict ISO C) -typedef int make_iso_compilers_happy; - #include "common/tusb_compiler.h" #define TUSB_VERSION_MAJOR 0 -#define TUSB_VERSION_MINOR 14 +#define TUSB_VERSION_MINOR 15 #define TUSB_VERSION_REVISION 0 #define TUSB_VERSION_STRING TU_STRING(TUSB_VERSION_MAJOR) "." TU_STRING(TUSB_VERSION_MINOR) "." TU_STRING(TUSB_VERSION_REVISION) @@ -160,6 +157,9 @@ typedef int make_iso_compilers_happy; // Allwinner #define OPT_MCU_F1C100S 2100 ///< Allwinner F1C100s family +// WCH +#define OPT_MCU_CH32V307 2200 ///< WCH CH32V307 + // Helper to check if configured MCU is one of listed // Apply _TU_CHECK_MCU with || as separator to list of input #define _TU_CHECK_MCU(_m) (CFG_TUSB_MCU == _m) @@ -256,6 +256,10 @@ typedef int make_iso_compilers_happy; // For backward compatible #define TUSB_OPT_HOST_ENABLED CFG_TUH_ENABLED +// highspeed support indicator +#define TUH_OPT_HIGH_SPEED (CFG_TUH_MAX_SPEED ? (CFG_TUH_MAX_SPEED & OPT_MODE_HIGH_SPEED) : TUP_RHPORT_HIGHSPEED) + + //--------------------------------------------------------------------+ // TODO move later //--------------------------------------------------------------------+ @@ -428,6 +432,9 @@ typedef int make_iso_compilers_happy; #error Control Endpoint Max Packet Size cannot be larger than 64 #endif +// To avoid GCC compiler warnings when -pedantic option is used (strict ISO C) +typedef int make_iso_compilers_happy; + #endif /* _TUSB_OPTION_H_ */ /** @} */ diff --git a/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_common.h b/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_common.h index 1a641be10ec..13334f2a7ff 100644 --- a/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_common.h +++ b/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_common.h @@ -187,13 +187,6 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata, */ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t *partition, esp_app_desc_t *app_desc); -/** - * @brief Get chip revision - * - * @return Chip revision number - */ -uint8_t bootloader_common_get_chip_revision(void); - /** * @brief Get chip package * diff --git a/tools/sdk/esp32s2/include/bootloader_support/include/esp_app_format.h b/tools/sdk/esp32s2/include/bootloader_support/include/esp_app_format.h index ef4f7f4f48f..1f547d3bfbf 100644 --- a/tools/sdk/esp32s2/include/bootloader_support/include/esp_app_format.h +++ b/tools/sdk/esp32s2/include/bootloader_support/include/esp_app_format.h @@ -6,6 +6,7 @@ #pragma once #include +#include "esp_assert.h" /** * @brief ESP chip ID @@ -21,7 +22,7 @@ typedef enum { } __attribute__((packed)) esp_chip_id_t; /** @cond */ -_Static_assert(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); +ESP_STATIC_ASSERT(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); /** @endcond */ /** @@ -88,7 +89,7 @@ typedef struct { } __attribute__((packed)) esp_image_header_t; /** @cond */ -_Static_assert(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); +ESP_STATIC_ASSERT(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); /** @endcond */ diff --git a/tools/sdk/esp32s2/include/bootloader_support/include/esp_image_format.h b/tools/sdk/esp32s2/include/bootloader_support/include/esp_image_format.h index 1db62442537..20545f5d7f6 100644 --- a/tools/sdk/esp32s2/include/bootloader_support/include/esp_image_format.h +++ b/tools/sdk/esp32s2/include/bootloader_support/include/esp_image_format.h @@ -9,6 +9,7 @@ #include #include "esp_flash_partitions.h" #include "esp_app_format.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -53,12 +54,18 @@ typedef struct { uint32_t crc; /*!< Check sum crc32 */ } rtc_retain_mem_t; + +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, crc) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t), "CRC field must be the last field of rtc_retain_mem_t structure"); + #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC -_Static_assert(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +/* The custom field must be the penultimate field */ +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, custom) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t) - CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE, + "custom field in rtc_retain_mem_t structure must be the field before the CRC one"); #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); #endif #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC @@ -68,7 +75,7 @@ _Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_R #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); +ESP_STATIC_ASSERT(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); #endif /** diff --git a/tools/sdk/esp32s2/include/console/argtable3/argtable3.h b/tools/sdk/esp32s2/include/console/argtable3/argtable3.h index abb2009cccf..95715b1907e 100644 --- a/tools/sdk/esp32s2/include/console/argtable3/argtable3.h +++ b/tools/sdk/esp32s2/include/console/argtable3/argtable3.h @@ -1,4 +1,11 @@ +/* + * SPDX-FileCopyrightText: 1998-2001,2003-2011,2013 Stewart Heitmann + * + * SPDX-License-Identifier: BSD-3-Clause + */ /******************************************************************************* + * argtable3: Declares the main interfaces of the library + * * This file is part of the argtable3 library. * * Copyright (C) 1998-2001,2003-2011,2013 Stewart Heitmann @@ -31,274 +38,240 @@ #ifndef ARGTABLE3 #define ARGTABLE3 -#include /* FILE */ -#include /* struct tm */ +#include /* FILE */ +#include /* struct tm */ #ifdef __cplusplus extern "C" { #endif #define ARG_REX_ICASE 1 +#define ARG_DSTR_SIZE 200 +#define ARG_CMD_NAME_LEN 100 +#define ARG_CMD_DESCRIPTION_LEN 256 + +#ifndef ARG_REPLACE_GETOPT +#define ARG_REPLACE_GETOPT 0 /* ESP-IDF-specific: use newlib-provided getopt instead of the embedded one */ +#endif /* ARG_REPLACE_GETOPT */ /* bit masks for arg_hdr.flag */ -enum -{ - ARG_TERMINATOR=0x1, - ARG_HASVALUE=0x2, - ARG_HASOPTVALUE=0x4 -}; +enum { ARG_TERMINATOR = 0x1, ARG_HASVALUE = 0x2, ARG_HASOPTVALUE = 0x4 }; + +#if defined(_WIN32) + #if defined(argtable3_EXPORTS) + #define ARG_EXTERN __declspec(dllexport) + #elif defined(argtable3_IMPORTS) + #define ARG_EXTERN __declspec(dllimport) + #else + #define ARG_EXTERN + #endif +#else + #define ARG_EXTERN +#endif -typedef void (arg_resetfn)(void *parent); -typedef int (arg_scanfn)(void *parent, const char *argval); -typedef int (arg_checkfn)(void *parent); -typedef void (arg_errorfn)(void *parent, FILE *fp, int error, const char *argval, const char *progname); +typedef struct _internal_arg_dstr* arg_dstr_t; +typedef void* arg_cmd_itr_t; +typedef void(arg_resetfn)(void* parent); +typedef int(arg_scanfn)(void* parent, const char* argval); +typedef int(arg_checkfn)(void* parent); +typedef void(arg_errorfn)(void* parent, arg_dstr_t ds, int error, const char* argval, const char* progname); +typedef void(arg_dstr_freefn)(char* buf); +typedef int(arg_cmdfn)(int argc, char* argv[], arg_dstr_t res); +typedef int(arg_comparefn)(const void* k1, const void* k2); /* -* The arg_hdr struct defines properties that are common to all arg_xxx structs. -* The argtable library requires each arg_xxx struct to have an arg_hdr -* struct as its first data member. -* The argtable library functions then use this data to identify the -* properties of the command line option, such as its option tags, -* datatype string, and glossary strings, and so on. -* Moreover, the arg_hdr struct contains pointers to custom functions that -* are provided by each arg_xxx struct which perform the tasks of parsing -* that particular arg_xxx arguments, performing post-parse checks, and -* reporting errors. -* These functions are private to the individual arg_xxx source code -* and are the pointer to them are initiliased by that arg_xxx struct's -* constructor function. The user could alter them after construction -* if desired, but the original intention is for them to be set by the -* constructor and left unaltered. -*/ -struct arg_hdr -{ - char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ - const char *shortopts; /* String defining the short options */ - const char *longopts; /* String defiing the long options */ - const char *datatype; /* Description of the argument data type */ - const char *glossary; /* Description of the option as shown by arg_print_glossary function */ - int mincount; /* Minimum number of occurences of this option accepted */ - int maxcount; /* Maximum number of occurences if this option accepted */ - void *parent; /* Pointer to parent arg_xxx struct */ - arg_resetfn *resetfn; /* Pointer to parent arg_xxx reset function */ - arg_scanfn *scanfn; /* Pointer to parent arg_xxx scan function */ - arg_checkfn *checkfn; /* Pointer to parent arg_xxx check function */ - arg_errorfn *errorfn; /* Pointer to parent arg_xxx error function */ - void *priv; /* Pointer to private header data for use by arg_xxx functions */ -}; - -struct arg_rem -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ -}; - -struct arg_lit -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ -}; - -struct arg_int -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - int *ival; /* Array of parsed argument values */ -}; - -struct arg_dbl -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - double *dval; /* Array of parsed argument values */ -}; - -struct arg_str -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_rex -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_file -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args*/ - const char **filename; /* Array of parsed filenames (eg: /home/foo.bar) */ - const char **basename; /* Array of parsed basenames (eg: foo.bar) */ - const char **extension; /* Array of parsed extensions (eg: .bar) */ -}; - -struct arg_date -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - const char *format; /* strptime format string used to parse the date */ - int count; /* Number of matching command line args */ - struct tm *tmval; /* Array of parsed time values */ -}; - -enum {ARG_ELIMIT=1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG}; -struct arg_end -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of errors encountered */ - int *error; /* Array of error codes */ - void **parent; /* Array of pointers to offending arg_xxx struct */ - const char **argval; /* Array of pointers to offending argv[] string */ -}; - + * The arg_hdr struct defines properties that are common to all arg_xxx structs. + * The argtable library requires each arg_xxx struct to have an arg_hdr + * struct as its first data member. + * The argtable library functions then use this data to identify the + * properties of the command line option, such as its option tags, + * datatype string, and glossary strings, and so on. + * Moreover, the arg_hdr struct contains pointers to custom functions that + * are provided by each arg_xxx struct which perform the tasks of parsing + * that particular arg_xxx arguments, performing post-parse checks, and + * reporting errors. + * These functions are private to the individual arg_xxx source code + * and are the pointer to them are initiliased by that arg_xxx struct's + * constructor function. The user could alter them after construction + * if desired, but the original intention is for them to be set by the + * constructor and left unaltered. + */ +typedef struct arg_hdr { + char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ + const char* shortopts; /* String defining the short options */ + const char* longopts; /* String defiing the long options */ + const char* datatype; /* Description of the argument data type */ + const char* glossary; /* Description of the option as shown by arg_print_glossary function */ + int mincount; /* Minimum number of occurences of this option accepted */ + int maxcount; /* Maximum number of occurences if this option accepted */ + void* parent; /* Pointer to parent arg_xxx struct */ + arg_resetfn* resetfn; /* Pointer to parent arg_xxx reset function */ + arg_scanfn* scanfn; /* Pointer to parent arg_xxx scan function */ + arg_checkfn* checkfn; /* Pointer to parent arg_xxx check function */ + arg_errorfn* errorfn; /* Pointer to parent arg_xxx error function */ + void* priv; /* Pointer to private header data for use by arg_xxx functions */ +} arg_hdr_t; + +typedef struct arg_rem { + struct arg_hdr hdr; /* The mandatory argtable header struct */ +} arg_rem_t; + +typedef struct arg_lit { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ +} arg_lit_t; + +typedef struct arg_int { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + int* ival; /* Array of parsed argument values */ +} arg_int_t; + +typedef struct arg_dbl { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + double* dval; /* Array of parsed argument values */ +} arg_dbl_t; + +typedef struct arg_str { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_str_t; + +typedef struct arg_rex { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_rex_t; + +typedef struct arg_file { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args*/ + const char** filename; /* Array of parsed filenames (eg: /home/foo.bar) */ + const char** basename; /* Array of parsed basenames (eg: foo.bar) */ + const char** extension; /* Array of parsed extensions (eg: .bar) */ +} arg_file_t; + +typedef struct arg_date { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + const char* format; /* strptime format string used to parse the date */ + int count; /* Number of matching command line args */ + struct tm* tmval; /* Array of parsed time values */ +} arg_date_t; + +enum { ARG_ELIMIT = 1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG }; +typedef struct arg_end { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of errors encountered */ + int* error; /* Array of error codes */ + void** parent; /* Array of pointers to offending arg_xxx struct */ + const char** argval; /* Array of pointers to offending argv[] string */ +} arg_end_t; + +typedef struct arg_cmd_info { + char name[ARG_CMD_NAME_LEN]; + char description[ARG_CMD_DESCRIPTION_LEN]; + arg_cmdfn* proc; +} arg_cmd_info_t; /**** arg_xxx constructor functions *********************************/ -struct arg_rem* arg_rem(const char* datatype, const char* glossary); - -struct arg_lit* arg_lit0(const char* shortopts, - const char* longopts, - const char* glossary); -struct arg_lit* arg_lit1(const char* shortopts, - const char* longopts, - const char *glossary); -struct arg_lit* arg_litn(const char* shortopts, - const char* longopts, - int mincount, - int maxcount, - const char *glossary); - -struct arg_key* arg_key0(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_key1(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_keyn(const char* keyword, - int flags, - int mincount, - int maxcount, - const char* glossary); - -struct arg_int* arg_int0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_int* arg_int1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_int* arg_intn(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_dbl* arg_dbl0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_dbl* arg_dbl1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_dbl* arg_dbln(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_str* arg_str0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_str* arg_str1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_str* arg_strn(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_rex* arg_rex0(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char* glossary); -struct arg_rex* arg_rex1(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char *glossary); -struct arg_rex* arg_rexn(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int mincount, - int maxcount, - int flags, - const char *glossary); - -struct arg_file* arg_file0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_file* arg_file1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_file* arg_filen(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_date* arg_date0(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char* glossary); -struct arg_date* arg_date1(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char *glossary); -struct arg_date* arg_daten(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_end* arg_end(int maxerrors); +ARG_EXTERN struct arg_rem* arg_rem(const char* datatype, const char* glossary); + +ARG_EXTERN struct arg_lit* arg_lit0(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_lit1(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_litn(const char* shortopts, const char* longopts, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_int* arg_int0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_int1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_intn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_dbl* arg_dbl0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbl1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbln(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_str* arg_str0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_str1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_strn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_rex* arg_rex0(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rex1(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rexn(const char* shortopts, + const char* longopts, + const char* pattern, + const char* datatype, + int mincount, + int maxcount, + int flags, + const char* glossary); + +ARG_EXTERN struct arg_file* arg_file0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_file1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_filen(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_date* arg_date0(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_date1(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_daten(const char* shortopts, const char* longopts, const char* format, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_end* arg_end(int maxcount); +#define ARG_DSTR_STATIC ((arg_dstr_freefn*)0) +#define ARG_DSTR_VOLATILE ((arg_dstr_freefn*)1) +#define ARG_DSTR_DYNAMIC ((arg_dstr_freefn*)3) /**** other functions *******************************************/ -int arg_nullcheck(void **argtable); -int arg_parse(int argc, char **argv, void **argtable); -void arg_print_option(FILE *fp, const char *shortopts, const char *longopts, const char *datatype, const char *suffix); -void arg_print_syntax(FILE *fp, void **argtable, const char *suffix); -void arg_print_syntaxv(FILE *fp, void **argtable, const char *suffix); -void arg_print_glossary(FILE *fp, void **argtable, const char *format); -void arg_print_glossary_gnu(FILE *fp, void **argtable); -void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); -void arg_freetable(void **argtable, size_t n); -void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN int arg_nullcheck(void** argtable); +ARG_EXTERN int arg_parse(int argc, char** argv, void** argtable); +ARG_EXTERN void arg_print_option(FILE* fp, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary(FILE* fp, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu(FILE* fp, void** argtable); +ARG_EXTERN void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_print_option_ds(arg_dstr_t ds, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary_ds(arg_dstr_t ds, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu_ds(arg_dstr_t ds, void** argtable); +ARG_EXTERN void arg_print_errors_ds(arg_dstr_t ds, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_freetable(void** argtable, size_t n); + +ARG_EXTERN arg_dstr_t arg_dstr_create(void); +ARG_EXTERN void arg_dstr_destroy(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_reset(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_free(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_set(arg_dstr_t ds, char* str, arg_dstr_freefn* free_proc); +ARG_EXTERN void arg_dstr_cat(arg_dstr_t ds, const char* str); +ARG_EXTERN void arg_dstr_catc(arg_dstr_t ds, char c); +ARG_EXTERN void arg_dstr_catf(arg_dstr_t ds, const char* fmt, ...); +ARG_EXTERN char* arg_dstr_cstr(arg_dstr_t ds); + +ARG_EXTERN void arg_cmd_init(void); +ARG_EXTERN void arg_cmd_uninit(void); +ARG_EXTERN void arg_cmd_register(const char* name, arg_cmdfn* proc, const char* description); +ARG_EXTERN void arg_cmd_unregister(const char* name); +ARG_EXTERN int arg_cmd_dispatch(const char* name, int argc, char* argv[], arg_dstr_t res); +ARG_EXTERN unsigned int arg_cmd_count(void); +ARG_EXTERN arg_cmd_info_t* arg_cmd_info(const char* name); +ARG_EXTERN arg_cmd_itr_t arg_cmd_itr_create(void); +ARG_EXTERN void arg_cmd_itr_destroy(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_advance(arg_cmd_itr_t itr); +ARG_EXTERN char* arg_cmd_itr_key(arg_cmd_itr_t itr); +ARG_EXTERN arg_cmd_info_t* arg_cmd_itr_value(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_search(arg_cmd_itr_t itr, void* k); +ARG_EXTERN void arg_mgsort(void* data, int size, int esize, int i, int k, arg_comparefn* comparefn); +ARG_EXTERN void arg_make_get_help_msg(arg_dstr_t res); +ARG_EXTERN void arg_make_help_msg(arg_dstr_t ds, char* cmd_name, void** argtable); +ARG_EXTERN void arg_make_syntax_err_msg(arg_dstr_t ds, void** argtable, struct arg_end* end); +ARG_EXTERN int arg_make_syntax_err_help_msg(arg_dstr_t ds, char* name, int help, int nerrors, void** argtable, struct arg_end* end, int* exitcode); +ARG_EXTERN void arg_set_module_name(const char* name); +ARG_EXTERN void arg_set_module_version(int major, int minor, int patch, const char* tag); /**** deprecated functions, for back-compatibility only ********/ -void arg_free(void **argtable); +ARG_EXTERN void arg_free(void** argtable); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/console/argtable3/argtable3_private.h b/tools/sdk/esp32s2/include/console/argtable3/argtable3_private.h new file mode 100644 index 00000000000..5589fc7ffad --- /dev/null +++ b/tools/sdk/esp32s2/include/console/argtable3/argtable3_private.h @@ -0,0 +1,245 @@ +/* + * SPDX-FileCopyrightText: 2013-2019 Tom G. Huang + * + * SPDX-License-Identifier: BSD-3-Clause + */ +/******************************************************************************* + * argtable3_private: Declares private types, constants, and interfaces + * + * This file is part of the argtable3 library. + * + * Copyright (C) 2013-2019 Tom G. Huang + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of STEWART HEITMANN nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +#ifndef ARG_UTILS_H +#define ARG_UTILS_H + +#include + +#define ARG_ENABLE_TRACE 0 +#define ARG_ENABLE_LOG 0 + +#ifdef __cplusplus +extern "C" { +#endif + +enum { ARG_ERR_MINCOUNT = 1, ARG_ERR_MAXCOUNT, ARG_ERR_BADINT, ARG_ERR_OVERFLOW, ARG_ERR_BADDOUBLE, ARG_ERR_BADDATE, ARG_ERR_REGNOMATCH }; + +typedef void(arg_panicfn)(const char* fmt, ...); + +#if defined(_MSC_VER) +#define ARG_TRACE(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) + +#define ARG_LOG(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) +#else +#define ARG_TRACE(x) \ + do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } while (0) + +#define ARG_LOG(x) \ + do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } while (0) +#endif + +/* + * Rename a few generic names to unique names. + * They can be a problem for the platforms like NuttX, where + * the namespace is flat for everything including apps and libraries. + */ +#define xmalloc argtable3_xmalloc +#define xcalloc argtable3_xcalloc +#define xrealloc argtable3_xrealloc +#define xfree argtable3_xfree + +extern void dbg_printf(const char* fmt, ...); +extern void arg_set_panic(arg_panicfn* proc); +extern void* xmalloc(size_t size); +extern void* xcalloc(size_t count, size_t size); +extern void* xrealloc(void* ptr, size_t size); +extern void xfree(void* ptr); + +struct arg_hashtable_entry { + void *k, *v; + unsigned int h; + struct arg_hashtable_entry* next; +}; + +typedef struct arg_hashtable { + unsigned int tablelength; + struct arg_hashtable_entry** table; + unsigned int entrycount; + unsigned int loadlimit; + unsigned int primeindex; + unsigned int (*hashfn)(const void* k); + int (*eqfn)(const void* k1, const void* k2); +} arg_hashtable_t; + +/** + * @brief Create a hash table. + * + * @param minsize minimum initial size of hash table + * @param hashfn function for hashing keys + * @param eqfn function for determining key equality + * @return newly created hash table or NULL on failure + */ +arg_hashtable_t* arg_hashtable_create(unsigned int minsize, unsigned int (*hashfn)(const void*), int (*eqfn)(const void*, const void*)); + +/** + * @brief This function will cause the table to expand if the insertion would take + * the ratio of entries to table size over the maximum load factor. + * + * This function does not check for repeated insertions with a duplicate key. + * The value returned when using a duplicate key is undefined -- when + * the hash table changes size, the order of retrieval of duplicate key + * entries is reversed. + * If in doubt, remove before insert. + * + * @param h the hash table to insert into + * @param k the key - hash table claims ownership and will free on removal + * @param v the value - does not claim ownership + * @return non-zero for successful insertion + */ +void arg_hashtable_insert(arg_hashtable_t* h, void* k, void* v); + +#define ARG_DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \ + int fnname(arg_hashtable_t* h, keytype* k, valuetype* v) { return arg_hashtable_insert(h, k, v); } + +/** + * @brief Search the specified key in the hash table. + * + * @param h the hash table to search + * @param k the key to search for - does not claim ownership + * @return the value associated with the key, or NULL if none found + */ +void* arg_hashtable_search(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \ + valuetype* fnname(arg_hashtable_t* h, keytype* k) { return (valuetype*)(arg_hashtable_search(h, k)); } + +/** + * @brief Remove the specified key from the hash table. + * + * @param h the hash table to remove the item from + * @param k the key to search for - does not claim ownership + */ +void arg_hashtable_remove(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \ + void fnname(arg_hashtable_t* h, keytype* k) { arg_hashtable_remove(h, k); } + +/** + * @brief Return the number of keys in the hash table. + * + * @param h the hash table + * @return the number of items stored in the hash table + */ +unsigned int arg_hashtable_count(arg_hashtable_t* h); + +/** + * @brief Change the value associated with the key. + * + * function to change the value associated with a key, where there already + * exists a value bound to the key in the hash table. + * Source due to Holger Schemel. + * + * @name hashtable_change + * @param h the hash table + * @param key + * @param value + */ +int arg_hashtable_change(arg_hashtable_t* h, void* k, void* v); + +/** + * @brief Free the hash table and the memory allocated for each key-value pair. + * + * @param h the hash table + * @param free_values whether to call 'free' on the remaining values + */ +void arg_hashtable_destroy(arg_hashtable_t* h, int free_values); + +typedef struct arg_hashtable_itr { + arg_hashtable_t* h; + struct arg_hashtable_entry* e; + struct arg_hashtable_entry* parent; + unsigned int index; +} arg_hashtable_itr_t; + +arg_hashtable_itr_t* arg_hashtable_itr_create(arg_hashtable_t* h); + +void arg_hashtable_itr_destroy(arg_hashtable_itr_t* itr); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_key(arg_hashtable_itr_t* i); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_value(arg_hashtable_itr_t* i); + +/** + * @brief Advance the iterator to the next element. Returns zero if advanced to end of table. + */ +int arg_hashtable_itr_advance(arg_hashtable_itr_t* itr); + +/** + * @brief Remove current element and advance the iterator to the next element. + */ +int arg_hashtable_itr_remove(arg_hashtable_itr_t* itr); + +/** + * @brief Search and overwrite the supplied iterator, to point to the entry matching the supplied key. + * + * @return Zero if not found. + */ +int arg_hashtable_itr_search(arg_hashtable_itr_t* itr, arg_hashtable_t* h, void* k); + +#define ARG_DEFINE_HASHTABLE_ITERATOR_SEARCH(fnname, keytype) \ + int fnname(arg_hashtable_itr_t* i, arg_hashtable_t* h, keytype* k) { return (arg_hashtable_iterator_search(i, h, k)); } + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/touch_sensor.h b/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/touch_sensor.h index 7b2fd50b620..327018b04d3 100644 --- a/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/touch_sensor.h +++ b/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/touch_sensor.h @@ -67,7 +67,7 @@ esp_err_t touch_pad_set_meas_time(uint16_t sleep_cycle, uint16_t meas_times); esp_err_t touch_pad_get_meas_time(uint16_t *sleep_cycle, uint16_t *meas_times); /** - * @brief Set connection type of touch channel in idle status. + * @brief Set the connection type of touch channels in idle status. * When a channel is in measurement mode, other initialized channels are in idle mode. * The touch channel is generally adjacent to the trace, so the connection state of the idle channel * affects the stability and sensitivity of the test channel. @@ -80,7 +80,7 @@ esp_err_t touch_pad_get_meas_time(uint16_t *sleep_cycle, uint16_t *meas_times); esp_err_t touch_pad_set_idle_channel_connect(touch_pad_conn_type_t type); /** - * @brief Set connection type of touch channel in idle status. + * @brief Get the connection type of touch channels in idle status. * When a channel is in measurement mode, other initialized channels are in idle mode. * The touch channel is generally adjacent to the trace, so the connection state of the idle channel * affects the stability and sensitivity of the test channel. diff --git a/tools/sdk/esp32s2/include/driver/include/driver/gpio.h b/tools/sdk/esp32s2/include/driver/include/driver/gpio.h index b904def347b..90723c2100a 100644 --- a/tools/sdk/esp32s2/include/driver/include/driver/gpio.h +++ b/tools/sdk/esp32s2/include/driver/include/driver/gpio.h @@ -50,7 +50,9 @@ extern "C" { #define GPIO_IS_VALID_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_GPIO_MASK) != 0) /// Check whether it can be a valid GPIO number of output mode #define GPIO_IS_VALID_OUTPUT_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_OUTPUT_GPIO_MASK) != 0) - +/// Check whether it can be a valid digital I/O pad +#define GPIO_IS_VALID_DIGITAL_IO_PAD(gpio_num) ((gpio_num >= 0) && \ + (((1ULL << (gpio_num)) & SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK) != 0)) typedef intr_handle_t gpio_isr_handle_t; @@ -447,7 +449,6 @@ esp_err_t gpio_force_hold_all(void); esp_err_t gpio_force_unhold_all(void); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable SLP_SEL to change GPIO status automantically in lightsleep. * @param gpio_num GPIO number of the pad. @@ -494,7 +495,6 @@ esp_err_t gpio_sleep_set_direction(gpio_num_t gpio_num, gpio_mode_t mode); * - ESP_ERR_INVALID_ARG : Parameter error */ esp_err_t gpio_sleep_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull); -#endif #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32s2/include/driver/include/driver/ledc.h b/tools/sdk/esp32s2/include/driver/include/driver/ledc.h index d9b8df8edaf..599622a2c24 100644 --- a/tools/sdk/esp32s2/include/driver/include/driver/ledc.h +++ b/tools/sdk/esp32s2/include/driver/include/driver/ledc.h @@ -78,8 +78,9 @@ typedef struct { * @brief Type of LEDC event callback * @param param LEDC callback parameter * @param user_arg User registered data + * @return Whether a high priority task has been waken up by this function */ -typedef bool (* ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); +typedef bool (*ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); /** * @brief Group of supported LEDC callbacks @@ -99,7 +100,7 @@ typedef struct { * - ESP_OK Success * - ESP_ERR_INVALID_ARG Parameter error */ -esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); +esp_err_t ledc_channel_config(const ledc_channel_config_t *ledc_conf); /** * @brief LEDC timer configuration @@ -112,7 +113,7 @@ esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); * - ESP_ERR_INVALID_ARG Parameter error * - ESP_FAIL Can not find a proper pre-divider number base on the given frequency and the current duty_resolution. */ -esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf); +esp_err_t ledc_timer_config(const ledc_timer_config_t *timer_conf); /** * @brief LEDC update channel parameters @@ -285,7 +286,7 @@ esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t * - ESP_OK Success * - ESP_ERR_INVALID_ARG Function pointer error. */ -esp_err_t ledc_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, ledc_isr_handle_t *handle); +esp_err_t ledc_isr_register(void (*fn)(void *), void *arg, int intr_alloc_flags, ledc_isr_handle_t *handle); /** * @brief Configure LEDC settings @@ -496,6 +497,7 @@ esp_err_t ledc_set_fade_step_and_start(ledc_mode_t speed_mode, ledc_channel_t ch * - ESP_FAIL Fade function init error */ esp_err_t ledc_cb_register(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_cbs_t *cbs, void *user_arg); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s2/include/driver/include/driver/mcpwm.h b/tools/sdk/esp32s2/include/driver/include/driver/mcpwm.h index fed2c3f326d..c80bca21d23 100644 --- a/tools/sdk/esp32s2/include/driver/include/driver/mcpwm.h +++ b/tools/sdk/esp32s2/include/driver/include/driver/mcpwm.h @@ -7,6 +7,7 @@ #pragma once #include "soc/soc_caps.h" +#include "esp_assert.h" #if SOC_MCPWM_SUPPORTED #include "esp_err.h" #include "soc/soc.h" @@ -74,7 +75,7 @@ typedef enum { MCPWM_UNIT_MAX, /*! #include "soc/gdma_channel.h" +#include "hal/gdma_types.h" #include "esp_err.h" #ifdef __cplusplus @@ -23,34 +24,6 @@ extern "C" { */ typedef struct gdma_channel_t *gdma_channel_handle_t; -/** - * @brief Enumeration of peripherals which have the DMA capability - * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. - * - */ -typedef enum { - GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ - GDMA_TRIG_PERIPH_UART, /*!< GDMA trigger peripheral: UART */ - GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ - GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ - GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ - GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ - GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ - GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ - GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ - GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ - GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ -} gdma_trigger_peripheral_t; - -/** - * @brief Enumeration of GDMA channel direction - * - */ -typedef enum { - GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ - GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ -} gdma_channel_direction_t; - /** * @brief Collection of configuration items that used for allocating GDMA channel * @@ -124,13 +97,13 @@ typedef struct { */ typedef struct { gdma_trigger_peripheral_t periph; /*!< Target peripheral which will trigger DMA operations */ - int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UART0 */ + int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UHCI0 */ } gdma_trigger_t; /** * @brief Helper macro to initialize GDMA trigger * @note value of `peri` must be selected from `gdma_trigger_peripheral_t` enum. - * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UART,0) + * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_I2S,0) * */ #define GDMA_MAKE_TRIGGER(peri, id) \ @@ -325,6 +298,22 @@ esp_err_t gdma_append(gdma_channel_handle_t dma_chan); */ esp_err_t gdma_reset(gdma_channel_handle_t dma_chan); +/** + * @brief Get the mask of free M2M trigger IDs + * + * @note On some ESP targets (e.g. ESP32C3/S3), DMA trigger used for memory copy can be any of valid peripheral's trigger ID, + * which can bring conflict if the peripheral is also using the same trigger ID. This function can return the free IDs + * for memory copy, at the runtime. + * + * @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel` + * @param[out] mask Returned mask of free M2M trigger IDs + * @return + * - ESP_OK: Get free M2M trigger IDs successfully + * - ESP_ERR_INVALID_ARG: Get free M2M trigger IDs failed because of invalid argument + * - ESP_FAIL: Get free M2M trigger IDs failed because of other error + */ +esp_err_t gdma_get_free_m2m_trig_id_mask(gdma_channel_handle_t dma_chan, uint32_t *mask); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s2/include/driver/include/esp_private/gpio.h b/tools/sdk/esp32s2/include/driver/include/esp_private/gpio.h index c4227dc8c4f..65211a5e4e8 100644 --- a/tools/sdk/esp32s2/include/driver/include/esp_private/gpio.h +++ b/tools/sdk/esp32s2/include/driver/include/esp_private/gpio.h @@ -12,7 +12,6 @@ #include "soc/soc_caps.h" #include "driver/gpio.h" -#if SOC_GPIO_SUPPORT_SLP_SWITCH #if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Emulate ESP32S2 behaviour to backup FUN_PU, FUN_PD information @@ -34,4 +33,3 @@ esp_err_t gpio_sleep_pupd_config_apply(gpio_num_t gpio_num); */ esp_err_t gpio_sleep_pupd_config_unapply(gpio_num_t gpio_num); #endif -#endif diff --git a/tools/sdk/esp32s2/include/efuse/esp32s2/include/esp_efuse_table.h b/tools/sdk/esp32s2/include/efuse/esp32s2/include/esp_efuse_table.h index f2a1d9ce3fb..fdab261ce60 100644 --- a/tools/sdk/esp32s2/include/efuse/esp32s2/include/esp_efuse_table.h +++ b/tools/sdk/esp32s2/include/efuse/esp32s2/include/esp_efuse_table.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ extern "C" { #endif -// md5_digest_table 614c862c2cfa8ccda3a79183ce767255 +// md5_digest_table 3ac9188bf7eb0a27f3f636085a260743 // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. @@ -95,6 +95,8 @@ extern const esp_efuse_desc_t* ESP_EFUSE_PIN_POWER_SELECTION[]; extern const esp_efuse_desc_t* ESP_EFUSE_FLASH_TYPE[]; extern const esp_efuse_desc_t* ESP_EFUSE_FORCE_SEND_RESUME[]; extern const esp_efuse_desc_t* ESP_EFUSE_SECURE_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_WAFER_VERSION_MAJOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_BLK_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_CLK[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_Q_D1[]; @@ -107,13 +109,14 @@ extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D4[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D5[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D6[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D7[]; -extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MAJOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MINOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_FLASH_VERSION[]; -extern const esp_efuse_desc_t* ESP_EFUSE_BLOCK1_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_PSRAM_VERSION[]; extern const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[]; extern const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[]; -extern const esp_efuse_desc_t* ESP_EFUSE_BLOCK2_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MINOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA[]; extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA_MAC_CUSTOM[]; extern const esp_efuse_desc_t* ESP_EFUSE_KEY0[]; diff --git a/tools/sdk/esp32s2/include/efuse/include/esp_efuse.h b/tools/sdk/esp32s2/include/efuse/include/esp_efuse.h index 435b5e100fb..f2c08bad30e 100644 --- a/tools/sdk/esp32s2/include/efuse/include/esp_efuse.h +++ b/tools/sdk/esp32s2/include/efuse/include/esp_efuse.h @@ -276,13 +276,6 @@ esp_err_t esp_efuse_read_block(esp_efuse_block_t blk, void* dst_key, size_t offs */ esp_err_t esp_efuse_write_block(esp_efuse_block_t blk, const void* src_key, size_t offset_in_bits, size_t size_bits); -/** - * @brief Returns chip version from efuse - * - * @return chip version - */ -uint8_t esp_efuse_get_chip_ver(void); - /** * @brief Returns chip package from efuse * diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/customized_word_wn5.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/customized_word_wn5.h deleted file mode 100644 index e0d59666a3d..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/customized_word_wn5.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_customized_word_wn5; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib.h deleted file mode 100644 index d7b6d8fbe77..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib.h +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_H -#define DL_LIB_H - -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -#ifdef ESP_PLATFORM -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/queue.h" -#include "esp_system.h" -#include "esp_heap_caps.h" -#include "sdkconfig.h" -#define DL_SPIRAM_SUPPORT 1 -#endif - -#ifdef CONFIG_IDF_TARGET_ESP32S3 -#include "esp32s3/rom/cache.h" -#endif - -typedef int padding_state; - -// /** -// * @brief Allocate a chunk of memory which has the given capabilities. -// * Equivalent semantics to libc malloc(), for capability-aware memory. -// * In IDF, malloc(p) is equivalent to heap_caps_malloc(p, MALLOC_CAP_8BIT). -// * -// * @param size In bytes, of the amount of memory to allocate -// * @param caps Bitwise OR of MALLOC_CAP_* flags indicating the type of memory to be returned -// * MALLOC_CAP_SPIRAM: Memory must be in SPI RAM -// * MALLOC_CAP_INTERNAL: Memory must be internal; specifically it should not disappear when flash/spiram cache is switched off -// * MALLOC_CAP_DMA: Memory must be able to accessed by DMA -// * MALLOC_CAP_DEFAULT: Memory can be returned in a non-capability-specific memory allocation -// * @return Pointer to currently allocated heap memory -// **/ -// void *heap_caps_malloc(size_t size, uint32_t caps); - -/** - * @brief Allocate aligned memory from internal memory or external memory. - * if cnt*size > CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL, allocate memory from internal RAM - * else, allocate memory from PSRAM - * - * @param cnt Number of continuing chunks of memory to allocate - * @param size Size, in bytes, of a chunk of memory to allocate - * @param align Aligned size, in bits - * @return Pointer to currently allocated heap memory - */ -void *dl_lib_calloc(int cnt, int size, int align); - -/** - * @brief Always allocate aligned memory from external memory. - * - * @param cnt Number of continuing chunks of memory to allocate - * @param size Size, in bytes, of a chunk of memory to allocate - * @param align Aligned size, in bits - * @return Pointer to currently aligned heap memory - */ -void *dl_lib_calloc_psram(int cnt, int size, int align); - -/** - * @brief Free aligned memory allocated by `dl_lib_calloc` or `dl_lib_calloc_psram` - * - * @param prt Pointer to free - */ -void dl_lib_free(void *ptr); - -/** - * @brief Does a fast version of the exp() operation on a floating point number. - * - * As described in https://codingforspeed.com/using-faster-exponential-approximation/ - * Should be good til an input of 5 or so with a steps factor of 8. - * - * @param in Floating point input - * @param steps Approximation steps. More is more precise. 8 or 10 should be good enough for most purposes. - * @return Exp()'ed output - */ -fptp_t fast_exp(double x, int steps); - -/** - * @brief Does a fast version of the exp() operation on a floating point number. - * - * @param in Floating point input - * @return Exp()'ed output - */ -double fast_exp_pro(double x); - -/** - * @brief Does a softmax operation on a matrix. - * - * @param in Input matrix - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_softmax(const dl_matrix2d_t *in, dl_matrix2d_t *out); - - -/** - * @brief Does a softmax operation on a quantized matrix. - * - * @param in Input matrix - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_softmax_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); - -/** - * @brief Does a sigmoid operation on a floating point number - * - * @param in Floating point input - * @return Sigmoid output - */ - -fptp_t dl_sigmoid_op(fptp_t in); - - -/** - * @brief Does a sigmoid operation on a matrix. - * - * @param in Input matrix - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_sigmoid(const dl_matrix2d_t *in, dl_matrix2d_t *out); - -/** - * @brief Does a tanh operation on a floating point number - * - * @param in Floating point input number - * @return Tanh value - */ -fptp_t dl_tanh_op(fptp_t v); - -/** - * @brief Does a tanh operation on a matrix. - * - * @param in Input matrix - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_tanh(const dl_matrix2d_t *in, dl_matrix2d_t *out); - - -/** - * @brief Does a relu (Rectifier Linear Unit) operation on a floating point number - * - * @param in Floating point input - * @param clip If value is higher than this, it will be clipped to this value - * @return Relu output - */ -fptp_t dl_relu_op(fptp_t in, fptp_t clip); - -/** - * @brief Does a ReLu operation on a matrix. - * - * @param in Input matrix - * @param clip If values are higher than this, they will be clipped to this value - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_relu(const dl_matrix2d_t *in, fptp_t clip, dl_matrix2d_t *out); - -/** - * @brief Fully connected layer operation - * - * @param in Input vector - * @param weight Weights of the neurons - * @param bias Biases for the neurons. Can be NULL if a bias of 0 is required. - * @param out Output array. Outputs are placed here. Needs to be an initialized, weight->w by in->h in size, matrix. - */ -void dl_fully_connect_layer(const dl_matrix2d_t *in, const dl_matrix2d_t *weight, const dl_matrix2d_t *bias, dl_matrix2d_t *out); - -/** - * @brief Pre-calculate the sqrtvari variable for the batch_normalize function. - * The sqrtvari matrix depends on the variance and epsilon values, which normally are constant. Hence, - * this matrix only needs to be calculated once. This function does that. - * - * @param - * @return - */ -void dl_batch_normalize_get_sqrtvar(const dl_matrix2d_t *variance, fptp_t epsilon, dl_matrix2d_t *out); - -/** - * @brief Batch-normalize a matrix - * - * @param m The matrix to normalize - * @param offset Offset matrix - * @param scale Scale matrix - * @param mean Mean matrix - * @param sqrtvari Matrix precalculated using dl_batch_normalize_get_sqrtvar - * @return - */ -void dl_batch_normalize(dl_matrix2d_t *m, const dl_matrix2d_t *offset, const dl_matrix2d_t *scale, - const dl_matrix2d_t *mean, const dl_matrix2d_t *sqrtvari); - -/** - * @brief Do a basic LSTM layer pass. - * - * @warning Returns state_h pointer, so do not free result. - - * @param in Input vector - * @param state_c Internal state of the LSTM network - * @param state_h Internal state (previous output values) of the LSTM network - * @param weights Weights for the neurons - * @param bias Bias for the neurons. Can be NULL if no bias is required - * @return Output values of the neurons - */ -dl_matrix2d_t *dl_basic_lstm_layer(const dl_matrix2d_t *in, dl_matrix2d_t *state_c, dl_matrix2d_t *state_h, - const dl_matrix2d_t *weight, const dl_matrix2d_t *bias); - -/** - * @brief Do a basic LSTM layer pass, partial quantized version. - * This LSTM function accepts 16-bit fixed-point weights and 32-bit float-point bias. - * - * @warning Returns state_h pointer, so do not free result. - - * @param in Input vector - * @param state_c Internal state of the LSTM network - * @param state_h Internal state (previous output values) of the LSTM network - * @param weights Weights for the neurons, need to be quantised - * @param bias Bias for the neurons. Can be NULL if no bias is required - * @return Output values of the neurons - */ -dl_matrix2dq_t *dl_basic_lstm_layer_quantised_weights(const dl_matrix2d_t *in, dl_matrix2d_t *state_c, dl_matrix2d_t *state_h, - const dl_matrix2dq_t *weight, const dl_matrix2d_t *bias); - -/** - * @brief Do a fully-connected layer pass, fully-quantized version. - * - * @param in Input vector - * @param weight Weights of the neurons - * @param bias Bias values of the neurons. Can be NULL if no bias is needed. - * @param shift Number of bits to shift the result back by. See dl_lib_matrixq.h for more info - * @return Output values of the neurons - */ -void dl_fully_connect_layer_q(const dl_matrix2dq_t *in, const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, dl_matrix2dq_t *out, int shift); - -/** - * @brief Do a basic LSTM layer pass, fully-quantized version - * - * @warning Returns state_h pointer, so do not free result. - - * @param in Input vector - * @param state_c Internal state of the LSTM network - * @param state_h Internal state (previous output values) of the LSTM network - * @param weights Weights for the neurons - * @param bias Bias for the neurons. Can be NULL if no bias is required - * @param shift Number of bits to shift the result back by. See dl_lib_matrixq.h for more info - * @return Output values of the neurons - */ -dl_matrix2dq_t *dl_basic_lstm_layer_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *state_c, dl_matrix2dq_t *state_h, - const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, int shift); - -/** - * @brief Batch-normalize a matrix, fully-quantized version - * - * @param m The matrix to normalize - * @param offset Offset matrix - * @param scale Scale matrix - * @param mean Mean matrix - * @param sqrtvari Matrix precalculated using dl_batch_normalize_get_sqrtvar - * @param shift Number of bits to shift the result back by. See dl_lib_matrixq.h for more info - * @return - */ -void dl_batch_normalize_q(dl_matrix2dq_t *m, const dl_matrix2dq_t *offset, const dl_matrix2dq_t *scale, - const dl_matrix2dq_t *mean, const dl_matrix2dq_t *sqrtvari, int shift); - -/** - * @brief Does a relu (Rectifier Linear Unit) operation on a fixed-point number - * This accepts and returns fixed-point 32-bit number with the last 15 bits being the bits after the decimal - * point. (Equivalent to a mantissa in a quantized matrix with exponent -15.) - * - * @param in Fixed-point input - * @param clip If value is higher than this, it will be clipped to this value - * @return Relu output - */ -qtp_t dl_relu_q_op(qtp_t in, qtp_t clip); - -/** - * @brief Does a ReLu operation on a matrix, quantized version - * - * @param in Input matrix - * @param clip If values are higher than this, they will be clipped to this value - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_relu_q(const dl_matrix2dq_t *in, fptp_t clip, dl_matrix2dq_t *out); - -/** - * @brief Does a sigmoid operation on a fixed-point number. - * This accepts and returns a fixed-point 32-bit number with the last 15 bits being the bits after the decimal - * point. (Equivalent to a mantissa in a quantized matrix with exponent -15.) - * - * @param in Fixed-point input - * @return Sigmoid output - */ -int dl_sigmoid_op_q(const int in); -int16_t dl_sigmoid_op_q8(const int16_t in); -/** - * @brief Does a sigmoid operation on a matrix, quantized version - * - * @param in Input matrix - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_sigmoid_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); - -/** - * @brief Does a tanh operation on a matrix, quantized version - * - * @param in Input matrix - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_tanh_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); - -/** - * @brief Does a tanh operation on a fixed-point number. - * This accepts and returns a fixed-point 32-bit number with the last 15 bits being the bits after the decimal - * point. (Equivalent to a mantissa in a quantized matrix with exponent -15.) - * - * @param in Fixed-point input - * @return tanh output - */ -int dl_tanh_op_q(int v); -int16_t dl_tanh_op_q8(int16_t v); - -void load_mat_psram_mn4(void); -void load_mat_psram_mn3(void); -void free_mat_psram_mn4(void); -void free_mat_psram_mn3(void); -qtp_t dl_hard_sigmoid_op(qtp_t in, int exponent); -qtp_t dl_hard_tanh_op(qtp_t in, int exponent); - -int16_t dl_table_tanh_op(int16_t in, int exponent); -int16_t dl_table_sigmoid_op(int16_t in, int exponent); - -void dl_hard_sigmoid_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); -void dl_hard_tanh_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); - -void dl_table_sigmoid_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); -void dl_table_tanh_q(const dl_matrix2dq_t *in, dl_matrix2dq_t *out); - - -/** - * @brief Filter out the number greater than clip in the matrix, quantized version - * - * @param in Input matrix - * @param clip If values are higher than this, they will be clipped to this value - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_minimum(const dl_matrix2d_t *in, fptp_t clip, dl_matrix2d_t *out); - -/** - * @brief Filter out the number greater than clip in the matrix, float version - * - * @param in Input matrix - * @param clip If values are higher than this, they will be clipped to this value - * @param out Output matrix. Can be the same as the input matrix; if so, output results overwrite the input. - */ -void dl_minimum_q(const dl_matrix2dq_t *in, fptp_t clip, dl_matrix2dq_t *out); -/** - * @brief Do a basic CNN layer pass. - * - * @Warning This just supports the single channel input image, and the output is single row matrix. - That is to say, the height of output is 1, and the weight of output is out_channels*out_image_width*out_image_height - * - * @param in Input single channel image - * @param weight Weights of the neurons, weight->w = out_channels, weight->h = filter_width*filter_height - * @param bias Bias for the CNN layer. - * @param filter_height The height of convolution kernel - * @param filter_width The width of convolution kernel - * @param out_channels The number of output channels of convolution kernel - * @param stride_x The step length of the convolution window in x(width) direction - * @param stride_y The step length of the convolution window in y(height) direction - * @param pad One of `"VALID"` or `"SAME"`, 0 is "VALID" and the other is "SAME" - * @param out The result of CNN layer, out->h=1. - * @return The result of CNN layer. - */ -dl_matrix2d_t *dl_basic_conv_layer(const dl_matrix2d_t *in, const dl_matrix2d_t *weight, const dl_matrix2d_t *bias, int filter_width, int filter_height, - const int out_channels, const int stride_x, const int stride_y, padding_state pad, const dl_matrix2d_t* out); - - -/** - * @brief Do a basic CNN layer pass, quantised wersion. - * - * @Warning This just supports the single channel input image, and the output is single row matrix. - That is to say, the height of output is 1, and the weight of output is out_channels*out_image_width*out_image_height - * - * @param in Input single channel image - * @param weight Weights of the neurons, weight->w = out_channels, weight->h = filter_width*filter_height, - * @param bias Bias of the neurons. - * @param filter_height The height of convolution kernel - * @param filter_width The width of convolution kernel - * @param out_channels The number of output channels of convolution kernel - * @param stride_x The step length of the convolution window in x(width) direction - * @param stride_y The step length of the convolution window in y(height) direction - * @param pad One of `"VALID"` or `"SAME"`, 0 is "VALID" and the other is "SAME" - * @param out The result of CNN layer, out->h=1 - * @return The result of CNN layer - */ -dl_matrix2d_t *dl_basic_conv_layer_quantised_weight(const dl_matrix2d_t *in, const dl_matrix2dq_t *weight, const dl_matrix2d_t *bias, int filter_width, int filter_height, - const int out_channels, const int stride_x, const int stride_y, padding_state pad, const dl_matrix2d_t* out); - -#endif - diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_coefgetter_if.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_coefgetter_if.h deleted file mode 100644 index f1a937343bf..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_coefgetter_if.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_COEFGETTER_IF_H -#define DL_LIB_COEFGETTER_IF_H - -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" -#include "cJSON.h" - -//Set this if the coefficient requested is a batch-normalization popvar matrix which needs to be preprocessed by -//dl_batch_normalize_get_sqrtvar first. -#define COEF_GETTER_HINT_BNVAR (1<<0) - -/* -This struct describes the basic information of model data: -word_num: the number of wake words or speech commands -word_list: the name list of wake words or speech commands -thres_list: the threshold list of wake words or speech commands -info_str: the string used to reflect the version and information of model data - which consist of the architecture of network, the version of model data, wake words and their threshold -*/ -typedef struct { - int word_num; - char **word_list; - int *win_list; - float *thresh_list; - char *info_str; -} model_info_t; - -/* -Alphabet struct describes the basic grapheme or phoneme. -item_num: the number of baisc item(grapheme or phonemr) -items: the list of basic item -*/ -typedef struct { - int item_num; - char **items; -}alphabet_t; - -/* -This struct describes a generic coefficient getter: a way to get the constant coefficients needed for a neural network. -For the two getters, the name describes the name of the coefficient matrix, usually the same as the Numpy filename the -coefficient was originally stored in. The arg argument can be used to optionally pass an additional user-defined argument -to the getter (e.g. the directory to look for files in the case of the Numpy file loader getter). The hint argument -is a bitwise OR of the COEF_GETTER_HINT_* flags or 0 when none is needed. Use the free_f/free_q functions to release the -memory for the returned matrices, when applicable. -*/ -typedef struct { - const dl_matrix2d_t* (*getter_f)(const char *name, void *arg, int hint); - const dl_matrix2dq_t* (*getter_q)(const char *name, void *arg, int hint); - const dl_matrix2dq8_t* (*getter_q8)(const char *name, void *arg, int hint); - void (*free_f)(const dl_matrix2d_t *m); - void (*free_q)(const dl_matrix2dq_t *m); - void (*free_q8)(const dl_matrix2dq8_t *m); - const model_info_t* (*getter_info)(void *arg); - const alphabet_t* (*getter_alphabet)(void *arg); - const cJSON* (*getter_config)(void *arg); -} model_coeff_getter_t; - -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_conv_queue.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_conv_queue.h deleted file mode 100644 index e0ca0a1d457..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_conv_queue.h +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_CONV_QUEUE_H -#define DL_LIB_CONV_QUEUE_H - - -#include "dl_lib_matrix.h" -typedef float fptp_t; - - -//Flags for matrices -#define DL_MF_FOREIGNDATA (1<<0) /*< Matrix *item data actually points to another matrix and should not be freed */ - -//Float convolution FIFO queue. -typedef struct { - int n; /*< the length of queue */ - int c; /*< the channel number of queue element*/ - int front; /*< the front(top) position of queue */ - int flag; /*< not used*/ - fptp_t *item; /*< Pointer to item array */ -} dl_conv_queue_t; - -/** - * @brief Allocate a convolution queue - * - * @param n The length of queue - * @param c The channel number of elements in the queue - * @return The convolution queue, or NULL if out of memory - */ -dl_conv_queue_t *dl_conv_queue_alloc(int n, int c); - -/** - * @brief Free a convolution queue - * - * @param cq The convolution queue to free - */ -void dl_conv_queue_free(dl_conv_queue_t *cq); - -void dl_conv_to_matrix2d(dl_conv_queue_t *cq, dl_matrix2d_t* out); - -/** - * @brief Move the front pointer of queue forward, - the First(oldest) element become the last(newest) element, - * - * @param cq Input convolution queue - * @return Pointer of oldest element - */ -fptp_t *dl_conv_queue_pop(dl_conv_queue_t *cq); - -/** - * @brief Remove the oldest element, then insert the input element at the end of queue - * - * @param cq Input convolution queue - * @param item The new element - */ -void dl_conv_queue_push(dl_conv_queue_t *cq, fptp_t* item); - - -/** - * @brief Get the pointer of element in the queue by offset - * - * @param cq Input convolution queue - * @param offset Offset from the front of the queue - * @return Pointer of the element - */ -fptp_t *dl_get_queue_item(dl_conv_queue_t *cq, int offset); - -/** - * @brief Does a sigmoid operation on the one of element in the convolution queue. - * Gets the pointer of element in the convolution queue by offset, and does a sigmoid operation - * by this pointer, then return the pointer - * - * @param cq Input convolution queue - * @param offset Offset from the front of the queue - * @return Pointer of the element - */ -fptp_t *dl_sigmoid_step(dl_conv_queue_t *cq, int offset); - -/** - * @brief Does a tanh operation on the one of element in the convolution queue. - * Gets the pointer of element in the convolution queue by offset, and does a tanh operation - * by this pointer, then return the pointer - * - * @param cq Input convolution queue - * @param offset Offset from the front of the queue - * @return Pointer of the element - */ -fptp_t *dl_tanh_step(dl_conv_queue_t *cq, int offset); - -/** - * @brief Does a softmax operation on the one of element in the convolution queue. - * Gets the pointer of element in the convolution queue by offset, and does a softmax operation - * by this pointer, then return the pointer - * - * @param cq Input convolution queue - * @param offset Offset from the front of the queue - * @return Pointer of the element - */ -fptp_t *dl_softmax_step(dl_conv_queue_t *cq, int offset); - -fptp_t *dl_relu_step(dl_conv_queue_t *cq, int offset); -fptp_t *dl_relu_look(dl_matrix2d_t *cq, int offset); -dl_matrix2d_t *dl_matrix_concat1(const dl_conv_queue_t *a, const dl_matrix2d_t *b); -dl_matrix2d_t *dl_basic_lstm_layer1(const dl_conv_queue_t *in, dl_matrix2d_t *state_c, dl_matrix2d_t *state_h, - const dl_matrix2d_t *weight, const dl_matrix2d_t *bias); -/** - * @brief Fast implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) - * based on convolution queue. - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is first element of output queue and should not be freed separately. - * - * @param in Input convolution queue - * @param out Output convolution queue - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param kernel The kernel matrix of filter - * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @return The result of atrous convolution - */ -fptp_t *dl_atrous_conv1d_step(dl_conv_queue_t *in, dl_conv_queue_t *out, int rate, int size, - dl_matrix2d_t* kernel, dl_matrix2d_t* bias); -fptp_t *dl_look_conv_step(dl_conv_queue_t *in, dl_matrix2d_t *out, int rate, int size, - dl_matrix2d_t* kernel, dl_matrix2d_t* bias); - -/** - * @brief Fast implement of dilation layer as follows - * - * |-> [gate(sigmoid)] -| - * input - | |-> (*) - output - * |-> [filter(tanh)] -| - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is first element of output queue and should not be freed separately. - * - * @param in Input convolution queue - * @param out Output convolution queue - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param filter_kernel The kernel matrix of filter - * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param gate_kernel The kernel matrix of gate - * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. - * @return The result of dilation layer - */ -fptp_t *dl_dilation_layer(dl_conv_queue_t *in, dl_conv_queue_t *out, int rate, int size, - dl_matrix2d_t* filter_kernel, dl_matrix2d_t* filter_bias, - dl_matrix2d_t* gate_kernel, dl_matrix2d_t* gate_bias); - - -void test_atrous_conv(int size, int rate, int in_channel, int out_channel); - -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_convq8_queue.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_convq8_queue.h deleted file mode 100644 index dadb5cad26c..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_convq8_queue.h +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_CONVQ8_QUEUE_H -#define DL_LIB_CONVQ8_QUEUE_H - - -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" -#include "dl_lib_conv_queue.h" -#include "dl_lib_convq_queue.h" - -//[nch, n, c] -typedef struct { - int n; /*< the length of queue */ - int c; /*< the number of queue element*/ - int front; /*< the front(top) position of queue */ - int nch; /*< the channel of queue */ - int exponent; /*< The values in items should be multiplied by pow(2,exponent) - to get the real values */ - q8tp_t *itemq; /*< Pointer to item array */ -} dl_convq8_queue_t; - -/** - * @brief Allocate a fixed-point convolution queue - * - * @param n The length of queue - * @param c The number of elements in the queue - * @return The convolution queue, or NULL if out of memory - */ -dl_convq8_queue_t *dl_convq8_queue_alloc(int n, int c); - -/** - * @brief Allocate a fixed-point convolution queue - * - * @param n The length of queue - * @param c The number of elements in the queue - * @param c The channel of queue - * @return The convolution queue, or NULL if out of memory - */ -dl_convq8_queue_t *dl_convq8_queue_alloc_mc(int n, int c, int nch); - -/** - * @brief Free a fixed-point convolution queue - * - * @param cq The fixed-point convolution queue to free - */ -void dl_convq8_queue_free(dl_convq8_queue_t *cq); - -/** - * @brief Set itemq of convolution queue to 0 - * - * @param cq The fixed-point convolution queue to free - */ -void dl_convq8_queue_bzero(dl_convq8_queue_t *cqm); - -/** - * @brief Insert the float-point element at the end of queue. - * The precision of fixed-point numbers is described by the Qm.f notation, - * - * @param cq Input fixed-point convolution queue - * @param item The float-point element - * @param m_bit The number of integer bits including the sign bits - * @param f_bit The number of fractional bits - */ -void dl_convq8_queue_push_by_qmf(dl_convq8_queue_t *cq, fptp_t* item, int m_bit, int f_bit); - -/** - * @brief Get the pointer of element in the queue by offset - * - * @param cq Input fixed-point convolution queue - * @param offset Offset from the front of the queue - * @return Pointer of the element - */ -q8tp_t *dl_get_queue_itemq8(dl_convq8_queue_t *cq, int offset); - -/** - * @brief Get the pointer of element in the queue by offset - * - * @param cq Input fixed-point convolution queue - * @param offset Offset from the front of the queue - * @param ch Channel index of queue - * @return Pointer of the element - */ -q8tp_t *dl_get_queue_itemq8_mc(dl_convq8_queue_t *cq, int offset, int ch); - -/** - * @brief Fast and quantised implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) - * based on convolution queue. - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input fixed-point convolution queue - * @param out Output fixed-point convolution queue - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param kernel Kernel matrix of filter - * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param out_exponent Shift ratio used in dot operation between two 16-bit fixed point vector - * @param offset Offset used to calculate the beginning of input conv queue - * @param prenum The num to control the parameter size of preload operation - * @return The result of atrous convolution - */ -void dl_atrous_conv1dq8_steps(dl_convq8_queue_t *in, dl_convq8_queue_t *out, int rate, int size, - dl_matrix2dq8_t* kernel, dl_matrix2dq8_t* bias, - int out_exponent, int offset, int prenum); - -/** - * @brief Fast implement of dilation layer as follows - * - * |-> [gate(sigmoid)] -| - * input - | |-> (*) - output - * |-> [filter(tanh)] -| - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input fixed-point convolution queue - * @param out Output fixed-point convolution queue - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param filter_kernel The kernel matrix of filter - * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param gate_kernel The kernel matrix of gate - * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. - * @param offset Offset used to calculate the beginning of input conv queue - * @param prenum The num to control the parameter size of preload operation - * @return The result of dilation layer - */ -void dl_dilation_layerq8_steps(dl_convq8_queue_t *in, dl_convq8_queue_t *out, int rate, int size, - dl_matrix2dq8_t* filter_kernel, dl_matrix2dq8_t* filter_bias, - dl_matrix2dq8_t* gate_kernel, dl_matrix2dq8_t* gate_bias, - int offset, int prenum); - - - - -dl_conv_queue_t *dl_convq8_queue_add(dl_convq8_queue_t *cq1, dl_convq8_queue_t *cq2); - -int8_t dl_sigmoid_lutq8(int in); -/** - * @brief Allocate a 8-bit fixed-point Multi-Channel convolution queue - * - * @param n The length of queue - * @param c The number of elements in the queue - * @param nch  The channel number - * @return The convolution queue, or NULL if out of memory - */ -dl_convq8_queue_t **dl_convq8_queue_mc_alloc(int n, int c, int nch); - -/** - * @brief Free a 8-bit fixed-point Multi-Channel convolution queue - * - * @param cqm The fixed-point convolution queue to free - * @param nch The channel number - */ -void dl_convq8_queue_mc_free(dl_convq8_queue_t **cqm, int nch); - -/** - * @brief Tanh activation function for 8-bit fixed-point Multi-Channel convolution queue input - * - * @param cqm Input 8-bit fixed-point Multi-Channel convolution queue - * @param offset Offset used to calculate the beginning of input conv queue - * @param nch The channel number - */ -void dl_tanh_convq8_mc(dl_convq8_queue_t **cqm, int offset, int nch); - -/** - * @brief Fast and quantised 16-bit implement for Multi-channel 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) - * Usually, this layer is used as first layer for 8-bit network. - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * Input is a 16-bit queue point, Output is an 8-bit queue point. - * - * @param in Input 16bit fixed-point convolution queue array - * @param out Output 8bit fixed-point convolution queue array - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param kernel The kernel matrix of filter - * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param out_exponent Exponent of output - * @param offset Offset used to calculate the beginning of input conv queue - * @param prenum The num to control the parameter size of preload operation - */ -void dl_atrous_conv1dq8_16in_mc_steps(dl_convq_queue_t **in, dl_convq8_queue_t **out, int nch, int rate, int size, - dl_matrix2dq_t* kernel, dl_matrix2dq_t* bias, int out_exponent, int offset, int prenum); - -/** - * @brief Fast and quantised 8-bit implement for Multi-channel 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) - * based on convolution queue. - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input 8bit fixed-point convolution queue array - * @param out Output 8bit fixed-point convolution queue array - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param kernel The kernel matrix of filter - * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param out_exponent Exponent of output - * @param offset Offset used to calculate the beginning of input conv queue - * @param prenum The num to control the parameter size of preload operation - */ -void dl_atrous_conv1dq8_mc_steps(dl_convq8_queue_t **in, dl_convq8_queue_t **out, - int nch, int rate, int size, - dl_matrix2dq8_t* kernel, dl_matrix2dq8_t* bias, - int out_exponent, int offset, int prenum); - -/** - * @brief Fast implement of 8-bit dilation layer as follows - * - * |-> [gate(sigmoid)] -| - * input - | |-> (*) - output - * |-> [filter(tanh)] -| - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input 8-bit fixed-point convolution queue - * @param out Output 8-bit fixed-point convolution queue - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param filter_kernel The kernel matrix of filter - * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param gate_kernel The kernel matrix of gate - * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. - * @param offset Offset used to calculate the beginning of input conv queue - * @param prenum The num to control the parameter size of preload operation - */ -void dl_dilation_layerq8_mc_steps(dl_convq8_queue_t **in, dl_convq8_queue_t **out, int nch, int rate, int size, - dl_matrix2dq8_t* filter_kernel, dl_matrix2dq8_t* filter_bias, - dl_matrix2dq8_t* gate_kernel, dl_matrix2dq8_t* gate_bias, - int offset, int prenum); - -void dl_convq8_queue_mc_bzero(dl_convq8_queue_t **cqm, int nch); - - - -dl_convq8_queue_t *dl_convq8_queue_alloc_from_psram(int n, int c); - -qtp_t *dl_dilation_layerq16_8(dl_convq_queue_t *in, dl_convq8_queue_t *out, int rate, int size, - dl_matrix2dq_t* filter_kernel, dl_matrix2dq_t* filter_bias, - dl_matrix2dq_t* gate_kernel, dl_matrix2dq_t* gate_bias, int prenum); - - -qtp_t *dl_dilation_layerq8(dl_convq8_queue_t *in, dl_convq8_queue_t *out, int rate, int size, - dl_matrix2dq8_t* filter_kernel, dl_matrix2dq_t* filter_bias, - dl_matrix2dq8_t* gate_kernel, dl_matrix2dq_t* gate_bias, int prenum); - -dl_matrix2dq8_t *dl_convq8_lstm_layer(const dl_convq8_queue_t *in, dl_convq8_queue_t *out, dl_matrix2dq8_t *state_c, - dl_matrix2dq8_t *state_h, const dl_matrix2dq8_t *in_weight, const dl_matrix2dq8_t *h_weight, - const dl_matrix2dq_t *bias, int prenum); - -qtp_t *dl_atrous_conv1dq8_16_s3(dl_convq8_queue_t *in, dl_convq_queue_t *out, int rate, int size, - dl_matrix2dq8_t* kernel, dl_matrix2dq_t* bias, int prenum); - -void print_convq8(dl_convq8_queue_t *cq, int offset); -void print_convq(dl_convq_queue_t *cq, int offset); - -void lstmq8_free(void); -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_convq_queue.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_convq_queue.h deleted file mode 100644 index 80693718f95..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_convq_queue.h +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_CONVQ_QUEUE_H -#define DL_LIB_CONVQ_QUEUE_H - -#include "dl_lib_matrixq.h" -#include "dl_lib_conv_queue.h" -#include "dl_lib.h" - - -//fixed-point convolution FIFO queue. -//[nch, n, c] -typedef struct { - int n; /*< the length of queue */ - int c; /*< the number of queue element*/ - int front; /*< the front(top) position of queue */ - int nch; /*< the multiple of queue*/ - int exponent; /*< The values in items should be multiplied by pow(2,exponent) - to get the real values */ - qtp_t *itemq; /*< Pointer to item array */ -} dl_convq_queue_t; - -/** - * @brief Allocate a fixed-point convolution queue - * - * @param n The length of queue - * @param c The number of elements in the queue - * @return The convolution queue, or NULL if out of memory - */ -dl_convq_queue_t *dl_convq_queue_alloc(int n, int c); - -/** - * @brief Allocate a fixed-point convolution queue from PSRAM - * - * @param n The length of queue - * @param c The number of elements in the queue - * @return The convolution queue, or NULL if out of memory - */ -dl_convq_queue_t *dl_convq_queue_alloc_from_psram(int n, int c); - -/** - * @brief Allocate a fixed-point multi-channel convolution queue - * - * @param n The length of queue - * @param c The number of elements in the queue - * @param nch The channel of conv queue - * @return The convolution queue, or NULL if out of memory - */ -dl_convq_queue_t *dl_convq_queue_alloc_mc(int n, int c, int nch); - -/** - * @brief Allocate a fixed-point multi-channel convolution queue from PSRAM - * - * @param n The length of queue - * @param c The number of elements in the queue - * @param nch The channel of conv queue - * @return The convolution queue, or NULL if out of memory - */ -dl_convq_queue_t *dl_convq_queue_alloc_mc_from_psram(int n, int c, int nch); - - -void dl_convq_to_matrix2dq(dl_convq_queue_t *cq, dl_matrix2dq_t* out, int row); - -/** - * @brief Free a fixed-point convolution queue - * - * @param cq The fixed-point convolution queue to free - */ -void dl_convq_queue_free(dl_convq_queue_t *cq); - -/** - * @brief Set itemq of convolution queue to 0 - * - * @param cq The fixed-point convolution queue point - */ -void dl_convq_queue_bzero(dl_convq_queue_t *cq); - -/** - * @brief Move the front pointer of queue forward, - the First(oldest) element become the last(newest) element, - * - * @param cq Input fixed-point convolution queue - * @return Pointer of oldest element - */ -inline qtp_t *dl_convq_queue_pop(dl_convq_queue_t *cq); -inline qtp_t *dl_convq_queue_popn(dl_convq_queue_t *cq, int n); -/** - * @brief Remove the oldest element, then insert the input element at the end of queue - * - * @param cq Input fixed-point convolution queue - * @param item The new element - */ -void dl_convq_queue_push(dl_convq_queue_t *cq, dl_matrix2dq_t *a, int shift); - -/** - * @brief Insert the float-point element at the end of queue. - * The precision of fixed-point numbers is described by the Qm.f notation, - * - * @param cq Input fixed-point convolution queue - * @param item The float-point element - * @param m_bit The number of integer bits including the sign bits - * @param f_bit The number of fractional bits - */ -void dl_convq_queue_push_by_qmf(dl_convq_queue_t *cq, fptp_t* item, int m_bit, int f_bit); - -void dl_convq16_queue_push_by_qmf(dl_convq_queue_t *cq, fptp_t* item, int m_bit, int f_bit); - -dl_conv_queue_t *dl_queue_from_convq(dl_convq_queue_t *cq1); - -/** - * @brief Get the pointer of element in the queue by offset - * - * @param cq Input fixed-point convolution queue - * @param last_num Offset from the front of the queue - * @return Pointer of the element - */ -inline qtp_t *dl_get_queue_itemq(dl_convq_queue_t *cq, int last_num); - -/** - * @brief Get the pointer of element in the queue by offset - * - * @param cq Input fixed-point convolution queue - * @param offset Offset from the front of the queue - * @param ch Channel index of convolution queue - * @return Pointer of the element - */ -qtp_t *dl_get_queue_itemq_mc(dl_convq_queue_t *cq, int offset, int ch); - -/** - * @brief Does a tanh operation on the one of element in the convolution queue. - * Gets the pointer of element in the convolution queue by offset, and does a - * tanh operation by this pointer, then return the pointer - * - * @param cq Input fixed-point convolution queue - * @param offset Offset from the front of the queue - * @return Pointer of the element - */ -void dl_tanh_convq(dl_convq_queue_t *cq, int offset); - -/** - * @brief Does a tanh operation on the one of element in multi channel convolution queue. - * Gets the pointer of element in the convolution queue by offset, and does a - * tanh operation by this pointer, then return the pointer - * - * @param cq Input fixed-point multi channnel convolution queue - * @param offset Offset from the front of the queue - * @param nch The channel number of cqm - * @return Pointer of the element - */ -void dl_tanh_convq_mc(dl_convq_queue_t **cqm, int offset, int nch); - -/** - * @brief Does a relu operation on the one of element in the convolution queue. - * Gets the pointer of element in the convolution queue by offset, and does a - * relu operation by this pointer, then return the pointer - * - * @param cq Input fixed-point convolution queue - * @param offset Offset from the front of the queue - * @return Pointer of the element - */ -void dl_relu_convq(dl_convq_queue_t *cq, fptp_t clip, int last_num); - -/** - * @brief Does a softmax operation on the one of element in the convolution queue. - * Gets the pointer of element in the convolution queue by offset, input data - stay as it is. Results are saved into the *out* array. - * - * @param cq Input fixed-point convolution queue - * @param offset Offset from the front of the queue - * @param out Old array to re-use. Passing NULL will allocate a new matrix. - * @return softmax results - */ -fptp_t * dl_softmax_step_q(dl_convq_queue_t *cq, int offset, fptp_t *out); - -/** - * @brief Fast and quantised implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) - * based on convolution queue. - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input fixed-point convolution queue - * @param out Output fixed-point convolution queue - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param kernel The kernel matrix of filter - * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param shift Shift ratio used in dot operation between two 16-bit fixed point vector - * @return The result of atrous convolution - */ -qtp_t * dl_atrous_conv1dq(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, - dl_matrix2dq_t* kernel, dl_matrix2dq_t* bias, int shift, int prenum); - -/** - * @brief Fast implement of dilation layer as follows - * - * |-> [gate(sigmoid)] -| - * input - | |-> (*) - output - * |-> [filter(tanh)] -| - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input fixed-point convolution queue - * @param out Output fixed-point convolution queue - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param filter_kernel The kernel matrix of filter - * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param gate_kernel The kernel matrix of gate - * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. - * @param filter_shift Shift ratio used in filter operation between two 16-bit fixed point vector - * @param gate_shift Shift ratio used in gate operation between two 16-bit fixed point vector - * @return The result of dilation layer - */ -qtp_t *dl_dilation_layerq_steps(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, - dl_matrix2dq_t* filter_kernel, dl_matrix2dq_t* filter_bias, - dl_matrix2dq_t* gate_kernel, dl_matrix2dq_t* gate_bias, - int filter_shift, int gate_shift, int offset, int prenum); - - -qtp_t *dl_dilation_layerq(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, - dl_matrix2dq_t* filter_kernel, dl_matrix2dq_t* filter_bias, - dl_matrix2dq_t* gate_kernel, dl_matrix2dq_t* gate_bias, - int filter_shift, int gate_shift, int prenum); - -qtp_t *dl_dilation_layerq16(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, - dl_matrix2dq_t* filter_kernel, dl_matrix2dq_t* filter_bias, - dl_matrix2dq_t* gate_kernel, dl_matrix2dq_t* gate_bias, int prenum); - - -qtp_t *dl_atrous_conv1dq_steps(dl_convq_queue_t *in, dl_convq_queue_t *out, int rate, int size, - dl_matrix2dq_t* kernel, dl_matrix2dq_t* bias, int shift, int offset, int prenum); - -/** - * @brief Add a pair of fixed-point convolution queue item-by-item, and return float-point convolution queue - * - * @param cq1 First fixed-point convolution queue - * @param cq2 Seconf fixed-point convolution queue - * @return The result of float-point convolution queue - */ -dl_conv_queue_t *dl_convq_queue_add(dl_convq_queue_t *cq1, dl_convq_queue_t *cq2); - -/** - * @brief Fast implement of LSTM layer by dl_atrous_conv1dq function - * - * @Warning LSTM kernel is split into two part, the first part input is the last layer output, - * and kernel is parameter *in_weight*. The second part input is the last frame LSTM output, - * the kernel is parameters *h_weight*. - * - * @param in Input fixed-point convolution queue - * @param out Output fixed-point convolution queue - * @param state_c Internal state of the LSTM network - * @param state_h Internal state (previous output values) of the LSTM network - * @param in_weight the LSTM kernel needed by first part - * @param h_weight the LSTM kernel needed by second part - * @param bias The bias matrix of LSTM. Can be NULL if a bias of 0 is required. - * @in_shift Shift ratio used in first part - * @h_shift Shift ratio used in second part - * @return The result of LSTM layer - */ -dl_matrix2dq_t *dl_convq_lstm_layer(const dl_convq_queue_t *in, dl_convq_queue_t *out, dl_matrix2dq_t *state_c, - dl_matrix2dq_t *state_h, const dl_matrix2dq_t *in_weight, const dl_matrix2dq_t *h_weight, - const dl_matrix2dq_t *bias, int in_shift, int h_shift, int prenum); -dl_matrix2dq_t *dl_basic_lstm_layer1_q(const dl_convq_queue_t *in, dl_matrix2dq_t *state_c, dl_matrix2dq_t *state_h, - const dl_matrix2dq_t *weight, const dl_matrix2dq_t *bias, int step, int shift); - -dl_matrix2dq_t *dl_convq16_lstm_layer(const dl_convq_queue_t *in, dl_convq_queue_t *out, dl_matrix2dq_t *state_c, - dl_matrix2dq_t *state_h, const dl_matrix2dq_t *in_weight, const dl_matrix2dq_t *h_weight, - const dl_matrix2dq_t *bias, int prenum); - -/** - * @brief Allocate a fixed-point multi channel convolution queue - * - * @param n The length of queue - * @param c The channel number of elements in the queue - * @param nch the channel numbet of convolution queue - * @return The convolution queue, or NULL if out of memory - */ -dl_convq_queue_t **dl_convq_queue_mc_alloc(int n, int c, int nch); - -/** - * @brief Free a fixed-point multi channel convolution queue - * - * @param cqm The fixed-point convolution queue to free - * @param nch The channel number of cqm - */ -void dl_convq_queue_mc_free(dl_convq_queue_t **cqm, int nch); - -/** - * @brief Fast and quantised implement for 1D atrous convolution (a.k.a. convolution with holes or dilated convolution) - * based on convolution queue. - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input fixed-point convolution queue - * @param out Output fixed-point convolution queue - * @param nch The channel number of input - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param kernel The kernel matrix of filter - * @param bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param shift Shift ratio used in dot operation between two 16-bit fixed point vector - * @param offset the offset to calculate input convq - * @param prenum the preload size, 0: do not use preload function - * @return The result of atrous convolution - */ -qtp_t *dl_atrous_conv1dq_mc_steps( dl_convq_queue_t **in, - dl_convq_queue_t **out, - int nch, - int rate, - int size, - dl_matrix2dq_t* kernel, - dl_matrix2dq_t* bias, - int shift, - int offset, - int prenum); - -/** - * @brief Fast implement of dilation layer as follows for multi channel input - * - * |-> [gate(sigmoid)] -| - * input - | |-> (*) - output - * |-> [filter(tanh)] -| - * - * @Warning All input and output convolution queue and matrix should be allocated. The return pointer - * is last element of output queue and should not be freed separately. - * - * @param in Input fixed-point convolution queue - * @param out Output fixed-point convolution queue - * @param nch The channel number of input - * @param rate A positive int, the stride with which we sample input value - * @param size A positive int, the size of 1D-filter - * @param filter_kernel The kernel matrix of filter - * @param filter_bias The bias matrix of filter. Can be NULL if a bias of 0 is required. - * @param gate_kernel The kernel matrix of gate - * @param gate_bias The bias matrix of gate. Can be NULL if a bias of 0 is required. - * @param filter_shift Shift ratio used in filter operation between two 16-bit fixed point vector - * @param gate_shift Shift ratio used in gate operation between two 16-bit fixed point vector - * @param offset The offset to calculate input convq - * @param prenum The preload size, 0: do not use preload function - * @return The result of dilation layer - */ -qtp_t *dl_dilation_layerq_mc_steps( dl_convq_queue_t **in, - dl_convq_queue_t **out, - int nch, - int rate, - int size, - dl_matrix2dq_t* filter_kernel, - dl_matrix2dq_t* filter_bias, - dl_matrix2dq_t* gate_kernel, - dl_matrix2dq_t* gate_bias, - int filter_shift, - int gate_shift, - int offset, - int prenum); - -void test_atrous_convq(int size, int rate, int in_channel, int out_channel); -void test_lstm_convq(int size, int in_dim, int lstm_cell); -void dl_nn_tanh_i162(dl_convq_queue_t **cqm, int offset, int nch); -void dl_copy_queue_item_by_qmf(dl_convq_queue_t *cq, fptp_t* item, int m_bit, int f_bit, int offset, int ch); -void dl_convq_queue_mc_bzero(dl_convq_queue_t **cqm, int nch); -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrix.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrix.h deleted file mode 100644 index d046e2452f7..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrix.h +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_MATRIX_H -#define DL_LIB_MATRIX_H - -#ifdef ESP_PLATFORM -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/queue.h" -#include "esp_system.h" -#endif - -// #ifdef CONFIG_IDF_TARGET_ESP32S3 -// #include "dl_tie728_bzero.h" -// #endif - -typedef float fptp_t; - -#if CONFIG_BT_SHARE_MEM_REUSE -extern multi_heap_handle_t gst_heap; -#endif - -//Flags for matrices -#define DL_MF_FOREIGNDATA (1<<0) /*< Matrix *item data actually points to another matrix and should not be freed */ - -//'Normal' float matrix -typedef struct { - int w; /*< Width */ - int h; /*< Height */ - int stride; /*< Row stride, essentially how many items to skip to get to the same position in the next row */ - int flags; /*< Flags. OR of DL_MF_* values */ - fptp_t *item; /*< Pointer to item array */ -} dl_matrix2d_t; - -//Macro to quickly access the raw items in a matrix -#define DL_ITM(m, x, y) m->item[(x)+(y)*m->stride] - - -/** - * @brief Allocate a matrix - * - * @param w Width of the matrix - * @param h Height of the matrix - * @return The matrix, or NULL if out of memory - */ -dl_matrix2d_t *dl_matrix_alloc(int w, int h); - - -/** - * @brief Free a matrix - * Frees the matrix structure and (if it doesn't have the DL_MF_FOREIGNDATA flag set) the m->items space as well. - * - * @param m Matrix to free - */ -void dl_matrix_free(dl_matrix2d_t *m); - -/** - * @brief Zero out the matrix - * Sets all entries in the matrix to 0. - * - * @param m Matrix to zero - */ -void dl_matrix_zero(dl_matrix2d_t *m); - -/** - * @brief Copy the matrix into psram - * Copy the matrix from flash or iram/psram into psram - * - * @param m Matrix to zero - */ -dl_matrix2d_t *dl_matrix_copy_to_psram(const dl_matrix2d_t *m); - -/** - * @brief Generate a new matrix using a range of items from an existing matrix. - * When using this, the data of the new matrix is not allocated/copied but it re-uses a pointer - * to the existing data. Changing the data in the resulting matrix, as a result, will also change - * the data in the existing matrix that has been sliced. - * - * @param x X-offset of the origin of the returned matrix within the sliced matrix - * @param y Y-offset of the origin of the returned matrix within the sliced matrix - * @param w Width of the resulting matrix - * @param h Height of the resulting matrix - * @param in Old matrix (with foreign data) to re-use. Passing NULL will allocate a new matrix. - * @return The resulting slice matrix, or NULL if out of memory - */ -dl_matrix2d_t *dl_matrix_slice(const dl_matrix2d_t *src, int x, int y, int w, int h, dl_matrix2d_t *in); - -/** - * @brief select a range of items from an existing matrix and flatten them into one dimension. - * - * @Warning The results are flattened in row-major order. - * - * @param x X-offset of the origin of the returned matrix within the sliced matrix - * @param y Y-offset of the origin of the returned matrix within the sliced matrix - * @param w Width of the resulting matrix - * @param h Height of the resulting matrix - * @param in Old matrix to re-use. Passing NULL will allocate a new matrix. - * @return The resulting flatten matrix, or NULL if out of memory - */ -dl_matrix2d_t *dl_matrix_flatten(const dl_matrix2d_t *src, int x, int y, int w, int h, dl_matrix2d_t *in); - -/** - * @brief Generate a matrix from existing floating-point data - * - * @param w Width of resulting matrix - * @param h Height of resulting matrix - * @param data Data to populate matrix with - * @return A newaly allocated matrix populated with the given input data, or NULL if out of memory. - */ -dl_matrix2d_t *dl_matrix_from_data(int w, int h, int stride, const void *data); - - -/** - * @brief Multiply a pair of matrices item-by-item: res=a*b - * - * @param a First multiplicand - * @param b Second multiplicand - * @param res Multiplicated data. Can be equal to a or b to overwrite that. - */ -void dl_matrix_mul(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *res); - -/** - * @brief Do a dotproduct of two matrices : res=a.b - * - * @param a First multiplicand - * @param b Second multiplicand - * @param res Dotproduct data. *Must* be a *different* matrix from a or b! - */ -void dl_matrix_dot(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *res); - -/** - * @brief Add a pair of matrices item-by-item: res=a-b - * - * @param a First matrix - * @param b Second matrix - * @param res Added data. Can be equal to a or b to overwrite that. - */ -void dl_matrix_add(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *out); - - -/** - * @brief Divide a pair of matrices item-by-item: res=a/b - * - * @param a First matrix - * @param b Second matrix - * @param res Divided data. Can be equal to a or b to overwrite that. - */ -void dl_matrix_div(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *out); - -/** - * @brief Subtract a matrix from another, item-by-item: res=a-b - * - * @param a First matrix - * @param b Second matrix - * @param res Subtracted data. Can be equal to a or b to overwrite that. - */ -void dl_matrix_sub(const dl_matrix2d_t *a, const dl_matrix2d_t *b, dl_matrix2d_t *out); - -/** - * @brief Add a constant to every item of the matrix - * - * @param subj Matrix to add the constant to - * @param add The constant - */ -void dl_matrix_add_const(dl_matrix2d_t *subj, const fptp_t add); - - -/** - * @brief Concatenate the rows of two matrices into a new matrix - * - * @param a First matrix - * @param b Second matrix - * @return A newly allocated array with as avlues a|b - */ -dl_matrix2d_t *dl_matrix_concat(const dl_matrix2d_t *a, const dl_matrix2d_t *b); - -dl_matrix2d_t *dl_matrix_concat_h( dl_matrix2d_t *a, const dl_matrix2d_t *b); - -/** - * @brief Print the contents of a matrix to stdout. Used for debugging. - * - * @param a The matrix to print. - */ -void dl_printmatrix(const dl_matrix2d_t *a); - -/** - * @brief Return the average square error given a correct and a test matrix. - * - * ...Well, more or less. If anything, it gives an indication of the error between - * the two. Check the code for the exact implementation. - * - * @param a First of the two matrices to compare - * @param b Second of the two matrices to compare - * @return value indicating the relative difference between matrices - */ -float dl_matrix_get_avg_sq_err(const dl_matrix2d_t *a, const dl_matrix2d_t *b); - - - -/** - * @brief Check if two matrices have the same shape, that is, the same amount of rows and columns - * - * @param a First of the two matrices to compare - * @param b Second of the two matrices to compare - * @return true if the two matrices are shaped the same, false otherwise. - */ -int dl_matrix_same_shape(const dl_matrix2d_t *a, const dl_matrix2d_t *b); - - -/** - * @brief Get a specific item from the matrix - * - * Please use these for external matrix access instead of DL_ITM - * - * @param m Matrix to access - * @param x Column address - * @param y Row address - * @return Value in that position - */ -inline static fptp_t dl_matrix_get(const dl_matrix2d_t *m, const int x, const int y) { - return DL_ITM(m, x, y); -} - -/** - * @brief Set a specific item in the matrix to the given value - * - * Please use these for external matrix access instead of DL_ITM - * - * @param m Matrix to access - * @param x Column address - * @param y Row address - * @param val Value to write to that position - */ -inline static void dl_matrix_set(dl_matrix2d_t *m, const int x, const int y, fptp_t val) { - DL_ITM(m, x, y)=val; -} - -void matrix_get_range(const dl_matrix2d_t *m, fptp_t *rmin, fptp_t *rmax); - -#endif - diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrixq.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrixq.h deleted file mode 100644 index 5f0474a08fd..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrixq.h +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_MATRIXQ_H -#define DL_LIB_MATRIXQ_H - -#include -#include "dl_lib_matrix.h" - -typedef int16_t qtp_t; - -//Quantized matrix. Uses fixed numbers and has the storage for the rows/columns inverted -//for easy use as a multiplicand without stressing out the flash cache too much. -typedef struct { - int w; - int h; - int stride; //Normally equals h, not w! - int flags; - int exponent; //The values in items should be multiplied by pow(2,exponent) to get the real values. - qtp_t *itemq; -} dl_matrix2dq_t; - -#define DL_QTP_SHIFT 15 -#define DL_QTP_RANGE ((1<itemq[(y)+(x)*m->stride] -#define DL_QTP_EXP_NA 255 //non-applicable exponent because matrix is null - -#define DL_SHIFT_AUTO 32 - -/** - * @info About quantized matrices and shift values - * - * Grab a coffee (or tea, or hot water) and sit down when you read this for the first - * time. Quantized matrices can speed up your operations, but come with some quirks, and - * it's good to understand how they work before using them. - * - * The data in the quantized matrix type is stored similarily to floating-point types: - * when storing a real value, the value is stored as a mantissa (base number) and an - * exponent. The 'real' value that can be re-derived from those two numbers is something - * similar to mantissa*2^exponent. Up to this point, there's not that much difference from - * the standard floating point implementations like e.g. IEEE-754. - * - * The difference with respect to quantized matrices is that for a quantized matrix, it is - * assumed all values stored have more-or-less the same order of magnitude. This allows the - * matrix to only store all the mantissas, while the exponents are shared; there is only one - * exponent for the entire matrix. This makes it quicker to handle matrix operations - the - * logic to fix the exponents only needs to happen once, while the rest can be done in simple - * integer arithmetic. It also nets us some memory savings - while normally a floating point - * number is 32-bit, storing only 16-bit mantissas as the matrix items almost halves the - * memory requirements. - * - * While most of the details of handling the intricacies of the quantized matrixes are done - * transparently by the code in dl_lib_matrixq.c, some implementation details leak out, - * specifically in places where addition/subtraction/division happens. - * - * The problem is that the routines do not know what the size of the resulting operation is. For - * instance, when adding two matrices of numbers, the resulting numbers *could* be large enough - * to overflow the mantissa of the result if the exponent is the same. However, if by default we - * assume the mantissas needs to be scaled back, we may lose precision. - * - * In order to counter this, all operations that have this issue have a ``shift`` argument. If - * the argument is zero, the routine will be conservative, that is, increase the exponent of - * the result to such an extent it's mathematically impossible a value in the result will exceed - * the maximum value that can be stored. However, when this argument is larger than zero, the - * algorithm will hold back on this scaling by the indicated amount of bits, preserving precision - * but increasing the chance of some of the calculated values not fitting in the mantissa anymore. - * If this happens, the value will be clipped to the largest (or, for negative values, smallest) - * value possible. (Neural networks usually are okay with this happening for a limited amount - * of matrix indices). - * - * For deciding on these shift values, it is recommended to start with a shift value of one, then - * use dl_matrixq_check_sanity on the result. If this indicates clipping, lower the shift value. - * If it indicates bits are under-used, increase it. Note that for adding and subtraction, only - * shift values of 0 or 1 make sense; these routines will error out if you try to do something - * else. - * - * For neural networks and other noise-tolerant applications, note that even when - * dl_matrixq_check_sanity does not indicate any problems, twiddling with the shift value may lead - * to slightly improved precision. Feel free to experiment. - **/ - - -/** - * @brief Allocate a matrix - * - * @param w Width of the matrix - * @param h Height of the matrix - * @return The matrix, or NULL if out of memory - */ -dl_matrix2dq_t *dl_matrixq_alloc(int w, int h); -dl_matrix2dq_t *dl_matrixq_alloc_psram(int w, int h); -/** - * @brief Convert a floating-point matrix to a quantized matrix - * - * @param m Floating-point matrix to convert - * @param out Quantized matrix to re-use. If NULL, allocate a new one. - * @Return The quantized version of the floating-point matrix - */ -dl_matrix2dq_t *dl_matrixq_from_matrix2d(const dl_matrix2d_t *m, dl_matrix2dq_t *out); - -/** - * TODO: DESCRIBE THIS FUNCTION - */ -dl_matrix2dq_t *dl_matrixq_from_matrix2d_by_qmf(const dl_matrix2d_t *m, dl_matrix2dq_t *out, int m_bit, int f_bit); - - -/** - * @brief Convert a quantized matrix to a floating-point one. - * - * @param m Floating-point matrix to convert - * @param out Quantized matrix to re-use. If NULL, allocate a new one. - * @Return The quantized version of the floating-point matrix - **/ -dl_matrix2d_t *dl_matrix2d_from_matrixq(const dl_matrix2dq_t *m, dl_matrix2d_t *out); - - -/** - * @brief Free a quantized matrix - * Frees the matrix structure and (if it doesn't have the DL_MF_FOREIGNDATA flag set) the m->items space as well. - * - * @param m Matrix to free - */ -void dl_matrixq_free(dl_matrix2dq_t *m); - -/** - * @brief Zero out the matrix - * Sets all entries in the matrix to 0. - * - * @param m Matrix to zero - */ -void dl_matrixq_zero(dl_matrix2dq_t *m); - -/** - * @brief Copy the matrix into psram - * Copy the matrix from flash or iram/psram into psram - * - * @param m Matrix to copy - */ -dl_matrix2dq_t *dl_matrixq_copy_to_psram(const dl_matrix2dq_t *m); - -/** - * @brief Do a dotproduct of two quantized matrices : res=a.b, Result is a fixed-point matrix. - * - * @param a First multiplicand - * @param b Second multiplicand - * @param res Dotproduct data. *Must* be a *different* matrix from a or b! - * @param shift Shift ratio - */ -void dl_matrixq_dot(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); - -/** - * @brief Do a dotproduct of two quantized matrices: res=a.b, Result is a floating-point matrix. - * - * @param a First multiplicand - * @param b Second multiplicand - * @param res Dotproduct data. *Must* be a *different* matrix from a or b! - */ -void dl_matrixq_dot_matrix_out(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2d_t *res); - -/** - * @brief Do a dotproduct of two quantized matrices : res=a.b. This always uses the simple & stupid C algo for the dot product. - * - * Result is a fixed-point matrix. - * - * Use this only if you expect something is wrong with the accelerated routines that dl_matrixq_dot calls; this function can be - * much slower than dl_matrixq_dot . - * - * @param a First multiplicand - * @param b Second multiplicand - * @param res Dotproduct data. *Must* be a *different* matrix from a or b! - * @param shift Shift ratio - */ -void dl_matrixq_dot_c_impl(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); - -/** - * @brief Do a dotproduct of two quantized matrices : res=a.b. This always uses the simple & stupid C algo for the dot product. - * - * Result is a floating-point matrix. - * - * Use this only if you expect something is wrong with the accelerated routines that dl_matrixq_dot_matrix_out calls; this function can be - * much slower than dl_matrixq_dot_matrix_out. - * - * @param a First multiplicand - * @param b Second multiplicand - * @param res Dotproduct data. *Must* be a *different* matrix from a or b! - */ -void dl_matrixq_dot_matrix_out_c_impl(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2d_t *res); - -/** - * @brief Do a dotproduct of a floating point and a quantized matrix. Result is a floating-point matrix. - * - * @param a First multiplicand; float matrix - * @param b Second multiplicand; quantized matrix - * @param res Dotproduct data; float matrix. *Must* be a *different* matrix from a or b! - */ -void dl_matrix_matrixq_dot(const dl_matrix2d_t *a, const dl_matrix2dq_t *b, dl_matrix2d_t *res); - - -/** - * @brief Print the contents of a quantized matrix to stdout. Used for debugging. - * - * @param a The matrix to print. - */ -void dl_printmatrixq(const dl_matrix2dq_t *a); - - -/** - * @brief Add a pair of quantizedmatrices item-by-item: res=a-b - * - * @param a First matrix - * @param b Second matrix - * @param res Added data. Can be equal to a or b to overwrite that. - * @param shift Shift value. Only 0 or 1 makes sense here. - */ -void dl_matrixq_add(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); - -/** - * @brief Generate a new matrix using a range of items from an existing matrix. - * When using this, the data of the new matrix is not allocated/copied but it re-uses a pointer - * to the existing data. Changing the data in the resulting matrix, as a result, will also change - * the data in the existing matrix that has been sliced. - * - * @Warning In contrast to the floating point equivalent of this function, the fixed-point version - * of this has the issue that as soon as the output exponent of one of the slices changes, the data - * in the sliced matrix gets corrupted (because the exponent of that matrix is still the same.) If you - * use this function, either treat the slices as read-only, or assume the sliced matrix contains - * garbage after modifying the data in one of the slices. - * - * @param x X-offset of the origin of the returned matrix within the sliced matrix - * @param y Y-offset of the origin of the returned matrix within the sliced matrix - * @param w Width of the resulting matrix - * @param h Height of the resulting matrix - * @param in Old matrix (with foreign data) to re-use. Passing NULL will allocate a new matrix. - * @return The resulting slice matrix, or NULL if out of memory - */ -dl_matrix2dq_t *dl_matrixq_slice(const dl_matrix2dq_t *src, int x, int y, int w, int h, dl_matrix2dq_t *in); - -/** - * @brief select a range of items from an existing matrix and flatten them into one dimension. - * - * @Warning The results are flattened in row-major order. - * - * @param x X-offset of the origin of the returned matrix within the sliced matrix - * @param y Y-offset of the origin of the returned matrix within the sliced matrix - * @param w Width of the resulting matrix - * @param h Height of the resulting matrix - * @param in Old matrix to re-use. Passing NULL will allocate a new matrix. - * @return The resulting flatten matrix, or NULL if out of memory - */ -dl_matrix2dq_t *dl_matrixq_flatten(const dl_matrix2dq_t *src, int x, int y, int w, int h, dl_matrix2dq_t *in); - -/** - * @brief Subtract a quantized matrix from another, item-by-item: res=a-b - * - * @param a First matrix - * @param b Second matrix - * @param res Subtracted data. Can be equal to a or b to overwrite that. - * @param shift Shift value. Only 0 or 1 makes sense here. - */ -void dl_matrixq_sub(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *res, int shift); - -/** - * @brief Multiply a pair of quantized matrices item-by-item: res=a*b - * - * @param a First multiplicand - * @param b Second multiplicand - * @param res Multiplicated data. Can be equal to a or b to overwrite that matrix. - */ -void dl_matrixq_mul( dl_matrix2dq_t *a, dl_matrix2dq_t *b, dl_matrix2dq_t *res); - -/** - * @brief Divide a pair of quantized matrices item-by-item: res=a/b - * - * @param a First matrix - * @param b Second matrix - * @param res Divided data. Can be equal to a or b to overwrite that. - */ -void dl_matrixq_div(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b, dl_matrix2dq_t *out, int shift); - -/** - * @brief Check if two quantized matrices have the same shape, that is, the same amount of - * rows and columns - * - * @param a First of the two matrices to compare - * @param b Second of the two matrices to compare - * @return true if the two matrices are shaped the same, false otherwise. - */ -int dl_matrixq_same_shape(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b); - -/** - * @brief Concatenate the rows of two quantized matrices into a new matrix - * - * @param a First matrix - * @param b Second matrix - * @return A newly allocated quantized matrix with as values a|b - */ -dl_matrix2dq_t *dl_matrixq_concat(const dl_matrix2dq_t *a, const dl_matrix2dq_t *b); - -/** - * @brief Add a constant to every item of the quantized matrix - * - * @param subj Matrix to add the constant to - * @param add The constant - */ -void dl_matrixq_add_const(dl_matrix2dq_t *subj, const fptp_t add, int shift); - -/** - * @brief Check the sanity of a quantized matrix - * - * Due to the nature of quantized matrices, depending on the calculations a quantized - * matrix is the result of and the shift values chosen in those calculations, a quantized - * matrix may have an exponent and mantissas that lead to a loss of precision, either because - * most significant mantissa bits are unused, or because a fair amount of mantissas are - * clipped. This function checks if this is the case and will report a message to stdout - * if significant loss of precision is detected. - * - * @param m The quantized matrix to check - * @param name A string to be displayed in the message if the sanity check fails - * @return True if matrix is sane, false otherwise - **/ - -int dl_matrixq_check_sanity(dl_matrix2dq_t *m, const char *name); - -/** - * @brief re-adjust the exponent of the matrix to fit the mantissa better - * - * This function will shift up all the data in the mantissas so there are no - * most-significant bits that are unused in all mantissas. It will also adjust - * the exponent to keep the actua values in the matrix the same. - * - * Some operations done on a matrix, especially operations that re-use the - * result of earlier operations done in the same way, can lead to the loss of - * data because the exponent of the quantized matrix is never re-adjusted. You - * can do that implicitely by calling this function. - * - * @param m The matrix to re-adjust -**/ -void dl_matrixq_readjust_exp(dl_matrix2dq_t *m); - - - -/** - * @brief Get the floating-point value of a specific item from the quantized matrix - * - * @param m Matrix to access - * @param x Column address - * @param y Row address - * @return Value in that position - */ -fptp_t dl_matrixq_get(const dl_matrix2dq_t *m, const int x, const int y); - -/** - * @brief Set a specific item in the quantized matrix to the given - * floating-point value - * - * @warning If the given value is more than the exponent in the quantized matrix - * allows for, all mantissas in the matrix will be shifted down to make the value - * 'fit'. If, however, the exponent is such that the value would result in a - * quantized mantissa of 0, nothing is done. - * - * @param m Matrix to access - * @param x Column address - * @param y Row address - * @param val Value to write to that position - */ -void dl_matrixq_set(dl_matrix2dq_t *m, const int x, const int y, fptp_t val); - -#endif diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrixq8.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrixq8.h deleted file mode 100644 index 579b1c08aaf..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/dl_lib_matrixq8.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2015-2019 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. -#ifndef DL_LIB_MATRIXQ8_H -#define DL_LIB_MATRIXQ8_H - -#include -#include "dl_lib_matrix.h" -#include "dl_lib.h" -#include "dl_lib_matrixq.h" - -typedef int8_t q8tp_t; - -typedef struct { - int w; - int h; - int stride; //Normally equals h, not w! - int flags; - int exponent; //The values in items should be multiplied by pow(2,exponent) to get the real values. - q8tp_t *itemq; -} dl_matrix2dq8_t; - -#define DL_Q8TP_SHIFT 7 -#define DL_Q8TP_RANGE ((1<itemq[(y)+(x)*m->stride] - -/** - * @brief Allocate a matrix - * - * @param w Width of the matrix - * @param h Height of the matrix - * @return The matrix, or NULL if out of memory - */ -dl_matrix2dq8_t *dl_matrixq8_alloc(int w, int h); - -/** - * @brief Free a quantized matrix - * Frees the matrix structure and (if it doesn't have the DL_MF_FOREIGNDATA flag set) the m->items space as well. - * - * @param m Matrix to free - */ -void dl_matrixq8_free(dl_matrix2dq8_t *m); - -/** - * @brief Copy a quantized matrix - * Copy a quantized matrix from flash or iram/psram - * - * @param m Matrix to copy - */ -dl_matrix2dq8_t *dl_matrixq8_copy_to_psram(const dl_matrix2dq8_t *m); - -/** - * @brief Convert a floating-point matrix to a quantized matrix - * - * @param m Floating-point matrix to convert - * @param out Quantized matrix to re-use. If NULL, allocate a new one. - * @Return The quantized version of the floating-point matrix - */ -dl_matrix2dq8_t *dl_matrixq8_from_matrix2d(const dl_matrix2d_t *m, dl_matrix2dq8_t *out); - -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_aec.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_aec.h deleted file mode 100644 index 03afc90ff04..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_aec.h +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2015-2019 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 -#ifndef _ESP_AEC_H_ -#define _ESP_AEC_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define USE_AEC_FFT // Not kiss_fft -#define AEC_USE_SPIRAM 0 -#define AEC_SAMPLE_RATE 16000 // Only Support 16000Hz -#define AEC_FRAME_LENGTH_MS 16 -#define AEC_FILTER_LENGTH 1200 // Number of samples of echo to cancel - -typedef void* aec_handle_t; - -/** - * @brief Creates an instance to the AEC structure. - * - * @deprecated This API will be deprecated after version 1.0, please use aec_pro_create - * - * @param sample_rate The Sampling frequency (Hz) must be 16000. - * - * @param frame_length The length of the audio processing must be 16ms. - * - * @param filter_length Number of samples of echo to cancel. - * - * @return - * - NULL: Create failed - * - Others: The instance of AEC - */ -aec_handle_t aec_create(int sample_rate, int frame_length, int filter_length); - -/** - * @brief Creates an instance to the AEC structure. - * - * @deprecated This API will be deprecated after version 1.0, please use aec_pro_create - * - * @param sample_rate The Sampling frequency (Hz) must be 16000. - * - * @param frame_length The length of the audio processing must be 16ms. - * - * @param filter_length Number of samples of echo to cancel. - * - * @param nch Number of input signal channel. - * - * @return - * - NULL: Create failed - * - Others: The instance of AEC - */ -aec_handle_t aec_create_multimic(int sample_rate, int frame_length, int filter_length, int nch); - -/** - * @brief Creates an instance of more powerful AEC. - * - * @param frame_length Length of input signal. Must be 16ms if mode is 0; otherwise could be 16ms or 32ms. Length of input signal to aec_process must be modified accordingly. - * - * @param nch Number of microphones. - * - * @param mode Mode of AEC (0 to 5), indicating aggressiveness and RAM allocation. 0: mild; 1 or 2: medium (1: internal RAM, 2: SPIRAM); 3 and 4: aggressive (3: internal RAM, 4: SPIRAM); 5: agressive, accelerated for ESP32-S3. - * - * @return - * - NULL: Create failed - * - Others: An Instance of AEC - */ -aec_handle_t aec_pro_create(int frame_length, int nch, int mode); - -/** - * @brief Performs echo cancellation a frame, based on the audio sent to the speaker and frame from mic. - * - * @param inst The instance of AEC. - * - * @param indata An array of 16-bit signed audio samples from mic. - * - * @param refdata An array of 16-bit signed audio samples sent to the speaker. - * - * @param outdata Returns near-end signal with echo removed. - * - * @return None - * - */ -void aec_process(const aec_handle_t inst, int16_t *indata, int16_t *refdata, int16_t *outdata); - -/** - * @brief Free the AEC instance - * - * @param inst The instance of AEC. - * - * @return None - * - */ -void aec_destroy(aec_handle_t inst); - -#ifdef __cplusplus -} -#endif - -#endif //_ESP_AEC_H_ diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_config.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_config.h deleted file mode 100644 index cf0b06a6cd0..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_config.h +++ /dev/null @@ -1,131 +0,0 @@ -#pragma once -#include "stdint.h" -#include "esp_wn_iface.h" -#include "esp_wn_models.h" -#include "esp_vad.h" - -//AFE: Audio Front-End -//SR: Speech Recognition -//afe_sr/AFE_SR: the audio front-end for speech recognition - - -//Set AFE_SR mode -typedef enum { - SR_MODE_LOW_COST = 0, - SR_MODE_HIGH_PERF = 1 -} afe_sr_mode_t; - -typedef enum { - AFE_MEMORY_ALLOC_MORE_INTERNAL = 1, // malloc with more internal ram - AFE_MEMORY_ALLOC_INTERNAL_PSRAM_BALANCE = 2, // malloc with internal ram and psram in balance - AFE_MEMORY_ALLOC_MORE_PSRAM = 3 // malloc with more psram -} afe_memory_alloc_mode_t; - -typedef enum { - AFE_MN_PEAK_AGC_MODE_1 = -5, // The peak amplitude of audio fed to multinet is -5dB - AFE_MN_PEAK_AGC_MODE_2 = -4, // The peak amplitude of audio fed to multinet is -4dB - AFE_MN_PEAK_AGC_MODE_3 = -3, // The peak amplitude of audio fed to multinet is -3dB - AFE_MN_PEAK_NO_AGC = 0, // There is no agc gain -} afe_mn_peak_agc_mode_t; - -typedef struct { - int total_ch_num; // total channel num. It must be: total_ch_num = mic_num + ref_num - int mic_num; // mic channel num - int ref_num; // reference channel num - int sample_rate; // sample rate of audio -} afe_pcm_config_t; - -/** - * @brief Function to get the debug audio data - * - * @param data The debug audio data which don't be modify. It should be copied away as soon as possible that avoid blocking for too long. - * @param data_size The number of bytes of data. - * @returns - */ -typedef void (*afe_debug_hook_callback_t)(const int16_t* data, int data_size); - -typedef enum { - AFE_DEBUG_HOOK_MASE_TASK_IN = 0, // To get the input data of mase task - AFE_DEBUG_HOOK_FETCH_TASK_IN = 1, // To get the input data of fetch task - AFE_DEBUG_HOOK_MAX = 2 -} afe_debug_hook_type_t; - -typedef struct { - afe_debug_hook_type_t hook_type; // debug type of hook - afe_debug_hook_callback_t hook_callback; // callback function which transfer debug audio data -} afe_debug_hook_t; - -typedef struct { - bool aec_init; - bool se_init; - bool vad_init; - bool wakenet_init; - bool voice_communication_init; - bool voice_communication_agc_init; // AGC swich for voice communication - int voice_communication_agc_gain; // AGC gain(dB) for voice communication - vad_mode_t vad_mode; // The value can be: VAD_MODE_0, VAD_MODE_1, VAD_MODE_2, VAD_MODE_3, VAD_MODE_4 - char *wakenet_model_name; // The model name of wakenet - det_mode_t wakenet_mode; - afe_sr_mode_t afe_mode; - int afe_perferred_core; - int afe_perferred_priority; - int afe_ringbuf_size; - afe_memory_alloc_mode_t memory_alloc_mode; - afe_mn_peak_agc_mode_t agc_mode; // The agc mode for ASR - afe_pcm_config_t pcm_config; // Config the channel num of original data which is fed to the afe feed function. - bool debug_init; - afe_debug_hook_t debug_hook[AFE_DEBUG_HOOK_MAX]; -} afe_config_t; - - -#if CONFIG_IDF_TARGET_ESP32 -#define AFE_CONFIG_DEFAULT() { \ - .aec_init = true, \ - .se_init = true, \ - .vad_init = true, \ - .wakenet_init = true, \ - .voice_communication_init = false, \ - .voice_communication_agc_init = false, \ - .voice_communication_agc_gain = 15, \ - .vad_mode = VAD_MODE_3, \ - .wakenet_model_name = NULL, \ - .wakenet_mode = DET_MODE_90, \ - .afe_mode = SR_MODE_HIGH_PERF, \ - .afe_perferred_core = 0, \ - .afe_perferred_priority = 5, \ - .afe_ringbuf_size = 50, \ - .memory_alloc_mode = AFE_MEMORY_ALLOC_INTERNAL_PSRAM_BALANCE, \ - .agc_mode = AFE_MN_PEAK_AGC_MODE_2, \ - .pcm_config.total_ch_num = 2, \ - .pcm_config.mic_num = 1, \ - .pcm_config.ref_num = 1, \ - .pcm_config.sample_rate = 16000, \ - .debug_init = false, \ - .debug_hook = {{AFE_DEBUG_HOOK_MASE_TASK_IN, NULL}, {AFE_DEBUG_HOOK_FETCH_TASK_IN, NULL}}, \ -} -#elif CONFIG_IDF_TARGET_ESP32S3 -#define AFE_CONFIG_DEFAULT() { \ - .aec_init = true, \ - .se_init = true, \ - .vad_init = true, \ - .wakenet_init = true, \ - .voice_communication_init = false, \ - .voice_communication_agc_init = false, \ - .voice_communication_agc_gain = 15, \ - .vad_mode = VAD_MODE_3, \ - .wakenet_model_name = NULL, \ - .wakenet_mode = DET_MODE_2CH_90, \ - .afe_mode = SR_MODE_LOW_COST, \ - .afe_perferred_core = 0, \ - .afe_perferred_priority = 5, \ - .afe_ringbuf_size = 50, \ - .memory_alloc_mode = AFE_MEMORY_ALLOC_MORE_PSRAM, \ - .agc_mode = AFE_MN_PEAK_AGC_MODE_2, \ - .pcm_config.total_ch_num = 3, \ - .pcm_config.mic_num = 2, \ - .pcm_config.ref_num = 1, \ - .pcm_config.sample_rate = 16000, \ - .debug_init = false, \ - .debug_hook = {{AFE_DEBUG_HOOK_MASE_TASK_IN, NULL}, {AFE_DEBUG_HOOK_FETCH_TASK_IN, NULL}}, \ -} -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_sr_iface.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_sr_iface.h deleted file mode 100644 index b9025e96225..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_sr_iface.h +++ /dev/null @@ -1,199 +0,0 @@ -#pragma once -#include "stdint.h" -#include "esp_afe_config.h" - -//AFE: Audio Front-End -//SR: Speech Recognition -//afe_sr/AFE_SR: the audio front-end for speech recognition - -//Opaque AFE_SR data container -typedef struct esp_afe_sr_data_t esp_afe_sr_data_t; - -/** - * @brief The state of vad - */ -typedef enum -{ - AFE_VAD_SILENCE = 0, // noise or silence - AFE_VAD_SPEECH // speech -} afe_vad_state_t; - -/** - * @brief The result of fetch function - */ -typedef struct afe_fetch_result_t -{ - int16_t *data; // the data of audio. - int data_size; // the size of data. The unit is byte. - wakenet_state_t wakeup_state; // the value is wakenet_state_t - int wake_word_index; // if the wake word is detected. It will store the wake word index which start from 1. - afe_vad_state_t vad_state; // the value is afe_vad_state_t - int trigger_channel_id; // the channel index of output - int wake_word_length; // the length of wake word. It's unit is the number of samples. - int ret_value; // the return state of fetch function - void* reserved; // reserved for future use -} afe_fetch_result_t; - -/** - * @brief Function to initialze a AFE_SR instance - * - * @param afe_config The config of AFE_SR - * @returns Handle to the AFE_SR data - */ -typedef esp_afe_sr_data_t* (*esp_afe_sr_iface_op_create_from_config_t)(afe_config_t *afe_config); - -/** - * @brief Get the amount of each channel samples per frame that need to be passed to the function - * - * Every speech enhancement AFE_SR processes a certain number of samples at the same time. This function - * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. - * - * @param afe The AFE_SR object to query - * @return The amount of samples to feed the fetch function - */ -typedef int (*esp_afe_sr_iface_op_get_samp_chunksize_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Get the total channel number which be config - * - * @param afe The AFE_SR object to query - * @return The amount of total channels - */ -typedef int (*esp_afe_sr_iface_op_get_total_channel_num_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Get the mic channel number which be config - * - * @param afe The AFE_SR object to query - * @return The amount of mic channels - */ -typedef int (*esp_afe_sr_iface_op_get_channel_num_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Get the sample rate of the samples to feed to the function - * - * @param afe The AFE_SR object to query - * @return The sample rate, in hz - */ -typedef int (*esp_afe_sr_iface_op_get_samp_rate_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Feed samples of an audio stream to the AFE_SR - * - * @Warning The input data should be arranged in the format of channel interleaving. - * The last channel is reference signal if it has reference data. - * - * @param afe The AFE_SR object to query - * - * @param in The input microphone signal, only support signed 16-bit @ 16 KHZ. The frame size can be queried by the - * `get_feed_chunksize`. - * @return The size of input - */ -typedef int (*esp_afe_sr_iface_op_feed_t)(esp_afe_sr_data_t *afe, const int16_t* in); - -/** - * @brief fetch enhanced samples of an audio stream from the AFE_SR - * - * @Warning The output is single channel data, no matter how many channels the input is. - * - * @param afe The AFE_SR object to query - * @return The result of output, please refer to the definition of `afe_fetch_result_t`. (The frame size of output audio can be queried by the `get_fetch_chunksize`.) - */ -typedef afe_fetch_result_t* (*esp_afe_sr_iface_op_fetch_t)(esp_afe_sr_data_t *afe); - -/** - * @brief reset ringbuf of AFE. - * - * @param afe The AFE_SR object to query - * @return -1: fail, 0: success - */ -typedef int (*esp_afe_sr_iface_op_reset_buffer_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Initial wakenet and wake words coefficient, or reset wakenet and wake words coefficient - * when wakenet has been initialized. - * - * @param afe The AFE_SR object to query - * @param wakenet_word The wakenet word, should be DEFAULT_WAKE_WORD or EXTRA_WAKE_WORD - * @return 0: fail, 1: success - */ -typedef int (*esp_afe_sr_iface_op_set_wakenet_t)(esp_afe_sr_data_t *afe, char* model_name); - -/** - * @brief Disable wakenet model. - * - * @param afe The AFE_SR object to query - * @return 0: fail, 1: success - */ -typedef int (*esp_afe_sr_iface_op_disable_wakenet_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Enable wakenet model. - * - * @param afe The AFE_SR object to query - * @return 0: fail, 1: success - */ -typedef int (*esp_afe_sr_iface_op_enable_wakenet_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Disable AEC algorithm. - * - * @param afe The AFE_SR object to query - * @return 0: fail, 1: success - */ -typedef int (*esp_afe_sr_iface_op_disable_aec_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Enable AEC algorithm. - * - * @param afe The AFE_SR object to query - * @return 0: fail, 1: success - */ -typedef int (*esp_afe_sr_iface_op_enable_aec_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Disable SE algorithm. - * - * @param afe The AFE_SR object to query - * @return 0: fail, 1: success - */ -typedef int (*esp_afe_sr_iface_op_disable_se_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Enable SE algorithm. - * - * @param afe The AFE_SR object to query - * @return 0: fail, 1: success - */ -typedef int (*esp_afe_sr_iface_op_enable_se_t)(esp_afe_sr_data_t *afe); - -/** - * @brief Destroy a AFE_SR instance - * - * @param afe AFE_SR object to destroy - */ -typedef void (*esp_afe_sr_iface_op_destroy_t)(esp_afe_sr_data_t *afe); - - -/** - * This structure contains the functions used to do operations on a AFE_SR. - */ -typedef struct { - esp_afe_sr_iface_op_create_from_config_t create_from_config; - esp_afe_sr_iface_op_feed_t feed; - esp_afe_sr_iface_op_fetch_t fetch; - esp_afe_sr_iface_op_reset_buffer_t reset_buffer; - esp_afe_sr_iface_op_get_samp_chunksize_t get_feed_chunksize; - esp_afe_sr_iface_op_get_samp_chunksize_t get_fetch_chunksize; - esp_afe_sr_iface_op_get_total_channel_num_t get_total_channel_num; - esp_afe_sr_iface_op_get_channel_num_t get_channel_num; - esp_afe_sr_iface_op_get_samp_rate_t get_samp_rate; - esp_afe_sr_iface_op_set_wakenet_t set_wakenet; - esp_afe_sr_iface_op_disable_wakenet_t disable_wakenet; - esp_afe_sr_iface_op_enable_wakenet_t enable_wakenet; - esp_afe_sr_iface_op_disable_aec_t disable_aec; - esp_afe_sr_iface_op_enable_aec_t enable_aec; - esp_afe_sr_iface_op_disable_se_t disable_se; - esp_afe_sr_iface_op_enable_se_t enable_se; - esp_afe_sr_iface_op_destroy_t destroy; -} esp_afe_sr_iface_t; diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_sr_models.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_sr_models.h deleted file mode 100644 index 43a0d088e15..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_afe_sr_models.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#if defined CONFIG_USE_AFE -#include "esp_afe_sr_iface.h" - - -#if CONFIG_AFE_INTERFACE_V1 -extern const esp_afe_sr_iface_t esp_afe_sr_v1; -extern const esp_afe_sr_iface_t esp_afe_vc_v1; -#define ESP_AFE_SR_HANDLE esp_afe_sr_v1 -#define ESP_AFE_VC_HANDLE esp_afe_vc_v1 - -#else -#error No valid afe selected. -#endif - - -#else - - -#include "esp_afe_sr_iface.h" -extern const esp_afe_sr_iface_t esp_afe_sr_v1; -extern const esp_afe_sr_iface_t esp_afe_vc_v1; -#define ESP_AFE_SR_HANDLE esp_afe_sr_v1 -#define ESP_AFE_VC_HANDLE esp_afe_vc_v1 - -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_agc.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_agc.h deleted file mode 100644 index 37116eb6df1..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_agc.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015-2019 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 -#ifndef _ESP_AGC_H_ -#define _ESP_AGC_H_ - -////all positive value is valid, negective is error -typedef enum { - ESP_AGC_SUCCESS = 0, ////success - ESP_AGC_FAIL = -1, ////agc fail - ESP_AGC_SAMPLE_RATE_ERROR = -2, ///sample rate can be only 8khz, 16khz, 32khz - ESP_AGC_FRAME_SIZE_ERROR = -3, ////the input frame size should be only 10ms, so should together with sample-rate to get the frame size -} ESP_AGE_ERR; - - -void *esp_agc_open(int agc_mode, int sample_rate); -void set_agc_config(void *agc_handle, int gain_dB, int limiter_enable, int target_level_dbfs); -int esp_agc_process(void *agc_handle, short *in_pcm, short *out_pcm, int frame_size, int sample_rate); -void esp_agc_close(void *agc_handle); - -#endif // _ESP_AGC_H_ diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mase.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mase.h deleted file mode 100644 index 0b12e82ad46..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mase.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2015-2019 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 - -#define MASE_SAMPLE_RATE 16000 // Supports 16kHz only -#define MASE_FRAME_SIZE 16 // Supports 16ms only -#define MASE_MIC_DISTANCE 65 // According to physical design of mic-array - -/** - * @brief Sets mic-array type, currently 2-mic line array and 3-mic circular array - * are supported. - */ -typedef enum { - TWO_MIC_LINE = 0, - THREE_MIC_CIRCLE = 1 -} mase_mic_array_type_t; - -/** - * @brief Sets operating mode, supporting normal mode and wake-up enhancement mode - */ -typedef enum { - NORMAL_ENHANCEMENT_MODE = 0, - WAKE_UP_ENHANCEMENT_MODE = 1 -} mase_op_mode_t; - -typedef void* mase_handle_t; - -/** - * @brief Creates an instance to the MASE structure. - * - * @param sample_rate The sampling frequency (Hz) must be 16000. - * - * @param frame_size The length of the audio processing must be 16ms. - * - * @param array_type '0' for 2-mic line array and '1' for 3-mic circular array. - * - * @param mic_distance The distance between neiboring microphones in mm. - * - * @param operating_mode '0' for normal mode and '1' for wake-up enhanced mode. - * - * @param filter_strength Strengh of the mic-array speech enhancement, must be 0, 1, 2 or 3. - * - * @return - * - NULL: Create failed - * - Others: An instance of MASE - */ -mase_handle_t mase_create(int fs, int frame_size, int array_type, float mic_distance, int operating_mode, int filter_strength); - -/** - * @brief Performs mic array processing for one frame. - * - * @param inst The instance of MASE. - * - * @param in An array of 16-bit signed audio samples from mic. - * - * @param dsp_out Returns enhanced signal. - * - * @return None - * - */ -void mase_process(mase_handle_t st, int16_t *in, int16_t *dsp_out); - -/** - * @brief Free the MASE instance - * - * @param inst The instance of MASE. - * - * @return None - * - */ -void mase_destory(mase_handle_t st); \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mn_iface.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mn_iface.h deleted file mode 100644 index 6f3e5eadb34..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mn_iface.h +++ /dev/null @@ -1,153 +0,0 @@ -#pragma once -#include "stdint.h" -#include "esp_wn_iface.h" - -#define ESP_MN_RESULT_MAX_NUM 5 -#define ESP_MN_MAX_PHRASE_NUM 200 -#define ESP_MN_MAX_PHRASE_LEN 63 -#define ESP_MN_MIN_PHRASE_LEN 2 - -#define ESP_MN_PREFIX "mn" -#define ESP_MN_ENGLISH "en" -#define ESP_MN_CHINESE "cn" - -typedef enum { - ESP_MN_STATE_DETECTING = 0, // detecting - ESP_MN_STATE_DETECTED = 1, // detected - ESP_MN_STATE_TIMEOUT = 2, // time out -} esp_mn_state_t; - -// Return all possible recognition results -typedef struct{ - esp_mn_state_t state; - int num; // The number of phrase in list, num<=5. When num=0, no phrase is recognized. - int command_id[ESP_MN_RESULT_MAX_NUM]; // The list of command id. - int phrase_id[ESP_MN_RESULT_MAX_NUM]; // The list of phrase id. - float prob[ESP_MN_RESULT_MAX_NUM]; // The list of probability. -} esp_mn_results_t; - -typedef struct{ - int16_t num; // The number of error phrases, which can not added into model - int16_t phrase_idx[ESP_MN_MAX_PHRASE_NUM]; // The error phrase index in singly linked list. -} esp_mn_error_t; - -typedef struct { - char phoneme_string[ESP_MN_MAX_PHRASE_LEN + 1]; // phoneme string - int16_t command_id; // the command id - float threshold; // trigger threshold, default: 0 - int16_t *wave; // prompt wave data of the phrase -} esp_mn_phrase_t; - -typedef struct _mn_node_ { - esp_mn_phrase_t *phrase; - struct _mn_node_ *next; -} esp_mn_node_t; - -/** - * @brief Initialze a model instance with specified model name. - * - * @param model_name The wakenet model name. - * @param duration The duration (ms) to trigger the timeout - * - * @returns Handle to the model data. - */ -typedef model_iface_data_t* (*esp_mn_iface_op_create_t)(const char *model_name, int duration); - -/** - * @brief Callback function type to fetch the amount of samples that need to be passed to the detect function - * - * Every speech recognition model processes a certain number of samples at the same time. This function - * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. - * - * @param model The model object to query - * @return The amount of samples to feed the detect function - */ -typedef int (*esp_mn_iface_op_get_samp_chunksize_t)(model_iface_data_t *model); - -/** - * @brief Callback function type to fetch the number of frames recognized by the command word - * - * @param model The model object to query - * @return The number of the frames recognized by the command word - */ -typedef int (*esp_mn_iface_op_get_samp_chunknum_t)(model_iface_data_t *model); - -/** - * @brief Set the detection threshold to manually abjust the probability - * - * @param model The model object to query - * @param det_treshold The threshold to trigger speech commands, the range of det_threshold is 0.0~0.9999 - */ -typedef int (*esp_mn_iface_op_set_det_threshold_t)(model_iface_data_t *model, float det_threshold); - -/** - * @brief Get the sample rate of the samples to feed to the detect function - * - * @param model The model object to query - * @return The sample rate, in hz - */ -typedef int (*esp_mn_iface_op_get_samp_rate_t)(model_iface_data_t *model); - -/** - * @brief Get the language of model - * - * @param model The language name - * @return Language name string defined in esp_mn_models.h, eg: ESP_MN_CHINESE, ESP_MN_ENGLISH - */ -typedef char * (*esp_mn_iface_op_get_language_t)(model_iface_data_t *model); - -/** - * @brief Feed samples of an audio stream to the speech recognition model and detect if there is a speech command found. - * - * @param model The model object to query. - * @param samples An array of 16-bit signed audio samples. The array size used can be queried by the - * get_samp_chunksize function. - * @return The state of multinet - */ -typedef esp_mn_state_t (*esp_mn_iface_op_detect_t)(model_iface_data_t *model, int16_t *samples); - -/** - * @brief Destroy a speech commands recognition model - * - * @param model The Model object to destroy - */ -typedef void (*esp_mn_iface_op_destroy_t)(model_iface_data_t *model); - -/** - * @brief Get recognition results - * - * @param model The Model object to query - * - * @return The current results. - */ -typedef esp_mn_results_t* (*esp_mn_iface_op_get_results_t)(model_iface_data_t *model); - -/** - * @brief Open the log print - * - * @param model_data The model object to query. - * - */ -typedef void (*esp_mn_iface_op_open_log_t)(model_iface_data_t *model_data); - -/** - * @brief Set the speech commands by mn_command_root - * - * @param model_data The model object to query. - * @param mn_command_root The speech commands link. - * @return The error phrase id info. - */ -typedef esp_mn_error_t* (*esp_wn_iface_op_set_speech_commands)(model_iface_data_t *model_data, esp_mn_node_t *mn_command_root); - -typedef struct { - esp_mn_iface_op_create_t create; - esp_mn_iface_op_get_samp_rate_t get_samp_rate; - esp_mn_iface_op_get_samp_chunksize_t get_samp_chunksize; - esp_mn_iface_op_get_samp_chunknum_t get_samp_chunknum; - esp_mn_iface_op_set_det_threshold_t set_det_threshold; - esp_mn_iface_op_detect_t detect; - esp_mn_iface_op_destroy_t destroy; - esp_mn_iface_op_get_results_t get_results; - esp_mn_iface_op_open_log_t open_log; - esp_wn_iface_op_set_speech_commands set_speech_commands; -} esp_mn_iface_t; diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mn_models.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mn_models.h deleted file mode 100644 index 15d7ddd4ca1..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_mn_models.h +++ /dev/null @@ -1,61 +0,0 @@ -#pragma once -#include "esp_mn_iface.h" - -//Contains declarations of all available speech recognion models. Pair this up with the right coefficients and you have a model that can recognize -//a specific phrase or word. - - -/** - * @brief Get the multinet handle from model name - * - * @param model_name The name of model - * @returns The handle of multinet - */ -esp_mn_iface_t *esp_mn_handle_from_name(char *model_name); - -/** - * @brief Get the multinet language from model name - * - * @param model_name The name of model - * @returns The language of multinet - */ -char *esp_mn_language_from_name(char *model_name); - -/* - Configure wake word to use based on what's selected in menuconfig. -*/ - -#ifdef CONFIG_SR_MN_CN_MULTINET2_SINGLE_RECOGNITION -#include "multinet2_ch.h" -#define MULTINET_COEFF get_coeff_multinet2_ch -#define MULTINET_MODEL_NAME "mn2_cn" - -#else -#define MULTINET_COEFF "COEFF_NULL" -#define MULTINET_MODEL_NAME "NULL" -#endif - - -/* example - -static const esp_mn_iface_t *multinet = &MULTINET_MODEL; - -//Initialize MultiNet model data -model_iface_data_t *model_data = multinet->create(&MULTINET_COEFF); -add_speech_commands(multinet, model_data); - -//Set parameters of buffer -int audio_chunksize=model->get_samp_chunksize(model_data); -int frequency = model->get_samp_rate(model_data); -int16_t *buffer=malloc(audio_chunksize*sizeof(int16_t)); - -//Detect -int r=model->detect(model_data, buffer); -if (r>0) { - printf("Detection triggered output %d.\n", r); -} - -//Destroy model -model->destroy(model_data) - -*/ diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_ns.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_ns.h deleted file mode 100644 index c113aedca58..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_ns.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2015-2019 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 -#ifndef _ESP_NS_H_ -#define _ESP_NS_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define NS_USE_SPIARM 0 -#define NS_FRAME_LENGTH_MS 10 //Supports 10ms, 20ms, 30ms - -/** -* The Sampling frequency (Hz) must be 16000Hz -*/ - -typedef void* ns_handle_t; - -/** - * @brief Creates an instance to the NS structure. - * - * @param frame_length The length of the audio processing can be 10ms, 20ms, 30ms. - * - * @return - * - NULL: Create failed - * - Others: The instance of NS - */ -ns_handle_t ns_create(int frame_length); - -/** - * @brief Creates an instance of the more powerful noise suppression algorithm. - * - * @warning frame_length only supports be 10 ms. - * - * @param frame_length The length of the audio processing can only be 10ms. - * @param mode 0: Mild, 1: Medium, 2: Aggressive - * @param sample_rate The sample rate of the audio. - * - * @return - * - NULL: Create failed - * - Others: The instance of NS - */ -ns_handle_t ns_pro_create(int frame_length, int mode, int sample_rate); - -/** - * @brief Feed samples of an audio stream to the NS and get the audio stream after Noise suppression. - * - * @param inst The instance of NS. - * - * @param indata An array of 16-bit signed audio samples. - * - * @param outdata An array of 16-bit signed audio samples after noise suppression. - * - * @return None - * - */ -void ns_process(ns_handle_t inst, int16_t *indata, int16_t *outdata); - -/** - * @brief Free the NS instance - * - * @param inst The instance of NS. - * - * @return None - * - */ -void ns_destroy(ns_handle_t inst); - -#ifdef __cplusplus -} -#endif - -#endif //_ESP_NS_H_ diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_vad.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_vad.h deleted file mode 100644 index 2440d39a795..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_vad.h +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2015-2019 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 -#ifndef _ESP_VAD_H_ -#define _ESP_VAD_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define SAMPLE_RATE_HZ 16000 //Supports 32000, 16000, 8000 -#define VAD_FRAME_LENGTH_MS 30 //Supports 10ms, 20ms, 30ms - -/** - * @brief Sets the VAD operating mode. A more aggressive (higher mode) VAD is more - * restrictive in reporting speech. - */ -typedef enum { - VAD_MODE_0 = 0, - VAD_MODE_1, - VAD_MODE_2, - VAD_MODE_3, - VAD_MODE_4 -} vad_mode_t; - -typedef enum { - VAD_SILENCE = 0, - VAD_SPEECH -} vad_state_t; - -typedef void* vad_handle_t; - -/** - * @brief Creates an instance to the VAD structure. - * - * @param vad_mode Sets the VAD operating mode. - * - * @return - * - NULL: Create failed - * - Others: The instance of VAD - */ -vad_handle_t vad_create(vad_mode_t vad_mode); - -/** - * @brief Feed samples of an audio stream to the VAD and check if there is someone speaking. - * - * @param inst The instance of VAD. - * - * @param data An array of 16-bit signed audio samples. - * - * @param sample_rate_hz The Sampling frequency (Hz) can be 32000, 16000, 8000, default: 16000. - * - * @param one_frame_ms The length of the audio processing can be 10ms, 20ms, 30ms, default: 30. - * - * @return - * - VAD_SILENCE if no voice - * - VAD_SPEECH if voice is detected - * - */ -vad_state_t vad_process(vad_handle_t inst, int16_t *data, int sample_rate_hz, int one_frame_ms); - -/** - * @brief Free the VAD instance - * - * @param inst The instance of VAD. - * - * @return None - * - */ -void vad_destroy(vad_handle_t inst); - -/* -* Programming Guide: -* -* @code{c} -* vad_handle_t vad_inst = vad_create(VAD_MODE_3, SAMPLE_RATE_HZ, VAD_FRAME_LENGTH_MS); // Creates an instance to the VAD structure. -* -* while (1) { -* //Use buffer to receive the audio data from MIC. -* vad_state_t vad_state = vad_process(vad_inst, buffer); // Feed samples to the VAD process and get the result. -* } -* -* vad_destroy(vad_inst); // Free the VAD instance at the end of whole VAD process -* -* @endcode -*/ - -#ifdef __cplusplus -} -#endif - -#endif //_ESP_VAD_H_ diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_wn_iface.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_wn_iface.h deleted file mode 100644 index 9cc9e5cf5c3..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_wn_iface.h +++ /dev/null @@ -1,185 +0,0 @@ -#pragma once -#include "stdint.h" - -//Opaque model data container -typedef struct model_iface_data_t model_iface_data_t; - -/** - * @brief The state of wakeup - */ -typedef enum -{ - WAKENET_NO_DETECT = 0, // wake word is not detected - WAKENET_CHANNEL_VERIFIED = -1, // output channel is verified - WAKENET_DETECTED = 1 // wake word is detected -} wakenet_state_t; - -//Set wake words recognition operating mode -//The probability of being wake words is increased with increasing mode, -//As a consequence also the false alarm rate goes up -typedef enum { - DET_MODE_90 = 0, // Normal - DET_MODE_95 = 1, // Aggressive - DET_MODE_2CH_90 = 2, - DET_MODE_2CH_95 = 3, - DET_MODE_3CH_90 = 4, - DET_MODE_3CH_95 = 5, -} det_mode_t; - -typedef struct { - int wake_word_num; //The number of all wake words - char **wake_word_list; //The name list of wake words -} wake_word_info_t; - -/** - * @brief Easy function type to initialze a model instance with a detection mode and specified wake word coefficient - * - * @param model_name The specified wake word model coefficient - * @param det_mode The wake words detection mode to trigger wake words, DET_MODE_90 or DET_MODE_95 - * @returns Handle to the model data - */ -typedef model_iface_data_t* (*esp_wn_iface_op_create_t)(const void *model_name, det_mode_t det_mode); - -/** - * @brief Get the amount of samples that need to be passed to the detect function - * - * Every speech recognition model processes a certain number of samples at the same time. This function - * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. - * - * @param model The model object to query - * @return The amount of samples to feed the detect function - */ -typedef int (*esp_wn_iface_op_get_samp_chunksize_t)(model_iface_data_t *model); - -/** - * @brief Get the channel number of samples that need to be passed to the detect function - * - * Every speech recognition model processes a certain number of samples at the same time. This function - * can be used to query that amount. Note that the returned amount is in 16-bit samples, not in bytes. - * - * @param model The model object to query - * @return The amount of samples to feed the detect function - */ -typedef int (*esp_wn_iface_op_get_channel_num_t)(model_iface_data_t *model); - -/** - * @brief Get the start point of wake word when one wake word is detected. - * - * @Warning: This function should be called when the channel index is verified. - * The returned value is the number of samples from start point of wake word to detected point. - * - * @param model The model object to query - * @return The number of samples from start point to detected point (end point) - */ -typedef int (*esp_wn_iface_op_get_start_point_t)(model_iface_data_t *model); - - -/** - * @brief Get the sample rate of the samples to feed to the detect function - * - * @param model The model object to query - * @return The sample rate, in hz - */ -typedef int (*esp_wn_iface_op_get_samp_rate_t)(model_iface_data_t *model); - -/** - * @brief Get the number of wake words - * - * @param model The model object to query - * @returns the number of wake words - */ -typedef int (*esp_wn_iface_op_get_word_num_t)(model_iface_data_t *model); - -/** - * @brief Get the name of wake word by index - * - * @Warning The index of wake word start with 1 - - * @param model The model object to query - * @param word_index The index of wake word - * @returns the detection threshold - */ -typedef char* (*esp_wn_iface_op_get_word_name_t)(model_iface_data_t *model, int word_index); - -/** - * @brief Set the detection threshold to manually abjust the probability - * - * @param model The model object to query - * @param det_treshold The threshold to trigger wake words, the range of det_threshold is 0.5~0.9999 - * @param word_index The index of wake word - * @return 0: setting failed, 1: setting success - */ -typedef int (*esp_wn_iface_op_set_det_threshold_t)(model_iface_data_t *model, float det_threshold, int word_index); - -/** - * @brief Get the wake word detection threshold of different modes - * - * @param model The model object to query - * @param word_index The index of wake word - * @returns the detection threshold - */ -typedef float (*esp_wn_iface_op_get_det_threshold_t)(model_iface_data_t *model, int word_index); - -/** - * @brief Feed samples of an audio stream to the keyword detection model and detect if there is a keyword found. - * - * @Warning The index of wake word start with 1, 0 means no wake words is detected. - * - * @param model The model object to query - * @param samples An array of 16-bit signed audio samples. The array size used can be queried by the - * get_samp_chunksize function. - * @return The index of wake words, return 0 if no wake word is detected, else the index of the wake words. - */ -typedef wakenet_state_t (*esp_wn_iface_op_detect_t)(model_iface_data_t *model, int16_t *samples); - -/** - * @brief Get the volume gain - * - * @param model The model object to query - * @param target_db The target dB to calculate volume gain - * @returns the volume gain - */ -typedef float (*esp_wn_iface_op_get_vol_gain_t)(model_iface_data_t *model, float target_db); - -/** - * @brief Get the triggered channel index. Channel index starts from zero - * - * @param model The model object to query - * @return The channel index - */ -typedef int (*esp_wn_iface_op_get_triggered_channel_t)(model_iface_data_t *model); - -/** - * @brief Clean all states of model - * - * @param model The model object to query - */ -typedef void (*esp_wn_iface_op_clean_t)(model_iface_data_t *model); - -/** - * @brief Destroy a speech recognition model - * - * @param model Model object to destroy - */ -typedef void (*esp_wn_iface_op_destroy_t)(model_iface_data_t *model); - - -/** - * This structure contains the functions used to do operations on a wake word detection model. - */ -typedef struct { - esp_wn_iface_op_create_t create; - esp_wn_iface_op_get_start_point_t get_start_point; - esp_wn_iface_op_get_samp_chunksize_t get_samp_chunksize; - esp_wn_iface_op_get_channel_num_t get_channel_num; - esp_wn_iface_op_get_samp_rate_t get_samp_rate; - esp_wn_iface_op_get_word_num_t get_word_num; - esp_wn_iface_op_get_word_name_t get_word_name; - esp_wn_iface_op_set_det_threshold_t set_det_threshold; - esp_wn_iface_op_get_det_threshold_t get_det_threshold; - esp_wn_iface_op_get_triggered_channel_t get_triggered_channel; - esp_wn_iface_op_get_vol_gain_t get_vol_gain; - esp_wn_iface_op_detect_t detect; - esp_wn_iface_op_clean_t clean; - esp_wn_iface_op_destroy_t destroy; -} esp_wn_iface_t; diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_wn_models.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_wn_models.h deleted file mode 100644 index 31ac0ab9c3b..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/esp_wn_models.h +++ /dev/null @@ -1,122 +0,0 @@ -#pragma once -#include "esp_wn_iface.h" - - -// The prefix of wakenet model name is used to filter all wakenet from availabel models. -#define ESP_WN_PREFIX "wn" - -/** - * @brief Get the wakenet handle from model name - * - * @param model_name The name of model - * @returns The handle of wakenet - */ -const esp_wn_iface_t *esp_wn_handle_from_name(const char *model_name); - -/** - * @brief Get the wake word name from model name - * - * @param model_name The name of model - * @returns The wake word name, like "alexa","hilexin","xiaoaitongxue" - */ -char* esp_wn_wakeword_from_name(const char *model_name); - -// /** -// * @brief Get the model coeff from model name -// * -// * @Warning: retuen model_coeff_getter_t, when chip is ESP32, -// * return string for other chips -// * -// * @param model_name The name of model -// * @returns The handle of wakenet -// */ -// void *esp_wn_coeff_from_name(char *model_name); - - -#if defined CONFIG_USE_WAKENET -/* - Configure wake word to use based on what's selected in menuconfig. -*/ -#if CONFIG_SR_WN_WN5_HILEXIN -#include "hilexin_wn5.h" -#define WAKENET_MODEL_NAME "wn5_hilexin" -#define WAKENET_COEFF get_coeff_hilexin_wn5 - -#elif CONFIG_SR_WN_WN5X2_HILEXIN -#include "hilexin_wn5X2.h" -#define WAKENET_MODEL_NAME "wn5_hilexinX2" -#define WAKENET_COEFF get_coeff_hilexin_wn5X2 - - -#elif CONFIG_SR_WN_WN5X3_HILEXIN -#include "hilexin_wn5X3.h" -#define WAKENET_MODEL_NAME "wn5_hilexinX3" -#define WAKENET_COEFF get_coeff_hilexin_wn5X3 - - -#elif CONFIG_SR_WN_WN5_NIHAOXIAOZHI -#include "nihaoxiaozhi_wn5.h" -#define WAKENET_MODEL_NAME "wn5_nihaoxiaozhi" -#define WAKENET_COEFF get_coeff_nihaoxiaozhi_wn5 - - -#elif CONFIG_SR_WN_WN5X2_NIHAOXIAOZHI -#include "nihaoxiaozhi_wn5X2.h" -#define WAKENET_MODEL_NAME "wn5_nihaoxiaozhiX2" -#define WAKENET_COEFF get_coeff_nihaoxiaozhi_wn5X2 - - -#elif CONFIG_SR_WN_WN5X3_NIHAOXIAOZHI -#include "nihaoxiaozhi_wn5X3.h" -#define WAKENET_MODEL_NAME "wn5_nihaoxiaozhiX3" -#define WAKENET_COEFF get_coeff_nihaoxiaozhi_wn5X3 - - -#elif CONFIG_SR_WN_WN5X3_NIHAOXIAOXIN -#include "nihaoxiaoxin_wn5X3.h" -#define WAKENET_MODEL_NAME "wn5_nihaoxiaoxinX3" -#define WAKENET_COEFF get_coeff_nihaoxiaoxin_wn5X3 - - -#elif CONFIG_SR_WN_WN5X3_HIJESON -#include "hijeson_wn5X3.h" -#define WAKENET_MODEL_NAME "wn5_hijesonX3" -#define WAKENET_COEFF get_coeff_hijeson_wn5X3 - -#elif CONFIG_SR_WN_WN5_CUSTOMIZED_WORD -#include "customized_word_wn5.h" -#define WAKENET_MODEL_NAME "wn5_customizedword" -#define WAKENET_COEFF get_coeff_customizedword_wn5 - -#else -#define WAKENET_MODEL_NAME "NULL" -#define WAKENET_COEFF "COEFF_NULL" -#endif - -#else -#define WAKENET_MODEL_NAME "NULL" -#define WAKENET_COEFF "COEFF_NULL" -#endif - -/* - -static const sr_model_iface_t *model = esp_wn_handle_from_name(model_name); - -//Initialize wakeNet model data -static model_iface_data_t *model_data=model->create(model_name, DET_MODE_90); - -//Set parameters of buffer -int audio_chunksize=model->get_samp_chunksize(model_data); -int frequency = model->get_samp_rate(model_data); -int16_t *buffer=malloc(audio_chunksize*sizeof(int16_t)); - -//Detect -int r=model->detect(model_data, buffer); -if (r>0) { - printf("Detection triggered output %d.\n", r); -} - -//Destroy model -model->destroy(model_data) - -*/ diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5.h deleted file mode 100644 index 3e08234e23e..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_hilexin_wn5; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5X2.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5X2.h deleted file mode 100644 index 543c6c66bd3..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5X2.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_hilexin_wn5X2; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5X3.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5X3.h deleted file mode 100644 index b2897b34fee..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/hilexin_wn5X3.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_hilexin_wn5X3; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/multinet2_ch.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/multinet2_ch.h deleted file mode 100644 index 2cee215dca7..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/multinet2_ch.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_multinet2_ch; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaoxin_wn5X3.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaoxin_wn5X3.h deleted file mode 100644 index fe278122a78..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaoxin_wn5X3.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_nihaoxiaoxin_wn5X3; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5.h deleted file mode 100644 index f88dced9342..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_nihaoxiaozhi_wn5; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X2.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X2.h deleted file mode 100644 index 0f8a9f17049..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X2.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_nihaoxiaozhi_wn5X2; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X3.h b/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X3.h deleted file mode 100644 index 2b5cdc10b0f..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/include/esp32/nihaoxiaozhi_wn5X3.h +++ /dev/null @@ -1,9 +0,0 @@ -//Generated by mkmodel_py -#pragma once -#include -#include "dl_lib_coefgetter_if.h" -#include "dl_lib_matrix.h" -#include "dl_lib_matrixq.h" -#include "dl_lib_matrixq8.h" - -extern const model_coeff_getter_t get_coeff_nihaoxiaozhi_wn5X3; \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/src/include/esp_mn_speech_commands.h b/tools/sdk/esp32s2/include/esp-sr/src/include/esp_mn_speech_commands.h deleted file mode 100644 index c7b29274096..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/src/include/esp_mn_speech_commands.h +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2015-2022 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. -#pragma once -#include "esp_err.h" -#include "esp_mn_iface.h" - -/* -esp_mn_node_t is a singly linked list which is used to manage speech commands. -It is easy to add one speech command into linked list and remove one speech command from linked list. -*/ - - -/** - * @brief Initialze the speech commands singly linked list. - * - * @return - * - ESP_OK Success - * - ESP_ERR_NO_MEM No memory - * - ESP_ERR_INVALID_STATE The Speech Commands link has been initialized - */ -esp_err_t esp_mn_commands_alloc(void); - -/** - * @brief Clear the speech commands linked list and free root node. - * - * @return - * - ESP_OK Success - * - ESP_ERR_INVALID_STATE The Speech Commands link has not been initialized - */ -esp_err_t esp_mn_commands_free(void); - -/** - * @brief Add one speech commands with phoneme string and command ID - * - * @param command_id The command ID - * @param phoneme_string The phoneme string of the speech commands - * - * @return - * - ESP_OK Success - * - ESP_ERR_INVALID_STATE Fail - */ -esp_err_t esp_mn_commands_add(int command_id, char *phoneme_string); - -/** - * @brief Modify one speech commands with new phoneme string - * - * @param old_phoneme_string The old phoneme string of the speech commands - * @param new_phoneme_string The new phoneme string of the speech commands - * - * @return - * - ESP_OK Success - * - ESP_ERR_INVALID_STATE Fail - */ -esp_err_t esp_mn_commands_modify(char *old_phoneme_string, char *new_phoneme_string); - -/** - * @brief Remove one speech commands by phoneme string - * - * @param phoneme_string The phoneme string of the speech commands - * - * @return - * - ESP_OK Success - * - ESP_ERR_INVALID_STATE Fail - */ -esp_err_t esp_mn_commands_remove(char *phoneme_string); - -/** - * @brief Clear all speech commands in linked list - * - * @return - * - ESP_OK Success - * - ESP_ERR_INVALID_STATE Fail - */ -esp_err_t esp_mn_commands_clear(void); - -/** - * @brief Get phrase from index, which is the depth from the phrase node to root node - * - * @Warning: The first phrase index is 0, the second phrase index is 1, and so on. - * - * @return - * - esp_mn_phrase_t* Success - * - NULL Fail - */ -esp_mn_phrase_t *esp_mn_commands_get_from_index(int index); - -/** - * @brief Get phrase from phoneme string - * - * @return - * - esp_mn_phrase_t* Success - * - NULL Fail - */ -esp_mn_phrase_t *esp_mn_commands_get_from_string(const char *phoneme_string); - -/** - * @brief Update the speech commands of MultiNet - * - * @Warning: Must be used after [add/remove/modify/clear] function, - * otherwise the language model of multinet can not be updated. - * - * @param multinet The multinet handle - * @param model_data The model object to query - * - * @return - * - NULL Success - * - others The list of error phrase which can not be parsed by multinet. - */ -esp_mn_error_t *esp_mn_commands_update(const esp_mn_iface_t *multinet, model_iface_data_t *model_data); - -/** - * @brief Print the MultiNet Speech Commands. - */ -void esp_mn_print_commands(void); - -/** - * @brief Initialze the esp_mn_phrase_t struct by command id and phoneme string . - * - * @return the pointer of esp_mn_phrase_t - */ -esp_mn_phrase_t *esp_mn_phrase_alloc(int command_id, char *phoneme_string); - -/** - * @brief Free esp_mn_phrase_t pointer. - * - * @param phrase The esp_mn_phrase_t pointer - */ -void esp_mn_phrase_free(esp_mn_phrase_t *phrase); - -/** - * @brief Initialze the esp_mn_node_t struct by esp_mn_phrase_t pointer. - * - * @return the pointer of esp_mn_node_t - */ -esp_mn_node_t *esp_mn_node_alloc(esp_mn_phrase_t *phrase); - -/** - * @brief Free esp_mn_node_t pointer. - * - * @param node The esp_mn_node_free pointer - */ -void esp_mn_node_free(esp_mn_node_t *node); - -/** - * @brief Print phrase linked list. - */ -void esp_mn_commands_print(void); \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-sr/src/include/esp_process_sdkconfig.h b/tools/sdk/esp32s2/include/esp-sr/src/include/esp_process_sdkconfig.h deleted file mode 100644 index 9743dcad7da..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/src/include/esp_process_sdkconfig.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include "esp_err.h" -#include "esp_mn_iface.h" - -/** - * @brief Check chip config to ensure optimum performance - */ -void check_chip_config(void); - -/** - * @brief Update the speech commands of MultiNet by menuconfig - * - * @param multinet The multinet handle - * - * @param model_data The model object to query - * - * @param langugae The language of MultiNet - * - * @return - * - ESP_OK Success - * - ESP_ERR_INVALID_STATE Fail - */ -esp_mn_error_t* esp_mn_commands_update_from_sdkconfig(const esp_mn_iface_t *multinet, model_iface_data_t *model_data); diff --git a/tools/sdk/esp32s2/include/esp-sr/src/include/model_path.h b/tools/sdk/esp32s2/include/esp-sr/src/include/model_path.h deleted file mode 100644 index 0c685cdd310..00000000000 --- a/tools/sdk/esp32s2/include/esp-sr/src/include/model_path.h +++ /dev/null @@ -1,94 +0,0 @@ -#pragma once - -typedef struct -{ - char **model_name; // the name of models, like "wn9_hilexin"(wakenet9, hilexin), "mn5_en"(multinet5, english) - char *partition_label; // partition label used to save the files of model - int num; // the number of models -} srmodel_list_t; - -#define MODEL_NAME_MAX_LENGTH 64 - -/** - * @brief Return all avaliable models in spiffs or selected in Kconfig. - * - * @param partition_label The spiffs label defined in your partition file used to save models. - * - * @return all avaliable models in spiffs,save as srmodel_list_t. - */ -srmodel_list_t* esp_srmodel_init(const char* partition_label); - -/** - * @brief Free srmodel_list_t and unregister SPIFFS filesystem if open SPIFFS filesystem. - * - * @param models The srmodel_list_t point allocated by esp_srmodel_init function. - * - * @return all avaliable models in spiffs,save as srmodel_list_t. - */ -void esp_srmodel_deinit(srmodel_list_t *models); - -/** - * @brief Return the first model name containing the specified keywords - * If keyword is NULL, we will ignore the keyword. - * - * @param models The srmodel_list_t point allocated by esp_srmodel_init function. - * @param keyword1 The specified keyword1 , like ESP_WN_PREDIX(the prefix of wakenet), - * ESP_MN_PREFIX(the prefix of multinet), - * - * @param keyword2 The specified keyword2, like ESP_MN_ENGLISH(the english multinet) - * ESP_MN_CHINESE(the chinese multinet) - * "alexa" (the "alexa" wakenet) - * @return return model name if can find one model name containing the keywords otherwise return NULL. - */ -char *esp_srmodel_filter(srmodel_list_t *models, const char *keyword1, const char *keyword2); - - -/** - * @brief Check whether the specified model name exists or not. - * - * @param models The srmodel_list_t point allocated by esp_srmodel_init function. - * @param model_name The specified model name - * @return return index in models if model name exists otherwise return -1 - */ -int esp_srmodel_exists(srmodel_list_t *models, char *model_name); - -/** - * @brief Initialize and mount SPIFFS filesystem, return all avaliable models in spiffs. - * - * @param partition_label The spiffs label defined in your partition file used to save models. - * - * @return all avaliable models in spiffs,save as srmodel_list_t. - */ -srmodel_list_t *srmodel_spiffs_init(const char* partition_label); - -/** - * @brief unregister SPIFFS filesystem and free srmodel_list_t. - * - * @param models The srmodel_list_t point allocated by srmodel_spiffs_init function. - * - * @return all avaliable models in spiffs,save as srmodel_list_t. - */ -void srmodel_spiffs_deinit(srmodel_list_t *models); - - -/** - * @brief Return base path of srmodel spiffs - * - * @return the base path od srmodel spiffs - */ -char *get_model_base_path(void); - - -#ifdef ESP_PLATFORM -#include "dl_lib_coefgetter_if.h" -/** - * @brief Return model_coeff_getter_t pointer base on model_name - * - * @warning Just support ESP32 to load old wakenet - * - * @param model_name The model name - * - * @return model_coeff_getter_t pointer or NULL - */ -model_coeff_getter_t* srmodel_get_model_coeff(char *model_name); -#endif \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp_common/include/esp_assert.h b/tools/sdk/esp32s2/include/esp_common/include/esp_assert.h index 39d6a32843f..17e4b928f83 100644 --- a/tools/sdk/esp32s2/include/esp_common/include/esp_assert.h +++ b/tools/sdk/esp32s2/include/esp_common/include/esp_assert.h @@ -16,15 +16,21 @@ #include "assert.h" +#ifndef __cplusplus + #define ESP_STATIC_ASSERT _Static_assert +#else // __cplusplus + #define ESP_STATIC_ASSERT static_assert +#endif // __cplusplus + /* Assert at compile time if possible, runtime otherwise */ #ifndef __cplusplus /* __builtin_choose_expr() is only in C, makes this a lot cleaner */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ - _Static_assert(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ + ESP_STATIC_ASSERT(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ assert(#MSG && (CONDITION)); \ } while(0) #else -/* for C++, use __attribute__((error)) - works almost as well as _Static_assert */ +/* for C++, use __attribute__((error)) - works almost as well as ESP_STATIC_ASSERT */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ if (__builtin_constant_p(CONDITION) && !(CONDITION)) { \ extern __attribute__((error(#MSG))) void failed_compile_time_assert(void); \ diff --git a/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h index 74dda44cbdc..4caac067f95 100644 --- a/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32s2/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 3 +#define ESP_IDF_VERSION_PATCH 4 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32s2/include/esp_diagnostics/include/esp_diagnostics.h b/tools/sdk/esp32s2/include/esp_diagnostics/include/esp_diagnostics.h index 0e0fb50da36..682f316db7b 100644 --- a/tools/sdk/esp32s2/include/esp_diagnostics/include/esp_diagnostics.h +++ b/tools/sdk/esp32s2/include/esp_diagnostics/include/esp_diagnostics.h @@ -238,7 +238,7 @@ esp_err_t esp_diag_log_event(const char *tag, const char *format, ...) __attribu */ #define ESP_DIAG_EVENT(tag, format, ...) \ { \ - esp_diag_log_event(tag, "EV (%" PRIu32 ") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ + esp_diag_log_event(tag, "EV (%"PRIu32") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ ESP_LOGI(tag, format, ##__VA_ARGS__); \ } diff --git a/tools/sdk/esp32s2/include/esp_https_server/include/esp_https_server.h b/tools/sdk/esp32s2/include/esp_https_server/include/esp_https_server.h index 75720bd1ce7..f5159207216 100644 --- a/tools/sdk/esp32s2/include/esp_https_server/include/esp_https_server.h +++ b/tools/sdk/esp32s2/include/esp_https_server/include/esp_https_server.h @@ -119,6 +119,8 @@ typedef struct httpd_ssl_config httpd_ssl_config_t; .global_user_ctx_free_fn = NULL, \ .global_transport_ctx = NULL, \ .global_transport_ctx_free_fn = NULL, \ + .enable_so_linger = false, \ + .linger_timeout = 0, \ .open_fn = NULL, \ .close_fn = NULL, \ .uri_match_fn = NULL \ diff --git a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_chip_info.h b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_chip_info.h index 0b081d37e1b..a99863d7718 100644 --- a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_chip_info.h +++ b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_chip_info.h @@ -41,6 +41,7 @@ typedef enum { typedef struct { esp_chip_model_t model; //!< chip model, one of esp_chip_model_t uint32_t features; //!< bit mask of CHIP_FEATURE_x feature flags + uint16_t full_revision; //!< chip revision number (in format MXX; where M - wafer major version, XX - wafer minor version) uint8_t cores; //!< number of CPU cores uint8_t revision; //!< chip revision number } esp_chip_info_t; diff --git a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_intr_alloc.h b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_intr_alloc.h index a26fde9394f..a800c94fe86 100644 --- a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_intr_alloc.h +++ b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_intr_alloc.h @@ -64,6 +64,7 @@ extern "C" { #define ETS_INTERNAL_SW0_INTR_SOURCE -4 ///< Software int source 1 #define ETS_INTERNAL_SW1_INTR_SOURCE -5 ///< Software int source 2 #define ETS_INTERNAL_PROFILING_INTR_SOURCE -6 ///< Int source for profiling +#define ETS_INTERNAL_UNUSED_INTR_SOURCE -99 ///< Interrupt is not assigned to any source /**@}*/ diff --git a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/esp_sleep_internal.h b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/esp_sleep_internal.h index ee0b72953f0..5eb5081b562 100644 --- a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/esp_sleep_internal.h +++ b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/esp_sleep_internal.h @@ -6,6 +6,7 @@ #pragma once #include +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { @@ -20,6 +21,15 @@ extern "C" { */ void esp_sleep_enable_adc_tsens_monitor(bool enable); +// IDF does not officially support esp32h2 in v4.4 +#if !CONFIG_IDF_TARGET_ESP32H2 +/** + * @brief Isolate all digital IOs except those that are held during deep sleep + * + * Reduce digital IOs current leakage during deep sleep. + */ +void esp_sleep_isolate_digital_gpio(void); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/sleep_gpio.h b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/sleep_gpio.h index abab21871a4..493687ec32d 100644 --- a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/sleep_gpio.h +++ b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_private/sleep_gpio.h @@ -18,7 +18,7 @@ extern "C" { * This file contains declarations of GPIO related functions in light sleep mode. */ -#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Save GPIO pull-up and pull-down configuration information in the wake-up state @@ -39,7 +39,7 @@ void gpio_sleep_mode_config_apply(void); */ void gpio_sleep_mode_config_unapply(void); -#endif // SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_sleep.h b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_sleep.h index 8090fe85211..1c1b51d3519 100644 --- a/tools/sdk/esp32s2/include/esp_hw_support/include/esp_sleep.h +++ b/tools/sdk/esp32s2/include/esp_hw_support/include/esp_sleep.h @@ -80,6 +80,11 @@ typedef enum { /* Leave this type define for compatibility */ typedef esp_sleep_source_t esp_sleep_wakeup_cause_t; +enum { + ESP_ERR_SLEEP_REJECT = ESP_ERR_INVALID_STATE, + ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION = ESP_ERR_INVALID_ARG, +}; + /** * @brief Disable wakeup source * @@ -101,10 +106,8 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source); #if SOC_ULP_SUPPORTED /** * @brief Enable wakeup by ULP coprocessor - * @note In revisions 0 and 1 of the ESP32, ULP wakeup source - * cannot be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when - * ext0 wakeup source is used. + * @note On ESP32, ULP wakeup source cannot be used when RTC_PERIPH power domain is forced, + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * @return * - ESP_OK on success * - ESP_ERR_NOT_SUPPORTED if additional current by touch (CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT) is enabled. @@ -128,10 +131,8 @@ esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us); /** * @brief Enable wakeup by touch sensor * - * @note In revisions 0 and 1 of the ESP32, touch wakeup source - * can not be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup - * source is used. + * @note On ESP32, touch wakeup source can not be used when RTC_PERIPH power domain is forced + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * * @note The FSM mode of the touch button should be configured * as the timer trigger mode. @@ -179,8 +180,7 @@ bool esp_sleep_is_valid_wakeup_gpio(gpio_num_t gpio_num); * @note This function does not modify pin configuration. The pin is * configured in esp_sleep_start, immediately before entering sleep mode. * - * @note In revisions 0 and 1 of the ESP32, ext0 wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, ext0 wakeup source can not be used together with touch or ULP wakeup sources. * * @param gpio_num GPIO number used as wakeup source. Only GPIOs which are have RTC * functionality can be used: 0,2,4,12-15,25-27,32-39. @@ -265,8 +265,7 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee * wakeup level, for each GPIO which is used for wakeup. * Then call this function to enable wakeup feature. * - * @note In revisions 0 and 1 of the ESP32, GPIO wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources. * * @return * - ESP_OK on success @@ -351,7 +350,10 @@ void esp_deep_sleep_start(void) __attribute__((noreturn)); * * @return * - ESP_OK on success (returned after wakeup) - * - ESP_ERR_INVALID_STATE if WiFi or BT is not stopped + * - ESP_ERR_SLEEP_REJECT sleep request is rejected(wakeup source set before the sleep request) + * - ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION after deducting the sleep flow overhead, the final sleep duration + * is too short to cover the minimum sleep duration of the chip, when + * rtc timer wakeup source enabled */ esp_err_t esp_light_sleep_start(void); @@ -456,7 +458,6 @@ void esp_deep_sleep_disable_rom_logging(void); esp_err_t esp_sleep_cpu_pd_low_init(bool enable); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Configure to isolate all GPIO pins in sleep state */ @@ -467,7 +468,6 @@ void esp_sleep_config_gpio_isolate(void); * @param enable decide whether to switch status or not */ void esp_sleep_enable_gpio_switch(bool enable); -#endif #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_io.h b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_io.h index 2f2c613f1a8..9bc140870e4 100644 --- a/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_io.h +++ b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_io.h @@ -19,11 +19,35 @@ typedef void *esp_lcd_spi_bus_handle_t; /*!< Type of LCD S typedef void *esp_lcd_i2c_bus_handle_t; /*!< Type of LCD I2C bus handle */ typedef struct esp_lcd_i80_bus_t *esp_lcd_i80_bus_handle_t; /*!< Type of LCD intel 8080 bus handle */ +/** + * @brief Type of LCD panel IO event data + */ +typedef struct { +} esp_lcd_panel_io_event_data_t; + +/** + * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * + * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] edata Panel IO event data, fed by driver + * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` + * @return Whether a high priority task has been waken up by this function + */ +typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); + +/** + * @brief Type of LCD panel IO callbacks + */ +typedef struct { + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ +} esp_lcd_panel_io_callbacks_t; + + /** * @brief Transmit LCD command and receive corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -42,7 +66,7 @@ esp_err_t esp_lcd_panel_io_rx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, v * @brief Transmit LCD command and corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -65,7 +89,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c * Recycling of color buffer should be done in the callback `on_color_trans_done()`. * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] lcd_cmd The specific LCD command + * @param[in] lcd_cmd The specific LCD command, set to -1 if no command needed * @param[in] color Buffer that holds the RGB color data * @param[in] color_size Size of `color` in memory, in bytes * @return @@ -75,7 +99,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, const void *color, size_t color_size); /** - * @brief Destory LCD panel IO handle (deinitialize panel and free all corresponding resource) + * @brief Destroy LCD panel IO handle (deinitialize panel and free all corresponding resource) * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` * @return @@ -85,20 +109,16 @@ esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t io); /** - * @brief Type of LCD panel IO event data - */ -typedef struct { -} esp_lcd_panel_io_event_data_t; - -/** - * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * @brief Register LCD panel IO callbacks * - * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] edata Panel IO event data, fed by driver - * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` - * @return Whether a high priority task has been waken up by this function + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success */ -typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); +esp_err_t esp_lcd_panel_io_register_event_callbacks(esp_lcd_panel_io_handle_t io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); /** * @brief Panel IO configuration structure, for SPI interface @@ -142,7 +162,7 @@ typedef struct { uint32_t dev_addr; /*!< I2C device address */ esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ - size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C seclection) into control phase, in several bytes */ + size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C selection) into control phase, in several bytes */ unsigned int dc_bit_offset; /*!< Offset of the D/C selection bit in control phase */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ @@ -194,7 +214,7 @@ typedef struct { esp_err_t esp_lcd_new_i80_bus(const esp_lcd_i80_bus_config_t *bus_config, esp_lcd_i80_bus_handle_t *ret_bus); /** - * @brief Destory Intel 8080 bus handle + * @brief Destroy Intel 8080 bus handle * * @param[in] bus Intel 8080 bus handle, created by `esp_lcd_new_i80_bus()` * @return @@ -211,7 +231,7 @@ typedef struct { int cs_gpio_num; /*!< GPIO used for CS line, set to -1 will declaim exclusively use of I80 bus */ unsigned int pclk_hz; /*!< Frequency of pixel clock */ size_t trans_queue_depth; /*!< Transaction queue size, larger queue, higher throughput */ - esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was tranferred done */ + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was transferred done */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ diff --git a/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_ops.h b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_ops.h index 5099233ce83..63bc6fe2742 100644 --- a/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_ops.h +++ b/tools/sdk/esp32s2/include/esp_lcd/include/esp_lcd_panel_ops.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -110,9 +110,22 @@ esp_err_t esp_lcd_panel_set_gap(esp_lcd_panel_handle_t panel, int x_gap, int y_g */ esp_err_t esp_lcd_panel_invert_color(esp_lcd_panel_handle_t panel, bool invert_color_data); +/** + * @brief Turn on or off the display + * + * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` + * @param[in] on_off True to turns on display, False to turns off display + * @return + * - ESP_OK on success + * - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel + */ +esp_err_t esp_lcd_panel_disp_on_off(esp_lcd_panel_handle_t panel, bool on_off); + /** * @brief Turn off the display * + * @deprecated This function has similar functionality to `esp_lcd_panel_disp_on_off`. + * * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` * @param[in] off Whether to turn off the screen * @return diff --git a/tools/sdk/esp32s2/include/esp_lcd/interface/esp_lcd_panel_io_interface.h b/tools/sdk/esp32s2/include/esp_lcd/interface/esp_lcd_panel_io_interface.h index 9f2226587e5..88bf9db0d47 100644 --- a/tools/sdk/esp32s2/include/esp_lcd/interface/esp_lcd_panel_io_interface.h +++ b/tools/sdk/esp32s2/include/esp_lcd/interface/esp_lcd_panel_io_interface.h @@ -7,6 +7,7 @@ #include #include "esp_err.h" +#include "esp_lcd_panel_io.h" #ifdef __cplusplus extern "C" { @@ -73,6 +74,18 @@ struct esp_lcd_panel_io_t { * - ESP_OK on success */ esp_err_t (*del)(esp_lcd_panel_io_t *io); + + /** + * @brief Register LCD panel IO callbacks + * + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success + */ + esp_err_t (*register_event_callbacks)(esp_lcd_panel_io_t *io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); }; #ifdef __cplusplus diff --git a/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h index 60409b1b689..c41da24e963 100644 --- a/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32s2/include/esp_littlefs/include/esp_littlefs.h @@ -8,10 +8,10 @@ extern "C" { #endif -#define ESP_LITTLEFS_VERSION_NUMBER "1.5.1" +#define ESP_LITTLEFS_VERSION_NUMBER "1.5.2" #define ESP_LITTLEFS_VERSION_MAJOR 1 #define ESP_LITTLEFS_VERSION_MINOR 5 -#define ESP_LITTLEFS_VERSION_PATCH 1 +#define ESP_LITTLEFS_VERSION_PATCH 2 /** *Configuration structure for esp_vfs_littlefs_register. diff --git a/tools/sdk/esp32s2/include/esp_phy/include/esp_phy_init.h b/tools/sdk/esp32s2/include/esp_phy/include/esp_phy_init.h index efefd114d4f..bcf3e289d3d 100644 --- a/tools/sdk/esp32s2/include/esp_phy/include/esp_phy_init.h +++ b/tools/sdk/esp32s2/include/esp_phy/include/esp_phy_init.h @@ -178,12 +178,13 @@ void esp_phy_load_cal_and_init(void); /** * @brief Initialize backup memory for Phy power up/down */ -void esp_phy_pd_mem_init(void); +void esp_phy_modem_init(void); /** * @brief Deinitialize backup memory for Phy power up/down + * Set phy_init_flag if all modems deinit on ESP32C3 */ -void esp_phy_pd_mem_deinit(void); +void esp_phy_modem_deinit(void); #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_mqtt.h index eba3615a70c..8775eb8696f 100644 --- a/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ b/tools/sdk/esp32s2/include/esp_rainmaker/include/esp_rmaker_mqtt.h @@ -100,6 +100,17 @@ esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); */ void esp_rmaker_create_mqtt_topic(char *buf, size_t buf_size, const char *topic_suffix, const char *rule); +/** + * @brief Check if budget is available to publish an mqtt message + * + * @return true if budget is available + * @return false if budget is exhausted + * + * @note `esp_rmaker_mqtt_publish` API already does this check. In addition to that, + * some use-cases might still need to check for this. + */ +bool esp_rmaker_mqtt_is_budget_available(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s2/include/esp_rom/esp32s2/esp_rom_caps.h b/tools/sdk/esp32s2/include/esp_rom/esp32s2/esp_rom_caps.h index 1078ff8997f..1032eef93a1 100644 --- a/tools/sdk/esp32s2/include/esp_rom/esp32s2/esp_rom_caps.h +++ b/tools/sdk/esp32s2/include/esp_rom/esp32s2/esp_rom_caps.h @@ -7,5 +7,4 @@ #pragma once #define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian -#define ESP_ROM_SUPPORT_MULTIPLE_UART (1) // ROM has multiple UARTs available for logging #define ESP_ROM_NEEDS_SWSETUP_WORKAROUND (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/rtc.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/rtc.h index 2be040aa99d..7410180da3a 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/rtc.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -100,17 +101,17 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/secure_boot.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/secure_boot.h index 50a3fcd4948..04c3c509f78 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/secure_boot.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -62,7 +63,7 @@ typedef struct { uint32_t block_crc; uint8_t _padding[16]; } ets_secure_boot_sig_block_t; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); /* ROM supports up to 3, but IDF only checks the first one (SECURE_BOOT_NUM_BLOCKS) */ #define SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE 3 @@ -73,7 +74,7 @@ typedef struct { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE)]; } ets_secure_boot_signature_t; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); typedef struct { const void *key_digests[SECURE_BOOT_NUM_BLOCKS]; diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/rtc.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/rtc.h index 2a7f6cb6140..1e6100cb106 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/rtc.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/rtc.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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ROM_RTC_H_ #define _ROM_RTC_H_ @@ -19,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -105,24 +98,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/secure_boot.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/secure_boot.h index a9d417283b7..26cd0b4b842 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/secure_boot.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32c3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/rtc.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/rtc.h index e3a8d9d63e2..2629fd9a6d9 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/rtc.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/rtc.h @@ -11,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -98,25 +99,25 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); -_Static_assert((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/secure_boot.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/secure_boot.h index 36a490d8584..b7dd24b00cb 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/secure_boot.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32h2/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/rtc.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/rtc.h index 2de02a88c8e..2c5b1b2a631 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/rtc.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -101,20 +102,21 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/secure_boot.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/secure_boot.h index a0fcecfd3c5..49edf7d6fd7 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/secure_boot.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,6 +9,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -92,7 +93,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -102,7 +103,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/usb/usb_device.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/usb/usb_device.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32s2/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/rtc.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/rtc.h index d395ce3976e..168ca7997a7 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/rtc.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/rtc.h @@ -8,6 +8,7 @@ #include #include +#include "esp_assert.h" #include "soc/rtc_cntl_reg.h" #include "soc/reset_reasons.h" @@ -91,24 +92,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/secure_boot.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/secure_boot.h index a372517b7a1..3c374fe3016 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/secure_boot.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -80,7 +81,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -90,7 +91,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/usb/usb_device.h b/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/usb/usb_device.h +++ b/tools/sdk/esp32s2/include/esp_rom/include/esp32s3/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32s2/include/esp_wifi/include/esp_mesh_internal.h b/tools/sdk/esp32s2/include/esp_wifi/include/esp_mesh_internal.h index e967dbaafbc..af602bb5480 100644 --- a/tools/sdk/esp32s2/include/esp_wifi/include/esp_mesh_internal.h +++ b/tools/sdk/esp32s2/include/esp_wifi/include/esp_mesh_internal.h @@ -1,16 +1,8 @@ -// Copyright 2017-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: 2017-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __ESP_MESH_INTERNAL_H__ #define __ESP_MESH_INTERNAL_H__ @@ -107,6 +99,9 @@ typedef struct { mesh_chain_layer_t chain; } __attribute__((packed)) mesh_chain_assoc_t; +/* mesh max connections */ +#define MESH_MAX_CONNECTIONS (10) + /** * @brief Mesh PS duties */ @@ -117,7 +112,7 @@ typedef struct { bool used; uint8_t duty; uint8_t mac[6]; - } child[ESP_WIFI_MAX_CONN_NUM]; + } child[MESH_MAX_CONNECTIONS]; } esp_mesh_ps_duties_t; /******************************************************* 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 08be53cf6a4..ab138a96926 100644 --- a/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi.h +++ b/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi.h @@ -108,6 +108,7 @@ typedef struct { int mgmt_sbuf_num; /**< WiFi management short buffer number, the minimum value is 6, the maximum value is 32 */ uint64_t feature_caps; /**< Enables additional WiFi features and capabilities */ bool sta_disconnected_pm; /**< WiFi Power Management for station at disconnected status */ + int espnow_max_encrypt_num; /**< Maximum encrypt number of peers supported by espnow */ int magic; /**< WiFi init magic number, it should be the last field */ } wifi_init_config_t; @@ -227,6 +228,7 @@ extern uint64_t g_wifi_feature_caps; .mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \ .feature_caps = g_wifi_feature_caps, \ .sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \ + .espnow_max_encrypt_num = CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM, \ .magic = WIFI_INIT_CONFIG_MAGIC\ } @@ -455,6 +457,21 @@ esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number); esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records); +/** + * @brief Clear AP list found in last scan + * + * @attention When the obtained ap list fails,bss info must be cleared,otherwise it may cause memory leakage. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_MODE: WiFi mode is wrong + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_clear_ap_list(void); + + /** * @brief Get information of AP which the ESP32 station is associated with * @@ -567,6 +584,8 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); * @attention 2. When ESP32 is in STA mode, this API should not be called when STA is scanning or connecting to an external AP * @attention 3. When ESP32 is in softAP mode, this API should not be called when softAP has connected to external STAs * @attention 4. When ESP32 is in STA+softAP mode, this API should not be called when in the scenarios described above + * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remeber the channel used before wifi stop, + * you need to call this API again after wifi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. * * @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel * @param second for HT20, second is ignored, for HT40, second is the second channel @@ -776,6 +795,7 @@ esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter * @attention 2. For station configuration, bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. * @attention 3. ESP32 is limited to only one channel, so when in the soft-AP+station mode, the soft-AP will adjust its channel automatically to be the same as * the channel of the ESP32 station. + * @attention 4. The configuration will be stored in NVS * * @param interface interface * @param conf station or soft-AP configuration @@ -1161,7 +1181,9 @@ esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi); * @brief Start an FTM Initiator session by sending FTM request * If successful, event WIFI_EVENT_FTM_REPORT is generated with the result of the FTM procedure * - * @attention Use this API only in Station mode + * @attention 1. Use this API only in Station mode. + * @attention 2. If FTM is initiated on a different channel than Station is connected in or internal SoftAP is started in, + * FTM defaults to a single burst in ASAP mode. * * @param cfg FTM Initiator session configuration * @@ -1219,7 +1241,7 @@ esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable); * @attention 3. This configuration would influence nothing until some module configure wake_window * @attention 4. A sensible interval which is not too small is recommended (e.g. 100ms) * - * @param interval how much micriosecond would the chip wake up, from 1 to 65535. + * @param interval how much milliseconds would the chip wake up, from 1 to 65535. */ esp_err_t esp_wifi_set_connectionless_wake_interval(uint16_t interval); diff --git a/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_types.h b/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_types.h index 4dae6a8c3fa..60b22707c15 100644 --- a/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_types.h +++ b/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_types.h @@ -61,41 +61,63 @@ typedef enum { } wifi_auth_mode_t; typedef enum { - WIFI_REASON_UNSPECIFIED = 1, - WIFI_REASON_AUTH_EXPIRE = 2, - WIFI_REASON_AUTH_LEAVE = 3, - WIFI_REASON_ASSOC_EXPIRE = 4, - WIFI_REASON_ASSOC_TOOMANY = 5, - WIFI_REASON_NOT_AUTHED = 6, - WIFI_REASON_NOT_ASSOCED = 7, - WIFI_REASON_ASSOC_LEAVE = 8, - WIFI_REASON_ASSOC_NOT_AUTHED = 9, - WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, - WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, - WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, - WIFI_REASON_IE_INVALID = 13, - WIFI_REASON_MIC_FAILURE = 14, - WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, - WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, - WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, - WIFI_REASON_GROUP_CIPHER_INVALID = 18, - WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, - WIFI_REASON_AKMP_INVALID = 20, - WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, - WIFI_REASON_INVALID_RSN_IE_CAP = 22, - WIFI_REASON_802_1X_AUTH_FAILED = 23, - WIFI_REASON_CIPHER_SUITE_REJECTED = 24, - - WIFI_REASON_INVALID_PMKID = 53, - - WIFI_REASON_BEACON_TIMEOUT = 200, - WIFI_REASON_NO_AP_FOUND = 201, - WIFI_REASON_AUTH_FAIL = 202, - WIFI_REASON_ASSOC_FAIL = 203, - WIFI_REASON_HANDSHAKE_TIMEOUT = 204, - WIFI_REASON_CONNECTION_FAIL = 205, - WIFI_REASON_AP_TSF_RESET = 206, - WIFI_REASON_ROAMING = 207, + WIFI_REASON_UNSPECIFIED = 1, + WIFI_REASON_AUTH_EXPIRE = 2, + WIFI_REASON_AUTH_LEAVE = 3, + WIFI_REASON_ASSOC_EXPIRE = 4, + WIFI_REASON_ASSOC_TOOMANY = 5, + WIFI_REASON_NOT_AUTHED = 6, + WIFI_REASON_NOT_ASSOCED = 7, + WIFI_REASON_ASSOC_LEAVE = 8, + WIFI_REASON_ASSOC_NOT_AUTHED = 9, + WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, + WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, + WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, + WIFI_REASON_IE_INVALID = 13, + WIFI_REASON_MIC_FAILURE = 14, + WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, + WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, + WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, + WIFI_REASON_GROUP_CIPHER_INVALID = 18, + WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, + WIFI_REASON_AKMP_INVALID = 20, + WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, + WIFI_REASON_INVALID_RSN_IE_CAP = 22, + WIFI_REASON_802_1X_AUTH_FAILED = 23, + WIFI_REASON_CIPHER_SUITE_REJECTED = 24, + WIFI_REASON_TDLS_PEER_UNREACHABLE = 25, + WIFI_REASON_TDLS_UNSPECIFIED = 26, + WIFI_REASON_SSP_REQUESTED_DISASSOC = 27, + WIFI_REASON_NO_SSP_ROAMING_AGREEMENT = 28, + WIFI_REASON_BAD_CIPHER_OR_AKM = 29, + WIFI_REASON_NOT_AUTHORIZED_THIS_LOCATION = 30, + WIFI_REASON_SERVICE_CHANGE_PERCLUDES_TS = 31, + WIFI_REASON_UNSPECIFIED_QOS = 32, + WIFI_REASON_NOT_ENOUGH_BANDWIDTH = 33, + WIFI_REASON_MISSING_ACKS = 34, + WIFI_REASON_EXCEEDED_TXOP = 35, + WIFI_REASON_STA_LEAVING = 36, + WIFI_REASON_END_BA = 37, + WIFI_REASON_UNKNOWN_BA = 38, + WIFI_REASON_TIMEOUT = 39, + WIFI_REASON_PEER_INITIATED = 46, + WIFI_REASON_AP_INITIATED = 47, + WIFI_REASON_INVALID_FT_ACTION_FRAME_COUNT = 48, + WIFI_REASON_INVALID_PMKID = 49, + WIFI_REASON_INVALID_MDE = 50, + WIFI_REASON_INVALID_FTE = 51, + WIFI_REASON_TRANSMISSION_LINK_ESTABLISH_FAILED = 67, + WIFI_REASON_ALTERATIVE_CHANNEL_OCCUPIED = 68, + + WIFI_REASON_BEACON_TIMEOUT = 200, + WIFI_REASON_NO_AP_FOUND = 201, + WIFI_REASON_AUTH_FAIL = 202, + WIFI_REASON_ASSOC_FAIL = 203, + WIFI_REASON_HANDSHAKE_TIMEOUT = 204, + WIFI_REASON_CONNECTION_FAIL = 205, + WIFI_REASON_AP_TSF_RESET = 206, + WIFI_REASON_ROAMING = 207, + WIFI_REASON_ASSOC_COMEBACK_TIME_TOO_LONG = 208, } wifi_err_reason_t; typedef enum { @@ -235,7 +257,7 @@ typedef struct { uint8_t channel; /**< Channel of ESP32 soft-AP */ wifi_auth_mode_t authmode; /**< Auth mode of ESP32 soft-AP. Do not support AUTH_WEP in soft-AP mode */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ - uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 10 */ + uint8_t max_connection; /**< Max number of stations allowed to connect in */ uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */ wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of SoftAP, group cipher will be derived using this. cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */ bool ftm_responder; /**< Enable FTM Responder mode */ @@ -256,8 +278,10 @@ typedef struct { uint32_t rm_enabled:1; /**< Whether Radio Measurements are enabled for the connection */ uint32_t btm_enabled:1; /**< Whether BSS Transition Management is enabled for the connection */ uint32_t mbo_enabled:1; /**< Whether MBO is enabled for the connection */ - uint32_t reserved:29; /**< Reserved for future feature set */ + uint32_t transition_disable:1; /**< Whether to enable transition disable feature */ + uint32_t reserved:28; /**< Reserved for future feature set */ wifi_sae_pwe_method_t sae_pwe_h2e; /**< Whether SAE hash to element is enabled */ + uint8_t failure_retry_cnt; /**< Number of connection retries station will do before moving to next AP. scan_method should be set as WIFI_ALL_CHANNEL_SCAN to use this config. Note: Enabling this may cause connection time to increase incase best AP doesn't behave properly. */ } wifi_sta_config_t; /** @brief Configuration data for ESP32 AP or STA. @@ -283,7 +307,11 @@ typedef struct { uint32_t reserved:27; /**< bit: 5..31 reserved */ } wifi_sta_info_t; -#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32 soft-AP */ +#if CONFIG_IDF_TARGET_ESP32C3 +#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */ +#else +#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */ +#endif /** @brief List of stations associated with the ESP32 Soft-AP */ typedef struct { @@ -640,6 +668,7 @@ typedef struct { uint8_t ssid_len; /**< SSID length of disconnected AP */ uint8_t bssid[6]; /**< BSSID of disconnected AP */ uint8_t reason; /**< reason of disconnection */ + int8_t rssi; /**< rssi of disconnection */ } wifi_event_sta_disconnected_t; /** Argument structure for WIFI_EVENT_STA_AUTHMODE_CHANGE event */ diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_common.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_common.h similarity index 83% rename from tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_common.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_common.h index bc8dc619544..988fdf35f57 100644 --- a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_common.h +++ b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_common.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -52,6 +52,19 @@ bool dsp_is_power_of_two(int x); */ int dsp_power_of_two(int x); + +/** + * @brief Logginng for esp32s3 TIE core + * Registers covered q0 to q7, ACCX and SAR_BYTE + * + * @param n_regs: number of registers to be logged at once + * @param ...: register codes 0, 1, 2, 3, 4, 5, 6, 7, 'a', 's' + * + * @return ESP_OK + * + */ +esp_err_t tie_log(int n_regs, ...); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_err.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_err.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_err.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_err.h diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_err_codes.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h similarity index 89% rename from tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_err_codes.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h index c8827781a80..a4176e5a818 100644 --- a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_err_codes.h +++ b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -22,6 +22,7 @@ #define ESP_ERR_DSP_PARAM_OUTOFRANGE (ESP_ERR_DSP_BASE + 3) #define ESP_ERR_DSP_UNINITIALIZED (ESP_ERR_DSP_BASE + 4) #define ESP_ERR_DSP_REINITIALIZED (ESP_ERR_DSP_BASE + 5) +#define ESP_ERR_DSP_ARRAY_NOT_ALIGNED (ESP_ERR_DSP_BASE + 6) #endif // _dsp_error_codes_H_ \ No newline at end of file diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_tests.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_tests.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_tests.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_tests.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_types.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_types.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/common/include/dsp_types.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/dsp_types.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/common/include/esp_dsp.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/esp_dsp.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/common/include/esp_dsp.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/common/include/esp_dsp.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_ccorr.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_ccorr.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_conv.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_conv.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_conv_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_conv_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_corr.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/conv/include/dsps_corr.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/dct/include/dsps_dct.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/dct/include/dsps_dct.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft2r.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft2r.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft4r.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft4r.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft_tables.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/fft/include/dsps_fft_tables.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fir/include/dsps_fir.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h similarity index 71% rename from tools/sdk/esp32/include/esp-dsp/modules/fir/include/dsps_fir.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h index a7d3d09003e..c06b1f34b77 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/fir/include/dsps_fir.h +++ b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h @@ -19,6 +19,7 @@ #include "dsp_err.h" #include "dsps_fir_platform.h" +#include "dsp_common.h" #ifdef __cplusplus extern "C" @@ -49,13 +50,16 @@ typedef struct fir_f32_s { * All fields of this structure are initialized by the dsps_fir_init_s16(...) function. */ typedef struct fir_s16_s{ - int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ - int16_t *delay; /*!< Pointer to the delay line buffer.*/ - int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ - int16_t pos; /*!< Position in delay line.*/ - int16_t decim; /*!< Decimation factor.*/ - int16_t d_pos; /*!< Actual decimation counter.*/ - int16_t shift; /*!< shift value of the result.*/ + int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ + int16_t *delay; /*!< Pointer to the delay line buffer.*/ + int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ + int16_t pos; /*!< Position in delay line.*/ + int16_t decim; /*!< Decimation factor.*/ + int16_t d_pos; /*!< Actual decimation counter.*/ + int16_t shift; /*!< Shift value of the result.*/ + int32_t *rounding_buff; /*!< Rounding buffer for the purposes of esp32s3 ee.ld.accx.ip assembly instruction */ + int32_t rounding_val; /*!< Rounding value*/ + int16_t free_status; /*!< Indicator for dsps_fird_s16_aes3_free() function*/ }fir_s16_t; /** @@ -173,7 +177,43 @@ int dsps_fird_f32_ae32(fir_f32_t *fir, const float *input, float *output, int le */ int32_t dsps_fird_s16_ansi(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); +int32_t dsps_fird_s16_aes3(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); + + /**@}*/ +/** + * @brief support arrays freeing function + * + * Function frees all the arrays, which were created during the initialization of the fir_s16_t structure + * 1. frees allocated memory for rounding buffer, for the purposes of esp32s3 ee.ld.accx.ip assembly instruction + * 2. frees allocated memory in case the delay line is NULL + * 3. frees allocated memory in case the length of the filter (and the delay line) is not divisible by 8 + * and new delay line and filter coefficients arrays are created for the purpose of the esp32s3 assembly + * + * @param fir: pointer to fir filter structure, that must be initialized before + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_fird_s16_aexx_free(fir_s16_t *fir); +/**@}*/ + + +/**@{*/ +/** + * @brief Array reversal + * + * Function reverses 16-bit long array members for the purpose of the dsps_fird_s16_aes3 implementation + * The function has to be called either during the fir struct initialization or every time the coefficients change + * + * @param fir: pointer to the array to be reversed + * @param len: length of the array to be reversed + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_16_array_rev(int16_t *arr, int16_t len); +/**@{*/ #ifdef __cplusplus } @@ -182,28 +222,34 @@ int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output #if CONFIG_DSP_OPTIMIZED -#if (dsps_fir_f32_ae32_enabled == 1) -#define dsps_fir_f32 dsps_fir_f32_ae32 -#else -#define dsps_fir_f32 dsps_fir_f32_ansi -#endif + #if (dsps_fir_f32_ae32_enabled == 1) + #define dsps_fir_f32 dsps_fir_f32_ae32 + #else + #define dsps_fir_f32 dsps_fir_f32_ansi + #endif -#if (dsps_fird_f32_ae32_enabled == 1) -#define dsps_fird_f32 dsps_fird_f32_ae32 -#else -#define dsps_fird_f32 dsps_fird_f32_ansi -#endif + #if (dsps_fird_f32_ae32_enabled == 1) + #define dsps_fird_f32 dsps_fird_f32_ae32 + #else + #define dsps_fird_f32 dsps_fird_f32_ansi + #endif -#if (dsps_fird_s16_ae32_enabled == 1) -#define dsps_fird_s16 dsps_fird_s16_ae32 -#else -#define dsps_fird_s16 dsps_fird_s16_ansi -#endif + #if (dsps_fird_s16_ae32_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_ae32 + + #elif (dsps_fird_s16_aes3_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_aes3 + + #else + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif #else // CONFIG_DSP_OPTIMIZED -#define dsps_fir_f32 dsps_fir_f32_ansi -#define dsps_fird_f32 dsps_fird_f32_ansi -#define dsps_fird_s16 dsps_fird_s16_ansi + + #define dsps_fir_f32 dsps_fir_f32_ansi + #define dsps_fird_f32 dsps_fird_f32_ansi + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif // CONFIG_DSP_OPTIMIZED #endif // _dsps_fir_H_ \ No newline at end of file diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/fir/include/dsps_fir_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h similarity index 64% rename from tools/sdk/esp32c3/include/esp-dsp/modules/fir/include/dsps_fir_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h index f352fa85fc4..a20fa0a6bb6 100644 --- a/tools/sdk/esp32c3/include/esp-dsp/modules/fir/include/dsps_fir_platform.h +++ b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h @@ -12,8 +12,14 @@ #define dsps_fir_f32_ae32_enabled 1 #define dsps_fird_f32_ae32_enabled 1 -#define dsps_fird_s16_ae32_enabled 1 -#define dsps_fird_s16_ae32_mul_enabled 1 + +#if CONFIG_IDF_TARGET_ESP32S3 + #define dsps_fird_s16_aes3_enabled 1 + #define dsps_fird_s16_ae32_enabled 0 +#else + #define dsps_fird_s16_aes3_enabled 0 + #define dsps_fird_s16_ae32_enabled 1 +#endif #endif // #endif // __XTENSA__ diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/iir/include/dsps_biquad.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/iir/include/dsps_biquad.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/kalman/ekf/include/ekf.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/kalman/ekf/include/ekf.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/add/include/dsps_add.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/add/include/dsps_add.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/add/include/dsps_add_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/add/include/dsps_add_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/addc/include/dsps_addc.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/addc/include/dsps_addc.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/include/dsps_math.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/include/dsps_math.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/include/dsps_math.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/include/dsps_math.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/mul/include/dsps_mul.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/mul/include/dsps_mul.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/sub/include/dsps_sub.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/sub/include/dsps_sub.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/matrix/include/dspm_mult.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/matrix/include/dspm_mult.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/matrix/include/mat.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/matrix/include/mat.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/matrix/include/mat.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/matrix/include/mat.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_d_gen.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_d_gen.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_h_gen.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_h_gen.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_sfdr.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_sfdr.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_snr.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_snr.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_snr.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_snr.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_tone_gen.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_tone_gen.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_view.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_view.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/support/include/dsps_view.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/support/include/dsps_view.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/windows/include/dsps_wind.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/windows/include/dsps_wind.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h diff --git a/tools/sdk/esp32s2/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h b/tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h similarity index 100% rename from tools/sdk/esp32s2/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h rename to tools/sdk/esp32s2/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h diff --git a/tools/sdk/esp32s2/include/expat/expat/expat/lib/expat.h b/tools/sdk/esp32s2/include/expat/expat/expat/lib/expat.h index e2020a4a29e..1c83563cbf6 100644 --- a/tools/sdk/esp32s2/include/expat/expat/expat/lib/expat.h +++ b/tools/sdk/esp32s2/include/expat/expat/expat/lib/expat.h @@ -1054,8 +1054,8 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold( See http://semver.org. */ #define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 4 -#define XML_MICRO_VERSION 8 +#define XML_MINOR_VERSION 5 +#define XML_MICRO_VERSION 0 #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/expat/expat/expat/lib/internal.h b/tools/sdk/esp32s2/include/expat/expat/expat/lib/internal.h index 444eba0fb03..e09f533b23c 100644 --- a/tools/sdk/esp32s2/include/expat/expat/expat/lib/internal.h +++ b/tools/sdk/esp32s2/include/expat/expat/expat/lib/internal.h @@ -28,7 +28,7 @@ Copyright (c) 2002-2003 Fred L. Drake, Jr. Copyright (c) 2002-2006 Karl Waclawek Copyright (c) 2003 Greg Stein - Copyright (c) 2016-2021 Sebastian Pipping + Copyright (c) 2016-2022 Sebastian Pipping Copyright (c) 2018 Yury Gribov Copyright (c) 2019 David Loffredo Licensed under the MIT license: @@ -107,7 +107,9 @@ #include // ULONG_MAX -#if defined(_WIN32) && ! defined(__USE_MINGW_ANSI_STDIO) +#if defined(_WIN32) \ + && (! defined(__USE_MINGW_ANSI_STDIO) \ + || (1 - __USE_MINGW_ANSI_STDIO - 1 == 0)) # define EXPAT_FMT_ULL(midpart) "%" midpart "I64u" # if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW # define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d" diff --git a/tools/sdk/esp32s2/include/expat/expat/expat/lib/siphash.h b/tools/sdk/esp32s2/include/expat/expat/expat/lib/siphash.h index e5406d7ee9e..303283ad2de 100644 --- a/tools/sdk/esp32s2/include/expat/expat/expat/lib/siphash.h +++ b/tools/sdk/esp32s2/include/expat/expat/expat/lib/siphash.h @@ -106,7 +106,7 @@ * if this code is included and compiled as C++; related GCC warning is: * warning: use of C++11 long long integer constant [-Wlong-long] */ -#define _SIP_ULL(high, low) (((uint64_t)high << 32) | low) +#define _SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low)) #define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) diff --git a/tools/sdk/esp32s2/include/expat/expat/expat/lib/xmltok_impl.h b/tools/sdk/esp32s2/include/expat/expat/expat/lib/xmltok_impl.h index c518aada013..3469c4ae138 100644 --- a/tools/sdk/esp32s2/include/expat/expat/expat/lib/xmltok_impl.h +++ b/tools/sdk/esp32s2/include/expat/expat/expat/lib/xmltok_impl.h @@ -45,7 +45,7 @@ enum { BT_LF, /* line feed = "\n" */ BT_GT, /* greater than = ">" */ BT_QUOT, /* quotation character = "\"" */ - BT_APOS, /* aposthrophe = "'" */ + BT_APOS, /* apostrophe = "'" */ BT_EQUALS, /* equal sign = "=" */ BT_QUEST, /* question mark = "?" */ BT_EXCL, /* exclamation mark = "!" */ diff --git a/tools/sdk/esp32s2/include/expat/port/include/expat_config.h b/tools/sdk/esp32s2/include/expat/port/include/expat_config.h index 42acb52a5ca..c5a086c1357 100644 --- a/tools/sdk/esp32s2/include/expat/port/include/expat_config.h +++ b/tools/sdk/esp32s2/include/expat/port/include/expat_config.h @@ -63,7 +63,7 @@ #define PACKAGE_NAME "expat" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "expat 2.4.8" +#define PACKAGE_STRING "expat 2.5.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "expat" @@ -72,13 +72,13 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.4.8" +#define PACKAGE_VERSION "2.5.0" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "2.4.8" +#define VERSION "2.5.0" /* whether byteorder is bigendian */ /* #undef WORDS_BIGENDIAN */ diff --git a/tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_common.h b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_common.h similarity index 87% rename from tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_common.h rename to tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_common.h index 9c65f08b90d..f443286ae87 100644 --- a/tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_common.h +++ b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_common.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _MB_IFACE_COMMON_H @@ -24,6 +15,7 @@ extern "C" { #if __has_include("esp_check.h") #include "esp_check.h" +#include "esp_log.h" #define MB_RETURN_ON_FALSE(a, err_code, tag, format, ...) ESP_RETURN_ON_FALSE(a, err_code, tag, format __VA_OPT__(,) __VA_ARGS__) @@ -44,10 +36,10 @@ extern "C" { #define MB_CONTROLLER_PRIORITY (CONFIG_FMB_PORT_TASK_PRIO - 1) // priority of MB controller task // Default port defines -#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus -#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined +#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus +#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined #define MB_UART_PORT (UART_NUM_MAX - 1) // Default UART port number -#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info +#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info #define MB_PARITY_NONE (UART_PARITY_DISABLE) // The Macros below handle the endianness while transfer N byte data into buffer diff --git a/tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_master.h b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_master.h similarity index 95% rename from tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_master.h rename to tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_master.h index 8084e689027..d11ade7a4d8 100644 --- a/tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_master.h +++ b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_master.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_MASTER_INTERFACE_H diff --git a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_slave.h b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h similarity index 88% rename from tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_slave.h rename to tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h index 040d18265bf..7d79b513a67 100644 --- a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_slave.h +++ b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_SLAVE_INTERFACE_H diff --git a/tools/sdk/esp32c3/include/freemodbus/common/include/mbcontroller.h b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/mbcontroller.h similarity index 51% rename from tools/sdk/esp32c3/include/freemodbus/common/include/mbcontroller.h rename to tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/mbcontroller.h index 08b3c183c8f..10205f8951a 100644 --- a/tools/sdk/esp32c3/include/freemodbus/common/include/mbcontroller.h +++ b/tools/sdk/esp32s2/include/freemodbus/freemodbus/common/include/mbcontroller.h @@ -1,17 +1,8 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 + */ // mbcontroller.h // mbcontroller - common Modbus controller header file 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 6bb81894593..3d0c3380556 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 @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H diff --git a/tools/sdk/esp32s2/include/freertos/include/freertos/FreeRTOS.h b/tools/sdk/esp32s2/include/freertos/include/freertos/FreeRTOS.h index eb0ee6be357..296b2878377 100644 --- a/tools/sdk/esp32s2/include/freertos/include/freertos/FreeRTOS.h +++ b/tools/sdk/esp32s2/include/freertos/include/freertos/FreeRTOS.h @@ -1296,7 +1296,9 @@ typedef struct xSTATIC_QUEUE UBaseType_t uxDummy8; uint8_t ucDummy9; #endif - portMUX_TYPE xDummy10; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy10; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticQueue_t; typedef StaticQueue_t StaticSemaphore_t; @@ -1326,7 +1328,9 @@ typedef struct xSTATIC_EVENT_GROUP #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) uint8_t ucDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticEventGroup_t; /* @@ -1378,7 +1382,9 @@ typedef struct xSTATIC_STREAM_BUFFER #if ( configUSE_TRACE_FACILITY == 1 ) UBaseType_t uxDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticStreamBuffer_t; /* Message buffers are built on stream buffers. */ diff --git a/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h b/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h index f2aab51ccfc..f543e1881f3 100644 --- a/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h +++ b/tools/sdk/esp32s2/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_XTENSA_H #define FREERTOS_CONFIG_XTENSA_H 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 2ee4c12c2b8..bce731d331d 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 @@ -106,7 +106,7 @@ typedef uint32_t TickType_t; #define portCRITICAL_NESTING_IN_TCB 0 #define portSTACK_GROWTH ( -1 ) #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) -#define portBYTE_ALIGNMENT 4 +#define portBYTE_ALIGNMENT 16 // Xtensa Windowed ABI requires the stack pointer to always be 16-byte aligned. See "isa_rm.pdf 8.1.1 Windowed Register Usage and Stack Layout" #define portNOP() XT_NOP() diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/clk_gate_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/clk_gate_ll.h index cde957997fd..a1ef5be97a6 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/clk_gate_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/clk_gate_ll.h @@ -97,6 +97,8 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en return DPORT_APB_SARADC_RST; case PERIPH_LEDC_MODULE: return DPORT_LEDC_RST; + case PERIPH_WIFI_MODULE: + return DPORT_WIFIMAC_RST; case PERIPH_UART0_MODULE: return DPORT_UART_RST; case PERIPH_UART1_MODULE: diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/efuse_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/efuse_ll.h new file mode 100644 index 00000000000..1d67e4f1266 --- /dev/null +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/efuse_ll.h @@ -0,0 +1,152 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include "soc/efuse_periph.h" +#include "hal/assert.h" +#include "esp32s2/rom/efuse.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Always inline these functions even no gcc optimization is applied. + +/******************* eFuse fields *************************/ + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_flash_crypt_cnt(void) +{ + return EFUSE.rd_repeat_data1.spi_boot_crypt_cnt; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_wdt_delay_sel(void) +{ + return EFUSE.rd_repeat_data1.wdt_delay_sel; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac0(void) +{ + return EFUSE.rd_mac_spi_8m_0; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac1(void) +{ + return EFUSE.rd_mac_spi_8m_1.mac_1; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_secure_boot_v2_en(void) +{ + return EFUSE.rd_repeat_data2.secure_boot_en; +} + +// use efuse_hal_get_major_chip_version() to get major chip version +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_major(void) +{ + return EFUSE.rd_mac_spi_8m_3.wafer_version_major; +} + +// use efuse_hal_get_minor_chip_version() to get minor chip version +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_minor(void) +{ + return (EFUSE.rd_mac_spi_8m_3.wafer_version_minor_high << 3) + EFUSE.rd_mac_spi_8m_4.wafer_version_minor_low; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_wafer_version_major(void) +{ + return EFUSE.rd_repeat_data4.disable_wafer_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_blk_version_major(void) +{ + return EFUSE.rd_mac_spi_8m_3.blk_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_blk_version_minor(void) +{ + return EFUSE.rd_sys_data4.blk_version_minor; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_blk_version_major(void) +{ + return EFUSE.rd_repeat_data4.disable_blk_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_ver_pkg(void) +{ + return EFUSE.rd_mac_spi_8m_4.pkg_version; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_sdio_force(void) +{ + return EFUSE.rd_repeat_data1.sdio_force; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_sdio_tieh(void) +{ + return EFUSE.rd_repeat_data1.sdio_tieh; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_sdio_xpd(void) +{ + return EFUSE.rd_repeat_data1.sdio_xpd; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_sdio_drefl(void) +{ + return EFUSE.rd_repeat_data1.sdio_drefl; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_sdio_drefm(void) +{ + return EFUSE.rd_repeat_data1.sdio_drefm; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_sdio_drefh(void) +{ + return EFUSE.rd_repeat_data0.sdio_drefh; +} + +/******************* eFuse control functions *************************/ + +__attribute__((always_inline)) static inline bool efuse_ll_get_read_cmd(void) +{ + return EFUSE.cmd.read_cmd; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_pgm_cmd(void) +{ + return EFUSE.cmd.pgm_cmd; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_read_cmd(void) +{ + EFUSE.cmd.read_cmd = 1; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_pgm_cmd(uint32_t block) +{ + HAL_ASSERT(block < ETS_EFUSE_BLOCK_MAX); + EFUSE.cmd.val = ((block << EFUSE_BLK_NUM_S) & EFUSE_BLK_NUM_M) | EFUSE_PGM_CMD; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_read_op_code(void) +{ + EFUSE.conf.op_code = EFUSE_READ_OP_CODE; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_write_op_code(void) +{ + EFUSE.conf.op_code = EFUSE_WRITE_OP_CODE; +} + +/******************* eFuse control functions *************************/ + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpio_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpio_ll.h index 1056230604a..abea4900451 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpio_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpio_ll.h @@ -14,6 +14,7 @@ #pragma once +#include #include "soc/soc.h" #include "soc/gpio_periph.h" #include "soc/rtc_cntl_reg.h" @@ -48,9 +49,10 @@ static inline void gpio_ll_pullup_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pullup_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PU); + REG_CLR_BIT(IO_MUX_GPIO0_REG + (gpio_num * 4), FUN_PU); } /** @@ -70,9 +72,10 @@ static inline void gpio_ll_pulldown_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pulldown_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PD); + REG_CLR_BIT(IO_MUX_GPIO0_REG + (gpio_num * 4), FUN_PD); } /** @@ -164,9 +167,10 @@ static inline void gpio_ll_intr_disable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_input_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { - PIN_INPUT_DISABLE(GPIO_PIN_MUX_REG[gpio_num]); + PIN_INPUT_DISABLE(IO_MUX_GPIO0_REG + (gpio_num * 4)); } /** @@ -186,6 +190,7 @@ static inline void gpio_ll_input_enable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_output_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { if (gpio_num < 32) { @@ -236,6 +241,18 @@ static inline void gpio_ll_od_enable(gpio_dev_t *hw, gpio_num_t gpio_num) hw->pin[gpio_num].pad_driver = 1; } +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +static inline __attribute__((always_inline)) void gpio_ll_func_sel(gpio_dev_t *hw, uint8_t gpio_num, uint32_t func) +{ + PIN_FUNC_SELECT(IO_MUX_GPIO0_REG + (gpio_num * 4), func); +} + /** * @brief GPIO set output level * @@ -336,6 +353,7 @@ static inline void gpio_ll_get_drive_capability(gpio_dev_t *hw, gpio_num_t gpio_ */ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) { + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD); SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } @@ -346,7 +364,22 @@ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) */ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) { - SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD); + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); +} + +/** + * @brief Get deep sleep hold status + * + * @param hw Peripheral GPIO hardware instance address. + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +__attribute__((always_inline)) +static inline bool gpio_ll_deep_sleep_hold_is_en(gpio_dev_t *hw) +{ + return !GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD) && GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } /** @@ -371,6 +404,24 @@ static inline void gpio_ll_hold_dis(gpio_dev_t *hw, gpio_num_t gpio_num) CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PAD_HOLD_REG, GPIO_HOLD_MASK[gpio_num]); } +/** + * @brief Get digital gpio pad hold status. + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number, only support output GPIOs + * + * @note caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +__attribute__((always_inline)) +static inline bool gpio_ll_is_digital_io_hold(gpio_dev_t *hw, uint32_t gpio_num) +{ + return GET_PERI_REG_MASK(RTC_CNTL_DIG_PAD_HOLD_REG, BIT(gpio_num - 21)); +} + /** * @brief Set pad input to a peripheral signal through the IOMUX. * diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2c_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2c_ll.h index f332613e562..daa0ca0aa55 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2c_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2c_ll.h @@ -224,6 +224,7 @@ static inline void i2c_ll_disable_intr_mask(i2c_dev_t *hw, uint32_t mask) * * @return I2C interrupt status */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_intsts_mask(i2c_dev_t *hw) { return hw->int_status.val; @@ -280,6 +281,7 @@ static inline void i2c_ll_set_slave_addr(i2c_dev_t *hw, uint16_t slave_addr, boo * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_write_cmd_reg(i2c_dev_t *hw, i2c_hw_cmd_t cmd, int cmd_idx) { hw->command[cmd_idx].val = cmd.val; @@ -444,6 +446,7 @@ static inline bool i2c_ll_is_master_mode(i2c_dev_t *hw) * * @return RxFIFO readable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) { return hw->status_reg.rx_fifo_cnt; @@ -456,6 +459,7 @@ static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) * * @return TxFIFO writable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_txfifo_len(i2c_dev_t *hw) { return SOC_I2C_FIFO_LEN - hw->status_reg.tx_fifo_cnt; @@ -480,6 +484,7 @@ static inline uint32_t i2c_ll_get_tout(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_trans_start(i2c_dev_t *hw) { hw->ctr.trans_start = 1; @@ -539,6 +544,7 @@ static inline void i2c_ll_get_scl_timing(i2c_dev_t *hw, int *high_period, int *l * * @return None. */ +__attribute__((always_inline)) static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { uint32_t fifo_addr = (hw == &I2C0) ? 0x6001301c : 0x6002701c; @@ -556,6 +562,7 @@ static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_read_rxfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { uint32_t fifo_addr = (hw == &I2C0) ? 0x6001301c : 0x6002701c; @@ -605,6 +612,7 @@ static inline uint8_t i2c_ll_get_filter(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -618,6 +626,7 @@ static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -631,6 +640,7 @@ static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_TX_INT); @@ -643,6 +653,7 @@ static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_RX_INT); @@ -655,6 +666,7 @@ static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_TX_INT; @@ -667,6 +679,7 @@ static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_rx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_RX_INT; @@ -703,6 +716,7 @@ static inline void i2c_ll_slave_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_SLAVE_TX_INT); @@ -727,6 +741,7 @@ static inline void i2c_ll_slave_disable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_SLAVE_TX_INT; @@ -795,6 +810,7 @@ static inline void i2c_ll_set_source_clk(i2c_dev_t *hw, i2c_sclk_t src_clk) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; @@ -821,6 +837,7 @@ static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *even * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; @@ -894,6 +911,7 @@ static inline void i2c_ll_slave_init(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_update(i2c_dev_t *hw) { ;// ESP32S2 do not support diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mwdt_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mwdt_ll.h index 6d50f740b6b..6219e185ffd 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mwdt_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mwdt_ll.h @@ -23,25 +23,26 @@ extern "C" { #include #include +#include "esp_assert.h" #include "soc/timer_periph.h" #include "soc/timer_group_struct.h" #include "hal/wdt_types.h" #include "esp_attr.h" //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == TIMG_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == TIMG_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == TIMG_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == TIMG_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == TIMG_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == TIMG_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == TIMG_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == TIMG_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == TIMG_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == TIMG_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == TIMG_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == TIMG_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == TIMG_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == TIMG_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == TIMG_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == TIMG_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == TIMG_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == TIMG_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == TIMG_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == TIMG_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == TIMG_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); #define FORCE_MODIFY_WHOLE_REG(i, j, k) \ { \ diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rmt_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rmt_ll.h index f7452a364e3..60e09ce0ecd 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rmt_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rmt_ll.h @@ -23,18 +23,21 @@ extern "C" { // Note: TX and RX channel number are all index from zero in the LL driver // i.e. tx_channel belongs to [0,3], and rx_channel belongs to [0,3] +__attribute__((always_inline)) static inline void rmt_ll_enable_drive_clock(rmt_dev_t *dev, bool enable) { dev->apb_conf.clk_en = enable; // register clock gating dev->apb_conf.mem_clk_force_on = enable; // memory clock gating } +__attribute__((always_inline)) static inline void rmt_ll_power_down_mem(rmt_dev_t *dev, bool enable) { dev->apb_conf.mem_force_pu = !enable; dev->apb_conf.mem_force_pd = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_mem_power_down(rmt_dev_t *dev) { // the RTC domain can also power down RMT memory @@ -43,216 +46,258 @@ static inline bool rmt_ll_is_mem_power_down(rmt_dev_t *dev) return (dev->apb_conf.mem_force_pd) || !(dev->apb_conf.mem_force_pu); } +__attribute__((always_inline)) static inline void rmt_ll_enable_mem_access(rmt_dev_t *dev, bool enable) { dev->apb_conf.apb_fifo_mask = enable; } +__attribute__((always_inline)) static inline void rmt_ll_set_group_clock_src(rmt_dev_t *dev, uint32_t channel, uint8_t src, uint8_t div_num, uint8_t div_a, uint8_t div_b) { dev->conf_ch[channel].conf1.ref_always_on = src; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_group_clock_src(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.ref_always_on; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->ref_cnt_rst.val |= (1 << channel); } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_channels_clock_div(rmt_dev_t *dev, uint32_t channel_mask) { dev->ref_cnt_rst.val |= channel_mask; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->ref_cnt_rst.val |= (1 << channel); } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.mem_rd_rst = 1; dev->conf_ch[channel].conf1.mem_rd_rst = 0; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.mem_wr_rst = 1; dev->conf_ch[channel].conf1.mem_wr_rst = 0; } +__attribute__((always_inline)) static inline void rmt_ll_tx_start(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.tx_start = 1; } +__attribute__((always_inline)) static inline void rmt_ll_tx_stop(rmt_dev_t *dev, uint32_t channel) { dev->conf_ch[channel].conf1.tx_stop = 1; } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.rx_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->conf_ch[channel].conf0.mem_size = block_num; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->conf_ch[channel].conf0.mem_size = block_num; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf0.mem_size; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf0.mem_size; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt, div); } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt, div); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { uint32_t div = HAL_FORCE_READ_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt); return div == 0 ? 256 : div; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { uint32_t div = HAL_FORCE_READ_U32_REG_FIELD(dev->conf_ch[channel].conf0, div_cnt); return div == 0 ? 256 : div; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_pingpong(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->apb_conf.mem_tx_wrap_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_idle_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf0, idle_thres, thres); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_idle_thres(rmt_dev_t *dev, uint32_t channel) { return HAL_FORCE_READ_U32_REG_FIELD(dev->conf_ch[channel].conf0, idle_thres); } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_owner(rmt_dev_t *dev, uint32_t channel, uint8_t owner) { dev->conf_ch[channel].conf1.mem_owner = owner; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_owner(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.mem_owner; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.tx_conti_mode = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_loop_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.tx_conti_mode; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_loop_count(rmt_dev_t *dev, uint32_t channel, uint32_t count) { dev->tx_lim_ch[channel].tx_loop_num = count; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_loop(rmt_dev_t *dev, uint32_t channel) { dev->tx_lim_ch[channel].loop_count_reset = 1; dev->tx_lim_ch[channel].loop_count_reset = 0; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop_count(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->tx_lim_ch[channel].tx_loop_cnt_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_sync(rmt_dev_t *dev, bool enable) { dev->tx_sim.en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_add_to_sync_group(rmt_dev_t *dev, uint32_t channel) { dev->tx_sim.val |= 1 << channel; } +__attribute__((always_inline)) static inline void rmt_ll_tx_remove_from_sync_group(rmt_dev_t *dev, uint32_t channel) { dev->tx_sim.val &= ~(1 << channel); } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_filter(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.rx_filter_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_filter_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->conf_ch[channel].conf1, rx_filter_thres, thres); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_idle(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf1.idle_out_en = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_idle_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.idle_out_en; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_idle_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->conf_ch[channel].conf1.idle_out_lv = level; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_idle_level(rmt_dev_t *dev, uint32_t channel) { return dev->conf_ch[channel].conf1.idle_out_lv; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->status_ch[channel].val; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->status_ch[channel].val; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_limit(rmt_dev_t *dev, uint32_t channel, uint32_t limit) { dev->tx_lim_ch[channel].tx_lim = limit; } +__attribute__((always_inline)) static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool enable) { if (enable) { @@ -262,108 +307,127 @@ static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool e } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3)); dev->int_ena.val |= (enable << (channel * 3)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3 + 1)); dev->int_ena.val |= (enable << (channel * 3 + 1)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3 + 2)); dev->int_ena.val |= (enable << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel * 3 + 2)); dev->int_ena.val |= (enable << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel + 12)); dev->int_ena.val |= (enable << (channel + 12)); } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_loop_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->int_ena.val &= ~(1 << (channel + 16)); dev->int_ena.val |= (enable << (channel + 16)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3 + 1)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel * 3 + 2)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 12)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_loop_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 16)); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_end_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return ((status & 0x01) >> 0) | ((status & 0x08) >> 2) | ((status & 0x40) >> 4) | ((status & 0x200) >> 6); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_end_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return ((status & 0x02) >> 1) | ((status & 0x10) >> 3) | ((status & 0x80) >> 5) | ((status & 0x400) >> 7); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_err_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return ((status & 0x04) >> 2) | ((status & 0x20) >> 4) | ((status & 0x100) >> 6) | ((status & 0x800) >> 8); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_err_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return ((status & 0x04) >> 2) | ((status & 0x20) >> 4) | ((status & 0x100) >> 6) | ((status & 0x800) >> 8); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_thres_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return (status & 0xF000) >> 12; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_loop_interrupt_status(rmt_dev_t *dev) { uint32_t status = dev->int_st.val; return (status & 0xF0000) >> 16; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { // In case the compiler optimise a 32bit instruction (e.g. s32i) into two 16bit instruction (e.g. s16i, which is not allowed to access a register) @@ -374,6 +438,7 @@ static inline void rmt_ll_tx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t dev->carrier_duty_ch[channel].val = reg.val; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { typeof(dev->ch_rx_carrier_rm[0]) reg; @@ -382,33 +447,39 @@ static inline void rmt_ll_rx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t dev->ch_rx_carrier_rm[channel].val = reg.val; } +__attribute__((always_inline)) static inline void rmt_ll_tx_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t *high_ticks, uint32_t *low_ticks) { *high_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->carrier_duty_ch[channel], high); *low_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->carrier_duty_ch[channel], low); } +__attribute__((always_inline)) static inline void rmt_ll_rx_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t *high_ticks, uint32_t *low_ticks) { *high_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->ch_rx_carrier_rm[channel], carrier_high_thres_ch); *low_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->ch_rx_carrier_rm[channel], carrier_low_thres_ch); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_carrier_modulation(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf0.carrier_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_carrier_demodulation(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf0.carrier_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->conf_ch[channel].conf0.carrier_out_lv = level; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->conf_ch[channel].conf0.carrier_out_lv = level; @@ -416,6 +487,7 @@ static inline void rmt_ll_rx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, // set true, enable carrier in all RMT state (idle, reading, sending) // set false, enable carrier only in sending state (i.e. there're effective data in RAM to be sent) +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_always_on(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf0.carrier_eff_en = !enable; @@ -423,6 +495,7 @@ static inline void rmt_ll_tx_set_carrier_always_on(rmt_dev_t *dev, uint32_t chan //Writes items to the specified TX channel memory with the given offset and length. //the caller should ensure that (length + off) <= (memory block * SOC_RMT_MEM_WORDS_PER_CHANNEL) +__attribute__((always_inline)) static inline void rmt_ll_write_memory(rmt_mem_t *mem, uint32_t channel, const void *data, size_t length_in_words, size_t off) { volatile uint32_t *to = (volatile uint32_t *)&mem->chan[channel].data32[off]; diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rwdt_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rwdt_ll.h index f3cc3c0cc42..25c433c1b47 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rwdt_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rwdt_ll.h @@ -29,22 +29,23 @@ extern "C" { #include "soc/rtc_cntl_struct.h" #include "soc/efuse_reg.h" #include "esp_attr.h" +#include "esp_assert.h" //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == RTC_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == RTC_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_RTC == RTC_WDT_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RTC_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RTC_WDT_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == RTC_WDT_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == RTC_WDT_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_RTC == RTC_WDT_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == RTC_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == RTC_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == RTC_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == RTC_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == RTC_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == RTC_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == RTC_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == RTC_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == RTC_WDT_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == RTC_WDT_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == RTC_WDT_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == RTC_WDT_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == RTC_WDT_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == RTC_WDT_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == RTC_WDT_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == RTC_WDT_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); /** * @brief Enable the RWDT diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/twai_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/twai_ll.h index 7a04c18aef5..8b743f4b34a 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/twai_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/twai_ll.h @@ -28,6 +28,7 @@ extern "C" { #include #include +#include "esp_assert.h" #include "hal/misc.h" #include "hal/twai_types.h" #include "soc/twai_periph.h" @@ -85,7 +86,7 @@ typedef union { uint8_t bytes[13]; } __attribute__((packed)) twai_ll_frame_buffer_t; -_Static_assert(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); +ESP_STATIC_ASSERT(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); /* ---------------------------- Mode Register ------------------------------- */ diff --git a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/uart_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/uart_ll.h index 9309d3b8f22..5596ab71e22 100644 --- a/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/uart_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/uart_ll.h @@ -128,7 +128,8 @@ FORCE_INLINE_ATTR void uart_ll_set_baudrate(uart_dev_t *hw, uint32_t baud) FORCE_INLINE_ATTR uint32_t uart_ll_get_baudrate(uart_dev_t *hw) { uint32_t sclk_freq = uart_ll_get_sclk_freq(hw); - typeof(hw->clk_div) div_reg = hw->clk_div; + typeof(hw->clk_div) div_reg; + div_reg.val = hw->clk_div.val; return ((sclk_freq << 4)) / ((div_reg.div_int << 4) | div_reg.div_frag); } @@ -304,7 +305,7 @@ FORCE_INLINE_ATTR void uart_ll_set_stop_bits(uart_dev_t *hw, uart_stop_bits_t st */ FORCE_INLINE_ATTR void uart_ll_get_stop_bits(uart_dev_t *hw, uart_stop_bits_t *stop_bit) { - *stop_bit = hw->conf0.stop_bit_num; + *stop_bit = (uart_stop_bits_t)hw->conf0.stop_bit_num; } /** @@ -334,7 +335,7 @@ FORCE_INLINE_ATTR void uart_ll_set_parity(uart_dev_t *hw, uart_parity_t parity_m FORCE_INLINE_ATTR void uart_ll_get_parity(uart_dev_t *hw, uart_parity_t *parity_mode) { if(hw->conf0.parity_en) { - *parity_mode = 0X2 | hw->conf0.parity; + *parity_mode = (uart_parity_t)(0x2 | hw->conf0.parity); } else { *parity_mode = UART_PARITY_DISABLE; } @@ -450,10 +451,10 @@ FORCE_INLINE_ATTR void uart_ll_get_hw_flow_ctrl(uart_dev_t *hw, uart_hw_flowcont { *flow_ctrl = UART_HW_FLOWCTRL_DISABLE; if(hw->conf1.rx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_RTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_RTS); } if(hw->conf0.tx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_CTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_CTS); } } @@ -708,7 +709,7 @@ FORCE_INLINE_ATTR uint32_t uart_ll_get_wakeup_thrd(uart_dev_t *hw) */ FORCE_INLINE_ATTR void uart_ll_get_data_bit_num(uart_dev_t *hw, uart_word_length_t *data_bit) { - *data_bit = hw->conf0.bit_num; + *data_bit = (uart_word_length_t)hw->conf0.bit_num; } /** @@ -771,7 +772,8 @@ FORCE_INLINE_ATTR void uart_ll_set_loop_back(uart_dev_t *hw, bool loop_back_en) */ FORCE_INLINE_ATTR void uart_ll_inverse_signal(uart_dev_t *hw, uint32_t inv_mask) { - typeof(hw->conf0) conf0_reg = hw->conf0; + typeof(hw->conf0) conf0_reg; + conf0_reg.val = hw->conf0.val; conf0_reg.irda_tx_inv = (inv_mask & UART_SIGNAL_IRDA_TX_INV) ? 1 : 0; conf0_reg.irda_rx_inv = (inv_mask & UART_SIGNAL_IRDA_RX_INV) ? 1 : 0; conf0_reg.rxd_inv = (inv_mask & UART_SIGNAL_RXD_INV) ? 1 : 0; diff --git a/tools/sdk/esp32s2/include/hal/include/hal/dma_types.h b/tools/sdk/esp32s2/include/hal/include/hal/dma_types.h index 66c8677e98f..5a832950999 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/dma_types.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/dma_types.h @@ -15,6 +15,7 @@ #pragma once #include +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -38,7 +39,7 @@ typedef struct dma_descriptor_s { struct dma_descriptor_s *next; /*!< Pointer to the next descriptor (set to NULL if the descriptor is the last one, e.g. suc_eof=1) */ } dma_descriptor_t; -_Static_assert(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); #define DMA_DESCRIPTOR_BUFFER_OWNER_CPU (0) /*!< DMA buffer is allowed to be accessed by CPU */ #define DMA_DESCRIPTOR_BUFFER_OWNER_DMA (1) /*!< DMA buffer is allowed to be accessed by DMA engine */ diff --git a/tools/sdk/esp32s2/include/hal/include/hal/efuse_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/efuse_hal.h new file mode 100644 index 00000000000..ca7fcd2003e --- /dev/null +++ b/tools/sdk/esp32s2/include/hal/include/hal/efuse_hal.h @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @brief Returns chip version + * + * @return Chip version in format: Major * 100 + Minor + */ +uint32_t efuse_hal_chip_revision(void); + +/** + * @brief Returns major chip version + */ +uint32_t efuse_hal_get_major_chip_version(void); + +/** + * @brief Returns minor chip version + */ +uint32_t efuse_hal_get_minor_chip_version(void); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s2/include/hal/include/hal/emac_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/emac_hal.h index 27cd38456dc..fbf0a8ebd66 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/emac_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/emac_hal.h @@ -12,6 +12,7 @@ extern "C" { #include #include +#include "esp_assert.h" #include "esp_err.h" #include "hal/eth_types.h" #include "soc/emac_dma_struct.h" @@ -76,7 +77,7 @@ typedef struct { #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPSEGMENT 2 /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */ #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPFULL 3 /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */ -_Static_assert(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); /** * @brief Ethernet DMA RX Descriptor @@ -150,7 +151,7 @@ typedef struct { uint32_t TimeStampHigh; /*!< Receive frame timestamp high */ } eth_dma_rx_descriptor_t; -_Static_assert(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); typedef struct { emac_mac_dev_t *mac_regs; diff --git a/tools/sdk/esp32s2/include/hal/include/hal/gdma_types.h b/tools/sdk/esp32s2/include/hal/include/hal/gdma_types.h new file mode 100644 index 00000000000..eb1447a78f4 --- /dev/null +++ b/tools/sdk/esp32s2/include/hal/include/hal/gdma_types.h @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumeration of peripherals which have the DMA capability + * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. + * + */ +typedef enum { + GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ + GDMA_TRIG_PERIPH_UHCI, /*!< GDMA trigger peripheral: UHCI */ + GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ + GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ + GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ + GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ + GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ + GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ + GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ + GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ + GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ +} gdma_trigger_peripheral_t; + +/** + * @brief Enumeration of GDMA channel direction + * + */ +typedef enum { + GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ + GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ +} gdma_channel_direction_t; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s2/include/hal/include/hal/gpio_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/gpio_hal.h index 018b4be1288..5a3ce27b0b4 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/gpio_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/gpio_hal.h @@ -187,6 +187,15 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_od_enable(hal, gpio_num) gpio_ll_od_enable((hal)->dev, gpio_num) +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +#define gpio_hal_func_sel(hal, gpio_num, func) gpio_ll_func_sel((hal)->dev, gpio_num, func) + /** * @brief GPIO set output level * @@ -280,6 +289,22 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_hold_dis(hal, gpio_num) gpio_ll_hold_dis((hal)->dev, gpio_num) +/** + * @brief Get wether digital gpio pad is held + * + * @param hal Context of the HAL layer + * @param gpio_num GPIO number, only support output GPIOs + * + * @note digital io means io pad powered by VDD3P3_CPU or VDD_SPI + * rtc io means io pad powered by VDD3P3_RTC + * caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +#define gpio_hal_is_digital_io_hold(hal, gpio_num) gpio_ll_is_digital_io_hold((hal)->dev, gpio_num) + /** * @brief Enable all digital gpio pad hold function during Deep-sleep. * @@ -300,6 +325,17 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_deep_sleep_hold_dis(hal) gpio_ll_deep_sleep_hold_dis((hal)->dev) +/** + * @brief Get whether all digital gpio pad hold function during Deep-sleep is enabled. + * + * @param hal Context of the HAL layer + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +#define gpio_hal_deep_sleep_hold_is_en(hal) gpio_ll_deep_sleep_hold_is_en((hal)->dev) + /** * @brief Set pad input to a peripheral signal through the IOMUX. * @@ -322,7 +358,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #if SOC_GPIO_SUPPORT_FORCE_HOLD /** - * @brief Force hold digital and rtc gpio pad. + * @brief Force hold digital gpio pad. * @note GPIO force hold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -330,7 +366,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_hold_all(hal) gpio_ll_force_hold_all((hal)->dev) /** - * @brief Force unhold digital and rtc gpio pad. + * @brief Force unhold digital gpio pad. * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -338,7 +374,6 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_unhold_all() gpio_ll_force_unhold_all() #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable pull-up on GPIO when system sleep. * @@ -436,7 +471,6 @@ void gpio_hal_sleep_pupd_config_apply(gpio_hal_context_t *hal, gpio_num_t gpio_n */ void gpio_hal_sleep_pupd_config_unapply(gpio_hal_context_t *hal, gpio_num_t gpio_num); #endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL -#endif //SOC_GPIO_SUPPORT_SLP_SWITCH #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32s2/include/hal/include/hal/spi_flash_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_flash_hal.h index ae37016fa2d..e51251b4593 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/spi_flash_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/spi_flash_hal.h @@ -26,6 +26,7 @@ #include "hal/spi_types.h" #include "hal/spi_flash_types.h" #include "soc/soc_memory_types.h" +#include "esp_assert.h" /* Hardware host-specific constants */ #define SPI_FLASH_HAL_MAX_WRITE_BYTES 64 @@ -56,7 +57,7 @@ typedef struct { uint32_t slicer_flags; /// Slicer flags for configuring how to slice data correctly while reading or writing. #define SPI_FLASH_HOST_CONTEXT_SLICER_FLAG_DTR BIT(0) ///< Slice data according to DTR mode, the address and length must be even (A0=0). } spi_flash_hal_context_t; -_Static_assert(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); +ESP_STATIC_ASSERT(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); /// This struct provide MSPI Flash necessary timing related config, should be consistent with that in union in `spi_flash_hal_config_t`. typedef struct { diff --git a/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hal.h index 3ad5f485f1f..49d8b0ca12c 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hal.h @@ -150,6 +150,7 @@ void spi_slave_hal_store_result(spi_slave_hal_context_t *hal); */ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); +#if CONFIG_IDF_TARGET_ESP32 /** * Check whether we need to reset the DMA according to the status of last transactions. * @@ -161,3 +162,4 @@ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); * @return true if reset is needed, else false. */ bool spi_slave_hal_dma_need_reset(const spi_slave_hal_context_t *hal); +#endif //#if CONFIG_IDF_TARGET_ESP32 diff --git a/tools/sdk/esp32s2/include/hal/include/hal/spi_types.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_types.h index 9c008838a19..c7caa95df9a 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/spi_types.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/spi_types.h @@ -27,7 +27,9 @@ typedef enum { //SPI1 can be used as GPSPI only on ESP32 SPI1_HOST=0, ///< SPI1 SPI2_HOST=1, ///< SPI2 +#if SOC_SPI_PERIPH_NUM > 2 SPI3_HOST=2, ///< SPI3 +#endif } spi_host_device_t; /// SPI Events diff --git a/tools/sdk/esp32s2/include/hal/include/hal/systimer_types.h b/tools/sdk/esp32s2/include/hal/include/hal/systimer_types.h index d4583dc7ae0..0ed44feb4eb 100644 --- a/tools/sdk/esp32s2/include/hal/include/hal/systimer_types.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/systimer_types.h @@ -16,6 +16,7 @@ #include #include "soc/soc_caps.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -39,7 +40,7 @@ typedef struct { } systimer_counter_value_t; /** @cond */ -_Static_assert(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); /** @endcond */ /** diff --git a/tools/sdk/esp32c3/include/hal/include/hal/usbh_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/usb_dwc_hal.h similarity index 67% rename from tools/sdk/esp32c3/include/hal/include/hal/usbh_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/usb_dwc_hal.h index 5326deb2dca..d52e882cb9f 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/usbh_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/usb_dwc_hal.h @@ -17,8 +17,8 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL #include #include -#include "soc/usbh_struct.h" -#include "hal/usbh_ll.h" +#include "soc/usb_dwc_struct.h" +#include "hal/usb_dwc_ll.h" #include "hal/usb_types_private.h" #include "hal/assert.h" @@ -26,11 +26,11 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL // ------------------ Constants/Configs -------------------- -#define USBH_HAL_DMA_MEM_ALIGN 512 -#define USBH_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) -#define USBH_HAL_NUM_CHAN 8 -#define USBH_HAL_XFER_DESC_SIZE (sizeof(usbh_ll_dma_qtd_t)) -#define USBH_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL +#define USB_DWC_HAL_DMA_MEM_ALIGN 512 +#define USB_DWC_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) +#define USB_DWC_HAL_NUM_CHAN 8 +#define USB_DWC_HAL_XFER_DESC_SIZE (sizeof(usb_dwc_ll_dma_qtd_t)) +#define USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL /** * @brief FIFO size configuration structure @@ -39,7 +39,7 @@ typedef struct { uint32_t rx_fifo_lines; /**< Size of the RX FIFO in terms the number of FIFO lines */ uint32_t nptx_fifo_lines; /**< Size of the Non-periodic FIFO in terms the number of FIFO lines */ uint32_t ptx_fifo_lines; /**< Size of the Periodic FIFO in terms the number of FIFO lines */ -} usbh_hal_fifo_config_t; +} usb_dwc_hal_fifo_config_t; // --------------------- HAL Events ------------------------ @@ -47,25 +47,25 @@ typedef struct { * @brief Host port HAL events */ typedef enum { - USBH_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ - USBH_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ - USBH_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ - USBH_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ - USBH_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ - USBH_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ - USBH_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ - USBH_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ -} usbh_hal_port_event_t; + USB_DWC_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ + USB_DWC_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ + USB_DWC_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ + USB_DWC_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ + USB_DWC_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ + USB_DWC_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ + USB_DWC_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ + USB_DWC_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ +} usb_dwc_hal_port_event_t; /** * @brief Channel events */ typedef enum { - USBH_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USBH_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ - USBH_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ - USBH_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ - USBH_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ -} usbh_hal_chan_event_t; + USB_DWC_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USB_DWC_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ + USB_DWC_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ + USB_DWC_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ + USB_DWC_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ +} usb_dwc_hal_chan_event_t; // --------------------- HAL Errors ------------------------ @@ -73,20 +73,20 @@ typedef enum { * @brief Channel errors */ typedef enum { - USBH_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ - USBH_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ - USBH_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ - USBH_HAL_CHAN_ERROR_STALL, /**< STALL response received */ -} usbh_hal_chan_error_t; + USB_DWC_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ + USB_DWC_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ + USB_DWC_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ + USB_DWC_HAL_CHAN_ERROR_STALL, /**< STALL response received */ +} usb_dwc_hal_chan_error_t; // ------------- Transfer Descriptor Related --------------- /** * @brief Flags used to describe the type of transfer descriptor to fill */ -#define USBH_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ -#define USBH_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ -#define USBH_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ +#define USB_DWC_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ +#define USB_DWC_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ +#define USB_DWC_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ /** * @brief Status value of a transfer descriptor @@ -95,10 +95,10 @@ typedef enum { * or an error). Therefore, if a channel halt is requested before a transfer descriptor completes, the transfer * descriptor remains unexecuted. */ -#define USBH_HAL_XFER_DESC_STS_SUCCESS USBH_LL_QTD_STATUS_SUCCESS -#define USBH_HAL_XFER_DESC_STS_PKTERR USBH_LL_QTD_STATUS_PKTERR -#define USBH_HAL_XFER_DESC_STS_BUFFER_ERR USBH_LL_QTD_STATUS_BUFFER -#define USBH_HAL_XFER_DESC_STS_NOT_EXECUTED USBH_LL_QTD_STATUS_NOT_EXECUTED +#define USB_DWC_HAL_XFER_DESC_STS_SUCCESS USB_DWC_LL_QTD_STATUS_SUCCESS +#define USB_DWC_HAL_XFER_DESC_STS_PKTERR USB_DWC_LL_QTD_STATUS_PKTERR +#define USB_DWC_HAL_XFER_DESC_STS_BUFFER_ERR USB_DWC_LL_QTD_STATUS_BUFFER +#define USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED USB_DWC_LL_QTD_STATUS_NOT_EXECUTED // -------------------- Object Types ----------------------- @@ -122,7 +122,7 @@ typedef struct { usb_hal_interval_t interval; /**< The interval of the endpoint */ uint32_t phase_offset_frames; /**< Phase offset in number of frames */ } periodic; /**< Characteristic for periodic (interrupt/isochronous) endpoints only */ -} usbh_hal_ep_char_t; +} usb_dwc_hal_ep_char_t; /** * @brief Channel object @@ -139,18 +139,18 @@ typedef struct { }; uint32_t val; } flags; /**< Flags regarding channel's status and information */ - usb_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ - usbh_hal_chan_error_t error; /**< The last error that occurred on the channel */ + usb_dwc_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ + usb_dwc_hal_chan_error_t error; /**< The last error that occurred on the channel */ usb_priv_xfer_type_t type; /**< The transfer type of the channel */ void *chan_ctx; /**< Context variable for the owner of the channel */ -} usbh_hal_chan_t; +} usb_dwc_hal_chan_t; /** * @brief HAL context structure */ typedef struct { //Context - usbh_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ + usb_dwc_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ //Host Port related uint32_t *periodic_frame_list; /**< Pointer to scheduling frame list */ usb_hal_frame_list_len_t frame_list_len; /**< Length of the periodic scheduling frame list */ @@ -168,9 +168,9 @@ typedef struct { struct { int num_allocd; /**< Number of channels currently allocated */ uint32_t chan_pend_intrs_msk; /**< Bit mask of channels with pending interrupts */ - usbh_hal_chan_t *hdls[USBH_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ + usb_dwc_hal_chan_t *hdls[USB_DWC_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ } channels; -} usbh_hal_context_t; +} usb_dwc_hal_context_t; // -------------------------------------------------- Core (Global) ---------------------------------------------------- @@ -188,12 +188,12 @@ typedef struct { * - Sets default values to some global and OTG registers (GAHBCFG and GUSBCFG) * - Umask global interrupt signal * - Put DWC_OTG into host mode. Require 25ms delay before this takes effect. - * - State -> USBH_HAL_PORT_STATE_OTG + * - State -> USB_DWC_HAL_PORT_STATE_OTG * - Interrupts cleared. Users can now enable their ISR * * @param[inout] hal Context of the HAL layer */ -void usbh_hal_init(usbh_hal_context_t *hal); +void usb_dwc_hal_init(usb_dwc_hal_context_t *hal); /** * @brief Deinitialize the HAL context @@ -206,20 +206,20 @@ void usbh_hal_init(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -void usbh_hal_deinit(usbh_hal_context_t *hal); +void usb_dwc_hal_deinit(usb_dwc_hal_context_t *hal); /** * @brief Issue a soft reset to the controller * * This should be called when the host port encounters an error event or has been disconnected. Before calling this, * users are responsible for safely freeing all channels as a soft reset will wipe all host port and channel registers. - * This function will result in the host port being put back into same state as after calling usbh_hal_init(). + * This function will result in the host port being put back into same state as after calling usb_dwc_hal_init(). * * @note This has nothing to do with a USB bus reset. It simply resets the peripheral * * @param hal Context of the HAL layer */ -void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); +void usb_dwc_hal_core_soft_reset(usb_dwc_hal_context_t *hal); /** * @brief Set FIFO sizes @@ -229,14 +229,14 @@ void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); * may be situations where this function may need to be called again to resize the FIFOs. If resizing FIFOs dynamically, * it is the user's responsibility to ensure there are no active channels when this function is called. * - * @note The totol size of all the FIFOs must be less than or equal to USBH_HAL_FIFO_TOTAL_USABLE_LINES + * @note The totol size of all the FIFOs must be less than or equal to USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES * @note After a port reset, the FIFO size registers will reset to their default values, so this function must be called * again post reset. * * @param hal Context of the HAL layer * @param fifo_config FIFO configuration */ -void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_t *fifo_config); +void usb_dwc_hal_set_fifo_size(usb_dwc_hal_context_t *hal, const usb_dwc_hal_fifo_config_t *fifo_config); // ---------------------------------------------------- Host Port ------------------------------------------------------ @@ -249,11 +249,11 @@ void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_ * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_init(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_init(usb_dwc_hal_context_t *hal) { //Configure Host related interrupts - usbh_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -263,10 +263,10 @@ static inline void usbh_hal_port_init(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_deinit(usb_dwc_hal_context_t *hal) { //Disable Host port and channel interrupts - usb_ll_dis_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_gintmsk_dis_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -275,12 +275,12 @@ static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param power_on Whether to power ON or OFF the port */ -static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool power_on) +static inline void usb_dwc_hal_port_toggle_power(usb_dwc_hal_context_t *hal, bool power_on) { if (power_on) { - usbh_ll_hprt_en_pwr(hal->dev); + usb_dwc_ll_hprt_en_pwr(hal->dev); } else { - usbh_ll_hprt_dis_pwr(hal->dev); + usb_dwc_ll_hprt_dis_pwr(hal->dev); } } @@ -291,19 +291,19 @@ static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool powe * Entry: * - Host port detects a device connection or Host port is already enabled * Exit: - * - On release of the reset signal, a USBH_HAL_PORT_EVENT_ENABLED will be generated + * - On release of the reset signal, a USB_DWC_HAL_PORT_EVENT_ENABLED will be generated * * @note If the host port is already enabled, then issuing a reset will cause it be disabled and generate a - * USBH_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus - * generating the USBH_HAL_PORT_EVENT_ENABLED event) + * USB_DWC_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus + * generating the USB_DWC_HAL_PORT_EVENT_ENABLED event) * * @param hal Context of the HAL layer * @param enable Enable/disable reset signal */ -static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_reset(usb_dwc_hal_context_t *hal, bool enable) { HAL_ASSERT(hal->channels.num_allocd == 0); //Cannot reset if there are still allocated channels - usbh_ll_hprt_set_port_reset(hal->dev, enable); + usb_dwc_ll_hprt_set_port_reset(hal->dev, enable); } /** @@ -317,7 +317,7 @@ static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enab * * @param hal Context of the HAL layer */ -void usbh_hal_port_enable(usbh_hal_context_t *hal); +void usb_dwc_hal_port_enable(usb_dwc_hal_context_t *hal); /** * @brief Disable the host port @@ -327,9 +327,9 @@ void usbh_hal_port_enable(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_disable(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_port_dis(hal->dev); + usb_dwc_ll_hprt_port_dis(hal->dev); } /** @@ -337,9 +337,9 @@ static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layers */ -static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_suspend(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_set_port_suspend(hal->dev); + usb_dwc_ll_hprt_set_port_suspend(hal->dev); } /** @@ -352,12 +352,12 @@ static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param enable Enable/disable resume signal */ -static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_resume(usb_dwc_hal_context_t *hal, bool enable) { if (enable) { - usbh_ll_hprt_set_port_resume(hal->dev); + usb_dwc_ll_hprt_set_port_resume(hal->dev); } else { - usbh_ll_hprt_clr_port_resume(hal->dev); + usb_dwc_ll_hprt_clr_port_resume(hal->dev); } } @@ -371,9 +371,9 @@ static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool ena * @return true Resume signal is still being driven * @return false Resume signal is no longer driven */ -static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_resume(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_port_resume(hal->dev); + return usb_dwc_ll_hprt_get_port_resume(hal->dev); } // ---------------- Host Port Scheduling ------------------- @@ -382,13 +382,13 @@ static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) * @brief Sets the periodic scheduling frame list * * @note This function must be called before attempting configuring any channels to be period via - * usbh_hal_chan_set_ep_char() + * usb_dwc_hal_chan_set_ep_char() * * @param hal Context of the HAL layer * @param frame_list Base address of the frame list * @param frame_list_len Number of entries in the frame list (can only be 8, 16, 32, 64) */ -static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) +static inline void usb_dwc_hal_port_set_frame_list(usb_dwc_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) { //Clear and save frame list hal->periodic_frame_list = frame_list; @@ -401,7 +401,7 @@ static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_ * @param hal Context of the HAL layer * @return uint32_t* Base address of the periodic scheduling frame list */ -static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) +static inline uint32_t *usb_dwc_hal_port_get_frame_list(usb_dwc_hal_context_t *hal) { return hal->periodic_frame_list; } @@ -409,18 +409,18 @@ static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) /** * @brief Enable periodic scheduling * - * @note The periodic frame list must be set via usbh_hal_port_set_frame_list() should be set before calling this + * @note The periodic frame list must be set via usb_dwc_hal_port_set_frame_list() should be set before calling this * function * @note This function must be called before activating any periodic channels * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_enable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->periodic_frame_list != NULL); - usbh_ll_set_frame_list_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); - usbh_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); - usbh_ll_hcfg_en_perio_sched(hal->dev); + usb_dwc_ll_hflbaddr_set_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); + usb_dwc_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); + usb_dwc_ll_hcfg_en_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 1; } @@ -435,16 +435,16 @@ static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_disable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->flags.periodic_sched_enabled); - usbh_ll_hcfg_dis_perio_sched(hal->dev); + usb_dwc_ll_hcfg_dis_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 0; } -static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) +static inline uint32_t usb_dwc_hal_port_get_cur_frame_num(usb_dwc_hal_context_t *hal) { - return usbh_ll_get_frm_num(hal->dev); + return usb_dwc_ll_hfnum_get_frame_num(hal->dev); } // --------------- Host Port Status/State ------------------ @@ -453,19 +453,19 @@ static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) * @brief Check if a device is currently connected to the host port * * This function is intended to be called after one of the following events followed by an adequate debounce delay - * - USBH_HAL_PORT_EVENT_CONN - * - USBH_HAL_PORT_EVENT_DISCONN + * - USB_DWC_HAL_PORT_EVENT_CONN + * - USB_DWC_HAL_PORT_EVENT_DISCONN * * @note No other connection/disconnection event will occur again until the debounce lock is disabled via - * usbh_hal_disable_debounce_lock() + * usb_dwc_hal_disable_debounce_lock() * * @param hal Context of the HAL layer * @return true A device is connected to the host port * @return false A device is not connected to the host port */ -static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_if_connected(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_conn_status(hal->dev); + return usb_dwc_ll_hprt_get_conn_status(hal->dev); } /** @@ -476,27 +476,27 @@ static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @return usb_priv_speed_t Speed of the connected device (FS or LS only on the esp32-s2 and esp32-s3) */ -static inline usb_priv_speed_t usbh_hal_port_get_conn_speed(usbh_hal_context_t *hal) +static inline usb_priv_speed_t usb_dwc_hal_port_get_conn_speed(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_speed(hal->dev); + return usb_dwc_ll_hprt_get_speed(hal->dev); } /** * @brief Disable the debounce lock * - * This function must be called after calling usbh_hal_port_check_if_connected() and will allow connection/disconnection + * This function must be called after calling usb_dwc_hal_port_check_if_connected() and will allow connection/disconnection * events to occur again. Any pending connection or disconenction interrupts are cleared. * * @param hal Context of the HAL layer */ -static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_disable_debounce_lock(usb_dwc_hal_context_t *hal) { hal->flags.dbnc_lock_enabled = 0; //Clear Conenction and disconenction interrupt in case it triggered again - usb_ll_intr_clear(hal->dev, USB_LL_INTR_CORE_DISCONNINT); - usbh_ll_hprt_intr_clear(hal->dev, USBH_LL_INTR_HPRT_PRTCONNDET); + usb_dwc_ll_gintsts_clear_intrs(hal->dev, USB_DWC_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_hprt_intr_clear(hal->dev, USB_DWC_LL_INTR_HPRT_PRTCONNDET); //Reenable the hprt (connection) and disconnection interrupts - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_DISCONNINT); } // ----------------------------------------------------- Channel ------------------------------------------------------- @@ -512,7 +512,7 @@ static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) * @return true Channel successfully allocated * @return false Failed to allocate channel */ -bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, void *chan_ctx); +bool usb_dwc_hal_chan_alloc(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, void *chan_ctx); /** * @brief Free a channel @@ -520,7 +520,7 @@ bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, voi * @param[in] hal Context of the HAL layer * @param[in] chan_obj Channel object */ -void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); +void usb_dwc_hal_chan_free(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj); // ---------------- Channel Configuration ------------------ @@ -530,7 +530,7 @@ void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); * @param[in] chan_obj Channel object * @return void* The context variable of the channel */ -static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) +static inline void *usb_dwc_hal_chan_get_context(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->chan_ctx; } @@ -547,7 +547,7 @@ static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) * @param chan_obj Channel object * @param ep_char Endpoint characteristics */ -void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, usbh_hal_ep_char_t *ep_char); +void usb_dwc_hal_chan_set_ep_char(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, usb_dwc_hal_ep_char_t *ep_char); /** * @brief Set the direction of the channel @@ -561,11 +561,11 @@ void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_ob * @param chan_obj Channel object * @param is_in Whether the direction is IN */ -static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) +static inline void usb_dwc_hal_chan_set_dir(usb_dwc_hal_chan_t *chan_obj, bool is_in) { //Cannot change direction whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); - usbh_ll_chan_set_dir(chan_obj->regs, is_in); + usb_dwc_ll_hcchar_set_dir(chan_obj->regs, is_in); } /** @@ -580,12 +580,12 @@ static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) * @param chan_obj Channel object * @param pid PID of the next DATA packet (DATA0 or DATA1) */ -static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) +static inline void usb_dwc_hal_chan_set_pid(usb_dwc_hal_chan_t *chan_obj, int pid) { //Cannot change pid whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); //Update channel object and set the register - usbh_ll_chan_set_pid(chan_obj->regs, pid); + usb_dwc_ll_hctsiz_set_pid(chan_obj->regs, pid); } /** @@ -598,10 +598,10 @@ static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) * @param chan_obj Channel object * @return uint32_t Starting PID of the next transfer (DATA0 or DATA1) */ -static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) +static inline uint32_t usb_dwc_hal_chan_get_pid(usb_dwc_hal_chan_t *chan_obj) { HAL_ASSERT(!chan_obj->flags.active); - return usbh_ll_chan_get_pid(chan_obj->regs); + return usb_dwc_ll_hctsiz_get_pid(chan_obj->regs); } // ------------------- Channel Control --------------------- @@ -619,7 +619,7 @@ static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) * @param desc_list_len Transfer descriptor list length * @param start_idx Index of the starting transfer descriptor in the list */ -void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); +void usb_dwc_hal_chan_activate(usb_dwc_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); /** * @brief Get the index of the current transfer descriptor @@ -627,9 +627,9 @@ void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int * @param chan_obj Channel object * @return int Descriptor index */ -static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) +static inline int usb_dwc_hal_chan_get_qtd_idx(usb_dwc_hal_chan_t *chan_obj) { - return usbh_ll_chan_get_ctd(chan_obj->regs); + return usb_dwc_ll_hcdam_get_cur_qtd_idx(chan_obj->regs); } /** @@ -637,24 +637,24 @@ static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) * * This function should be called in order to halt a channel. If the channel is already halted, this function will * return true. If the channel is still active, this function will return false and users must wait for the - * USBH_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. + * USB_DWC_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. * * @note When a transfer is in progress (i.e., the channel is active) and a halt is requested, the channel will halt * after the next USB packet is completed. If the transfer has more pending packets, the transfer will just be - * marked as USBH_HAL_XFER_DESC_STS_NOT_EXECUTED. + * marked as USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED. * * @param chan_obj Channel object * @return true The channel is already halted - * @return false The halt was requested, wait for USBH_HAL_CHAN_EVENT_HALT_REQ + * @return false The halt was requested, wait for USB_DWC_HAL_CHAN_EVENT_HALT_REQ */ -bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); +bool usb_dwc_hal_chan_request_halt(usb_dwc_hal_chan_t *chan_obj); /** * @brief Indicate that a channel is halted after a port error * * When a port error occurs (e.g., discconect, overcurrent): * - Any previously active channels will remain active (i.e., they will not receive a channel interrupt) - * - Attempting to disable them using usbh_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels + * - Attempting to disable them using usb_dwc_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels * (probalby something to do with the periodic scheduling) * * However, the channel's enable bit can be left as 1 since after a port error, a soft reset will be done anyways. @@ -663,7 +663,7 @@ bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); * * @param chan_obj Channel object */ -static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) +static inline void usb_dwc_hal_chan_mark_halted(usb_dwc_hal_chan_t *chan_obj) { chan_obj->flags.active = 0; } @@ -672,9 +672,9 @@ static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) * @brief Get a channel's error * * @param chan_obj Channel object - * @return usbh_hal_chan_error_t The type of error the channel has encountered + * @return usb_dwc_hal_chan_error_t The type of error the channel has encountered */ -static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *chan_obj) +static inline usb_dwc_hal_chan_error_t usb_dwc_hal_chan_get_error(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->error; } @@ -688,8 +688,8 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * - A stage of a transfer (for control transfers) * - A frame of a transfer interval (for interrupt and isoc) * - An entire transfer (for bulk transfers) - * - Check the various USBH_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor - * - For IN transfer entries, set the USBH_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of + * - Check the various USB_DWC_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor + * - For IN transfer entries, set the USB_DWC_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of * the endpoint's MPS * * @note Critical section is not required for this function @@ -700,19 +700,19 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * @param xfer_len Transfer length * @param flags Transfer flags */ -static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) +static inline void usb_dwc_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - if (flags & USBH_HAL_XFER_DESC_FLAG_IN) { - usbh_ll_set_qtd_in(&qtd_list[desc_idx], + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + if (flags & USB_DWC_HAL_XFER_DESC_FLAG_IN) { + usb_dwc_ll_qtd_set_in(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC); } else { - usbh_ll_set_qtd_out(&qtd_list[desc_idx], + usb_dwc_ll_qtd_set_out(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC, - flags & USBH_HAL_XFER_DESC_FLAG_SETUP); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC, + flags & USB_DWC_HAL_XFER_DESC_FLAG_SETUP); } } @@ -722,10 +722,10 @@ static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, u * @param desc_list Transfer descriptor list * @param desc_idx Transfer descriptor index */ -static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) +static inline void usb_dwc_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } /** @@ -738,12 +738,12 @@ static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) * * @note Critical section is not required for this function */ -static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) +static inline void usb_dwc_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_get_qtd_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_get_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); //Clear the QTD to prevent it from being read again - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } // ------------------------------------------------- Event Handling ---------------------------------------------------- @@ -757,9 +757,9 @@ static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, * @note This should be the first interrupt decode function to be run * * @param hal Context of the HAL layer - * @return usbh_hal_port_event_t Host port event + * @return usb_dwc_hal_port_event_t Host port event */ -usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); +usb_dwc_hal_port_event_t usb_dwc_hal_decode_intr(usb_dwc_hal_context_t *hal); /** * @brief Gets the next channel with a pending interrupt @@ -768,9 +768,9 @@ usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); * interrupt, this function returns one of the channel's objects. Call this function repeatedly until it returns NULL. * * @param hal Context of the HAL layer - * @return usbh_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. + * @return usb_dwc_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. */ -usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); +usb_dwc_hal_chan_t *usb_dwc_hal_get_chan_pending_intr(usb_dwc_hal_context_t *hal); /** * @brief Decode a particular channel's interrupt @@ -781,9 +781,9 @@ usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); * @param chan_obj Channel object * @note If the host port has an error (e.g., a sudden disconnect or an port error), any active channels will not * receive an interrupt. Each active channel must be manually halted. - * @return usbh_hal_chan_event_t Channel event + * @return usb_dwc_hal_chan_event_t Channel event */ -usbh_hal_chan_event_t usbh_hal_chan_decode_intr(usbh_hal_chan_t *chan_obj); +usb_dwc_hal_chan_event_t usb_dwc_hal_chan_decode_intr(usb_dwc_hal_chan_t *chan_obj); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/hal/include/hal/usbh_ll.h b/tools/sdk/esp32s2/include/hal/include/hal/usb_dwc_ll.h similarity index 59% rename from tools/sdk/esp32s3/include/hal/include/hal/usbh_ll.h rename to tools/sdk/esp32s2/include/hal/include/hal/usb_dwc_ll.h index 4320ead0a3b..3bbaeca4c2e 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/usbh_ll.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/usb_dwc_ll.h @@ -12,7 +12,7 @@ extern "C" { #include #include -#include "soc/usbh_struct.h" +#include "soc/usb_dwc_struct.h" #include "hal/usb_types_private.h" #include "hal/misc.h" @@ -24,48 +24,48 @@ extern "C" { /* * Interrupt bit masks of the GINTSTS and GINTMSK registers */ -#define USB_LL_INTR_CORE_WKUPINT (1 << 31) -#define USB_LL_INTR_CORE_SESSREQINT (1 << 30) -#define USB_LL_INTR_CORE_DISCONNINT (1 << 29) -#define USB_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) -#define USB_LL_INTR_CORE_PTXFEMP (1 << 26) -#define USB_LL_INTR_CORE_HCHINT (1 << 25) -#define USB_LL_INTR_CORE_PRTINT (1 << 24) -#define USB_LL_INTR_CORE_RESETDET (1 << 23) -#define USB_LL_INTR_CORE_FETSUSP (1 << 22) -#define USB_LL_INTR_CORE_INCOMPIP (1 << 21) -#define USB_LL_INTR_CORE_INCOMPISOIN (1 << 20) -#define USB_LL_INTR_CORE_OEPINT (1 << 19) -#define USB_LL_INTR_CORE_IEPINT (1 << 18) -#define USB_LL_INTR_CORE_EPMIS (1 << 17) -#define USB_LL_INTR_CORE_EOPF (1 << 15) -#define USB_LL_INTR_CORE_ISOOUTDROP (1 << 14) -#define USB_LL_INTR_CORE_ENUMDONE (1 << 13) -#define USB_LL_INTR_CORE_USBRST (1 << 12) -#define USB_LL_INTR_CORE_USBSUSP (1 << 11) -#define USB_LL_INTR_CORE_ERLYSUSP (1 << 10) -#define USB_LL_INTR_CORE_GOUTNAKEFF (1 << 7) -#define USB_LL_INTR_CORE_GINNAKEFF (1 << 6) -#define USB_LL_INTR_CORE_NPTXFEMP (1 << 5) -#define USB_LL_INTR_CORE_RXFLVL (1 << 4) -#define USB_LL_INTR_CORE_SOF (1 << 3) -#define USB_LL_INTR_CORE_OTGINT (1 << 2) -#define USB_LL_INTR_CORE_MODEMIS (1 << 1) -#define USB_LL_INTR_CORE_CURMOD (1 << 0) +#define USB_DWC_LL_INTR_CORE_WKUPINT (1 << 31) +#define USB_DWC_LL_INTR_CORE_SESSREQINT (1 << 30) +#define USB_DWC_LL_INTR_CORE_DISCONNINT (1 << 29) +#define USB_DWC_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) +#define USB_DWC_LL_INTR_CORE_PTXFEMP (1 << 26) +#define USB_DWC_LL_INTR_CORE_HCHINT (1 << 25) +#define USB_DWC_LL_INTR_CORE_PRTINT (1 << 24) +#define USB_DWC_LL_INTR_CORE_RESETDET (1 << 23) +#define USB_DWC_LL_INTR_CORE_FETSUSP (1 << 22) +#define USB_DWC_LL_INTR_CORE_INCOMPIP (1 << 21) +#define USB_DWC_LL_INTR_CORE_INCOMPISOIN (1 << 20) +#define USB_DWC_LL_INTR_CORE_OEPINT (1 << 19) +#define USB_DWC_LL_INTR_CORE_IEPINT (1 << 18) +#define USB_DWC_LL_INTR_CORE_EPMIS (1 << 17) +#define USB_DWC_LL_INTR_CORE_EOPF (1 << 15) +#define USB_DWC_LL_INTR_CORE_ISOOUTDROP (1 << 14) +#define USB_DWC_LL_INTR_CORE_ENUMDONE (1 << 13) +#define USB_DWC_LL_INTR_CORE_USBRST (1 << 12) +#define USB_DWC_LL_INTR_CORE_USBSUSP (1 << 11) +#define USB_DWC_LL_INTR_CORE_ERLYSUSP (1 << 10) +#define USB_DWC_LL_INTR_CORE_GOUTNAKEFF (1 << 7) +#define USB_DWC_LL_INTR_CORE_GINNAKEFF (1 << 6) +#define USB_DWC_LL_INTR_CORE_NPTXFEMP (1 << 5) +#define USB_DWC_LL_INTR_CORE_RXFLVL (1 << 4) +#define USB_DWC_LL_INTR_CORE_SOF (1 << 3) +#define USB_DWC_LL_INTR_CORE_OTGINT (1 << 2) +#define USB_DWC_LL_INTR_CORE_MODEMIS (1 << 1) +#define USB_DWC_LL_INTR_CORE_CURMOD (1 << 0) /* * Bit mask of interrupt generating bits of the the HPRT register. These bits - * are ORd into the USB_LL_INTR_CORE_PRTINT interrupt. + * are ORd into the USB_DWC_LL_INTR_CORE_PRTINT interrupt. * * Note: Some fields of the HPRT are W1C (write 1 clear), this we cannot do a * simple read and write-back to clear the HPRT interrupt bits. Instead we need * a W1C mask the non-interrupt related bits */ -#define USBH_LL_HPRT_W1C_MSK (0x2E) -#define USBH_LL_HPRT_ENA_MSK (0x04) -#define USBH_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) -#define USBH_LL_INTR_HPRT_PRTENCHNG (1 << 3) -#define USBH_LL_INTR_HPRT_PRTCONNDET (1 << 1) +#define USB_DWC_LL_HPRT_W1C_MSK (0x2E) +#define USB_DWC_LL_HPRT_ENA_MSK (0x04) +#define USB_DWC_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) +#define USB_DWC_LL_INTR_HPRT_PRTENCHNG (1 << 3) +#define USB_DWC_LL_INTR_HPRT_PRTCONNDET (1 << 1) /* * Bit mask of channel interrupts (HCINTi and HCINTMSKi registers) @@ -78,22 +78,22 @@ extern "C" { * - XFERCOMPL * The remaining interrupt bits will still be set (when the corresponding event occurs) * but will not generate an interrupt. Therefore we must proxy through the - * USBH_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. + * USB_DWC_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. */ -#define USBH_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) -#define USBH_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) -#define USBH_LL_INTR_CHAN_BNAINTR (1 << 11) -#define USBH_LL_INTR_CHAN_DATATGLERR (1 << 10) -#define USBH_LL_INTR_CHAN_FRMOVRUN (1 << 9) -#define USBH_LL_INTR_CHAN_BBLEER (1 << 8) -#define USBH_LL_INTR_CHAN_XACTERR (1 << 7) -#define USBH_LL_INTR_CHAN_NYET (1 << 6) -#define USBH_LL_INTR_CHAN_ACK (1 << 5) -#define USBH_LL_INTR_CHAN_NAK (1 << 4) -#define USBH_LL_INTR_CHAN_STALL (1 << 3) -#define USBH_LL_INTR_CHAN_AHBERR (1 << 2) -#define USBH_LL_INTR_CHAN_CHHLTD (1 << 1) -#define USBH_LL_INTR_CHAN_XFERCOMPL (1 << 0) +#define USB_DWC_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) +#define USB_DWC_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) +#define USB_DWC_LL_INTR_CHAN_BNAINTR (1 << 11) +#define USB_DWC_LL_INTR_CHAN_DATATGLERR (1 << 10) +#define USB_DWC_LL_INTR_CHAN_FRMOVRUN (1 << 9) +#define USB_DWC_LL_INTR_CHAN_BBLEER (1 << 8) +#define USB_DWC_LL_INTR_CHAN_XACTERR (1 << 7) +#define USB_DWC_LL_INTR_CHAN_NYET (1 << 6) +#define USB_DWC_LL_INTR_CHAN_ACK (1 << 5) +#define USB_DWC_LL_INTR_CHAN_NAK (1 << 4) +#define USB_DWC_LL_INTR_CHAN_STALL (1 << 3) +#define USB_DWC_LL_INTR_CHAN_AHBERR (1 << 2) +#define USB_DWC_LL_INTR_CHAN_CHHLTD (1 << 1) +#define USB_DWC_LL_INTR_CHAN_XFERCOMPL (1 << 0) /* * QTD (Queue Transfer Descriptor) structure used in Scatter/Gather DMA mode. @@ -150,7 +150,7 @@ typedef struct { uint32_t buffer_status_val; }; uint8_t *buffer; -} usbh_ll_dma_qtd_t; +} usb_dwc_ll_dma_qtd_t; /* ----------------------------------------------------------------------------- @@ -159,61 +159,61 @@ typedef struct { // --------------------------- GAHBCFG Register -------------------------------- -static inline void usb_ll_en_dma_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_dma_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 1; } -static inline void usb_ll_en_slave_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_slave_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 0; } -static inline void usb_ll_set_hbstlen(usbh_dev_t *hw, uint32_t burst_len) +static inline void usb_dwc_ll_gahbcfg_set_hbstlen(usb_dwc_dev_t *hw, uint32_t burst_len) { hw->gahbcfg_reg.hbstlen = burst_len; } -static inline void usb_ll_en_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 1; } -static inline void usb_ll_dis_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_dis_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 0; } // --------------------------- GUSBCFG Register -------------------------------- -static inline void usb_ll_set_host_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_force_host_mode(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.forcehstmode = 1; } -static inline void usb_ll_dis_hnp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_hnp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.hnpcap = 0; } -static inline void usb_ll_dis_srp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_srp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.srpcap = 0; } // --------------------------- GRSTCTL Register -------------------------------- -static inline bool usb_ll_check_ahb_idle(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_ahb_idle(usb_dwc_dev_t *hw) { return hw->grstctl_reg.ahbidle; } -static inline bool usb_ll_check_dma_req_in_progress(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_dma_req_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.dmareq; } -static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_nptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 0; //Set the TX FIFO number to 0 to select the non-periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //Flush the selected TX FIFO @@ -223,7 +223,7 @@ static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_ptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 1; //Set the TX FIFO number to 1 to select the periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //FLush the select TX FIFO @@ -233,7 +233,7 @@ static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_rx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.rxfflsh = 1; //Wait for the flushing to complete @@ -242,17 +242,17 @@ static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_reset_frame_counter(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_reset_frame_counter(usb_dwc_dev_t *hw) { hw->grstctl_reg.frmcntrrst = 1; } -static inline void usb_ll_core_soft_reset(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_core_soft_reset(usb_dwc_dev_t *hw) { hw->grstctl_reg.csftrst = 1; } -static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_core_soft_reset_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.csftrst; } @@ -265,9 +265,9 @@ static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @return uint32_t Mask of interrupts */ -static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_gintsts_read_and_clear_intrs(usb_dwc_dev_t *hw) { - usb_gintsts_reg_t gintsts; + usb_dwc_gintsts_reg_t gintsts; gintsts.val = hw->gintsts_reg.val; hw->gintsts_reg.val = gintsts.val; //Write back to clear return gintsts.val; @@ -279,7 +279,7 @@ static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param intr_msk Mask of interrupts to clear */ -static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) +static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t intr_msk) { //All GINTSTS fields are either W1C or read only. So safe to write directly hw->gintsts_reg.val = intr_msk; @@ -287,19 +287,19 @@ static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) // --------------------------- GINTMSK Register -------------------------------- -static inline void usb_ll_en_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val |= intr_mask; } -static inline void usb_ll_dis_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_dis_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val &= ~intr_mask; } // --------------------------- GRXFSIZ Register -------------------------------- -static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) +static inline void usb_dwc_ll_grxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t num_lines) { //Set size in words HAL_FORCE_MODIFY_U32_REG_FIELD(hw->grxfsiz_reg, rxfdep, num_lines); @@ -307,20 +307,24 @@ static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) // -------------------------- GNPTXFSIZ Register ------------------------------- -static inline void usb_ll_set_nptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_gnptxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_gnptxfsiz_reg_t gnptxfsiz; + usb_dwc_gnptxfsiz_reg_t gnptxfsiz; gnptxfsiz.val = hw->gnptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfdep, num_lines); hw->gnptxfsiz_reg.val = gnptxfsiz.val; } -static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) +// --------------------------- GSNPSID Register -------------------------------- + +static inline uint32_t usb_dwc_ll_gsnpsid_get_id(usb_dwc_dev_t *hw) { return hw->gsnpsid_reg.val; } +// --------------------------- GHWCFGx Register -------------------------------- + /** * @brief Get the hardware configuration regiters of the DWC_OTG controller * @@ -333,7 +337,7 @@ static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) * @param[out] ghwcfg3 Hardware configuration registesr 3 * @param[out] ghwcfg4 Hardware configuration registesr 4 */ -static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) +static inline void usb_dwc_ll_ghwcfg_get_hw_config(usb_dwc_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) { *ghwcfg1 = hw->ghwcfg1_reg.val; *ghwcfg2 = hw->ghwcfg2_reg.val; @@ -343,9 +347,9 @@ static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, // --------------------------- HPTXFSIZ Register ------------------------------- -static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_hptxfsiz_set_ptx_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_hptxfsiz_reg_t hptxfsiz; + usb_dwc_hptxfsiz_reg_t hptxfsiz; hptxfsiz.val = hw->hptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfsize, num_lines); @@ -358,12 +362,12 @@ static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint // ----------------------------- HCFG Register --------------------------------- -static inline void usbh_ll_hcfg_en_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 1; } -static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_dis_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 0; } @@ -373,7 +377,7 @@ static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) * * @param num_entires Number of entires in the frame list */ -static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_hal_frame_list_len_t num_entries) +static inline void usb_dwc_ll_hcfg_set_num_frame_list_entries(usb_dwc_dev_t *hw, usb_hal_frame_list_len_t num_entries) { uint32_t frlisten; switch (num_entries) { @@ -393,17 +397,17 @@ static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_h hw->hcfg_reg.frlisten = frlisten; } -static inline void usbh_ll_hcfg_en_scatt_gatt_dma(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_scatt_gatt_dma(usb_dwc_dev_t *hw) { hw->hcfg_reg.descdma = 1; } -static inline void usbh_ll_hcfg_set_fsls_supp_only(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_supp_only(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslssupp = 1; } -static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_pclk_sel(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslspclksel = 1; } @@ -414,7 +418,7 @@ static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param speed Speed to initialize the host port at */ -static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hcfg_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { hw->hcfg_reg.descdma = 1; //Enable scatt/gatt hw->hcfg_reg.fslssupp = 1; //FS/LS support only @@ -429,9 +433,9 @@ static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFIR Register --------------------------------- -static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hfir_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { - usb_hfir_reg_t hfir; + usb_dwc_hfir_reg_t hfir; hfir.val = hw->hfir_reg.val; hfir.hfirrldctrl = 0; //Disable dynamic loading /* @@ -445,49 +449,49 @@ static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFNUM Register -------------------------------- -static inline uint32_t usbh_ll_get_frm_time_rem(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_time_rem(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hfnum_reg, frrem); } -static inline uint32_t usbh_ll_get_frm_num(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_num(usb_dwc_dev_t *hw) { return hw->hfnum_reg.frnum; } // ---------------------------- HPTXSTS Register ------------------------------- -static inline uint32_t usbh_ll_get_p_tx_queue_top(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_top(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxqtop); } -static inline uint32_t usbh_ll_get_p_tx_queue_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_space_avail(usb_dwc_dev_t *hw) { return hw->hptxsts_reg.ptxqspcavail; } -static inline uint32_t usbh_ll_get_p_tx_fifo_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_ptxsts_get_ptxf_space_avail(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxfspcavail); } // ----------------------------- HAINT Register -------------------------------- -static inline uint32_t usbh_ll_get_chan_intrs_msk(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_haint_get_chan_intrs(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->haint_reg, haint); } // --------------------------- HAINTMSK Register ------------------------------- -static inline void usbh_ll_haintmsk_en_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_en_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val |= mask; } -static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_dis_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val &= ~mask; } @@ -504,7 +508,7 @@ static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) * @param hw Start address of the DWC_OTG registers * @param addr Base address of the scheduling frame list */ -static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t addr) +static inline void usb_dwc_ll_hflbaddr_set_base_addr(usb_dwc_dev_t *hw, uint32_t addr) { hw->hflbaddr_reg.hflbaddr = addr; } @@ -515,14 +519,14 @@ static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t add * @param hw Start address of the DWC_OTG registers * @return uint32_t Base address of the scheduling frame list */ -static inline uint32_t usbh_ll_get_frame_list_base_addr(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hflbaddr_get_base_addr(usb_dwc_dev_t *hw) { return hw->hflbaddr_reg.hflbaddr; } // ----------------------------- HPRT Register --------------------------------- -static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) +static inline usb_priv_speed_t usb_dwc_ll_hprt_get_speed(usb_dwc_dev_t *hw) { usb_priv_speed_t speed; //esp32-s2 and esp32-s3 only support FS or LS @@ -537,163 +541,163 @@ static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) return speed; } -static inline uint32_t usbh_ll_hprt_get_test_ctl(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_test_ctl(usb_dwc_dev_t *hw) { return hw->hprt_reg.prttstctl; } -static inline void usbh_ll_hprt_set_test_ctl(usbh_dev_t *hw, uint32_t test_mode) +static inline void usb_dwc_ll_hprt_set_test_ctl(usb_dwc_dev_t *hw, uint32_t test_mode) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prttstctl = test_mode; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_en_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_en_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_dis_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_dis_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline uint32_t usbh_ll_hprt_get_pwr_line_status(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_pwr_line_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtlnsts; } -static inline void usbh_ll_hprt_set_port_reset(usbh_dev_t *hw, bool reset) +static inline void usb_dwc_ll_hprt_set_port_reset(usb_dwc_dev_t *hw, bool reset) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtrst = reset; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_reset(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtrst; } -static inline void usbh_ll_hprt_set_port_suspend(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_suspend(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtsusp = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_suspend(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_suspend(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtsusp; } -static inline void usbh_ll_hprt_set_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_clr_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_clr_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_resume(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_resume(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtres; } -static inline bool usbh_ll_hprt_get_port_overcur(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_overcur(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtovrcurract; } -static inline bool usbh_ll_hprt_get_port_en(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_en(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtena; } -static inline void usbh_ll_hprt_port_dis(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_port_dis(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtena = 1; //W1C to disable //we want to W1C ENA but not W1C the interrupt bits - hw->hprt_reg.val = hprt.val & ((~USBH_LL_HPRT_W1C_MSK) | USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & ((~USB_DWC_LL_HPRT_W1C_MSK) | USB_DWC_LL_HPRT_ENA_MSK); } -static inline bool usbh_ll_hprt_get_conn_status(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_conn_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtconnsts; } -static inline uint32_t usbh_ll_hprt_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_intr_read_and_clear(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; //We want to W1C the interrupt bits but not that ENA - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_ENA_MSK); //Return only the interrupt bits - return (hprt.val & (USBH_LL_HPRT_W1C_MSK & ~(USBH_LL_HPRT_ENA_MSK))); + return (hprt.val & (USB_DWC_LL_HPRT_W1C_MSK & ~(USB_DWC_LL_HPRT_ENA_MSK))); } -static inline void usbh_ll_hprt_intr_clear(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_hprt_intr_clear(usb_dwc_dev_t *hw, uint32_t intr_mask) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; - hw->hprt_reg.val = ((hprt.val & ~USBH_LL_HPRT_ENA_MSK) & ~USBH_LL_HPRT_W1C_MSK) | intr_mask; + hw->hprt_reg.val = ((hprt.val & ~USB_DWC_LL_HPRT_ENA_MSK) & ~USB_DWC_LL_HPRT_W1C_MSK) | intr_mask; } //Per Channel registers // --------------------------- HCCHARi Register -------------------------------- -static inline void usbh_ll_chan_start(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_enable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chena = 1; } -static inline bool usbh_ll_chan_is_active(volatile usb_host_chan_regs_t *chan) +static inline bool usb_dwc_ll_hcchar_chan_is_enabled(volatile usb_dwc_host_chan_regs_t *chan) { return chan->hcchar_reg.chena; } -static inline void usbh_ll_chan_halt(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_disable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chdis = 1; } -static inline void usbh_ll_chan_xfer_odd_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_odd_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 1; } -static inline void usbh_ll_chan_xfer_even_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_even_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 0; } -static inline void usbh_ll_chan_set_dev_addr(volatile usb_host_chan_regs_t *chan, uint32_t addr) +static inline void usb_dwc_ll_hcchar_set_dev_addr(volatile usb_dwc_host_chan_regs_t *chan, uint32_t addr) { chan->hcchar_reg.devaddr = addr; } -static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, usb_priv_xfer_type_t type) +static inline void usb_dwc_ll_hcchar_set_ep_type(volatile usb_dwc_host_chan_regs_t *chan, usb_priv_xfer_type_t type) { uint32_t ep_type; switch (type) { @@ -715,42 +719,42 @@ static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, //Indicates whether channel is commuunicating with a LS device connected via a FS hub. Setting this bit to 1 will cause //each packet to be preceded by a PREamble packet -static inline void usbh_ll_chan_set_lspddev(volatile usb_host_chan_regs_t *chan, bool is_ls) +static inline void usb_dwc_ll_hcchar_set_lspddev(volatile usb_dwc_host_chan_regs_t *chan, bool is_ls) { chan->hcchar_reg.lspddev = is_ls; } -static inline void usbh_ll_chan_set_dir(volatile usb_host_chan_regs_t *chan, bool is_in) +static inline void usb_dwc_ll_hcchar_set_dir(volatile usb_dwc_host_chan_regs_t *chan, bool is_in) { chan->hcchar_reg.epdir = is_in; } -static inline void usbh_ll_chan_set_ep_num(volatile usb_host_chan_regs_t *chan, uint32_t num) +static inline void usb_dwc_ll_hcchar_set_ep_num(volatile usb_dwc_host_chan_regs_t *chan, uint32_t num) { chan->hcchar_reg.epnum = num; } -static inline void usbh_ll_chan_set_mps(volatile usb_host_chan_regs_t *chan, uint32_t mps) +static inline void usb_dwc_ll_hcchar_set_mps(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mps) { chan->hcchar_reg.mps = mps; } -static inline void usbh_ll_chan_hcchar_init(volatile usb_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) +static inline void usb_dwc_ll_hcchar_init(volatile usb_dwc_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) { //Sets all persistent fields of the channel over its lifetimez - usbh_ll_chan_set_dev_addr(chan, dev_addr); - usbh_ll_chan_set_ep_type(chan, type); - usbh_ll_chan_set_lspddev(chan, is_ls); - usbh_ll_chan_set_dir(chan, is_in); - usbh_ll_chan_set_ep_num(chan, ep_num); - usbh_ll_chan_set_mps(chan, mps); + usb_dwc_ll_hcchar_set_dev_addr(chan, dev_addr); + usb_dwc_ll_hcchar_set_ep_type(chan, type); + usb_dwc_ll_hcchar_set_lspddev(chan, is_ls); + usb_dwc_ll_hcchar_set_dir(chan, is_in); + usb_dwc_ll_hcchar_set_ep_num(chan, ep_num); + usb_dwc_ll_hcchar_set_mps(chan, mps); } // ---------------------------- HCINTi Register -------------------------------- -static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_regs_t *chan) +static inline uint32_t usb_dwc_ll_hcint_read_and_clear_intrs(volatile usb_dwc_host_chan_regs_t *chan) { - usb_hcint_reg_t hcint; + usb_dwc_hcint_reg_t hcint; hcint.val = chan->hcint_reg.val; chan->hcint_reg.val = hcint.val; return hcint.val; @@ -758,14 +762,14 @@ static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_r // --------------------------- HCINTMSKi Register ------------------------------ -static inline void usbh_ll_chan_set_intr_mask(volatile usb_host_chan_regs_t *chan, uint32_t mask) +static inline void usb_dwc_ll_hcintmsk_set_intr_mask(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mask) { chan->hcintmsk_reg.val = mask; } -// ---------------------- HCTSIZi and HCDMAi Registers ------------------------- +// ---------------------------- HCTSIZi Register ------------------------------- -static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uint32_t data_pid) +static inline void usb_dwc_ll_hctsiz_set_pid(volatile usb_dwc_host_chan_regs_t *chan, uint32_t data_pid) { if (data_pid == 0) { chan->hctsiz_reg.pid = 0; @@ -774,7 +778,8 @@ static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uin } } -static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) { +static inline uint32_t usb_dwc_ll_hctsiz_get_pid(volatile usb_dwc_host_chan_regs_t *chan) +{ if (chan->hctsiz_reg.pid == 0) { return 0; //DATA0 } else { @@ -782,35 +787,35 @@ static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) } } -static inline void usbh_ll_chan_set_dma_addr_non_iso(volatile usb_host_chan_regs_t *chan, - void *dmaaddr, - uint32_t qtd_idx) +static inline void usb_dwc_ll_hctsiz_set_qtd_list_len(volatile usb_dwc_host_chan_regs_t *chan, int qtd_list_len) { - //Set HCDMAi - chan->hcdma_reg.val = 0; - chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address - chan->hcdma_reg.non_iso.ctd = qtd_idx; + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list } -static inline int usbh_ll_chan_get_ctd(usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hctsiz_init(volatile usb_dwc_host_chan_regs_t *chan) { - return chan->hcdma_reg.non_iso.ctd; + chan->hctsiz_reg.dopng = 0; //Don't do ping + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels } -static inline void usbh_ll_chan_hctsiz_init(volatile usb_host_chan_regs_t *chan) +// ---------------------------- HCDMAi Register -------------------------------- + +static inline void usb_dwc_ll_hcdma_set_qtd_list_addr(volatile usb_dwc_host_chan_regs_t *chan, void *dmaaddr, uint32_t qtd_idx) { - chan->hctsiz_reg.dopng = 0; //Don't do ping - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels + //Set HCDMAi + chan->hcdma_reg.val = 0; + chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address + chan->hcdma_reg.non_iso.ctd = qtd_idx; } -static inline void usbh_ll_chan_set_qtd_list_len(volatile usb_host_chan_regs_t *chan, int qtd_list_len) +static inline int usb_dwc_ll_hcdam_get_cur_qtd_idx(usb_dwc_host_chan_regs_t *chan) { - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list + return chan->hcdma_reg.non_iso.ctd; } // ---------------------------- HCDMABi Register ------------------------------- -static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t *chan) +static inline void *usb_dwc_ll_hcdmab_get_buff_addr(volatile usb_dwc_host_chan_regs_t *chan) { return (void *)chan->hcdmab_reg.hcdmab; } @@ -826,20 +831,20 @@ static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t * * @param dev Start address of the DWC_OTG registers * @param chan_idx The channel's index - * @return usb_host_chan_regs_t* Pointer to channel's registers + * @return usb_dwc_host_chan_regs_t* Pointer to channel's registers */ -static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int chan_idx) +static inline usb_dwc_host_chan_regs_t *usb_dwc_ll_chan_get_regs(usb_dwc_dev_t *dev, int chan_idx) { return &dev->host_chans[chan_idx]; } // ------------------------------ QTD related ---------------------------------- -#define USBH_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully -#define USBH_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). +#define USB_DWC_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully +#define USB_DWC_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). //Note: 0x2 is reserved -#define USBH_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. -#define USBH_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed +#define USB_DWC_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. +#define USB_DWC_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed /** * @brief Set a QTD for a non isochronous IN transfer @@ -850,7 +855,7 @@ static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int c * Non zero length must be mulitple of the endpoint's MPS. * @param hoc Halt on complete (will generate an interrupt and halt the channel) */ -static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) +static inline void usb_dwc_ll_qtd_set_in(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -873,7 +878,7 @@ static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff * @param is_setup Indicates whether this is a control transfer setup packet or a normal OUT Data transfer. * (As per the USB protocol, setup packets cannot be STALLd or NAKd by the device) */ -static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) +static inline void usb_dwc_ll_qtd_set_out(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -896,7 +901,7 @@ static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buf * * @param qtd Pointer to the QTD */ -static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) +static inline void usb_dwc_ll_qtd_set_null(usb_dwc_ll_dma_qtd_t *qtd) { qtd->buffer = NULL; qtd->buffer_status_val = 0; //Disable qtd by clearing it to zero. Used by interrupt/isoc as an unscheudled frame @@ -911,12 +916,12 @@ static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) * @param[out] rem_len Number of bytes ramining in the QTD * @param[out] status Status of the QTD */ -static inline void usbh_ll_get_qtd_status(usbh_ll_dma_qtd_t *qtd, int *rem_len, int *status) +static inline void usb_dwc_ll_qtd_get_status(usb_dwc_ll_dma_qtd_t *qtd, int *rem_len, int *status) { //Status is the same regardless of IN or OUT if (qtd->in_non_iso.active) { //QTD was never processed - *status = USBH_LL_QTD_STATUS_NOT_EXECUTED; + *status = USB_DWC_LL_QTD_STATUS_NOT_EXECUTED; } else { *status = qtd->in_non_iso.rx_status; } diff --git a/tools/sdk/esp32s2/include/hal/platform_port/include/hal/check.h b/tools/sdk/esp32s2/include/hal/platform_port/include/hal/check.h index 3ad02946c71..df2d4af46ed 100644 --- a/tools/sdk/esp32s2/include/hal/platform_port/include/hal/check.h +++ b/tools/sdk/esp32s2/include/hal/platform_port/include/hal/check.h @@ -1,17 +1,11 @@ -// Copyright 2021 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: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once -#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) _Static_assert((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") +#include "esp_assert.h" + +#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) ESP_STATIC_ASSERT((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") diff --git a/tools/sdk/esp32s2/include/lwip/include/apps/ping/ping_sock.h b/tools/sdk/esp32s2/include/lwip/include/apps/ping/ping_sock.h index fb946f7e162..6abe6f77bd7 100644 --- a/tools/sdk/esp32s2/include/lwip/include/apps/ping/ping_sock.h +++ b/tools/sdk/esp32s2/include/lwip/include/apps/ping/ping_sock.h @@ -88,7 +88,7 @@ typedef struct { .tos = 0, \ .ttl = IP_DEFAULT_TTL, \ .target_addr = *(IP_ANY_TYPE), \ - .task_stack_size = 2048, \ + .task_stack_size = 2048 + TASK_EXTRA_STACK_SIZE, \ .task_prio = 2, \ .interface = 0,\ } diff --git a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/dhcp.h b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/dhcp.h index 8a528219da6..56e35223df3 100644 --- a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/dhcp.h +++ b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/dhcp.h @@ -151,6 +151,9 @@ u8_t dhcp_supplied_address(const struct netif *netif); void dhcp_coarse_tmr(void); /* to be called every half second */ void dhcp_fine_tmr(void); +#if ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND +void dhcp_fine_timeout_cb(void *arg); +#endif #if LWIP_DHCP_GET_NTP_SRV /** This function must exist, in other to add offered NTP servers to diff --git a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/ip4_napt.h b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/ip4_napt.h index 8d98e120dfa..8246d6fd36e 100644 --- a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/ip4_napt.h +++ b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/ip4_napt.h @@ -60,16 +60,21 @@ extern "C" { #include "lwip/err.h" #include "lwip/ip4.h" + +#ifndef NAPT_TMR_INTERVAL +#define NAPT_TMR_INTERVAL 2000 +#endif + /** -* NAPT for a forwarded packet. It checks weather we need NAPT and modify -* the packet source address and port if needed. -* -* @param p the packet to forward (p->payload points to IP header) -* @param iphdr the IP header of the input packet -* @param inp the netif on which this packet was received -* @param outp the netif on which this packet will be sent -* @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped -*/ + * NAPT for a forwarded packet. It checks weather we need NAPT and modify + * the packet source address and port if needed. + * + * @param p the packet to forward (p->payload points to IP header) + * @param iphdr the IP header of the input packet + * @param inp the netif on which this packet was received + * @param outp the netif on which this packet will be sent + * @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped + */ err_t ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct netif *outp); @@ -79,7 +84,6 @@ ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct * * @param p the packet to forward (p->payload points to IP header) * @param iphdr the IP header of the input packet - * @param inp the netif on which this packet was received */ void ip_napt_recv(struct pbuf *p, struct ip_hdr *iphdr); diff --git a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/lwip_napt.h b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/lwip_napt.h index a1816d42034..ccea172585a 100644 --- a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/lwip_napt.h +++ b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/lwip_napt.h @@ -59,13 +59,24 @@ extern "C" { #endif /* Timeouts in sec for the various protocol types */ +#ifndef IP_NAPT_TIMEOUT_MS_TCP #define IP_NAPT_TIMEOUT_MS_TCP (30*60*1000) -#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (20*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_TCP_DISCON +#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (TCP_MSL) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_UDP #define IP_NAPT_TIMEOUT_MS_UDP (2*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_ICMP #define IP_NAPT_TIMEOUT_MS_ICMP (2*1000) - +#endif +#ifndef IP_NAPT_PORT_RANGE_START #define IP_NAPT_PORT_RANGE_START 49152 +#endif +#ifndef IP_NAPT_PORT_RANGE_END #define IP_NAPT_PORT_RANGE_END 61439 +#endif /** * Enable/Disable NAPT for a specified interface. @@ -80,13 +91,12 @@ ip_napt_enable(u32_t addr, int enable); /** * Enable/Disable NAPT for a specified interface. * - * @param netif number of the interface + * @param number number of the interface * @param enable non-zero to enable NAPT, or 0 to disable. */ void ip_napt_enable_no(u8_t number, int enable); - /** * Register port mapping on the external interface to internal interface. * When the same port mapping is registered again, the old mapping is overwritten. @@ -101,16 +111,31 @@ ip_napt_enable_no(u8_t number, int enable); u8_t ip_portmap_add(u8_t proto, u32_t maddr, u16_t mport, u32_t daddr, u16_t dport); +u8_t +ip_portmap_get(u8_t proto, u16_t mport, u32_t *maddr, u32_t *daddr, u16_t *dport); + /** * Unregister port mapping on the external interface to internal interface. * * @param proto target protocol - * @param maddr ip address of the external interface + * @param mport mapped port on the external interface, in host byte order. */ u8_t ip_portmap_remove(u8_t proto, u16_t mport); + + +#if LWIP_STATS +/** + * Get statistics. + * + * @param stats struct to receive current stats + */ +void +ip_napt_get_stats(struct stats_ip_napt *stats); +#endif + #endif /* IP_NAPT */ #endif /* IP_FORWARD */ #endif /* ESP_LWIP */ diff --git a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/opt.h b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/opt.h index b314c59a439..11c9b10b886 100644 --- a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/opt.h +++ b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/opt.h @@ -506,7 +506,7 @@ * The default number of timeouts is calculated here for all enabled modules. */ #if ESP_LWIP -#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) +#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND ? LWIP_DHCP : 2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + (ESP_LWIP_DNS_TIMERS_ONDEMAND ? 0 : LWIP_DNS) + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #else #define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #endif @@ -2273,6 +2273,14 @@ #define MIB2_STATS 0 #endif +/** + * IP_NAPT_STATS==1: Stats for IP NAPT. + */ +#if !defined IP_NAPT_STATS || defined __DOXYGEN__ +#define IP_NAPT_STATS (IP_NAPT) +#endif + + #else #define LINK_STATS 0 @@ -2293,6 +2301,7 @@ #define MLD6_STATS 0 #define ND6_STATS 0 #define MIB2_STATS 0 +#define IP_NAPT_STATS 0 #endif /* LWIP_STATS */ /** diff --git a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h index 72f9126d465..92e582448aa 100644 --- a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h +++ b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h @@ -128,7 +128,9 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb); #define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in milliseconds */ #endif /* TCP_SLOW_INTERVAL */ +#ifndef TCP_FIN_WAIT_TIMEOUT #define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ +#endif /* TCP_FIN_WAIT_TIMEOUT */ #define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */ #define TCP_OOSEQ_TIMEOUT 6U /* x RTO */ diff --git a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/stats.h b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/stats.h index b570dbacf58..94e16691ca4 100644 --- a/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/stats.h +++ b/tools/sdk/esp32s2/include/lwip/lwip/src/include/lwip/stats.h @@ -228,6 +228,18 @@ struct stats_mib2_netif_ctrs { u32_t ifouterrors; }; +#if ESP_LWIP && IP_NAPT_STATS +/** + * IP NAPT stats + */ +struct stats_ip_napt { + STAT_COUNTER nr_active_tcp; + STAT_COUNTER nr_active_udp; + STAT_COUNTER nr_active_icmp; + STAT_COUNTER nr_forced_evictions; +}; +#endif /* ESP_LWIP && IP_NAPT */ + /** lwIP stats container */ struct stats_ { #if LINK_STATS @@ -298,6 +310,11 @@ struct stats_ { /** SNMP MIB2 */ struct stats_mib2 mib2; #endif +#if ESP_LWIP && IP_NAPT_STATS + /** IP NAPT */ + struct stats_ip_napt ip_napt; +#endif + }; /** Global variable containing lwIP internal statistics. Add this to your debugger's watchlist. */ @@ -467,6 +484,19 @@ void stats_init(void); #define MIB2_STATS_INC(x) #endif +#if IP_NAPT_STATS +#define IP_NAPT_STATS_INC(x) STATS_INC(x) +#else +#define IP_NAPT_STATS_INC(x) +#endif + +#if LWIP_STATS_DISPLAY && IP_NAPT_STATS +void stats_display_ip_napt(struct stats_ip_napt *napt); +#define IP_NAPT_STATS_DISPLAY() stats_display_ip_napt(&lwip_stats.ip_napt) +#else +#define IP_NAPT_STATS_DISPLAY() +#endif + /* Display of statistics */ #if LWIP_STATS_DISPLAY void stats_display(void); diff --git a/tools/sdk/esp32s2/include/lwip/port/esp32/include/lwipopts.h b/tools/sdk/esp32s2/include/lwip/port/esp32/include/lwipopts.h index bb0d371c6ee..bbae6d42412 100644 --- a/tools/sdk/esp32s2/include/lwip/port/esp32/include/lwipopts.h +++ b/tools/sdk/esp32s2/include/lwip/port/esp32/include/lwipopts.h @@ -254,6 +254,14 @@ */ #define ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +#define DHCP_DEFINE_CUSTOM_TIMEOUTS 1 +/* Since for embedded devices it's not that hard to miss a discover packet, so lower + * the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s. + */ + #define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \ + (uint16_t)(1 * 1000) : \ + (uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250)) + /* ------------------------------------ ---------- AUTOIP options ---------- @@ -359,6 +367,11 @@ */ #define TCP_MSL CONFIG_LWIP_TCP_MSL +/** + * TCP_FIN_WAIT_TIMEOUT: The maximum FIN segment lifetime in milliseconds + */ +#define TCP_FIN_WAIT_TIMEOUT CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT + /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ @@ -1021,9 +1034,25 @@ #ifdef CONFIG_LWIP_TIMERS_ONDEMAND #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 1 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 1 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* LWIP_IPV6_REASS */ #else #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 0 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 0 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* LWIP_IPV6_REASS */ #endif #define TCP_SND_BUF CONFIG_LWIP_TCP_SND_BUF_DEFAULT diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/asn1write.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/asn1write.h index 44afae0e560..5da7654bb40 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/asn1write.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/asn1write.h @@ -90,7 +90,7 @@ int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start, #if defined(MBEDTLS_BIGNUM_C) /** - * \brief Write a arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) + * \brief Write an arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) * in ASN.1 format. * * \note This function works backwards in data buffer. diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bignum.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bignum.h index c71a1d40227..95b9485acf1 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bignum.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bignum.h @@ -184,6 +184,20 @@ #endif /* !MBEDTLS_NO_UDBL_DIVISION */ #endif /* !MBEDTLS_HAVE_INT64 */ +/** \typedef mbedtls_mpi_uint + * \brief The type of machine digits in a bignum, called _limbs_. + * + * This is always an unsigned integer type with no padding bits. The size + * is platform-dependent. + */ + +/** \typedef mbedtls_mpi_sint + * \brief The signed type corresponding to #mbedtls_mpi_uint. + * + * This is always a signed integer type with no padding bits. The size + * is platform-dependent. + */ + #ifdef __cplusplus extern "C" { #endif @@ -193,9 +207,27 @@ extern "C" { */ typedef struct mbedtls_mpi { - int s; /*!< Sign: -1 if the mpi is negative, 1 otherwise */ - size_t n; /*!< total # of limbs */ - mbedtls_mpi_uint *p; /*!< pointer to limbs */ + /** Sign: -1 if the mpi is negative, 1 otherwise. + * + * The number 0 must be represented with `s = +1`. Although many library + * functions treat all-limbs-zero as equivalent to a valid representation + * of 0 regardless of the sign bit, there are exceptions, so bignum + * functions and external callers must always set \c s to +1 for the + * number zero. + * + * Note that this implies that calloc() or `... = {0}` does not create + * a valid MPI representation. You must call mbedtls_mpi_init(). + */ + int s; + + /** Total number of limbs in \c p. */ + size_t n; + + /** Pointer to limbs. + * + * This may be \c NULL if \c n is 0. + */ + mbedtls_mpi_uint *p; } mbedtls_mpi; @@ -282,7 +314,7 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * \param Y The MPI to be assigned from. This must point to an * initialized MPI. * \param assign The condition deciding whether to perform the - * assignment or not. Possible values: + * assignment or not. Must be either 0 or 1: * * \c 1: Perform the assignment `X = Y`. * * \c 0: Keep the original value of \p X. * @@ -293,6 +325,10 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p assign is neither 0 nor 1, the result of this function + * is indeterminate, and the resulting value in \p X might be + * neither its original value nor the value in \p Y. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. @@ -305,24 +341,28 @@ int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned * * \param X The first MPI. This must be initialized. * \param Y The second MPI. This must be initialized. - * \param assign The condition deciding whether to perform - * the swap or not. Possible values: + * \param swap The condition deciding whether to perform + * the swap or not. Must be either 0 or 1: * * \c 1: Swap the values of \p X and \p Y. * * \c 0: Keep the original values of \p X and \p Y. * * \note This function is equivalent to - * if( assign ) mbedtls_mpi_swap( X, Y ); + * if( swap ) mbedtls_mpi_swap( X, Y ); * except that it avoids leaking any information about whether - * the assignment was done or not (the above code may leak + * the swap was done or not (the above code may leak * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p swap is neither 0 nor 1, the result of this function + * is indeterminate, and both \p X and \p Y might end up with + * values different to either of the original ones. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. * */ -int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign ); +int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char swap ); /** * \brief Store integer value in MPI. @@ -755,11 +795,11 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A or B. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. - * \param A The dividend. This must point to an initialized MPi. + * remainder is not needed. This must not alias A or B. + * \param A The dividend. This must point to an initialized MPI. * \param B The divisor. This must point to an initialized MPI. * * \return \c 0 if successful. @@ -776,10 +816,10 @@ int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. + * remainder is not needed. This must not alias A. * \param A The dividend. This must point to an initialized MPi. * \param b The divisor. * @@ -834,6 +874,7 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, * \brief Perform a sliding-window exponentiation: X = A^E mod N * * \param X The destination MPI. This must point to an initialized MPI. + * This must not alias E or N. * \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. diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h index 31137cd4c23..a3fc3638150 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h @@ -94,13 +94,29 @@ #if defined(__GNUC__) && \ ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) +/* + * GCC < 5.0 treated the x86 ebx (which is used for the GOT) as a + * fixed reserved register when building as PIC, leading to errors + * like: bn_mul.h:46:13: error: PIC register clobbered by 'ebx' in 'asm' + * + * This is fixed by an improved register allocator in GCC 5+. From the + * release notes: + * Register allocation improvements: Reuse of the PIC hard register, + * instead of using a fixed register, was implemented on x86/x86-64 + * targets. This improves generated PIC code performance as more hard + * registers can be used. + */ +#if defined(__GNUC__) && __GNUC__ < 5 && defined(__PIC__) +#define MULADDC_CANNOT_USE_EBX +#endif + /* * Disable use of the i386 assembly code below if option -O0, to disable all * compiler optimisations, is passed, detected with __OPTIMIZE__ * This is done as the number of registers used in the assembly code doesn't * work with the -O0 option. */ -#if defined(__i386__) && defined(__OPTIMIZE__) +#if defined(__i386__) && defined(__OPTIMIZE__) && !defined(MULADDC_CANNOT_USE_EBX) #define MULADDC_INIT \ asm( \ @@ -563,10 +579,20 @@ "andi r7, r6, 0xffff \n\t" \ "bsrli r6, r6, 16 \n\t" -#define MULADDC_CORE \ +#if(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#define MULADDC_LHUI \ + "lhui r9, r3, 0 \n\t" \ + "addi r3, r3, 2 \n\t" \ + "lhui r8, r3, 0 \n\t" +#else +#define MULADDC_LHUI \ "lhui r8, r3, 0 \n\t" \ "addi r3, r3, 2 \n\t" \ - "lhui r9, r3, 0 \n\t" \ + "lhui r9, r3, 0 \n\t" +#endif + +#define MULADDC_CORE \ + MULADDC_LHUI \ "addi r3, r3, 2 \n\t" \ "mul r10, r9, r6 \n\t" \ "mul r11, r8, r7 \n\t" \ diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/check_config.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/check_config.h index be5c548e561..7ae1ff94db9 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/check_config.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/check_config.h @@ -525,6 +525,20 @@ #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously" #endif +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_ALT defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) &&\ + ( defined(MBEDTLS_PLATFORM_STD_VSNPRINTF) ||\ + defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) ) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_VSNPRINTF/MBEDTLS_PLATFORM_VSNPRINTF_ALT cannot be defined simultaneously" +#endif + #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\ !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites" @@ -650,10 +664,9 @@ MBEDTLS_ECDSA_C requires MBEDTLS_PK_WRITE_C to be defined." #endif -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PKCS1_V15) && \ - !defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_PSA_CRYPTO_C) -#error "MBEDTLS_PSA_CRYPTO_C, MBEDTLS_RSA_C and MBEDTLS_PKCS1_V15 defined, \ - but not all prerequisites" +#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_RSA_C) && \ + !( defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_PK_WRITE_C) ) +#error "MBEDTLS_PSA_CRYPTO_C with MBEDTLS_RSA_C requires MBEDTLS_PK_PARSE_C and MBEDTLS_PK_WRITE_C" #endif #if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ @@ -812,6 +825,11 @@ #error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_TICKET_C) && \ + !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" +#endif + #if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) && \ !defined(MBEDTLS_SSL_PROTO_SSL3) && !defined(MBEDTLS_SSL_PROTO_TLS1) #error "MBEDTLS_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites" @@ -926,6 +944,10 @@ #error "MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) && !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites" +#endif + /* * Avoid warning from -pedantic. This is a convenient place for this * workaround since this is included by every single file before the diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config.h index 1cd6eb66348..61db79362f7 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config.h @@ -1329,7 +1329,7 @@ * Include backtrace information with each allocated block. * * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * GLIBC-compatible backtrace() an backtrace_symbols() support + * GLIBC-compatible backtrace() and backtrace_symbols() support * * Uncomment this macro to include backtrace information */ @@ -1620,6 +1620,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #define MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -2425,7 +2427,7 @@ * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * * \warning ARC4 is considered a weak cipher and its use constitutes a - * security risk. If possible, we recommend avoidng dependencies on + * security risk. If possible, we recommend avoiding dependencies on * it, and considering stronger ciphers instead. * */ @@ -3030,7 +3032,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/net_sockets.c * @@ -3400,7 +3402,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #define MBEDTLS_SSL_TICKET_C @@ -3456,7 +3459,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * @@ -3488,7 +3491,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config_psa.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config_psa.h index 1bf750ad5ee..d27fb54b033 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config_psa.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/config_psa.h @@ -7,7 +7,7 @@ * those definitions to define symbols used in the library code. * * Users and integrators should not edit this file, please edit - * include/mbedtls/config.h for MBETLS_XXX settings or + * include/mbedtls/config.h for MBEDTLS_XXX settings or * include/psa/crypto_config.h for PSA_WANT_XXX settings. */ /* @@ -446,6 +446,8 @@ extern "C" { #if !defined(MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305) #if defined(PSA_WANT_KEY_TYPE_CHACHA20) #define MBEDTLS_CHACHAPOLY_C +#define MBEDTLS_CHACHA20_C +#define MBEDTLS_POLY1305_C #define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1 #endif /* PSA_WANT_KEY_TYPE_CHACHA20 */ #endif /* !MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 */ diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h index 264a638bb52..118f7cedb1e 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h @@ -309,10 +309,8 @@ int mbedtls_ecdsa_sign_det_ext( mbedtls_ecp_group *grp, mbedtls_mpi *r, * This must be initialized. * * \return \c 0 on success. - * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the signature - * is invalid. * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX - * error code on failure for any other reason. + * error code on failure. */ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp, const unsigned char *buf, size_t blen, diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/md.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/md.h index 84fafd2ac77..9cea40a89c6 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/md.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/md.h @@ -215,7 +215,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ); /** - * \brief This function clones the state of an message-digest + * \brief This function clones the state of a message-digest * context. * * \note You must call mbedtls_md_setup() on \c dst before calling diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/platform.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/platform.h index 06dd192eab9..eaf5122bec7 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/platform.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/platform.h @@ -11,6 +11,13 @@ * implementations of these functions, or implementations specific to * their platform, which can be statically linked to the library or * dynamically configured at runtime. + * + * When all compilation options related to platform abstraction are + * disabled, this header just defines `mbedtls_xxx` function names + * as aliases to the standard `xxx` function. + * + * Most modules in the library and example programs are expected to + * include this header. */ /* * Copyright The Mbed TLS Contributors diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h index 63270d12394..f890aefaeec 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h @@ -74,7 +74,7 @@ void mbedtls_ripemd160_init( mbedtls_ripemd160_context *ctx ); void mbedtls_ripemd160_free( mbedtls_ripemd160_context *ctx ); /** - * \brief Clone (the state of) an RIPEMD-160 context + * \brief Clone (the state of) a RIPEMD-160 context * * \param dst The destination context * \param src The context to be cloned diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/rsa.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/rsa.h index 062df73aa06..8559f67bb97 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/rsa.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/rsa.h @@ -491,7 +491,7 @@ int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx ); * the current function does not have access to them, * and therefore cannot check them. See mbedtls_rsa_complete(). * If you want to check the consistency of the entire - * content of an PKCS1-encoded RSA private key, for example, you + * content of a PKCS1-encoded RSA private key, for example, you * should use mbedtls_rsa_validate_params() before setting * up the RSA context. * Additionally, if the implementation performs empirical checks, diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl.h index 5064ec56891..aecac93f334 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl.h @@ -624,7 +624,7 @@ typedef int mbedtls_ssl_recv_t( void *ctx, * \param ctx Context for the receive callback (typically a file descriptor) * \param buf Buffer to write the received data to * \param len Length of the receive buffer - * \param timeout Maximum nomber of millisecondes to wait for data + * \param timeout Maximum number of milliseconds to wait for data * 0 means no timeout (potentially waiting forever) * * \return The callback must return the number of bytes received, @@ -652,7 +652,7 @@ typedef int mbedtls_ssl_recv_timeout_t( void *ctx, * for the associated \c mbedtls_ssl_get_timer_t callback to * return correct information. * - * \note If using a event-driven style of programming, an event must + * \note If using an event-driven style of programming, an event must * be generated when the final delay is passed. The event must * cause a call to \c mbedtls_ssl_handshake() with the proper * SSL context to be scheduled. Care must be taken to ensure @@ -2000,7 +2000,7 @@ int mbedtls_ssl_check_record( mbedtls_ssl_context const *ssl, * here, except if using an event-driven style. * * \note See also the "DTLS tutorial" article in our knowledge base. - * https://tls.mbed.org/kb/how-to/dtls-tutorial + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/dtls-tutorial */ void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, void *p_timer, diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h index 46ade67b9c4..77ad755477a 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h @@ -782,7 +782,7 @@ struct mbedtls_ssl_transform #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) uint8_t in_cid_len; uint8_t out_cid_len; - unsigned char in_cid [ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; + unsigned char in_cid [ MBEDTLS_SSL_CID_IN_LEN_MAX ]; unsigned char out_cid[ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/version.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/version.h index 44adcbfe037..b3b441d46b6 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/version.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/mbedtls/version.h @@ -38,16 +38,16 @@ */ #define MBEDTLS_VERSION_MAJOR 2 #define MBEDTLS_VERSION_MINOR 28 -#define MBEDTLS_VERSION_PATCH 1 +#define MBEDTLS_VERSION_PATCH 2 /** * The single version number has the following structure: * MMNNPP00 * Major version | Minor version | Patch version */ -#define MBEDTLS_VERSION_NUMBER 0x021C0100 -#define MBEDTLS_VERSION_STRING "2.28.1" -#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.1" +#define MBEDTLS_VERSION_NUMBER 0x021C0200 +#define MBEDTLS_VERSION_STRING "2.28.2" +#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.2" #if defined(MBEDTLS_VERSION_C) diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto.h index d6d3e4f559f..faa3b9e3fb0 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto.h @@ -551,7 +551,7 @@ psa_status_t psa_copy_key(mbedtls_svc_key_id_t source_key, * \retval #PSA_ERROR_INVALID_HANDLE * \p key is not a valid identifier nor \c 0. * \retval #PSA_ERROR_COMMUNICATION_FAILURE - * There was an failure in communication with the cryptoprocessor. + * There was a failure in communication with the cryptoprocessor. * The key material may still be present in the cryptoprocessor. * \retval #PSA_ERROR_DATA_INVALID * This error is typically a result of either storage corruption on a diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h index a875b237041..711c43df785 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h @@ -43,6 +43,12 @@ #define MBEDTLS_PSA_BUILTIN_MAC #endif +#if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305) +#define MBEDTLS_PSA_BUILTIN_AEAD 1 +#endif + #if defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC) || defined(PSA_CRYPTO_DRIVER_TEST) typedef struct { diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_compat.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_compat.h index 09ac488398f..0d184042e34 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_compat.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_compat.h @@ -44,7 +44,7 @@ typedef mbedtls_svc_key_id_t psa_key_handle_t; #define PSA_KEY_HANDLE_INIT MBEDTLS_SVC_KEY_ID_INIT -/** Check whether an handle is null. +/** Check whether a handle is null. * * \param handle Handle * diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_extra.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_extra.h index a48a4bb5eb9..a34d5516458 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_extra.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_extra.h @@ -356,7 +356,7 @@ psa_status_t mbedtls_psa_inject_entropy(const uint8_t *seed, */ #define PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) -/** Whether a key type is an DSA key (pair or public-only). */ +/** Whether a key type is a DSA key (pair or public-only). */ #define PSA_KEY_TYPE_IS_DSA(type) \ (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_platform.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_platform.h index 66f46879305..d3f518e3276 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_platform.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_platform.h @@ -60,8 +60,8 @@ * * The function psa_its_identifier_of_slot() in psa_crypto_storage.c that * translates a key identifier to a key storage file name assumes that - * mbedtls_key_owner_id_t is an 32 bits integer. This function thus needs - * reworking if mbedtls_key_owner_id_t is not defined as a 32 bits integer + * mbedtls_key_owner_id_t is a 32-bit integer. This function thus needs + * reworking if mbedtls_key_owner_id_t is not defined as a 32-bit integer * here anymore. */ typedef int32_t mbedtls_key_owner_id_t; diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h index 1dc8f9b5c40..f8f8c92e883 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h @@ -225,7 +225,7 @@ typedef psa_status_t (*psa_drv_se_mac_finish_t)(void *op_context, * operation by comparing the resulting MAC against a provided value * * \param[in,out] op_context A hardware-specific structure for the previously - * started MAC operation to be fiinished + * started MAC operation to be finished * \param[in] p_mac The MAC value against which the resulting MAC * will be compared against * \param[in] mac_length The size in bytes of the value stored in `p_mac` @@ -336,7 +336,7 @@ typedef struct { /** Function that completes a MAC operation with a verify check */ psa_drv_se_mac_finish_verify_t p_finish_verify; - /** Function that aborts a previoustly started MAC operation + /** Function that aborts a previously started MAC operation */ psa_drv_se_mac_abort_t p_abort; /** Function that performs a MAC operation in one call @@ -394,7 +394,7 @@ typedef psa_status_t (*psa_drv_se_cipher_setup_t)(psa_drv_se_context_t *drv_cont psa_encrypt_or_decrypt_t direction); /** \brief A function that sets the initialization vector (if - * necessary) for an secure element cipher operation + * necessary) for a secure element cipher operation * * Rationale: The `psa_se_cipher_*` operation in the PSA Cryptographic API has * two IV functions: one to set the IV, and one to generate it internally. The @@ -745,7 +745,7 @@ typedef psa_status_t (*psa_drv_se_aead_encrypt_t)(psa_drv_se_context_t *drv_cont size_t ciphertext_size, size_t *p_ciphertext_length); -/** A function that peforms a secure element authenticated decryption operation +/** A function that performs a secure element authenticated decryption operation * * \param[in,out] drv_context The driver context structure. * \param[in] key_slot Slot containing the key to use @@ -1156,7 +1156,7 @@ typedef struct { * * Different key derivation algorithms require a different number of inputs. * Instead of having an API that takes as input variable length arrays, which - * can be problemmatic to manage on embedded platforms, the inputs are passed + * can be problematic to manage on embedded platforms, the inputs are passed * to the driver via a function, `psa_drv_se_key_derivation_collateral`, that * is called multiple times with different `collateral_id`s. Thus, for a key * derivation algorithm that required 3 parameter inputs, the flow would look @@ -1270,7 +1270,7 @@ typedef struct { psa_drv_se_key_derivation_collateral_t p_collateral; /** Function that performs a final key derivation step */ psa_drv_se_key_derivation_derive_t p_derive; - /** Function that perforsm a final key derivation or agreement and + /** Function that performs a final key derivation or agreement and * exports the key */ psa_drv_se_key_derivation_export_t p_export; } psa_drv_se_key_derivation_t; diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_sizes.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_sizes.h index 0d4532200e7..a0a52876bef 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_sizes.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_sizes.h @@ -716,7 +716,7 @@ (PSA_KEY_EXPORT_ASN1_INTEGER_MAX_SIZE(key_bits) + 11) /* Maximum size of the export encoding of an RSA key pair. - * Assumes thatthe public exponent is less than 2^32 and that the size + * Assumes that the public exponent is less than 2^32 and that the size * difference between the two primes is at most 1 bit. * * RSAPrivateKey ::= SEQUENCE { diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_types.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_types.h index 8f23021a45a..679cbc48e6a 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_types.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_types.h @@ -104,7 +104,7 @@ typedef uint8_t psa_ecc_family_t; * Values of this type are generally constructed by macros called * `PSA_DH_FAMILY_xxx`. * - * The group identifier is required to create an Diffie-Hellman key using the + * The group identifier is required to create a Diffie-Hellman key using the * PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY() * macros. * @@ -296,7 +296,7 @@ typedef psa_key_id_t mbedtls_svc_key_id_t; #else /* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */ /* Implementation-specific: The Mbed Cryptography library can be built as - * part of a multi-client service that exposes the PSA Cryptograpy API in each + * part of a multi-client service that exposes the PSA Cryptography API in each * client and encodes the client identity in the key identifier argument of * functions such as psa_open_key(). */ diff --git a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_values.h b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_values.h index 8b3a815ac19..a4b4927e9d0 100644 --- a/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_values.h +++ b/tools/sdk/esp32s2/include/mbedtls/mbedtls/include/psa/crypto_values.h @@ -1195,7 +1195,7 @@ */ #define PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x05100500) -/* In the encoding of a AEAD algorithm, the bits corresponding to +/* In the encoding of an AEAD algorithm, the bits corresponding to * PSA_ALG_AEAD_TAG_LENGTH_MASK encode the length of the AEAD tag. * The constants for default lengths follow this encoding. */ @@ -1330,9 +1330,11 @@ * This is the signature scheme defined by RFC 8017 * (PKCS#1: RSA Cryptography Specifications) under the name * RSASSA-PSS, with the message generation function MGF1, and with - * a salt length equal to the length of the hash. The specified - * hash algorithm is used to hash the input message, to create the - * salted hash, and for the mask generation. + * a salt length equal to the length of the hash, or the largest + * possible salt length for the algorithm and key size if that is + * smaller than the hash length. The specified hash algorithm is + * used to hash the input message, to create the salted hash, and + * for the mask generation. * * \param hash_alg A hash algorithm (\c PSA_ALG_XXX value such that * #PSA_ALG_IS_HASH(\p hash_alg) is true). 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 607d35ffc69..95bd65883c4 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 @@ -44,7 +44,12 @@ * The time does not need to be correct, only time differences are used, * by contrast with MBEDTLS_HAVE_TIME_DATE * - * Comment if your system does not support time functions + * Comment if your system does not support time functions. + * + * \note If MBEDTLS_TIMING_C is set - to enable the semi-portable timing + * interface - timing.c will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. */ #ifdef CONFIG_MBEDTLS_HAVE_TIME #define MBEDTLS_HAVE_TIME @@ -253,9 +258,8 @@ #define MBEDTLS_CIPHER_PADDING_ZEROS /** - * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES & MBEDTLS_ARC4_C + * \def MBEDTLS_ARC4_C * - * MBEDTLS_ARC4_C * Enable the ARCFOUR stream cipher. * * This module enables/disables the following ciphersuites @@ -270,7 +274,14 @@ * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * - * MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * \warning ARC4 is considered a weak cipher and its use constitutes a + * security risk. If possible, we recommend avoiding dependencies on + * it, and considering stronger ciphers instead. + * + * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * + * Remove RC4 ciphersuites by default in SSL / TLS. + * * This flag removes the ciphersuites based on RC4 from the default list as * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them @@ -941,6 +952,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #ifdef CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -976,7 +989,7 @@ * Enable support for RFC 7627: Session Hash and Extended Master Secret * Extension. * - * This was introduced as "the proper fix" to the Triple Handshake familiy of + * This was introduced as "the proper fix" to the Triple Handshake family of * attacks, but it is recommended to always use it (even if you disable * renegotiation), since it actually fixes a more fundamental issue in the * original SSL/TLS design, and has implications beyond Triple Handshake. @@ -1026,7 +1039,7 @@ * \note This option has no influence on the protection against the * triple handshake attack. Even if it is disabled, Mbed TLS will * still ensure that certificates do not change during renegotiation, - * for exaple by keeping a hash of the peer's certificate. + * for example by keeping a hash of the peer's certificate. * * Comment this macro to disable storing the peer's certificate * after the handshake. @@ -1209,7 +1222,7 @@ * unless you know for sure amplification cannot be a problem in the * environment in which your server operates. * - * \warning Disabling this can ba a security risk! (see above) + * \warning Disabling this can be a security risk! (see above) * * Requires: MBEDTLS_SSL_PROTO_DTLS * @@ -1944,7 +1957,7 @@ * * Requires: MBEDTLS_MD_C * - * Uncomment to enable the HMAC_DRBG random number geerator. + * Uncomment to enable the HMAC_DRBG random number generator. */ #define MBEDTLS_HMAC_DRBG_C @@ -1978,11 +1991,19 @@ /** * \def MBEDTLS_NET_C * - * Enable the TCP/IP networking routines. + * Enable the TCP and UDP over IPv6/IPv4 networking routines. * - * Module: library/net.c + * \note This module only works on POSIX/Unix (including Linux, BSD and OS X) + * and Windows. For other platforms, you'll want to disable it, and write your + * own networking callbacks to be passed to \c mbedtls_ssl_set_bio(). * - * This module provides TCP/IP networking routines. + * \note See also our Knowledge Base article about porting to a new + * environment: + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * + * Module: library/net_sockets.c + * + * This module provides networking routines. */ #ifdef MBEDTLS_NET_C #undef MBEDTLS_NET_C @@ -2070,7 +2091,7 @@ /** * \def MBEDTLS_PK_C * - * Enable the generic public (asymetric) key layer. + * Enable the generic public (asymmetric) key layer. * * Module: library/pk.c * Caller: library/ssl_tls.c @@ -2086,7 +2107,7 @@ /** * \def MBEDTLS_PK_PARSE_C * - * Enable the generic public (asymetric) key parser. + * Enable the generic public (asymmetric) key parser. * * Module: library/pkparse.c * Caller: library/mbedtls_x509_crt.c @@ -2101,7 +2122,7 @@ /** * \def MBEDTLS_PK_WRITE_C * - * Enable the generic public (asymetric) key writer. + * Enable the generic public (asymmetric) key writer. * * Module: library/pkwrite.c * Caller: library/x509write.c @@ -2290,7 +2311,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #ifdef CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS #define MBEDTLS_SSL_TICKET_C @@ -2366,9 +2388,13 @@ * your own implementation of the whole module by setting * \c MBEDTLS_TIMING_ALT in the current file. * + * \note The timing module will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. + * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c @@ -2680,7 +2706,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/cp_dma_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/cp_dma_struct.h index 15fb42e451c..3cee914b579 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/cp_dma_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/cp_dma_struct.h @@ -620,7 +620,9 @@ typedef struct { volatile cp_dma_date_reg_t dma_date; } cp_dma_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(cp_dma_dev_t) == 0x100, "cp_dma_dev_t should occupy 0x100 bytes in memory"); +#endif extern cp_dma_dev_t CP_DMA; diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dedic_gpio_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dedic_gpio_struct.h index 04aae779ad2..e68babe481b 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dedic_gpio_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/dedic_gpio_struct.h @@ -519,7 +519,9 @@ typedef struct { volatile dedic_gpio_intr_clr_reg_t gpio_intr_clr; } dedic_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(dedic_dev_t) == 0x30, "dedic_dev_t should occupy 0x30 bytes in memory"); +#endif extern dedic_dev_t DEDIC_GPIO; diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_reg.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_reg.h index f7be21c6edd..1bf6e48b58e 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_reg.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_reg.h @@ -2072,6 +2072,9 @@ extern "C" { #define EFUSE_MEM_FORCE_PD_V 0x1 #define EFUSE_MEM_FORCE_PD_S 0 +#define EFUSE_WRITE_OP_CODE 0x5a5a +#define EFUSE_READ_OP_CODE 0x5aa5 + #define EFUSE_CONF_REG (DR_REG_EFUSE_BASE + 0x1cc) /* EFUSE_OP_CODE : R/W ;bitpos:[15:0] ;default: 16'h0 ; */ /*description: 0x5A5A: Operate programming command*/ diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_struct.h index d2ef6454948..d6b21a5c46a 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/efuse_struct.h @@ -186,8 +186,10 @@ typedef volatile struct efuse_dev_s { } rd_repeat_data3; union { struct { - uint32_t chip_version:24; - uint32_t reserved24: 8; + uint32_t disable_wafer_version_major: 1; + uint32_t disable_blk_version_major: 1; + uint32_t rpt4_reserved4:22; + uint32_t reserved24: 8; }; uint32_t val; } rd_repeat_data4; @@ -206,14 +208,38 @@ typedef volatile struct efuse_dev_s { }; uint32_t val; } rd_mac_spi_8m_2; - uint32_t rd_mac_spi_8m_3; /**/ - uint32_t rd_mac_spi_8m_4; /**/ + union { + struct { + uint32_t spi_pad_conf_2: 18; + uint32_t wafer_version_major: 2; + uint32_t wafer_version_minor_high: 1; // most significant bit + uint32_t reserve1: 4; + uint32_t blk_version_major: 2; + uint32_t reserve2: 5; + }; + uint32_t val; + } rd_mac_spi_8m_3; + union { + struct { + uint32_t pkg_version: 4; + uint32_t wafer_version_minor_low: 3; // least significant bits + uint32_t reserve: 25; + }; + uint32_t val; + } rd_mac_spi_8m_4; uint32_t rd_mac_spi_8m_5; /**/ uint32_t rd_sys_data0; /**/ uint32_t rd_sys_data1; /**/ uint32_t rd_sys_data2; /**/ uint32_t rd_sys_data3; /**/ - uint32_t rd_sys_data4; /**/ + union { + struct { + uint32_t reserved1: 4; + uint32_t blk_version_minor : 3; + uint32_t reserved2: 25; + }; + uint32_t val; + } rd_sys_data4; /**/ uint32_t rd_sys_data5; /**/ uint32_t rd_sys_data6; /**/ uint32_t rd_sys_data7; /**/ diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/i2s_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/i2s_struct.h index 99220407e72..046b42703ce 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/i2s_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/i2s_struct.h @@ -410,7 +410,9 @@ typedef volatile struct i2s_dev_s { } i2s_dev_t; extern i2s_dev_t I2S0; +#ifndef __cplusplus _Static_assert(sizeof(i2s_dev_t)==0x100, "invalid i2s_dev_t size"); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc.h index c23f73d5145..b4561a45211 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc.h @@ -109,6 +109,7 @@ extern "C" { #define RTC_CNTL_XTL_BUF_WAIT_SLP_US (1000) #define RTC_CNTL_CK8M_WAIT_SLP_CYCLES (4) #define RTC_CNTL_WAKEUP_DELAY_CYCLES (4) +#define RTC_CNTL_MIN_SLP_VAL_MIN (2) #define RTC_CNTL_CK8M_DFREQ_DEFAULT 172 #define RTC_CNTL_SCK_DCAP_DEFAULT 255 diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc_cntl_reg.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc_cntl_reg.h index bb769c935d1..bd747d13aa9 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc_cntl_reg.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/rtc_cntl_reg.h @@ -1,16 +1,8 @@ -// Copyright 2017-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: 2017-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _SOC_RTC_CNTL_REG_H_ #define _SOC_RTC_CNTL_REG_H_ @@ -396,7 +388,6 @@ extern "C" { #define RTC_CNTL_MIN_SLP_VAL_M ((RTC_CNTL_MIN_SLP_VAL_V)<<(RTC_CNTL_MIN_SLP_VAL_S)) #define RTC_CNTL_MIN_SLP_VAL_V 0xFF #define RTC_CNTL_MIN_SLP_VAL_S 8 -#define RTC_CNTL_MIN_SLP_VAL_MIN 2 #define RTC_CNTL_TIMER6_REG (DR_REG_RTCCNTL_BASE + 0x0030) /* RTC_CNTL_DG_DCDC_POWERUP_TIMER : R/W ;bitpos:[31:25] ;default: 7'h8 ; */ diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/soc_caps.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/soc_caps.h index 8a7cdba9ef8..a259ea45a1e 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/soc_caps.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/soc_caps.h @@ -114,8 +114,8 @@ // GPIO 46 is input only #define SOC_GPIO_VALID_OUTPUT_GPIO_MASK (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | BIT46)) -// Support to configure slept status -#define SOC_GPIO_SUPPORT_SLP_SWITCH (1) +// digital I/O pad powered by VDD3P3_CPU or VDD_SPI(GPIO_NUM_26~GPIO_NUM_46) +#define SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK 0x00007FFFFC000000ULL /*-------------------------- Dedicated GPIO CAPS ---------------------------------------*/ #define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */ diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_mem_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_mem_struct.h index 085a226f4ef..7520c64ee3d 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_mem_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_mem_struct.h @@ -699,7 +699,11 @@ typedef volatile struct spi_mem_dev_s { uint32_t val; } date; } spi_mem_dev_t; + +#ifndef __cplusplus _Static_assert(sizeof(spi_mem_dev_t) == 0x400, "invalid spi_mem_dev_t size"); +#endif + extern spi_mem_dev_t SPIMEM0; extern spi_mem_dev_t SPIMEM1; #ifdef __cplusplus diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_struct.h index 2d8f4b373bd..df09a5b0a9a 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/spi_struct.h @@ -755,8 +755,9 @@ typedef volatile struct spi_dev_s { extern spi_dev_t GPSPI2; //FSPI extern spi_dev_t GPSPI3; //HSPI +#ifndef __cplusplus _Static_assert(sizeof(spi_dev_t)==0x400, "***invalid spi"); - +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/syscon_reg.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/syscon_reg.h index a0ab648a7bb..91d9e153754 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/syscon_reg.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/syscon_reg.h @@ -1,16 +1,8 @@ -// Copyright 2017-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: 2017-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _SOC_SYSCON_REG_H_ #define _SOC_SYSCON_REG_H_ @@ -469,23 +461,31 @@ extern "C" { #define DPORT_CORE_RST_EN_REG DPORT_WIFI_RST_EN_REG #define DPORT_WIFI_RST_EN_REG SYSCON_WIFI_RST_EN_REG + /* DPORT_WIFI_RST : R/W ;bitpos:[31:0] ;default: 32'h0 ; */ /*description: */ #define DPORT_WIFI_RST 0xFFFFFFFF #define DPORT_WIFI_RST_M ((DPORT_WIFI_RST_V)<<(DPORT_WIFI_RST_S)) #define DPORT_WIFI_RST_V 0xFFFFFFFF #define DPORT_WIFI_RST_S 0 -#define DPORT_RW_BTLP_RST (BIT(10)) -#define DPORT_RW_BTMAC_RST (BIT(9)) -#define DPORT_MACPWR_RST (BIT(8)) -#define DPORT_EMAC_RST (BIT(7)) -#define DPORT_SDIO_HOST_RST (BIT(6)) -#define DPORT_SDIO_RST (BIT(5)) -#define DPORT_BTMAC_RST (BIT(4)) -#define DPORT_BT_RST (BIT(3)) -#define DPORT_MAC_RST (BIT(2)) -#define DPORT_FE_RST (BIT(1)) -#define DPORT_BB_RST (BIT(0)) + +#define DPORT_WIFIBB_RST BIT(0) +#define DPORT_FE_RST BIT(1) +#define DPORT_WIFIMAC_RST BIT(2) +#define DPORT_BTBB_RST BIT(3) +#define DPORT_BTMAC_RST BIT(4) +#define DPORT_SDIO_RST BIT(5) +#define DPORT_EMAC_RST BIT(7) +#define DPORT_MACPWR_RST BIT(8) +#define DPORT_RW_BTMAC_RST BIT(9) +#define DPORT_RW_BTLP_RST BIT(10) + +#define MODEM_RESET_FIELD_WHEN_PU (DPORT_WIFIBB_RST | \ + DPORT_FE_RST | \ + DPORT_WIFIMAC_RST | \ + DPORT_BTBB_RST | \ + DPORT_BTMAC_RST | \ + DPORT_RW_BTMAC_RST) #define SYSCON_FRONT_END_MEM_PD_REG (DR_REG_SYSCON_BASE + 0x098) /* SYSCON_DC_MEM_FORCE_PD : R/W ;bitpos:[5] ;default: 1'b0 ; */ diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/twai_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/twai_struct.h index 00a006501cf..f883769c947 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/twai_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/twai_struct.h @@ -205,7 +205,9 @@ typedef volatile struct twai_dev_s { } clock_divider_reg; /* Address 0x007C */ } twai_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(twai_dev_t) == 128, "TWAI registers should be 32 * 4 bytes"); +#endif extern twai_dev_t TWAI; diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usbh_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usb_dwc_struct.h similarity index 71% rename from tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usbh_struct.h rename to tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usb_dwc_struct.h index 3a52bf9952e..0402c4a83ed 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usbh_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usb_dwc_struct.h @@ -1,20 +1,11 @@ -// 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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once -#include #ifdef __cplusplus extern "C" { #endif @@ -49,7 +40,7 @@ typedef union { uint32_t reserved10: 10; }; uint32_t val; -} usb_gotgctl_reg_t; +} usb_dwc_gotgctl_reg_t; typedef union { struct { @@ -65,7 +56,7 @@ typedef union { uint32_t reserved12: 12; }; uint32_t val; -} usb_gotgint_reg_t; +} usb_dwc_gotgint_reg_t; typedef union { struct { @@ -84,7 +75,7 @@ typedef union { }; uint32_t val; //Checked -} usb_gahbcfg_reg_t; +} usb_dwc_gahbcfg_reg_t; typedef union { struct { @@ -106,7 +97,7 @@ typedef union { uint32_t corrupttxpkt: 1; }; uint32_t val; -} usb_gusbcfg_reg_t; +} usb_dwc_gusbcfg_reg_t; typedef union { struct { @@ -122,7 +113,7 @@ typedef union { uint32_t ahbidle: 1; }; uint32_t val; -} usb_grstctl_reg_t; +} usb_dwc_grstctl_reg_t; typedef union { struct { @@ -159,7 +150,7 @@ typedef union { uint32_t wkupint: 1; }; uint32_t val; -} usb_gintsts_reg_t; +} usb_dwc_gintsts_reg_t; typedef union { struct { @@ -196,7 +187,7 @@ typedef union { uint32_t wkupintmsk: 1; }; uint32_t val; -} usb_gintmsk_reg_t; +} usb_dwc_gintmsk_reg_t; typedef union { struct { @@ -208,7 +199,7 @@ typedef union { uint32_t reserved7: 7; }; uint32_t val; -} usb_grxstsr_reg_t; +} usb_dwc_grxstsr_reg_t; typedef union { struct { @@ -220,7 +211,7 @@ typedef union { uint32_t reserved7: 7; }; uint32_t val; -} usb_grxstsp_reg_t; +} usb_dwc_grxstsp_reg_t; typedef union { struct { @@ -228,7 +219,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_grxfsiz_reg_t; +} usb_dwc_grxfsiz_reg_t; typedef union { struct { @@ -236,7 +227,7 @@ typedef union { uint32_t nptxfdep: 16; }; uint32_t val; -} usb_gnptxfsiz_reg_t; +} usb_dwc_gnptxfsiz_reg_t; typedef union { struct { @@ -247,21 +238,21 @@ typedef union { uint32_t reserved1: 1; }; uint32_t val; -} usb_gnptxsts_reg_t; +} usb_dwc_gnptxsts_reg_t; typedef union { struct { uint32_t synopsysid; }; uint32_t val; -} usb_gsnpsid_reg_t; +} usb_dwc_gsnpsid_reg_t; typedef union { struct { uint32_t epdir; }; uint32_t val; -} usb_ghwcfg1_reg_t; +} usb_dwc_ghwcfg1_reg_t; typedef union { struct { @@ -282,7 +273,7 @@ typedef union { uint32_t reserved1b: 1; }; uint32_t val; -} usb_ghwcfg2_reg_t; +} usb_dwc_ghwcfg2_reg_t; typedef union { struct { @@ -300,7 +291,7 @@ typedef union { uint32_t dfifodepth: 16; }; uint32_t val; -} usb_ghwcfg3_reg_t; +} usb_dwc_ghwcfg3_reg_t; typedef union { struct { @@ -325,7 +316,7 @@ typedef union { uint32_t g_descdma: 1; }; uint32_t val; -} usb_ghwcfg4_reg_t; +} usb_dwc_ghwcfg4_reg_t; typedef union { struct { @@ -334,7 +325,7 @@ typedef union { }; uint32_t val; -} usb_gdfifocfg_reg_t; +} usb_dwc_gdfifocfg_reg_t; typedef union { struct { @@ -342,7 +333,7 @@ typedef union { uint32_t ptxfsize: 16; }; uint32_t val; -} usb_hptxfsiz_reg_t; +} usb_dwc_hptxfsiz_reg_t; typedef union { struct { @@ -350,7 +341,7 @@ typedef union { uint32_t inep1txfdep: 16; }; uint32_t val; -} usb_dieptxfi_reg_t; +} usb_dwc_dieptxfi_reg_t; typedef union { struct { @@ -368,7 +359,7 @@ typedef union { uint32_t modechtimen: 1; }; uint32_t val; -} usb_hcfg_reg_t; +} usb_dwc_hcfg_reg_t; typedef union { struct { @@ -377,7 +368,7 @@ typedef union { uint32_t reserved15: 15; }; uint32_t val; -} usb_hfir_reg_t; +} usb_dwc_hfir_reg_t; typedef union { struct { @@ -386,7 +377,7 @@ typedef union { uint32_t frrem: 16; }; uint32_t val; -} usb_hfnum_reg_t; +} usb_dwc_hfnum_reg_t; typedef union { struct { @@ -396,7 +387,7 @@ typedef union { uint32_t ptxqtop: 8; }; uint32_t val; -} usb_hptxsts_reg_t; +} usb_dwc_hptxsts_reg_t; typedef union { struct { @@ -404,7 +395,7 @@ typedef union { uint32_t reserved24: 24; }; uint32_t val; -} usb_haint_reg_t; +} usb_dwc_haint_reg_t; typedef union { struct { @@ -412,14 +403,14 @@ typedef union { uint32_t reserved24: 24; }; uint32_t val; -} usb_haintmsk_reg_t; +} usb_dwc_haintmsk_reg_t; typedef union { struct { uint32_t hflbaddr; }; uint32_t val; -} usb_hflbaddr_reg_t; +} usb_dwc_hflbaddr_reg_t; typedef union { struct { @@ -440,7 +431,7 @@ typedef union { uint32_t reserved13: 13; }; uint32_t val; -} usb_hprt_reg_t; +} usb_dwc_hprt_reg_t; typedef union { struct { @@ -457,8 +448,7 @@ typedef union { uint32_t chena: 1; }; uint32_t val; - //Checked with changes -} usb_hcchar_reg_t; +} usb_dwc_hcchar_reg_t; typedef union { struct { @@ -479,8 +469,7 @@ typedef union { uint32_t reserved18: 18; }; uint32_t val; - //Checked -} usb_hcint_reg_t; +} usb_dwc_hcint_reg_t; typedef union { struct { @@ -501,8 +490,7 @@ typedef union { uint32_t reserved18: 18; }; uint32_t val; - //Checked -} usb_hcintmsk_reg_t; +} usb_dwc_hcintmsk_reg_t; typedef union { struct { @@ -514,8 +502,7 @@ typedef union { uint32_t dopng: 1; }; uint32_t val; - //Checked -} usb_hctsiz_reg_t; +} usb_dwc_hctsiz_reg_t; typedef union { struct { @@ -528,15 +515,14 @@ typedef union { uint32_t dmaaddr_ctd: 29; } iso; uint32_t val; - //Checked -} usb_hcdma_reg_t; +} usb_dwc_hcdma_reg_t; typedef union { struct { uint32_t hcdmab; }; uint32_t val; -} usb_hcdmab_reg_t; +} usb_dwc_hcdmab_reg_t; typedef union { struct { @@ -555,7 +541,7 @@ typedef union { uint32_t resvalid: 6; }; uint32_t val; -} usb_dcfg_reg_t; +} usb_dwc_dcfg_reg_t; typedef union { struct { @@ -578,7 +564,7 @@ typedef union { uint32_t reserved3: 13; }; uint32_t val; -} usb_dctl_reg_t; +} usb_dwc_dctl_reg_t; typedef union { struct { @@ -591,7 +577,7 @@ typedef union { uint32_t reserved8: 8; }; uint32_t val; -} usb_dsts_reg_t; +} usb_dwc_dsts_reg_t; typedef union { struct { @@ -610,7 +596,7 @@ typedef union { uint32_t reserved18: 18; }; uint32_t val; -} usb_diepmsk_reg_t; +} usb_dwc_diepmsk_reg_t; typedef union { struct { @@ -631,7 +617,7 @@ typedef union { uint32_t reserved17: 17; }; uint32_t val; -} usb_doepmsk_reg_t; +} usb_dwc_doepmsk_reg_t; typedef union { struct { @@ -653,7 +639,7 @@ typedef union { uint32_t reserved9b: 9; }; uint32_t val; -} usb_daint_reg_t; +} usb_dwc_daint_reg_t; typedef union { struct { @@ -675,7 +661,7 @@ typedef union { uint32_t reserved9b: 9; }; uint32_t val; -} usb_daintmsk_reg_t; +} usb_dwc_daintmsk_reg_t; typedef union { struct { @@ -683,7 +669,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_dvbusdis_reg_t; +} usb_dwc_dvbusdis_reg_t; typedef union { struct { @@ -691,7 +677,7 @@ typedef union { uint32_t reserved20: 20; }; uint32_t val; -} usb_dvbuspulse_reg_t; +} usb_dwc_dvbuspulse_reg_t; typedef union { struct { @@ -707,7 +693,7 @@ typedef union { uint32_t reserved4: 4; }; uint32_t val; -} usb_dthrctl_reg_t; +} usb_dwc_dthrctl_reg_t; typedef union { struct { @@ -715,7 +701,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_diepempmsk_reg_t; +} usb_dwc_diepempmsk_reg_t; typedef union { struct { @@ -736,7 +722,7 @@ typedef union { uint32_t epena0: 1; }; uint32_t val; -} usb_diepctl0_reg_t; +} usb_dwc_diepctl0_reg_t; typedef union { struct { @@ -758,7 +744,7 @@ typedef union { uint32_t reserved17: 17; }; uint32_t val; -} usb_diepint0_reg_t; +} usb_dwc_diepint0_reg_t; typedef union { struct { @@ -768,14 +754,14 @@ typedef union { uint32_t reserved11: 11; }; uint32_t val; -} usb_dieptsiz0_reg_t; +} usb_dwc_dieptsiz0_reg_t; typedef union { struct { uint32_t dmaaddr0; }; uint32_t val; -} usb_diepdma0_reg_t; +} usb_dwc_diepdma0_reg_t; typedef union { struct { @@ -783,14 +769,14 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_dtxfsts0_reg_t; +} usb_dwc_dtxfsts0_reg_t; typedef union { struct { uint32_t dmabufferaddr0; }; uint32_t val; -} usb_diepdmab0_reg_t; +} usb_dwc_diepdmab0_reg_t; typedef union { struct { @@ -812,7 +798,7 @@ typedef union { uint32_t epena: 1; }; uint32_t val; -} usb_diepctl_reg_t; +} usb_dwc_diepctl_reg_t; typedef union { struct { @@ -834,7 +820,7 @@ typedef union { uint32_t reserved15: 17; }; uint32_t val; -} usb_diepint_reg_t; +} usb_dwc_diepint_reg_t; typedef union { struct { @@ -844,14 +830,14 @@ typedef union { uint32_t reserved11: 11; }; uint32_t val; -} usb_dieptsiz_reg_t; +} usb_dwc_dieptsiz_reg_t; typedef union { struct { uint32_t dmaddr1; }; uint32_t val; -} usb_diepdma_reg_t; +} usb_dwc_diepdma_reg_t; typedef union { struct { @@ -859,14 +845,14 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_dtxfsts_reg_t; +} usb_dwc_dtxfsts_reg_t; typedef union { struct { uint32_t dmabufferaddr1; }; uint32_t val; -} usb_diepdmab_reg_t; +} usb_dwc_diepdmab_reg_t; typedef union { struct { @@ -886,7 +872,7 @@ typedef union { uint32_t epena0: 1; }; uint32_t val; -} usb_doepctl0_reg_t; +} usb_dwc_doepctl0_reg_t; typedef union { struct { @@ -909,7 +895,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_doepint0_reg_t; +} usb_dwc_doepint0_reg_t; typedef union { struct { @@ -921,21 +907,21 @@ typedef union { uint32_t reserved1: 1; }; uint32_t val; -} usb_doeptsiz0_reg_t; +} usb_dwc_doeptsiz0_reg_t; typedef union { struct { uint32_t dmaaddr0; }; uint32_t val; -} usb_doepdma0_reg_t; +} usb_dwc_doepdma0_reg_t; typedef union { struct { uint32_t dmabufferaddr0; }; uint32_t val; -} usb_doepdmab0_reg_t; +} usb_dwc_doepdmab0_reg_t; typedef union { struct { @@ -956,7 +942,7 @@ typedef union { uint32_t epena: 1; }; uint32_t val; -} usb_doepctl_reg_t; +} usb_dwc_doepctl_reg_t; typedef union { struct { @@ -979,7 +965,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_doepint_reg_t; +} usb_dwc_doepint_reg_t; typedef union { struct { @@ -991,21 +977,21 @@ typedef union { uint32_t reserved1: 1; }; uint32_t val; -} usb_doeptsiz_reg_t; +} usb_dwc_doeptsiz_reg_t; typedef union { struct { uint32_t dmaaddr; }; uint32_t val; -} usb_doepdma_reg_t; +} usb_dwc_doepdma_reg_t; typedef union { struct { uint32_t dmabufferaddr; }; uint32_t val; -} usb_doepdmab_reg_t; +} usb_dwc_doepdmab_reg_t; typedef union { struct { @@ -1020,143 +1006,145 @@ typedef union { uint32_t reserved23: 23; }; uint32_t val; -} usb_pcgcctl_reg_t; +} usb_dwc_pcgcctl_reg_t; /* --------------------------- Register Groups ------------------------------ */ typedef struct { - volatile usb_hcchar_reg_t hcchar_reg; //0x00 - uint32_t reserved_0x04_0x08[1]; //0x04 - volatile usb_hcint_reg_t hcint_reg; //0x08 - volatile usb_hcintmsk_reg_t hcintmsk_reg; //0x0c - volatile usb_hctsiz_reg_t hctsiz_reg; //0x10 - volatile usb_hcdma_reg_t hcdma_reg; //0x14 - uint32_t reserved_0x14_0x14[1]; //0x18* - volatile usb_hcdmab_reg_t hcdmab_reg; //0x1c -} usb_host_chan_regs_t; + volatile usb_dwc_hcchar_reg_t hcchar_reg; // 0x00 + uint32_t reserved_0x04_0x08[1]; // 0x04 + volatile usb_dwc_hcint_reg_t hcint_reg; // 0x08 + volatile usb_dwc_hcintmsk_reg_t hcintmsk_reg; // 0x0c + volatile usb_dwc_hctsiz_reg_t hctsiz_reg; // 0x10 + volatile usb_dwc_hcdma_reg_t hcdma_reg; // 0x14 + uint32_t reserved_0x14_0x14[1]; // 0x18 + volatile usb_dwc_hcdmab_reg_t hcdmab_reg; // 0x1c +} usb_dwc_host_chan_regs_t; typedef struct { - volatile usb_diepctl_reg_t diepctl_reg; //0x00 - uint32_t reserved_0x04_0x08[1]; //0x04 - volatile usb_diepint_reg_t diepint_reg; //0x08 - uint32_t reserved_0x0c_0x10[1]; //0x0c - volatile usb_dieptsiz_reg_t dieptsiz_reg; //0x010 - volatile usb_diepdma_reg_t diepdma_reg; //0x14 - volatile usb_dtxfsts_reg_t dtxfsts_reg; //0x18 - volatile usb_diepdmab_reg_t diepdmab_reg; //0x1c -} usb_in_ep_regs_t; + volatile usb_dwc_diepctl_reg_t diepctl_reg; // 0x00 + uint32_t reserved_0x04_0x08[1]; // 0x04 + volatile usb_dwc_diepint_reg_t diepint_reg; // 0x08 + uint32_t reserved_0x0c_0x10[1]; // 0x0c + volatile usb_dwc_dieptsiz_reg_t dieptsiz_reg; // 0x010 + volatile usb_dwc_diepdma_reg_t diepdma_reg; // 0x14 + volatile usb_dwc_dtxfsts_reg_t dtxfsts_reg; // 0x18 + volatile usb_dwc_diepdmab_reg_t diepdmab_reg; // 0x1c +} usb_dwc_in_ep_regs_t; typedef struct { - volatile usb_doepctl_reg_t doepctl_reg; //0x00 - uint32_t reserved_0x04_0x08[1]; //0x04 - volatile usb_doepint_reg_t doepint_reg; //0x08 - uint32_t reserved_0x0c_0x10[1]; //0x0c - volatile usb_doeptsiz_reg_t doeptsiz_reg; //0x10 - volatile usb_doepdma_reg_t doepdma_reg; //0x14 - uint32_t reserved_0x18_0x1c[1]; //0x18 - volatile usb_doepdmab_reg_t doepdmab_reg; //0x1c -} usb_out_ep_regs_t; + volatile usb_dwc_doepctl_reg_t doepctl_reg; // 0x00 + uint32_t reserved_0x04_0x08[1]; // 0x04 + volatile usb_dwc_doepint_reg_t doepint_reg; // 0x08 + uint32_t reserved_0x0c_0x10[1]; // 0x0c + volatile usb_dwc_doeptsiz_reg_t doeptsiz_reg; // 0x10 + volatile usb_dwc_doepdma_reg_t doepdma_reg; // 0x14 + uint32_t reserved_0x18_0x1c[1]; // 0x18 + volatile usb_dwc_doepdmab_reg_t doepdmab_reg; // 0x1c +} usb_dwc_out_ep_regs_t; /* --------------------------- Register Layout ------------------------------ */ typedef struct { //Global Registers - volatile usb_gotgctl_reg_t gotgctl_reg; //0x0000 - volatile usb_gotgint_reg_t gotgint_reg; //0x0004 - volatile usb_gahbcfg_reg_t gahbcfg_reg; //0x0008 - volatile usb_gusbcfg_reg_t gusbcfg_reg; //0x000c - volatile usb_grstctl_reg_t grstctl_reg; //0x0010 - volatile usb_gintsts_reg_t gintsts_reg; //0x0014 - volatile usb_gintmsk_reg_t gintmsk_reg; //0x0018 - volatile usb_grxstsr_reg_t grxstsr_reg; //0x001c - volatile usb_grxstsp_reg_t grxstsp_reg; //0x0020 - volatile usb_grxfsiz_reg_t grxfsiz_reg; //0x0024 - volatile usb_gnptxfsiz_reg_t gnptxfsiz_reg; //0x0028 - volatile usb_gnptxsts_reg_t gnptxsts_reg; //0x002c - uint32_t reserved_0x0030_0x0040[4]; //0x0030 to 0x0040 - volatile usb_gsnpsid_reg_t gsnpsid_reg; //0x0040 - volatile usb_ghwcfg1_reg_t ghwcfg1_reg; //0x0044 - volatile usb_ghwcfg2_reg_t ghwcfg2_reg; //0x0048 - volatile usb_ghwcfg3_reg_t ghwcfg3_reg; //0x004c - volatile usb_ghwcfg4_reg_t ghwcfg4_reg; //0x0050 - uint32_t reserved_0x0054_0x005c[2]; //0x0054 to 0x005c + volatile usb_dwc_gotgctl_reg_t gotgctl_reg; // 0x0000 + volatile usb_dwc_gotgint_reg_t gotgint_reg; // 0x0004 + volatile usb_dwc_gahbcfg_reg_t gahbcfg_reg; // 0x0008 + volatile usb_dwc_gusbcfg_reg_t gusbcfg_reg; // 0x000c + volatile usb_dwc_grstctl_reg_t grstctl_reg; // 0x0010 + volatile usb_dwc_gintsts_reg_t gintsts_reg; // 0x0014 + volatile usb_dwc_gintmsk_reg_t gintmsk_reg; // 0x0018 + volatile usb_dwc_grxstsr_reg_t grxstsr_reg; // 0x001c + volatile usb_dwc_grxstsp_reg_t grxstsp_reg; // 0x0020 + volatile usb_dwc_grxfsiz_reg_t grxfsiz_reg; // 0x0024 + volatile usb_dwc_gnptxfsiz_reg_t gnptxfsiz_reg; // 0x0028 + volatile usb_dwc_gnptxsts_reg_t gnptxsts_reg; // 0x002c + uint32_t reserved_0x0030_0x0040[4]; // 0x0030 to 0x0040 + volatile usb_dwc_gsnpsid_reg_t gsnpsid_reg; // 0x0040 + volatile usb_dwc_ghwcfg1_reg_t ghwcfg1_reg; // 0x0044 + volatile usb_dwc_ghwcfg2_reg_t ghwcfg2_reg; // 0x0048 + volatile usb_dwc_ghwcfg3_reg_t ghwcfg3_reg; // 0x004c + volatile usb_dwc_ghwcfg4_reg_t ghwcfg4_reg; // 0x0050 + uint32_t reserved_0x0054_0x005c[2]; // 0x0054 to 0x005c //FIFO Configurations - volatile usb_gdfifocfg_reg_t gdfifocfg_reg; //0x005c - uint32_t reserved_0x0060_0x0100[40]; //0x0060 to 0x0100 - volatile usb_hptxfsiz_reg_t hptxfsiz_reg; //0x0100 - volatile usb_dieptxfi_reg_t dieptxfi_regs[4]; //0x0104 to 0x0114 - usb_dieptxfi_reg_t reserved_0x0114_0x0140[11]; //0x0114 to 0x0140 - uint32_t reserved_0x140_0x400[176]; //0x0140 to 0x0400 + volatile usb_dwc_gdfifocfg_reg_t gdfifocfg_reg; // 0x005c + uint32_t reserved_0x0060_0x0100[40]; // 0x0060 to 0x0100 + volatile usb_dwc_hptxfsiz_reg_t hptxfsiz_reg; // 0x0100 + volatile usb_dwc_dieptxfi_reg_t dieptxfi_regs[4]; // 0x0104 to 0x0114 + usb_dwc_dieptxfi_reg_t reserved_0x0114_0x0140[11]; // 0x0114 to 0x0140 + uint32_t reserved_0x140_0x400[176]; // 0x0140 to 0x0400 //Host Mode Registers - volatile usb_hcfg_reg_t hcfg_reg; //0x0400 - volatile usb_hfir_reg_t hfir_reg; //0x0404 - volatile usb_hfnum_reg_t hfnum_reg; //0x0408 - uint32_t reserved_0x40c_0x410[1]; //0x040c to 0x0410 - volatile usb_hptxsts_reg_t hptxsts_reg; //0x0410 - volatile usb_haint_reg_t haint_reg; //0x0414 - volatile usb_haintmsk_reg_t haintmsk_reg; //0x0418 - volatile usb_hflbaddr_reg_t hflbaddr_reg; //0x041c - uint32_t reserved_0x420_0x440[8]; //0x0420 to 0x0440 - volatile usb_hprt_reg_t hprt_reg; //0x0440 - uint32_t reserved_0x0444_0x0500[47]; //0x0444 to 0x0500 - usb_host_chan_regs_t host_chans[8]; //0x0500 to 0x0600 - usb_host_chan_regs_t reserved_0x0600_0x0700[8]; //0x0600 to 0x0700 - uint32_t reserved_0x0700_0x0800[64]; //0x0700 to 0x0800 - volatile usb_dcfg_reg_t dcfg_reg; //0x0800 - volatile usb_dctl_reg_t dctl_reg; //0x0804 - volatile usb_dsts_reg_t dsts_reg; //0x0808 - uint32_t reserved_0x080c_0x0810[1]; //0x080c to 0x0810 + volatile usb_dwc_hcfg_reg_t hcfg_reg; // 0x0400 + volatile usb_dwc_hfir_reg_t hfir_reg; // 0x0404 + volatile usb_dwc_hfnum_reg_t hfnum_reg; // 0x0408 + uint32_t reserved_0x40c_0x410[1]; // 0x040c to 0x0410 + volatile usb_dwc_hptxsts_reg_t hptxsts_reg; // 0x0410 + volatile usb_dwc_haint_reg_t haint_reg; // 0x0414 + volatile usb_dwc_haintmsk_reg_t haintmsk_reg; // 0x0418 + volatile usb_dwc_hflbaddr_reg_t hflbaddr_reg; // 0x041c + uint32_t reserved_0x420_0x440[8]; // 0x0420 to 0x0440 + volatile usb_dwc_hprt_reg_t hprt_reg; // 0x0440 + uint32_t reserved_0x0444_0x0500[47]; // 0x0444 to 0x0500 + usb_dwc_host_chan_regs_t host_chans[8]; // 0x0500 to 0x0600 + usb_dwc_host_chan_regs_t reserved_0x0600_0x0700[8]; // 0x0600 to 0x0700 + uint32_t reserved_0x0700_0x0800[64]; // 0x0700 to 0x0800 + volatile usb_dwc_dcfg_reg_t dcfg_reg; // 0x0800 + volatile usb_dwc_dctl_reg_t dctl_reg; // 0x0804 + volatile usb_dwc_dsts_reg_t dsts_reg; // 0x0808 + uint32_t reserved_0x080c_0x0810[1]; // 0x080c to 0x0810 //Device Mode Registers - volatile usb_diepmsk_reg_t diepmsk_reg; //0x810 - volatile usb_doepmsk_reg_t doepmsk_reg; //0x0814 - volatile usb_daint_reg_t daint_reg; //0x0818 - volatile usb_daintmsk_reg_t daintmsk_reg; //0x081c - uint32_t reserved_0x0820_0x0828[2]; //0x0820 to 0x0828 - volatile usb_dvbusdis_reg_t dvbusdis_reg; //0x0828 - volatile usb_dvbuspulse_reg_t dvbuspulse_reg; //0x082c - volatile usb_dthrctl_reg_t dthrctl_reg; //0x0830 - volatile usb_diepempmsk_reg_t diepempmsk_reg; //0x0834 - uint32_t reserved_0x0838_0x0900[50]; //0x0838 to 0x0900 + volatile usb_dwc_diepmsk_reg_t diepmsk_reg; // 0x810 + volatile usb_dwc_doepmsk_reg_t doepmsk_reg; // 0x0814 + volatile usb_dwc_daint_reg_t daint_reg; // 0x0818 + volatile usb_dwc_daintmsk_reg_t daintmsk_reg; // 0x081c + uint32_t reserved_0x0820_0x0828[2]; // 0x0820 to 0x0828 + volatile usb_dwc_dvbusdis_reg_t dvbusdis_reg; // 0x0828 + volatile usb_dwc_dvbuspulse_reg_t dvbuspulse_reg; // 0x082c + volatile usb_dwc_dthrctl_reg_t dthrctl_reg; // 0x0830 + volatile usb_dwc_diepempmsk_reg_t diepempmsk_reg; // 0x0834 + uint32_t reserved_0x0838_0x0900[50]; // 0x0838 to 0x0900 //Deivce: IN EP0 reigsters - volatile usb_diepctl0_reg_t diepctl0_reg; //0x0900 - uint32_t reserved_0x0904_0x0908[1]; //0x0904 to 0x0908 - volatile usb_diepint0_reg_t diepint0_reg; //0x0908 - uint32_t reserved_0x090c_0x0910[1]; //0x090c to 0x0910 - volatile usb_dieptsiz0_reg_t dieptsiz0_reg; //0x0910 - volatile usb_diepdma0_reg_t diepdma0_reg; //0x0914 - volatile usb_dtxfsts0_reg_t dtxfsts0_reg; //0x0918 - volatile usb_diepdmab0_reg_t diepdmab0_reg; //0x091c + volatile usb_dwc_diepctl0_reg_t diepctl0_reg; // 0x0900 + uint32_t reserved_0x0904_0x0908[1]; // 0x0904 to 0x0908 + volatile usb_dwc_diepint0_reg_t diepint0_reg; // 0x0908 + uint32_t reserved_0x090c_0x0910[1]; // 0x090c to 0x0910 + volatile usb_dwc_dieptsiz0_reg_t dieptsiz0_reg; // 0x0910 + volatile usb_dwc_diepdma0_reg_t diepdma0_reg; // 0x0914 + volatile usb_dwc_dtxfsts0_reg_t dtxfsts0_reg; // 0x0918 + volatile usb_dwc_diepdmab0_reg_t diepdmab0_reg; // 0x091c //Deivce: IN EP registers - usb_in_ep_regs_t in_eps[6]; //0x0920 to 0x09e0 - usb_in_ep_regs_t reserved_0x09e0_0x0b00[9]; //0x09e0 to 0x0b00 + usb_dwc_in_ep_regs_t in_eps[6]; // 0x0920 to 0x09e0 + usb_dwc_in_ep_regs_t reserved_0x09e0_0x0b00[9]; // 0x09e0 to 0x0b00 //Device: OUT EP0 reigsters - volatile usb_doepctl0_reg_t doepctl0_reg; //0x0b00 - uint32_t reserved_0x0b04_0x0b08[1]; //0x0b04 to 0x0b08 - volatile usb_doepint0_reg_t doepint0_reg; //0b0b08 - uint32_t reserved_0x0b0c_0x0b10[1]; //0x0b0c to 0x0b10 - volatile usb_doeptsiz0_reg_t doeptsiz0_reg; //0x0b10 - volatile usb_doepdma0_reg_t doepdma0_reg; //0x0b14 - uint32_t reserved_0x0b18_0x0b1c[1]; //0x0b18 to 0x0b1c - volatile usb_doepdmab0_reg_t doepdmab0_reg; //0x0b1c + volatile usb_dwc_doepctl0_reg_t doepctl0_reg; // 0x0b00 + uint32_t reserved_0x0b04_0x0b08[1]; // 0x0b04 to 0x0b08 + volatile usb_dwc_doepint0_reg_t doepint0_reg; // 0b0b08 + uint32_t reserved_0x0b0c_0x0b10[1]; // 0x0b0c to 0x0b10 + volatile usb_dwc_doeptsiz0_reg_t doeptsiz0_reg; // 0x0b10 + volatile usb_dwc_doepdma0_reg_t doepdma0_reg; // 0x0b14 + uint32_t reserved_0x0b18_0x0b1c[1]; // 0x0b18 to 0x0b1c + volatile usb_dwc_doepdmab0_reg_t doepdmab0_reg; // 0x0b1c //Deivce: OUT EP registers - usb_out_ep_regs_t out_eps[6]; //0xb1c - usb_out_ep_regs_t reserved_0x0be0_0x0d00[9]; //0x0be0 to 0x0d00 - uint32_t reserved_0x0d00_0x0e00[64]; //0x0d00 to 0x0e00 - volatile usb_pcgcctl_reg_t pcgcctl_reg; //0x0e00 - uint32_t reserved_0x0e04_0x0e08[1]; //0x0d00 to 0x0e00 -} usbh_dev_t; + usb_dwc_out_ep_regs_t out_eps[6]; // 0xb1c + usb_dwc_out_ep_regs_t reserved_0x0be0_0x0d00[9]; // 0x0be0 to 0x0d00 + uint32_t reserved_0x0d00_0x0e00[64]; // 0x0d00 to 0x0e00 + volatile usb_dwc_pcgcctl_reg_t pcgcctl_reg; // 0x0e00 + uint32_t reserved_0x0e04_0x0e08[1]; // 0x0d00 to 0x0e00 +} usb_dwc_dev_t; -_Static_assert(sizeof(usbh_dev_t) == 0xe08, "USB new struct should be 0xe08 large"); +#ifndef __cplusplus +_Static_assert(sizeof(usb_dwc_dev_t) == 0xe08, "Invalid size of usb_dwc_dev_t structure"); +#endif -extern usbh_dev_t USBH; +extern usb_dwc_dev_t USB_DWC; #ifdef __cplusplus diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usb_wrap_struct.h b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usb_wrap_struct.h index c196743ec03..1b891797748 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usb_wrap_struct.h +++ b/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usb_wrap_struct.h @@ -433,7 +433,9 @@ typedef struct { volatile usb_wrap_date_reg_t date; } usb_wrap_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(usb_wrap_dev_t)==0x400, "Invalid USB_WRAP size"); +#endif extern usb_wrap_dev_t USB_WRAP; diff --git a/tools/sdk/esp32s2/include/soc/include/soc/efuse_periph.h b/tools/sdk/esp32s2/include/soc/include/soc/efuse_periph.h index 76a118e3b68..a7fc65042c6 100644 --- a/tools/sdk/esp32s2/include/soc/include/soc/efuse_periph.h +++ b/tools/sdk/esp32s2/include/soc/include/soc/efuse_periph.h @@ -14,3 +14,4 @@ #pragma once #include "soc/efuse_reg.h" +#include "soc/efuse_struct.h" diff --git a/tools/sdk/esp32s2/include/spi_flash/include/esp_flash.h b/tools/sdk/esp32s2/include/spi_flash/include/esp_flash.h index c5adb279dcd..3529898bce6 100644 --- a/tools/sdk/esp32s2/include/spi_flash/include/esp_flash.h +++ b/tools/sdk/esp32s2/include/spi_flash/include/esp_flash.h @@ -103,7 +103,8 @@ struct esp_flash_t { uint32_t size; ///< Size of SPI flash in bytes. If 0, size will be detected during initialisation. uint32_t chip_id; ///< Detected chip id. uint32_t busy :1; ///< This flag is used to verify chip's status. - uint32_t reserved_flags :31; ///< reserved. + uint32_t hpm_dummy_ena :1; ///< This flag is used to verify whether flash works under HPM status. + uint32_t reserved_flags :30; ///< reserved. }; diff --git a/tools/sdk/esp32s2/include/spi_flash/include/esp_private/spi_flash_os.h b/tools/sdk/esp32s2/include/spi_flash/include/esp_private/spi_flash_os.h index 996606dbcee..f2a89112eb6 100644 --- a/tools/sdk/esp32s2/include/spi_flash/include/esp_private/spi_flash_os.h +++ b/tools/sdk/esp32s2/include/spi_flash/include/esp_private/spi_flash_os.h @@ -35,6 +35,7 @@ #include "esp_flash.h" #include "hal/spi_flash_hal.h" #include "soc/soc_caps.h" +#include "spi_flash_override.h" #ifdef __cplusplus extern "C" { @@ -138,6 +139,28 @@ bool spi_timing_is_tuned(void); */ void spi_flash_set_vendor_required_regs(void); +/** + * @brief Enable SPI flash high performance mode. + * + * @return ESP_OK if success. + */ +esp_err_t spi_flash_enable_high_performance_mode(void); + +/** + * @brief Get the flash dummy through this function + * This can be used when one flash has several dummy configurations to enable the high performance mode. + * @note Don't forget to subtract one when assign to the register of mspi e.g. if the value you get is 4, (4-1=3) should be assigned to the register. + * + * @return Pointer to spi_flash_hpm_dummy_conf_t. + */ +const spi_flash_hpm_dummy_conf_t *spi_flash_hpm_get_dummy(void); + +/** + * @brief Used to judge whether flash works under HPM mode with dummy adjustment. + * + * @return true Yes, and work under HPM with adjusting dummy. Otherwise, false. + */ +bool spi_flash_hpm_dummy_adjust(void); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/spi_flash/include/spi_flash/spi_flash_defs.h b/tools/sdk/esp32s2/include/spi_flash/include/spi_flash/spi_flash_defs.h index 1ff0bfdea5c..b248b24dcde 100644 --- a/tools/sdk/esp32s2/include/spi_flash/include/spi_flash/spi_flash_defs.h +++ b/tools/sdk/esp32s2/include/spi_flash/include/spi_flash/spi_flash_defs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2019 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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once @@ -52,6 +44,7 @@ #define CMD_PROGRAM_PAGE_4B 0x12 #define CMD_SUSPEND 0x75 #define CMD_RESUME 0x7A +#define CMD_HPMEN 0xA3 /* Enable High Performance mode on flash */ #define CMD_RST_EN 0x66 #define CMD_RST_DEV 0x99 @@ -72,3 +65,5 @@ #define SPI_FLASH_OPISTR_DUMMY_BITLEN 20 #define SPI_FLASH_OPIDTR_ADDR_BITLEN 32 #define SPI_FLASH_OPIDTR_DUMMY_BITLEN 40 +#define SPI_FLASH_QIO_HPM_DUMMY_BITLEN 10 +#define SPI_FLASH_DIO_HPM_DUMMY_BITLEN 8 diff --git a/tools/sdk/esp32s2/include/spi_flash/include/spi_flash_override.h b/tools/sdk/esp32s2/include/spi_flash/include/spi_flash_override.h new file mode 100644 index 00000000000..7f01576deed --- /dev/null +++ b/tools/sdk/esp32s2/include/spi_flash/include/spi_flash_override.h @@ -0,0 +1,62 @@ +/* + * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "sdkconfig.h" +#include "esp_err.h" + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Structure for flash dummy bits. + * For some flash chips, dummy bits are configurable under different conditions. + */ +typedef struct { + uint8_t dio_dummy; + uint8_t dout_dummy; + uint8_t qio_dummy; + uint8_t qout_dummy; + uint8_t fastrd_dummy; +} spi_flash_hpm_dummy_conf_t; + +typedef enum { + SPI_FLASH_HPM_CMD_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by command. + SPI_FLASH_HPM_DUMMY_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by adjusting dummy. + SPI_FLASH_HPM_WRITE_SR_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by writing status register. + SPI_FLASH_HPM_UNNEEDED, // Means that flash doesn't need to enter the high performance mode. + SPI_FLASH_HPM_BEYOND_LIMIT, // Means that flash has no capability to meet that condition. +} spi_flash_requirement_t; + +typedef void (*spi_flash_hpm_enable_fn_t)(void); +typedef esp_err_t (*spi_flash_hpf_check_fn_t)(void); +typedef void (*spi_flash_get_chip_dummy_fn_t)(spi_flash_hpm_dummy_conf_t *dummy_conf); +typedef esp_err_t (*spi_flash_hpm_probe_fn_t)(uint32_t flash_id); +typedef spi_flash_requirement_t (*spi_flash_hpm_chip_requirement_check_t)(uint32_t flash_id, uint32_t freq_mhz, int voltage_mv, int temperature); + +typedef struct __attribute__((packed)) +{ + const char *method; /* Flash HPM method */ + spi_flash_hpm_probe_fn_t probe; + spi_flash_hpm_chip_requirement_check_t chip_hpm_requirement_check; + spi_flash_hpm_enable_fn_t flash_hpm_enable; + spi_flash_hpf_check_fn_t flash_hpf_check; + spi_flash_get_chip_dummy_fn_t flash_get_dummy; +} spi_flash_hpm_info_t; + +/** + * Array of known flash chips and method to enable flash high performance mode. + * + * Users can override this array. + */ +extern const spi_flash_hpm_info_t __attribute__((weak)) spi_flash_hpm_enable_list[]; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s2/include/spiffs/include/spiffs_config.h b/tools/sdk/esp32s2/include/spiffs/include/spiffs_config.h index 5cc3d78049c..5e915039215 100644 --- a/tools/sdk/esp32s2/include/spiffs/include/spiffs_config.h +++ b/tools/sdk/esp32s2/include/spiffs/include/spiffs_config.h @@ -20,6 +20,7 @@ #include #include #include +#include "esp_assert.h" // compile time switches #define SPIFFS_TAG "SPIFFS" @@ -161,7 +162,7 @@ extern void spiffs_api_unlock(struct spiffs_t *fs); // spiffs_object_ix_header fields + at least some LUT entries) #define SPIFFS_OBJ_META_LEN (CONFIG_SPIFFS_META_LENGTH) #define SPIFFS_PAGE_EXTRA_SIZE (64) -_Static_assert(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE +ESP_STATIC_ASSERT(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE <= CONFIG_SPIFFS_PAGE_SIZE, "SPIFFS_OBJ_META_LEN or SPIFFS_OBJ_NAME_LEN too long"); // Size of buffer allocated on stack used when copying data. diff --git a/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h b/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h index 583c77c383c..bd104013dc8 100644 --- a/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h +++ b/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h @@ -16,6 +16,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -289,7 +290,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h b/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h index 184c7c2a203..e55c162a64a 100644 --- a/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h +++ b/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h @@ -8,6 +8,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -265,7 +266,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32s2/include/ulp/include/esp32s3/ulp.h b/tools/sdk/esp32s2/include/ulp/include/esp32s3/ulp.h index 8adbb2ebcfe..e1e50880740 100644 --- a/tools/sdk/esp32s2/include/ulp/include/esp32s3/ulp.h +++ b/tools/sdk/esp32s2/include/ulp/include/esp32s3/ulp.h @@ -8,6 +8,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -265,7 +266,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32s2/include/usb/include/usb/usb_types_ch9.h b/tools/sdk/esp32s2/include/usb/include/usb/usb_types_ch9.h index 177fc15bf90..69886c74269 100644 --- a/tools/sdk/esp32s2/include/usb/include/usb/usb_types_ch9.h +++ b/tools/sdk/esp32s2/include/usb/include/usb/usb_types_ch9.h @@ -11,6 +11,7 @@ Warning: The USB Host Library API is still a beta version and may be subject to #pragma once #include +#include "esp_assert.h" #ifdef __cplusplus extern "C" @@ -98,7 +99,7 @@ typedef union { } __attribute__((packed)); uint8_t val[USB_SETUP_PACKET_SIZE]; /**< Descriptor value */ } usb_setup_packet_t; -_Static_assert(sizeof(usb_setup_packet_t) == USB_SETUP_PACKET_SIZE, "Size of usb_setup_packet_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_setup_packet_t) == USB_SETUP_PACKET_SIZE, "Size of usb_setup_packet_t incorrect"); /** * @brief Bit masks belonging to the bmRequestType field of a setup packet @@ -244,7 +245,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_STANDARD_DESC_SIZE]; /**< Descriptor value */ } usb_standard_desc_t; -_Static_assert(sizeof(usb_standard_desc_t) == USB_STANDARD_DESC_SIZE, "Size of usb_standard_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_standard_desc_t) == USB_STANDARD_DESC_SIZE, "Size of usb_standard_desc_t incorrect"); // ------------------ Device Descriptor -------------------- @@ -277,7 +278,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_DEVICE_DESC_SIZE]; /**< Descriptor value */ } usb_device_desc_t; -_Static_assert(sizeof(usb_device_desc_t) == USB_DEVICE_DESC_SIZE, "Size of usb_device_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_device_desc_t) == USB_DEVICE_DESC_SIZE, "Size of usb_device_desc_t incorrect"); /** * @brief Possible base class values of the bDeviceClass field of a USB device descriptor @@ -340,7 +341,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_CONFIG_DESC_SIZE]; /**< Descriptor value */ } usb_config_desc_t; -_Static_assert(sizeof(usb_config_desc_t) == USB_CONFIG_DESC_SIZE, "Size of usb_config_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_config_desc_t) == USB_CONFIG_DESC_SIZE, "Size of usb_config_desc_t incorrect"); /** * @brief Bit masks belonging to the bmAttributes field of a configuration descriptor @@ -373,7 +374,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_IAD_DESC_SIZE]; /**< Descriptor value */ } usb_iad_desc_t; -_Static_assert(sizeof(usb_iad_desc_t) == USB_IAD_DESC_SIZE, "Size of usb_iad_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_iad_desc_t) == USB_IAD_DESC_SIZE, "Size of usb_iad_desc_t incorrect"); // ---------------- Interface Descriptor ------------------- @@ -401,7 +402,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_INTF_DESC_SIZE]; /**< Descriptor value */ } usb_intf_desc_t; -_Static_assert(sizeof(usb_intf_desc_t) == USB_INTF_DESC_SIZE, "Size of usb_intf_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_intf_desc_t) == USB_INTF_DESC_SIZE, "Size of usb_intf_desc_t incorrect"); // ----------------- Endpoint Descriptor ------------------- @@ -426,7 +427,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_EP_DESC_SIZE]; /**< Descriptor value */ } usb_ep_desc_t; -_Static_assert(sizeof(usb_ep_desc_t) == USB_EP_DESC_SIZE, "Size of usb_ep_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_ep_desc_t) == USB_EP_DESC_SIZE, "Size of usb_ep_desc_t incorrect"); /** * @brief Bit masks belonging to the bEndpointAddress field of an endpoint descriptor @@ -478,7 +479,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_STR_DESC_SIZE]; /**< Descriptor value */ } usb_str_desc_t; -_Static_assert(sizeof(usb_str_desc_t) == USB_STR_DESC_SIZE, "Size of usb_str_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_str_desc_t) == USB_STR_DESC_SIZE, "Size of usb_str_desc_t incorrect"); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/xtensa/include/xt_instr_macros.h b/tools/sdk/esp32s2/include/xtensa/include/xt_instr_macros.h index efcdbd4a78c..e3a11990208 100644 --- a/tools/sdk/esp32s2/include/xtensa/include/xt_instr_macros.h +++ b/tools/sdk/esp32s2/include/xtensa/include/xt_instr_macros.h @@ -84,11 +84,11 @@ do { \ uint32_t sp = (uint32_t)new_sp - SAVE_AREA_OFFSET; \ *(uint32_t*)(sp - BASE_AREA_SP_OFFSET) = (uint32_t)new_sp; \ + const uint32_t mask = ~(PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK); \ uint32_t tmp1 = 0, tmp2 = 0; \ asm volatile ( \ "rsr.ps %1 \n"\ - "movi %2, ~" XTSTR( PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK ) " \n"\ - "and %1, %1, %2 \n"\ + "and %1, %1, %3 \n"\ "wsr.ps %1 \n"\ "rsync \n"\ " \n"\ @@ -99,6 +99,7 @@ "wsr.windowstart %1 \n"\ "rsync \n"\ " \n"\ + "movi a0, 0\n" \ "mov sp, %0 \n"\ "rsr.ps %1 \n"\ " \n"\ @@ -107,6 +108,6 @@ "or %1, %1, %2 \n"\ "wsr.ps %1 \n"\ "rsync \n"\ - : "+r"(sp), "+r"(tmp1), "+r"(tmp2)); \ + : "+r"(sp), "+r"(tmp1), "+r"(tmp2) : "r"(mask)); \ } while (0); #endif // __ASSEMBLER__ diff --git a/tools/sdk/esp32s2/ld/esp32s2.peripherals.ld b/tools/sdk/esp32s2/ld/esp32s2.peripherals.ld index bd1d00c5b70..2332930a7e4 100644 --- a/tools/sdk/esp32s2/ld/esp32s2.peripherals.ld +++ b/tools/sdk/esp32s2/ld/esp32s2.peripherals.ld @@ -22,6 +22,7 @@ PROVIDE ( RMTMEM = 0x3f416400 ); PROVIDE ( PCNT = 0x3f417000 ); PROVIDE ( SLC = 0x3f418000 ); PROVIDE ( LEDC = 0x3f419000 ); +PROVIDE ( EFUSE = 0x3f41A000 ); PROVIDE ( CP_DMA = 0x3f4c3000 ); PROVIDE ( TIMERG0 = 0x3f41F000 ); PROVIDE ( TIMERG1 = 0x3f420000 ); @@ -34,5 +35,5 @@ PROVIDE ( TWAI = 0x3f42B000 ); PROVIDE ( APB_SARADC = 0x3f440000 ); PROVIDE ( DEDIC_GPIO = 0x3f4cf000 ); PROVIDE ( USB0 = 0x60080000 ); -PROVIDE ( USBH = 0x60080000 ); +PROVIDE ( USB_DWC = 0x60080000 ); PROVIDE ( USB_WRAP = 0x3f439000 ); diff --git a/tools/sdk/esp32s2/ld/sections.ld b/tools/sdk/esp32s2/ld/sections.ld index cd01f961cb2..a6a8ee39319 100644 --- a/tools/sdk/esp32s2/ld/sections.ld +++ b/tools/sdk/esp32s2/ld/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32s2/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32s2/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -220,9 +220,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -258,7 +293,6 @@ SECTIONS /* iram_end_test section exists for use by memprot unit tests only */ *(.iram_end_test) _iram_text_end = ABSOLUTE(.); - _iram_end = ABSOLUTE(.); } > iram0_0_seg .dram0_reserved_for_iram (NOLOAD): @@ -288,10 +322,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -313,13 +349,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -371,22 +405,40 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.ext_ram.bss*) - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -422,8 +474,8 @@ SECTIONS { _flash_rodata_start = ABSOLUTE(.); + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata.*) *(.rodata_wlog_error .rodata_wlog_error.*) - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:regi2c_ctrl.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) @@ -508,6 +560,9 @@ SECTIONS *libesp_system.a:esp_system.*(.literal.esp_get_free_heap_size .literal.esp_get_free_internal_heap_size .literal.esp_get_idf_version .literal.esp_get_minimum_free_heap_size .literal.esp_register_shutdown_handler .literal.esp_unregister_shutdown_handler .text .text.esp_get_free_heap_size .text.esp_get_free_internal_heap_size .text.esp_get_idf_version .text.esp_get_minimum_free_heap_size .text.esp_register_shutdown_handler .text.esp_unregister_shutdown_handler) *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) diff --git a/tools/sdk/esp32s2/lib/libapp_trace.a b/tools/sdk/esp32s2/lib/libapp_trace.a index 8a8a93f0ebf..b45a5cb53f3 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 379574751f0..6187cc455b3 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 bcaac7c4834..04aa11892f7 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/libasio.a b/tools/sdk/esp32s2/lib/libasio.a index c20ac0cd948..e2524e1b01a 100644 Binary files a/tools/sdk/esp32s2/lib/libasio.a and b/tools/sdk/esp32s2/lib/libasio.a differ diff --git a/tools/sdk/esp32s2/lib/libbootloader_support.a b/tools/sdk/esp32s2/lib/libbootloader_support.a index 5699ca0dd50..70c44dc1341 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/libcbor.a b/tools/sdk/esp32s2/lib/libcbor.a index f11a06aa91e..c00f36282ae 100644 Binary files a/tools/sdk/esp32s2/lib/libcbor.a and b/tools/sdk/esp32s2/lib/libcbor.a differ diff --git a/tools/sdk/esp32s2/lib/libcmock.a b/tools/sdk/esp32s2/lib/libcmock.a index f1069f61586..6045911e870 100644 Binary files a/tools/sdk/esp32s2/lib/libcmock.a and b/tools/sdk/esp32s2/lib/libcmock.a differ diff --git a/tools/sdk/esp32s2/lib/libcoap.a b/tools/sdk/esp32s2/lib/libcoap.a index b75b974115d..41a486bf50d 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 3e097be5361..748dc7bb389 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/libconsole.a b/tools/sdk/esp32s2/lib/libconsole.a index f60da9e2737..a586849ce35 100644 Binary files a/tools/sdk/esp32s2/lib/libconsole.a and b/tools/sdk/esp32s2/lib/libconsole.a differ diff --git a/tools/sdk/esp32s2/lib/libcore.a b/tools/sdk/esp32s2/lib/libcore.a index f2158fca976..b6318bdb837 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 9e64029eadb..4ecd3809beb 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 1a5e1d1a070..2f55389cdb6 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 2da416e37f0..2839f675de4 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 1ce1e3b554e..e8a7c0273cc 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 1e7e901b3cf..722d1761475 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_adc_cal.a b/tools/sdk/esp32s2/lib/libesp_adc_cal.a index ed9cbedbf11..555c2ea62c4 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_adc_cal.a and b/tools/sdk/esp32s2/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_common.a b/tools/sdk/esp32s2/lib/libesp_common.a index ed3c4f94c1b..577843d1a03 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_diagnostics.a b/tools/sdk/esp32s2/lib/libesp_diagnostics.a index 5fb9975d2d1..1a96016bf18 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_diagnostics.a and b/tools/sdk/esp32s2/lib/libesp_diagnostics.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_eth.a b/tools/sdk/esp32s2/lib/libesp_eth.a index 37f0d9c0fb9..7ad1804b84a 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 62c9ee26b07..e212d48f6e0 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_gdbstub.a b/tools/sdk/esp32s2/lib/libesp_gdbstub.a index 5c4261384cc..b67f538dc6c 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_gdbstub.a and b/tools/sdk/esp32s2/lib/libesp_gdbstub.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_hid.a b/tools/sdk/esp32s2/lib/libesp_hid.a index 480d644e859..fb9573ae5fc 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 c0e94be57c7..cd71e15abb4 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 1ceeb27baaf..de823d3574a 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 ca9fe326157..4a906864d72 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 f0227b459d0..1d213ce8db4 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 c5bf9e59282..777ba9cb80a 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_insights.a b/tools/sdk/esp32s2/lib/libesp_insights.a index 18990409aca..7b423aa8cd5 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_insights.a and b/tools/sdk/esp32s2/lib/libesp_insights.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_ipc.a b/tools/sdk/esp32s2/lib/libesp_ipc.a index 65a02f0174e..d34eb5939fd 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_ipc.a and b/tools/sdk/esp32s2/lib/libesp_ipc.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_lcd.a b/tools/sdk/esp32s2/lib/libesp_lcd.a index 05806487f1f..ad376db80b9 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 f658ee8537c..19d7d26ecbd 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 819669bd8f3..7cb7e2656be 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 2ab2a78f44c..21dca5f57f0 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 c39967bdf3d..87f121541f5 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 7dcf525bf0a..650b3754dba 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_rainmaker.a b/tools/sdk/esp32s2/lib/libesp_rainmaker.a index 08e1bc239aa..fb3be20528e 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_rainmaker.a and b/tools/sdk/esp32s2/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_ringbuf.a b/tools/sdk/esp32s2/lib/libesp_ringbuf.a index 7b258d9617f..80ea39218e4 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_rom.a b/tools/sdk/esp32s2/lib/libesp_rom.a index 070c403908c..57250278b6f 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_rom.a and b/tools/sdk/esp32s2/lib/libesp_rom.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_schedule.a b/tools/sdk/esp32s2/lib/libesp_schedule.a index 5deb7ee03a5..9285f883e88 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_schedule.a and b/tools/sdk/esp32s2/lib/libesp_schedule.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 72894ead6e7..d3cfa8a2537 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 8e5aa59eca6..2940b811848 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 3e6f6383f33..47099a049ac 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 03959d18a15..39f35dd569f 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 45a670214fc..e192f8ebd0f 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 092eab72be7..84b78de0c3c 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 8dd1715f7c3..99016d8f5e1 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/libesp-dsp.a b/tools/sdk/esp32s2/lib/libespressif__esp-dsp.a similarity index 56% rename from tools/sdk/esp32s2/lib/libesp-dsp.a rename to tools/sdk/esp32s2/lib/libespressif__esp-dsp.a index e49080ec3c7..53569a8d702 100644 Binary files a/tools/sdk/esp32s2/lib/libesp-dsp.a and b/tools/sdk/esp32s2/lib/libespressif__esp-dsp.a differ diff --git a/tools/sdk/esp32s2/lib/libexpat.a b/tools/sdk/esp32s2/lib/libexpat.a index 239fe5b2a42..ede3ac3c61b 100644 Binary files a/tools/sdk/esp32s2/lib/libexpat.a and b/tools/sdk/esp32s2/lib/libexpat.a differ diff --git a/tools/sdk/esp32s2/lib/libfatfs.a b/tools/sdk/esp32s2/lib/libfatfs.a index ad2c43d10fa..8a2ad4f0417 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/libfb_gfx.a b/tools/sdk/esp32s2/lib/libfb_gfx.a index a440b4478af..ed41442f4a3 100644 Binary files a/tools/sdk/esp32s2/lib/libfb_gfx.a and b/tools/sdk/esp32s2/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32s2/lib/libfreemodbus.a b/tools/sdk/esp32s2/lib/libfreemodbus.a index faefdc3f73a..80cfc632ec3 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 a47cdb21797..077f7db6835 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/libgpio_button.a b/tools/sdk/esp32s2/lib/libgpio_button.a index bddfead5944..53a5247146b 100644 Binary files a/tools/sdk/esp32s2/lib/libgpio_button.a and b/tools/sdk/esp32s2/lib/libgpio_button.a differ diff --git a/tools/sdk/esp32s2/lib/libhal.a b/tools/sdk/esp32s2/lib/libhal.a index fc6ffb188e9..d0c28bd2e2b 100644 Binary files a/tools/sdk/esp32s2/lib/libhal.a and b/tools/sdk/esp32s2/lib/libhal.a differ diff --git a/tools/sdk/esp32s2/lib/libheap.a b/tools/sdk/esp32s2/lib/libheap.a index 36cb97993b3..f6e16b776fa 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/libjsmn.a b/tools/sdk/esp32s2/lib/libjsmn.a index 998faad966d..57e4ae8e6c6 100644 Binary files a/tools/sdk/esp32s2/lib/libjsmn.a and b/tools/sdk/esp32s2/lib/libjsmn.a differ diff --git a/tools/sdk/esp32s2/lib/libjson.a b/tools/sdk/esp32s2/lib/libjson.a index 15c4476cb59..dfdf0d13575 100644 Binary files a/tools/sdk/esp32s2/lib/libjson.a and b/tools/sdk/esp32s2/lib/libjson.a differ diff --git a/tools/sdk/esp32s2/lib/libjson_generator.a b/tools/sdk/esp32s2/lib/libjson_generator.a index b4bce72a33b..1cfd0988a6a 100644 Binary files a/tools/sdk/esp32s2/lib/libjson_generator.a and b/tools/sdk/esp32s2/lib/libjson_generator.a differ diff --git a/tools/sdk/esp32s2/lib/libjson_parser.a b/tools/sdk/esp32s2/lib/libjson_parser.a index c7af283fb15..dd5b06ae8a1 100644 Binary files a/tools/sdk/esp32s2/lib/libjson_parser.a and b/tools/sdk/esp32s2/lib/libjson_parser.a differ diff --git a/tools/sdk/esp32s2/lib/liblibsodium.a b/tools/sdk/esp32s2/lib/liblibsodium.a index 0e4864f52ae..638b95f9962 100644 Binary files a/tools/sdk/esp32s2/lib/liblibsodium.a and b/tools/sdk/esp32s2/lib/liblibsodium.a differ diff --git a/tools/sdk/esp32s2/lib/liblog.a b/tools/sdk/esp32s2/lib/liblog.a index 4a6a7891b10..7fa23e7753d 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 d11d38cb038..1ef8e3e21d8 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 9205eefbe6b..8ee7eed52f5 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/libmbedtls.a b/tools/sdk/esp32s2/lib/libmbedtls.a index e4499bea077..aeb65f1806c 100644 Binary files a/tools/sdk/esp32s2/lib/libmbedtls.a and b/tools/sdk/esp32s2/lib/libmbedtls.a differ diff --git a/tools/sdk/esp32s2/lib/libmbedtls_2.a b/tools/sdk/esp32s2/lib/libmbedtls_2.a index de924aaf5ec..efbb4402822 100644 Binary files a/tools/sdk/esp32s2/lib/libmbedtls_2.a and b/tools/sdk/esp32s2/lib/libmbedtls_2.a differ diff --git a/tools/sdk/esp32s2/lib/libmbedx509.a b/tools/sdk/esp32s2/lib/libmbedx509.a index 3ba706715ad..2f0bb556b02 100644 Binary files a/tools/sdk/esp32s2/lib/libmbedx509.a and b/tools/sdk/esp32s2/lib/libmbedx509.a differ diff --git a/tools/sdk/esp32s2/lib/libmdns.a b/tools/sdk/esp32s2/lib/libmdns.a index be050843f71..6f6dbab3a20 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 ea112202b5a..52dd6799fa8 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 b7cd8d51c39..ba9af1eb74d 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 93afd56962a..27902b5f0d6 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 a194825cc85..82236086d84 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/libnghttp.a b/tools/sdk/esp32s2/lib/libnghttp.a index 8ea04df26cf..1d663d2332c 100644 Binary files a/tools/sdk/esp32s2/lib/libnghttp.a and b/tools/sdk/esp32s2/lib/libnghttp.a differ diff --git a/tools/sdk/esp32s2/lib/libnvs_flash.a b/tools/sdk/esp32s2/lib/libnvs_flash.a index 06c41a29d0f..57526e317e7 100644 Binary files a/tools/sdk/esp32s2/lib/libnvs_flash.a and b/tools/sdk/esp32s2/lib/libnvs_flash.a differ diff --git a/tools/sdk/esp32s2/lib/libopenssl.a b/tools/sdk/esp32s2/lib/libopenssl.a index 4800b5b3192..ae6a409a39f 100644 Binary files a/tools/sdk/esp32s2/lib/libopenssl.a and b/tools/sdk/esp32s2/lib/libopenssl.a differ diff --git a/tools/sdk/esp32s2/lib/libperfmon.a b/tools/sdk/esp32s2/lib/libperfmon.a index d18b95f0f97..eee84ef74be 100644 Binary files a/tools/sdk/esp32s2/lib/libperfmon.a and b/tools/sdk/esp32s2/lib/libperfmon.a differ diff --git a/tools/sdk/esp32s2/lib/libpp.a b/tools/sdk/esp32s2/lib/libpp.a index ded11007341..53a23f9ab33 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/libprotobuf-c.a b/tools/sdk/esp32s2/lib/libprotobuf-c.a index e110babc6bf..7c884cf5004 100644 Binary files a/tools/sdk/esp32s2/lib/libprotobuf-c.a and b/tools/sdk/esp32s2/lib/libprotobuf-c.a differ diff --git a/tools/sdk/esp32s2/lib/libprotocomm.a b/tools/sdk/esp32s2/lib/libprotocomm.a index b0571b63ccb..8bdc13b4de6 100644 Binary files a/tools/sdk/esp32s2/lib/libprotocomm.a and b/tools/sdk/esp32s2/lib/libprotocomm.a differ diff --git a/tools/sdk/esp32s2/lib/libpthread.a b/tools/sdk/esp32s2/lib/libpthread.a index 0d3f425da31..0577606b791 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/libqrcode.a b/tools/sdk/esp32s2/lib/libqrcode.a index 4160dc73763..416ee457031 100644 Binary files a/tools/sdk/esp32s2/lib/libqrcode.a and b/tools/sdk/esp32s2/lib/libqrcode.a differ diff --git a/tools/sdk/esp32s2/lib/librmaker_common.a b/tools/sdk/esp32s2/lib/librmaker_common.a index 9a2aafc94e7..c34893ad0ad 100644 Binary files a/tools/sdk/esp32s2/lib/librmaker_common.a and b/tools/sdk/esp32s2/lib/librmaker_common.a differ diff --git a/tools/sdk/esp32s2/lib/librtc_store.a b/tools/sdk/esp32s2/lib/librtc_store.a index e51ff550799..3bb4adbb821 100644 Binary files a/tools/sdk/esp32s2/lib/librtc_store.a and b/tools/sdk/esp32s2/lib/librtc_store.a differ diff --git a/tools/sdk/esp32s2/lib/libsdmmc.a b/tools/sdk/esp32s2/lib/libsdmmc.a index e95e0186ed5..0fdd029c26d 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 f8519690235..c9c0ff5b282 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/libsoc.a b/tools/sdk/esp32s2/lib/libsoc.a index 3860bb66a02..d1a8a7aee5a 100644 Binary files a/tools/sdk/esp32s2/lib/libsoc.a and b/tools/sdk/esp32s2/lib/libsoc.a differ diff --git a/tools/sdk/esp32s2/lib/libspiffs.a b/tools/sdk/esp32s2/lib/libspiffs.a index 08079418fb3..b1bd8d1104f 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 b15497270eb..3f055839370 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 caa6023c840..4a7a4c1f53e 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 8e38c82f79a..619fbb84b6c 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/libulp.a b/tools/sdk/esp32s2/lib/libulp.a index 59d47dde539..7565de2fcdc 100644 Binary files a/tools/sdk/esp32s2/lib/libulp.a and b/tools/sdk/esp32s2/lib/libulp.a differ diff --git a/tools/sdk/esp32s2/lib/libunity.a b/tools/sdk/esp32s2/lib/libunity.a index 6a667a71e8e..5c35bfe3eda 100644 Binary files a/tools/sdk/esp32s2/lib/libunity.a and b/tools/sdk/esp32s2/lib/libunity.a differ diff --git a/tools/sdk/esp32s2/lib/libusb.a b/tools/sdk/esp32s2/lib/libusb.a index 5ef889fb3c3..b1b6e814e56 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 c2f2fce83ae..776761db3c6 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 79ebe9d9ffd..082e0a19f16 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/libwear_levelling.a b/tools/sdk/esp32s2/lib/libwear_levelling.a index e6e332af9f4..ea5dcca6326 100644 Binary files a/tools/sdk/esp32s2/lib/libwear_levelling.a and b/tools/sdk/esp32s2/lib/libwear_levelling.a differ diff --git a/tools/sdk/esp32s2/lib/libwifi_provisioning.a b/tools/sdk/esp32s2/lib/libwifi_provisioning.a index 3e49eb731a4..a6d93ce3826 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 b69cbfef102..8d6e1a31e69 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/libws2812_led.a b/tools/sdk/esp32s2/lib/libws2812_led.a index ac338a1585d..f983ec1480b 100644 Binary files a/tools/sdk/esp32s2/lib/libws2812_led.a and b/tools/sdk/esp32s2/lib/libws2812_led.a differ diff --git a/tools/sdk/esp32s2/lib/libxtensa.a b/tools/sdk/esp32s2/lib/libxtensa.a index 8ac04cfb448..5c935e37e7f 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/qio_qspi/include/sdkconfig.h b/tools/sdk/esp32s2/qio_qspi/include/sdkconfig.h index af0742caa20..ff1cdfb6e4c 100644 --- a/tools/sdk/esp32s2/qio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s2/qio_qspi/include/sdkconfig.h @@ -152,8 +152,8 @@ #define CONFIG_ESP32S2_SPIRAM_SUPPORT 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 @@ -252,12 +252,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -287,10 +289,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 @@ -356,6 +354,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -510,7 +509,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -548,10 +546,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -580,14 +574,23 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32C3_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE #define CONFIG_ESP32C3_MEMPROT_FEATURE_LOCK CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK #define CONFIG_ESP32H2_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE @@ -598,14 +601,19 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -615,6 +623,7 @@ #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -627,16 +636,18 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -646,6 +657,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -673,5 +685,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s2/qio_qspi/libspi_flash.a b/tools/sdk/esp32s2/qio_qspi/libspi_flash.a index 94385332545..7cd59c13322 100644 Binary files a/tools/sdk/esp32s2/qio_qspi/libspi_flash.a and b/tools/sdk/esp32s2/qio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32s2/qout_qspi/include/sdkconfig.h b/tools/sdk/esp32s2/qout_qspi/include/sdkconfig.h index 16a4a8435fc..dc44b69321c 100644 --- a/tools/sdk/esp32s2/qout_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s2/qout_qspi/include/sdkconfig.h @@ -152,8 +152,8 @@ #define CONFIG_ESP32S2_SPIRAM_SUPPORT 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 @@ -252,12 +252,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -287,10 +289,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_UNICORE 1 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER 1 @@ -356,6 +354,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -510,7 +509,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -548,10 +546,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_ANSI 1 -#define CONFIG_DSP_OPTIMIZATION 0 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -580,14 +574,23 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_ANSI 1 +#define CONFIG_DSP_OPTIMIZATION 0 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32C3_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE #define CONFIG_ESP32C3_MEMPROT_FEATURE_LOCK CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK #define CONFIG_ESP32H2_MEMPROT_FEATURE CONFIG_ESP_SYSTEM_MEMPROT_FEATURE @@ -598,14 +601,19 @@ #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT @@ -615,6 +623,7 @@ #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -627,16 +636,18 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -646,6 +657,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -673,5 +685,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s2/qout_qspi/libspi_flash.a b/tools/sdk/esp32s2/qout_qspi/libspi_flash.a index b00771e6bec..d44647e859a 100644 Binary files a/tools/sdk/esp32s2/qout_qspi/libspi_flash.a and b/tools/sdk/esp32s2/qout_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32s2/sdkconfig b/tools/sdk/esp32s2/sdkconfig index 0f995ff37a9..7272a77e945 100644 --- a/tools/sdk/esp32s2/sdkconfig +++ b/tools/sdk/esp32s2/sdkconfig @@ -480,14 +480,8 @@ CONFIG_SPIRAM_TYPE_AUTO=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=-1 - -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set # CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY is not set @@ -771,6 +765,7 @@ CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT=y # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set +CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7 # end of Wi-Fi # @@ -785,6 +780,7 @@ CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y CONFIG_ESP_COREDUMP_CHECK_BOOT=y CONFIG_ESP_COREDUMP_ENABLE=y CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 +CONFIG_ESP_COREDUMP_STACK_SIZE=1024 # end of Core dump # @@ -851,11 +847,7 @@ CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 CONFIG_FMB_TIMER_PORT_ENABLED=y -CONFIG_FMB_TIMER_GROUP=0 -CONFIG_FMB_TIMER_INDEX=0 -CONFIG_FMB_MASTER_TIMER_GROUP=0 -CONFIG_FMB_MASTER_TIMER_INDEX=0 -# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# CONFIG_FMB_TIMER_USE_ISR_DISPATCH_METHOD is not set # end of Modbus configuration # @@ -1018,6 +1010,7 @@ CONFIG_LWIP_TCP_SYNMAXRTX=6 CONFIG_LWIP_TCP_MSS=1436 CONFIG_LWIP_TCP_TMR_INTERVAL=250 CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=20000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 CONFIG_LWIP_TCP_WND_DEFAULT=5744 CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 @@ -1454,7 +1447,7 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 -CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y +# CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION is not set # end of Wi-Fi Provisioning Manager # @@ -1546,21 +1539,6 @@ CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT=80 # CONFIG_RTC_STORE_OVERWRITE_NON_CRITICAL_DATA is not set # end of RTC Store -# -# DSP Library -# -CONFIG_DSP_ANSI=y -CONFIG_DSP_OPTIMIZATION=0 -# CONFIG_DSP_MAX_FFT_SIZE_512 is not set -# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set -# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set -CONFIG_DSP_MAX_FFT_SIZE_4096=y -# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set -# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set -# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set -CONFIG_DSP_MAX_FFT_SIZE=4096 -# end of DSP Library - # # Camera configuration # @@ -1609,6 +1587,21 @@ CONFIG_LITTLEFS_MTIME_USE_SECONDS=y # CONFIG_LITTLEFS_SPIFFS_COMPAT is not set # CONFIG_LITTLEFS_FLUSH_FILE_EVERY_WRITE is not set # end of LittleFS + +# +# DSP Library +# +CONFIG_DSP_ANSI=y +CONFIG_DSP_OPTIMIZATION=0 +# CONFIG_DSP_MAX_FFT_SIZE_512 is not set +# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set +# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set +CONFIG_DSP_MAX_FFT_SIZE_4096=y +# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set +# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set +# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set +CONFIG_DSP_MAX_FFT_SIZE=4096 +# end of DSP Library # end of Component config # @@ -1670,6 +1663,8 @@ CONFIG_WARN_WRITE_STRINGS=y CONFIG_ESP32_APPTRACE_DEST_NONE=y CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y CONFIG_ADC2_DISABLE_DAC=y +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 # CONFIG_EVENT_LOOP_PROFILING is not set CONFIG_POST_EVENTS_FROM_ISR=y CONFIG_POST_EVENTS_FROM_IRAM_ISR=y @@ -1712,6 +1707,7 @@ CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y CONFIG_ESP32_ENABLE_COREDUMP=y CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 +CONFIG_ESP32_CORE_DUMP_STACK_SIZE=1024 CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 CONFIG_MB_QUEUE_LENGTH=20 @@ -1724,8 +1720,6 @@ CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_MB_CONTROLLER_STACK_SIZE=4096 CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 CONFIG_MB_TIMER_PORT_ENABLED=y -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048 diff --git a/tools/sdk/esp32s3/bin/bootloader_dio_80m.elf b/tools/sdk/esp32s3/bin/bootloader_dio_80m.elf index 1227dbed74e..1976f0f29a3 100755 Binary files a/tools/sdk/esp32s3/bin/bootloader_dio_80m.elf and b/tools/sdk/esp32s3/bin/bootloader_dio_80m.elf differ diff --git a/tools/sdk/esp32s3/bin/bootloader_opi_80m.elf b/tools/sdk/esp32s3/bin/bootloader_opi_80m.elf index 3a5f7799bdc..93f61ec9a96 100755 Binary files a/tools/sdk/esp32s3/bin/bootloader_opi_80m.elf and b/tools/sdk/esp32s3/bin/bootloader_opi_80m.elf differ diff --git a/tools/sdk/esp32s3/bin/bootloader_qio_120m.elf b/tools/sdk/esp32s3/bin/bootloader_qio_120m.elf index 1af69b0ac83..750fd24b589 100755 Binary files a/tools/sdk/esp32s3/bin/bootloader_qio_120m.elf and b/tools/sdk/esp32s3/bin/bootloader_qio_120m.elf differ diff --git a/tools/sdk/esp32s3/bin/bootloader_qio_80m.elf b/tools/sdk/esp32s3/bin/bootloader_qio_80m.elf index 1af69b0ac83..2f8b4d40c63 100755 Binary files a/tools/sdk/esp32s3/bin/bootloader_qio_80m.elf and b/tools/sdk/esp32s3/bin/bootloader_qio_80m.elf differ diff --git a/tools/sdk/esp32s3/dio_opi/include/sdkconfig.h b/tools/sdk/esp32s3/dio_opi/include/sdkconfig.h index 4ffaa46695c..77d98b81bd0 100644 --- a/tools/sdk/esp32s3/dio_opi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/dio_opi/include/sdkconfig.h @@ -561,8 +561,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -570,6 +570,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF 0 #define CONFIG_BT_CTRL_SLEEP_MODE_EFF 0 @@ -583,9 +584,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -696,8 +699,8 @@ #define CONFIG_SPIRAM_MODE_OCT 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_BOOT_INIT 1 @@ -804,12 +807,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -840,10 +845,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 #define CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1 1 @@ -907,6 +908,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -1062,8 +1064,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -1101,11 +1101,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -1134,61 +1129,95 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_DIO CONFIG_ESPTOOLPY_FLASHMODE_DIO +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -1201,22 +1230,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -1228,6 +1265,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -1255,5 +1293,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/dio_opi/libbootloader_support.a b/tools/sdk/esp32s3/dio_opi/libbootloader_support.a index 1e22e6881c8..006fb5f3b02 100644 Binary files a/tools/sdk/esp32s3/dio_opi/libbootloader_support.a and b/tools/sdk/esp32s3/dio_opi/libbootloader_support.a differ diff --git a/tools/sdk/esp32s3/dio_opi/libesp_hw_support.a b/tools/sdk/esp32s3/dio_opi/libesp_hw_support.a index 559b13977d8..64d32de9344 100644 Binary files a/tools/sdk/esp32s3/dio_opi/libesp_hw_support.a and b/tools/sdk/esp32s3/dio_opi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/dio_opi/libesp_system.a b/tools/sdk/esp32s3/dio_opi/libesp_system.a index cbf980f33ad..2c132bfba29 100644 Binary files a/tools/sdk/esp32s3/dio_opi/libesp_system.a and b/tools/sdk/esp32s3/dio_opi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/dio_opi/libfreertos.a b/tools/sdk/esp32s3/dio_opi/libfreertos.a index 3f93fbb3433..abce7f31034 100644 Binary files a/tools/sdk/esp32s3/dio_opi/libfreertos.a and b/tools/sdk/esp32s3/dio_opi/libfreertos.a differ diff --git a/tools/sdk/esp32s3/dio_opi/libspi_flash.a b/tools/sdk/esp32s3/dio_opi/libspi_flash.a index ecd8f2b7b76..6320dc64022 100644 Binary files a/tools/sdk/esp32s3/dio_opi/libspi_flash.a and b/tools/sdk/esp32s3/dio_opi/libspi_flash.a differ diff --git a/tools/sdk/esp32s3/dio_opi/sections.ld b/tools/sdk/esp32s3/dio_opi/sections.ld index 48050f8f87f..2e63ebf01c9 100644 --- a/tools/sdk/esp32s3/dio_opi/sections.ld +++ b/tools/sdk/esp32s3/dio_opi/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32s3/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -219,9 +219,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -243,6 +278,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_th.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_winbond.*(.literal .literal.* .text .text.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_timing_tuning.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_timing_config.*(.literal .literal.* .text .text.*) @@ -283,10 +319,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -308,13 +346,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -330,6 +366,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_th.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_winbond.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_rom_patch.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_timing_tuning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_timing_config.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) @@ -360,22 +397,40 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.ext_ram.bss .ext_ram.bss.*) - *(COMMON) + *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -401,7 +456,7 @@ SECTIONS _instruction_reserved_start = ABSOLUTE(.); _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) *(.wifi0iram .wifi0iram.*) *(.wifiorslpiram .wifiorslpiram.*) *(.wifirxiram .wifirxiram.*) @@ -414,6 +469,9 @@ SECTIONS *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port.*(.literal.esp_startup_start_app_other_cores .text.esp_startup_start_app_other_cores) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) @@ -477,7 +535,7 @@ SECTIONS _flash_rodata_start = ABSOLUTE(.); *(.rodata_wlog_error .rodata_wlog_error.*) - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) diff --git a/tools/sdk/esp32s3/dio_qspi/include/sdkconfig.h b/tools/sdk/esp32s3/dio_qspi/include/sdkconfig.h index 0c5907b7050..c42131144c1 100644 --- a/tools/sdk/esp32s3/dio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/dio_qspi/include/sdkconfig.h @@ -561,8 +561,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -570,6 +570,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF 0 #define CONFIG_BT_CTRL_SLEEP_MODE_EFF 0 @@ -583,9 +584,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -696,8 +699,8 @@ #define CONFIG_SPIRAM_MODE_QUAD 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 @@ -802,12 +805,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -838,10 +843,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 #define CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1 1 @@ -905,6 +906,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -1060,8 +1062,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -1099,11 +1099,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -1132,61 +1127,95 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_DIO CONFIG_ESPTOOLPY_FLASHMODE_DIO +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -1199,22 +1228,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -1226,6 +1263,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -1253,5 +1291,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/dio_qspi/libbootloader_support.a b/tools/sdk/esp32s3/dio_qspi/libbootloader_support.a index 1e22e6881c8..006fb5f3b02 100644 Binary files a/tools/sdk/esp32s3/dio_qspi/libbootloader_support.a and b/tools/sdk/esp32s3/dio_qspi/libbootloader_support.a differ diff --git a/tools/sdk/esp32s3/dio_qspi/libesp_hw_support.a b/tools/sdk/esp32s3/dio_qspi/libesp_hw_support.a index 537d2ff9f80..754a90b9737 100644 Binary files a/tools/sdk/esp32s3/dio_qspi/libesp_hw_support.a and b/tools/sdk/esp32s3/dio_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/dio_qspi/libesp_system.a b/tools/sdk/esp32s3/dio_qspi/libesp_system.a index a059d7f2d31..e8c03242b1d 100644 Binary files a/tools/sdk/esp32s3/dio_qspi/libesp_system.a and b/tools/sdk/esp32s3/dio_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/dio_qspi/libfreertos.a b/tools/sdk/esp32s3/dio_qspi/libfreertos.a index 3f93fbb3433..abce7f31034 100644 Binary files a/tools/sdk/esp32s3/dio_qspi/libfreertos.a and b/tools/sdk/esp32s3/dio_qspi/libfreertos.a differ diff --git a/tools/sdk/esp32s3/dio_qspi/libspi_flash.a b/tools/sdk/esp32s3/dio_qspi/libspi_flash.a index 40d1bb97696..87873038026 100644 Binary files a/tools/sdk/esp32s3/dio_qspi/libspi_flash.a and b/tools/sdk/esp32s3/dio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32s3/dio_qspi/sections.ld b/tools/sdk/esp32s3/dio_qspi/sections.ld index 6efac6846cc..25b97ac6926 100644 --- a/tools/sdk/esp32s3/dio_qspi/sections.ld +++ b/tools/sdk/esp32s3/dio_qspi/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32s3/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -219,9 +219,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -243,6 +278,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_th.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_winbond.*(.literal .literal.* .text .text.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_timing_tuning.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_timing_config.*(.literal .literal.* .text .text.*) @@ -283,10 +319,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -308,13 +346,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -330,6 +366,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_th.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_winbond.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_rom_patch.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_timing_tuning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_timing_config.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) @@ -360,22 +397,40 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.ext_ram.bss*) - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -401,7 +456,7 @@ SECTIONS _instruction_reserved_start = ABSOLUTE(.); _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) *(.wifi0iram .wifi0iram.*) *(.wifiorslpiram .wifiorslpiram.*) *(.wifirxiram .wifirxiram.*) @@ -414,6 +469,9 @@ SECTIONS *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port.*(.literal.esp_startup_start_app_other_cores .text.esp_startup_start_app_other_cores) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) @@ -476,8 +534,8 @@ SECTIONS { _flash_rodata_start = ABSOLUTE(.); + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.rodata_wlog_error .rodata_wlog_error.*) - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h index 6f9c1a6b582..ba497906b3b 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/audio/audio.h @@ -721,11 +721,13 @@ typedef struct TU_ATTR_PACKED uint8_t bLength ; ///< Size of this descriptor, in bytes: 17. uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_INPUT_TERMINAL. + uint8_t bTerminalID ; ///< Constant uniquely identifying the Terminal within the audio function. This value is used in all requests to address this terminal. uint16_t wTerminalType ; ///< Constant characterizing the type of Terminal. See: audio_terminal_type_t for USB streaming and audio_terminal_input_type_t for other input types. uint8_t bAssocTerminal ; ///< ID of the Output Terminal to which this Input Terminal is associated. uint8_t bCSourceID ; ///< ID of the Clock Entity to which this Input Terminal is connected. uint8_t bNrChannels ; ///< Number of logical output channels in the Terminal’s output audio channel cluster. uint32_t bmChannelConfig ; ///< Describes the spatial location of the logical channels. See:audio_channel_config_t. + uint8_t iChannelNames ; ///< Index of a string descriptor, describing the name of the first logical channel. uint16_t bmControls ; ///< See: audio_terminal_input_control_pos_t. uint8_t iTerminal ; ///< Index of a string descriptor, describing the Input Terminal. } audio_desc_input_terminal_t; diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h index c428af86506..4658e43afe4 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc.h @@ -41,16 +41,6 @@ /** \defgroup ClassDriver_CDC_Common Common Definitions * @{ */ -// TODO remove -/// CDC Pipe ID, used to indicate which pipe the API is addressing to (Notification, Out, In) -typedef enum -{ - CDC_PIPE_NOTIFICATION , ///< Notification pipe - CDC_PIPE_DATA_IN , ///< Data in pipe - CDC_PIPE_DATA_OUT , ///< Data out pipe - CDC_PIPE_ERROR , ///< Invalid Pipe ID -}cdc_pipeid_t; - //--------------------------------------------------------------------+ // CDC Communication Interface Class //--------------------------------------------------------------------+ @@ -192,6 +182,28 @@ typedef enum CDC_REQUEST_MDLM_SEMANTIC_MODEL = 0x60, }cdc_management_request_t; +enum +{ + CDC_CONTROL_LINE_STATE_DTR = 0x01, + CDC_CONTROL_LINE_STATE_RTS = 0x02, +}; + +enum +{ + CDC_LINE_CONDING_STOP_BITS_1 = 0, // 1 bit + CDC_LINE_CONDING_STOP_BITS_1_5 = 1, // 1.5 bits + CDC_LINE_CONDING_STOP_BITS_2 = 2, // 2 bits +}; + +enum +{ + CDC_LINE_CODING_PARITY_NONE = 0, + CDC_LINE_CODING_PARITY_ODD = 1, + CDC_LINE_CODING_PARITY_EVEN = 2, + CDC_LINE_CODING_PARITY_MARK = 3, + CDC_LINE_CODING_PARITY_SPACE = 4, +}; + //--------------------------------------------------------------------+ // Management Element Notification (Notification Endpoint) //--------------------------------------------------------------------+ @@ -365,7 +377,9 @@ typedef struct TU_ATTR_PACKED uint32_t incoming_distinctive : 1; ///< 0 : Reports only incoming ringing. 1 : Reports incoming distinctive ringing patterns. uint32_t dual_tone_multi_freq : 1; ///< 0 : Cannot report dual tone multi-frequency (DTMF) digits input remotely over the telephone line. 1 : Can report DTMF digits input remotely over the telephone line. uint32_t line_state_change : 1; ///< 0 : Does not support line state change notification. 1 : Does support line state change notification - uint32_t TU_RESERVED : 26; + uint32_t TU_RESERVED0 : 2; + uint32_t TU_RESERVED1 : 16; + uint32_t TU_RESERVED2 : 8; } bmCapabilities; }cdc_desc_func_telephone_call_state_reporting_capabilities_t; @@ -390,9 +404,10 @@ TU_VERIFY_STATIC(sizeof(cdc_line_coding_t) == 7, "size is not correct"); typedef struct TU_ATTR_PACKED { - uint16_t dte_is_present : 1; ///< Indicates to DCE if DTE is presentor not. This signal corresponds to V.24 signal 108/2 and RS-232 signal DTR. - uint16_t half_duplex_carrier_control : 1; - uint16_t : 14; + uint16_t dtr : 1; + uint16_t rts : 1; + uint16_t : 6; + uint16_t : 8; } cdc_line_control_state_t; TU_VERIFY_STATIC(sizeof(cdc_line_control_state_t) == 2, "size is not correct"); diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h index fbc7162a366..f8a004df438 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_device.h @@ -27,7 +27,6 @@ #ifndef _TUSB_CDC_DEVICE_H_ #define _TUSB_CDC_DEVICE_H_ -#include "common/tusb_common.h" #include "cdc.h" //--------------------------------------------------------------------+ @@ -81,7 +80,7 @@ int32_t tud_cdc_n_read_char (uint8_t itf); // Clear the received FIFO void tud_cdc_n_read_flush (uint8_t itf); -// Get a byte from FIFO at the specified position without removing it +// Get a byte from FIFO without removing it bool tud_cdc_n_peek (uint8_t itf, uint8_t* ui8); // Write bytes to TX FIFO, data may remain in the FIFO for a while @@ -135,7 +134,7 @@ TU_ATTR_WEAK void tud_cdc_rx_cb(uint8_t itf); // Invoked when received `wanted_char` TU_ATTR_WEAK void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char); -// Invoked when space becomes available in TX buffer +// Invoked when a TX is complete and therefore space becomes available in TX buffer TU_ATTR_WEAK void tud_cdc_tx_complete_cb(uint8_t itf); // Invoked when line state DTR & RTS are changed via SET_CONTROL_LINE_STATE diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h index 33dbd2efb4d..c759527e6aa 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/cdc/cdc_host.h @@ -34,89 +34,156 @@ #endif //--------------------------------------------------------------------+ -// CDC APPLICATION PUBLIC API +// Class Driver Configuration //--------------------------------------------------------------------+ -/** \ingroup ClassDriver_CDC Communication Device Class (CDC) - * \addtogroup CDC_Serial Serial - * @{ - * \defgroup CDC_Serial_Host Host - * @{ */ -bool tuh_cdc_set_control_line_state(uint8_t dev_addr, bool dtr, bool rts, tuh_xfer_cb_t complete_cb); +// Set Line Control state on enumeration/mounted: DTR ( bit 0), RTS (bit 1) +#ifndef CFG_TUH_CDC_LINE_CONTROL_ON_ENUM +#define CFG_TUH_CDC_LINE_CONTROL_ON_ENUM 0 +#endif + +// Set Line Coding on enumeration/mounted, value for cdc_line_coding_t +//#ifndef CFG_TUH_CDC_LINE_CODING_ON_ENUM +//#define CFG_TUH_CDC_LINE_CODING_ON_ENUM { 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 } +//#endif + +// RX FIFO size +#ifndef CFG_TUH_CDC_RX_BUFSIZE +#define CFG_TUH_CDC_RX_BUFSIZE USBH_EPSIZE_BULK_MAX +#endif + +// RX Endpoint size +#ifndef CFG_TUH_CDC_RX_EPSIZE +#define CFG_TUH_CDC_RX_EPSIZE USBH_EPSIZE_BULK_MAX +#endif + +// TX FIFO size +#ifndef CFG_TUH_CDC_TX_BUFSIZE +#define CFG_TUH_CDC_TX_BUFSIZE USBH_EPSIZE_BULK_MAX +#endif + +// TX Endpoint size +#ifndef CFG_TUH_CDC_TX_EPSIZE +#define CFG_TUH_CDC_TX_EPSIZE USBH_EPSIZE_BULK_MAX +#endif + +//--------------------------------------------------------------------+ +// Application API +//--------------------------------------------------------------------+ -static inline bool tuh_cdc_connect(uint8_t dev_addr, tuh_xfer_cb_t complete_cb) +typedef struct { - return tuh_cdc_set_control_line_state(dev_addr, true, true, complete_cb); + uint8_t daddr; + uint8_t bInterfaceNumber; + uint8_t bInterfaceSubClass; + uint8_t bInterfaceProtocol; +} tuh_cdc_itf_info_t; + +// Get Interface index from device address + interface number +// return TUSB_INDEX_INVALID (0xFF) if not found +uint8_t tuh_cdc_itf_get_index(uint8_t daddr, uint8_t itf_num); + +// Get Interface information +// return true if index is correct and interface is currently mounted +bool tuh_cdc_itf_get_info(uint8_t idx, tuh_cdc_itf_info_t* info); + +// Check if a interface is mounted +bool tuh_cdc_mounted(uint8_t idx); + +// Get current DTR status +bool tuh_cdc_get_dtr(uint8_t idx); + +// Get current RTS status +bool tuh_cdc_get_rts(uint8_t idx); + +// Check if interface is connected (DTR active) +TU_ATTR_ALWAYS_INLINE static inline bool tuh_cdc_connected(uint8_t idx) +{ + return tuh_cdc_get_dtr(idx); } -static inline bool tuh_cdc_disconnect(uint8_t dev_addr, tuh_xfer_cb_t complete_cb) +// Get local (saved/cached) version of line coding. +// This function should return correct values if tuh_cdc_set_line_coding() / tuh_cdc_get_line_coding() +// are invoked previously or CFG_TUH_CDC_LINE_CODING_ON_ENUM is defined. +// NOTE: This function does not make any USB transfer request to device. +bool tuh_cdc_get_local_line_coding(uint8_t idx, cdc_line_coding_t* line_coding); + +//--------------------------------------------------------------------+ +// Write API +//--------------------------------------------------------------------+ + +// Get the number of bytes available for writing +uint32_t tuh_cdc_write_available(uint8_t idx); + +// Write to cdc interface +uint32_t tuh_cdc_write(uint8_t idx, void const* buffer, uint32_t bufsize); + +// Force sending data if possible, return number of forced bytes +uint32_t tuh_cdc_write_flush(uint8_t idx); + +// Clear the transmit FIFO +bool tuh_cdc_write_clear(uint8_t idx); + +//--------------------------------------------------------------------+ +// Read API +//--------------------------------------------------------------------+ + +// Get the number of bytes available for reading +uint32_t tuh_cdc_read_available(uint8_t idx); + +// Read from cdc interface +uint32_t tuh_cdc_read (uint8_t idx, void* buffer, uint32_t bufsize); + +// Get a byte from RX FIFO without removing it +bool tuh_cdc_peek(uint8_t idx, uint8_t* ch); + +// Clear the received FIFO +bool tuh_cdc_read_clear (uint8_t idx); + +//--------------------------------------------------------------------+ +// Control Endpoint (Request) API +// Each Function will make a USB transfer request to/from device +//--------------------------------------------------------------------+ + +// Request to Set Control Line State: DTR (bit 0), RTS (bit 1) +bool tuh_cdc_set_control_line_state(uint8_t idx, uint16_t line_state, tuh_xfer_cb_t complete_cb, uintptr_t user_data); + +// Request to Set Line Coding +bool tuh_cdc_set_line_coding(uint8_t idx, cdc_line_coding_t const* line_coding, tuh_xfer_cb_t complete_cb, uintptr_t user_data); + +// Request to Get Line Coding +// Should only use if tuh_cdc_set_line_coding() / tuh_cdc_get_line_coding() never got invoked and +// CFG_TUH_CDC_LINE_CODING_ON_ENUM is not defined +// bool tuh_cdc_get_line_coding(uint8_t idx, cdc_line_coding_t* coding); + +// Connect by set both DTR, RTS +static inline bool tuh_cdc_connect(uint8_t idx, tuh_xfer_cb_t complete_cb, uintptr_t user_data) { - return tuh_cdc_set_control_line_state(dev_addr, false, false, complete_cb); + return tuh_cdc_set_control_line_state(idx, CDC_CONTROL_LINE_STATE_DTR | CDC_CONTROL_LINE_STATE_RTS, complete_cb, user_data); } -/** \brief Check if device support CDC Serial interface or not - * \param[in] dev_addr device address - * \retval true if device supports - * \retval false if device does not support or is not mounted - */ -bool tuh_cdc_serial_is_mounted(uint8_t dev_addr); - -/** \brief Check if the interface is currently busy or not - * \param[in] dev_addr device address - * \param[in] pipeid value from \ref cdc_pipeid_t to indicate target pipe. - * \retval true if the interface is busy, meaning the stack is still transferring/waiting data from/to device - * \retval false if the interface is not busy, meaning the stack successfully transferred data from/to device - * \note This function is used to check if previous transfer is complete (success or error), so that the next transfer - * can be scheduled. User needs to make sure the corresponding interface is mounted - * (by \ref tuh_cdc_serial_is_mounted) before calling this function. - */ -bool tuh_cdc_is_busy(uint8_t dev_addr, cdc_pipeid_t pipeid); - -/** \brief Perform USB OUT transfer to device - * \param[in] dev_addr device address - * \param[in] p_data Buffer containing data. Must be accessible by USB controller (see \ref CFG_TUSB_MEM_SECTION) - * \param[in] length Number of bytes to be transferred via USB bus - * \retval TUSB_ERROR_NONE on success - * \retval TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device - * \retval TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request) - * \retval TUSB_ERROR_INVALID_PARA if input parameters are not correct - * \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the - * interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION. - */ -bool tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool is_notify); - -/** \brief Perform USB IN transfer to get data from device - * \param[in] dev_addr device address - * \param[in] p_buffer Buffer containing received data. Must be accessible by USB controller (see \ref CFG_TUSB_MEM_SECTION) - * \param[in] length Number of bytes to be transferred via USB bus - * \retval TUSB_ERROR_NONE on success - * \retval TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device - * \retval TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request) - * \retval TUSB_ERROR_INVALID_PARA if input parameters are not correct - * \note This function is non-blocking and returns immediately. The result of USB transfer will be reported by the - * interface's callback function. \a p_data must be declared with \ref CFG_TUSB_MEM_SECTION. - */ -bool tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify); +// Disconnect by clear both DTR, RTS +static inline bool tuh_cdc_disconnect(uint8_t idx, tuh_xfer_cb_t complete_cb, uintptr_t user_data) +{ + return tuh_cdc_set_control_line_state(idx, 0x00, complete_cb, user_data); +} //--------------------------------------------------------------------+ // CDC APPLICATION CALLBACKS //--------------------------------------------------------------------+ -/** \brief Callback function that is invoked when an transferring event occurred - * \param[in] dev_addr Address of device - * \param[in] event an value from \ref xfer_result_t - * \param[in] pipe_id value from \ref cdc_pipeid_t indicate the pipe - * \param[in] xferred_bytes Number of bytes transferred via USB bus - * \note event can be one of following - * - XFER_RESULT_SUCCESS : previously scheduled transfer completes successfully. - * - XFER_RESULT_FAILED : previously scheduled transfer encountered a transaction error. - * - XFER_RESULT_STALLED : previously scheduled transfer is stalled by device. - * \note - */ -void tuh_cdc_xfer_isr(uint8_t dev_addr, xfer_result_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes); +// Invoked when a device with CDC interface is mounted +// idx is index of cdc interface in the internal pool. +TU_ATTR_WEAK extern void tuh_cdc_mount_cb(uint8_t idx); + +// Invoked when a device with CDC interface is unmounted +TU_ATTR_WEAK extern void tuh_cdc_umount_cb(uint8_t idx); + +// Invoked when received new data +TU_ATTR_WEAK extern void tuh_cdc_rx_cb(uint8_t idx); -/// @} // group CDC_Serial_Host -/// @} +// Invoked when a TX is complete and therefore space becomes available in TX buffer +TU_ATTR_WEAK extern void tuh_cdc_tx_complete_cb(uint8_t idx); //--------------------------------------------------------------------+ // Internal Class Driver API diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h index eeef6d3bade..17b24def111 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/class/hid/hid_device.h @@ -116,7 +116,7 @@ TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t instance, uint8_t idle_rate); // Invoked when sent REPORT successfully to host // Application can use this to send the next report // Note: For composite reports, report[0] is report ID -TU_ATTR_WEAK void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, /*uint16_t*/ uint8_t len ); +TU_ATTR_WEAK void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, uint16_t len); //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h index 2c30daf6fc7..a0a49d7ec70 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_compiler.h @@ -76,9 +76,9 @@ * - ##__VA_ARGS__ is used to deal with 0 paramerter (swallows comma) *------------------------------------------------------------------*/ #if !defined(__CCRX__) -#define TU_ARGS_NUM(...) _TU_NARG(_0, ##__VA_ARGS__,_RSEQ_N()) +#define TU_ARGS_NUM(...) _TU_NARG(_0, ##__VA_ARGS__, _RSEQ_N()) #else -#define TU_ARGS_NUM(...) _TU_NARG(_0, __VA_ARGS__,_RSEQ_N()) +#define TU_ARGS_NUM(...) _TU_NARG(_0, __VA_ARGS__, _RSEQ_N()) #endif #define _TU_NARG(...) _GET_NTH_ARG(__VA_ARGS__) diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h index ac5bee6ece6..65fd1920dd5 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_debug.h @@ -66,7 +66,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG(n, ...) TU_XSTRCAT(TU_LOG, n)(__VA_ARGS__) #define TU_LOG_MEM(n, ...) TU_XSTRCAT3(TU_LOG, n, _MEM)(__VA_ARGS__) #define TU_LOG_ARR(n, ...) TU_XSTRCAT3(TU_LOG, n, _ARR)(__VA_ARGS__) -#define TU_LOG_VAR(n, ...) TU_XSTRCAT3(TU_LOG, n, _VAR)(__VA_ARGS__) +#define TU_LOG_PTR(n, ...) TU_XSTRCAT3(TU_LOG, n, _PTR)(__VA_ARGS__) #define TU_LOG_INT(n, ...) TU_XSTRCAT3(TU_LOG, n, _INT)(__VA_ARGS__) #define TU_LOG_HEX(n, ...) TU_XSTRCAT3(TU_LOG, n, _HEX)(__VA_ARGS__) #define TU_LOG_LOCATION() tu_printf("%s: %d:\r\n", __PRETTY_FUNCTION__, __LINE__) @@ -76,7 +76,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG1 tu_printf #define TU_LOG1_MEM tu_print_mem #define TU_LOG1_ARR(_x, _n) tu_print_arr((uint8_t const*)(_x), _n) -#define TU_LOG1_VAR(_x) tu_print_arr((uint8_t const*)(_x), sizeof(*(_x))) +#define TU_LOG1_PTR(_x) tu_print_arr((uint8_t const*)(_x), sizeof(*(_x))) #define TU_LOG1_INT(_x) tu_printf(#_x " = %ld\r\n", (unsigned long) (_x) ) #define TU_LOG1_HEX(_x) tu_printf(#_x " = %lX\r\n", (unsigned long) (_x) ) @@ -85,7 +85,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG2 TU_LOG1 #define TU_LOG2_MEM TU_LOG1_MEM #define TU_LOG2_ARR TU_LOG1_ARR - #define TU_LOG2_VAR TU_LOG1_VAR + #define TU_LOG2_PTR TU_LOG1_PTR #define TU_LOG2_INT TU_LOG1_INT #define TU_LOG2_HEX TU_LOG1_HEX #endif @@ -95,7 +95,7 @@ static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) #define TU_LOG3 TU_LOG1 #define TU_LOG3_MEM TU_LOG1_MEM #define TU_LOG3_ARR TU_LOG1_ARR - #define TU_LOG3_VAR TU_LOG1_VAR + #define TU_LOG3_PTR TU_LOG1_PTR #define TU_LOG3_INT TU_LOG1_INT #define TU_LOG3_HEX TU_LOG1_HEX #endif @@ -132,7 +132,7 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #ifndef TU_LOG #define TU_LOG(n, ...) #define TU_LOG_MEM(n, ...) - #define TU_LOG_VAR(n, ...) + #define TU_LOG_PTR(n, ...) #define TU_LOG_INT(n, ...) #define TU_LOG_HEX(n, ...) #define TU_LOG_LOCATION() @@ -143,14 +143,14 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #define TU_LOG0(...) #define TU_LOG0_MEM(...) -#define TU_LOG0_VAR(...) +#define TU_LOG0_PTR(...) #define TU_LOG0_INT(...) #define TU_LOG0_HEX(...) #ifndef TU_LOG1 #define TU_LOG1(...) #define TU_LOG1_MEM(...) - #define TU_LOG1_VAR(...) + #define TU_LOG1_PTR(...) #define TU_LOG1_INT(...) #define TU_LOG1_HEX(...) #endif @@ -158,7 +158,7 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #ifndef TU_LOG2 #define TU_LOG2(...) #define TU_LOG2_MEM(...) - #define TU_LOG2_VAR(...) + #define TU_LOG2_PTR(...) #define TU_LOG2_INT(...) #define TU_LOG2_HEX(...) #endif @@ -166,7 +166,7 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #ifndef TU_LOG3 #define TU_LOG3(...) #define TU_LOG3_MEM(...) - #define TU_LOG3_VAR(...) + #define TU_LOG3_PTR(...) #define TU_LOG3_INT(...) #define TU_LOG3_HEX(...) #endif diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h index e36e3a7f3c3..2f60ec2f49d 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_fifo.h @@ -44,28 +44,82 @@ extern "C" { #include "common/tusb_common.h" #include "osal/osal.h" -#define tu_fifo_mutex_t osal_mutex_t - // mutex is only needed for RTOS // for OS None, we don't get preempted #define CFG_FIFO_MUTEX OSAL_MUTEX_REQUIRED +/* Write/Read index is always in the range of: + * 0 .. 2*depth-1 + * The extra window allow us to determine the fifo state of empty or full with only 2 indices + * Following are examples with depth = 3 + * + * - empty: W = R + * | + * ------------------------- + * | 0 | RW| 2 | 3 | 4 | 5 | + * + * - full 1: W > R + * | + * ------------------------- + * | 0 | R | 2 | 3 | W | 5 | + * + * - full 2: W < R + * | + * ------------------------- + * | 0 | 1 | W | 3 | 4 | R | + * + * - Number of items in the fifo can be determined in either cases: + * - case W >= R: Count = W - R + * - case W < R: Count = 2*depth - (R - W) + * + * In non-overwritable mode, computed Count (in above 2 cases) is at most equal to depth. + * However, in over-writable mode, write index can be repeatedly increased and count can be + * temporarily larger than depth (overflowed condition) e.g + * + * - Overflowed 1: write(3), write(1) + * In this case we will adjust Read index when read()/peek() is called so that count = depth. + * | + * ------------------------- + * | R | 1 | 2 | 3 | W | 5 | + * + * - Double Overflowed i.e index is out of allowed range [0,2*depth) + * This occurs when we continue to write after 1st overflowed to 2nd overflowed. e.g: + * write(3), write(1), write(2) + * This must be prevented since it will cause unrecoverable state, in above example + * if not handled the fifo will be empty instead of continue-to-be full. Since we must not modify + * read index in write() function, which cause race condition. We will re-position write index so that + * after data is written it is a full fifo i.e W = depth - R + * + * re-position W = 1 before write(2) + * Note: we should also move data from mem[3] to read index as well, but deliberately skipped here + * since it is an expensive operation !!! + * | + * ------------------------- + * | R | W | 2 | 3 | 4 | 5 | + * + * perform write(2), result is still a full fifo. + * + * | + * ------------------------- + * | R | 1 | 2 | W | 4 | 5 | + + */ typedef struct { - uint8_t* buffer ; ///< buffer pointer - uint16_t depth ; ///< max items - uint16_t item_size ; ///< size of each item - bool overwritable ; + uint8_t* buffer ; // buffer pointer + uint16_t depth ; // max items - uint16_t non_used_index_space ; ///< required for non-power-of-two buffer length - uint16_t max_pointer_idx ; ///< maximum absolute pointer index + struct TU_ATTR_PACKED { + uint16_t item_size : 15; // size of each item + bool overwritable : 1 ; // ovwerwritable when full + }; - volatile uint16_t wr_idx ; ///< write pointer - volatile uint16_t rd_idx ; ///< read pointer + volatile uint16_t wr_idx ; // write index + volatile uint16_t rd_idx ; // read index #if OSAL_MUTEX_REQUIRED - tu_fifo_mutex_t mutex_wr; - tu_fifo_mutex_t mutex_rd; + osal_mutex_t mutex_wr; + osal_mutex_t mutex_rd; #endif } tu_fifo_t; @@ -84,8 +138,6 @@ typedef struct .depth = _depth, \ .item_size = sizeof(_type), \ .overwritable = _overwritable, \ - .non_used_index_space = UINT16_MAX - (2*(_depth)-1), \ - .max_pointer_idx = 2*(_depth)-1, \ } #define TU_FIFO_DEF(_name, _depth, _type, _overwritable) \ @@ -99,10 +151,10 @@ bool tu_fifo_config(tu_fifo_t *f, void* buffer, uint16_t depth, uint16_t item_si #if OSAL_MUTEX_REQUIRED TU_ATTR_ALWAYS_INLINE static inline -void tu_fifo_config_mutex(tu_fifo_t *f, tu_fifo_mutex_t write_mutex_hdl, tu_fifo_mutex_t read_mutex_hdl) +void tu_fifo_config_mutex(tu_fifo_t *f, osal_mutex_t wr_mutex, osal_mutex_t rd_mutex) { - f->mutex_wr = write_mutex_hdl; - f->mutex_rd = read_mutex_hdl; + f->mutex_wr = wr_mutex; + f->mutex_rd = rd_mutex; } #else diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h index bb4225ad596..0b10c5118ce 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_mcu.h @@ -275,6 +275,10 @@ #elif TU_CHECK_MCU(OPT_MCU_F1C100S) #define TUP_DCD_ENDPOINT_MAX 4 +//------------- WCH -------------// +#elif TU_CHECK_MCU(OPT_MCU_CH32V307) + #define TUP_DCD_ENDPOINT_MAX 16 + #define TUP_RHPORT_HIGHSPEED 1 #endif //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h index b34506f6500..d5541856cbf 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_private.h @@ -28,6 +28,8 @@ #ifndef _TUSB_PRIVATE_H_ #define _TUSB_PRIVATE_H_ +// Internal Helper used by Host and Device Stack + #ifdef __cplusplus extern "C" { #endif @@ -39,8 +41,31 @@ typedef struct TU_ATTR_PACKED volatile uint8_t claimed : 1; }tu_edpt_state_t; +typedef struct { + bool is_host; // host or device most + union { + uint8_t daddr; + uint8_t rhport; + uint8_t hwid; + }; + uint8_t ep_addr; + uint8_t ep_speed; + + uint16_t ep_packetsize; + uint16_t ep_bufsize; + + // TODO xfer_fifo can skip this buffer + uint8_t* ep_buf; + + tu_fifo_t ff; + + // mutex: read if ep rx, write if e tx + OSAL_MUTEX_DEF(ff_mutex); + +}tu_edpt_stream_t; + //--------------------------------------------------------------------+ -// Internal Helper used by Host and Device Stack +// Endpoint //--------------------------------------------------------------------+ // Check if endpoint descriptor is valid per USB specs @@ -58,6 +83,89 @@ bool tu_edpt_claim(tu_edpt_state_t* ep_state, osal_mutex_t mutex); // Release an endpoint with provided mutex bool tu_edpt_release(tu_edpt_state_t* ep_state, osal_mutex_t mutex); +//--------------------------------------------------------------------+ +// Endpoint Stream +//--------------------------------------------------------------------+ + +// Init an stream, should only be called once +bool tu_edpt_stream_init(tu_edpt_stream_t* s, bool is_host, bool is_tx, bool overwritable, + void* ff_buf, uint16_t ff_bufsize, uint8_t* ep_buf, uint16_t ep_bufsize); + +// Open an stream for an endpoint +// hwid is either device address (host mode) or rhport (device mode) +TU_ATTR_ALWAYS_INLINE static inline +void tu_edpt_stream_open(tu_edpt_stream_t* s, uint8_t hwid, tusb_desc_endpoint_t const *desc_ep) +{ + tu_fifo_clear(&s->ff); + s->hwid = hwid; + s->ep_addr = desc_ep->bEndpointAddress; + s->ep_packetsize = tu_edpt_packet_size(desc_ep); +} + +TU_ATTR_ALWAYS_INLINE static inline +void tu_edpt_stream_close(tu_edpt_stream_t* s) +{ + s->hwid = 0; + s->ep_addr = 0; +} + +// Clear fifo +TU_ATTR_ALWAYS_INLINE static inline +bool tu_edpt_stream_clear(tu_edpt_stream_t* s) +{ + return tu_fifo_clear(&s->ff); +} + +//--------------------------------------------------------------------+ +// Stream Write +//--------------------------------------------------------------------+ + +// Write to stream +uint32_t tu_edpt_stream_write(tu_edpt_stream_t* s, void const *buffer, uint32_t bufsize); + +// Start an usb transfer if endpoint is not busy +uint32_t tu_edpt_stream_write_xfer(tu_edpt_stream_t* s); + +// Start an zero-length packet if needed +bool tu_edpt_stream_write_zlp_if_needed(tu_edpt_stream_t* s, uint32_t last_xferred_bytes); + +// Get the number of bytes available for writing +TU_ATTR_ALWAYS_INLINE static inline +uint32_t tu_edpt_stream_write_available(tu_edpt_stream_t* s) +{ + return (uint32_t) tu_fifo_remaining(&s->ff); +} + +//--------------------------------------------------------------------+ +// Stream Read +//--------------------------------------------------------------------+ + +// Read from stream +uint32_t tu_edpt_stream_read(tu_edpt_stream_t* s, void* buffer, uint32_t bufsize); + +// Start an usb transfer if endpoint is not busy +uint32_t tu_edpt_stream_read_xfer(tu_edpt_stream_t* s); + +// Must be called in the transfer complete callback +TU_ATTR_ALWAYS_INLINE static inline +void tu_edpt_stream_read_xfer_complete(tu_edpt_stream_t* s, uint32_t xferred_bytes) +{ + tu_fifo_write_n(&s->ff, s->ep_buf, (uint16_t) xferred_bytes); +} + +// Get the number of bytes available for reading +TU_ATTR_ALWAYS_INLINE static inline +uint32_t tu_edpt_stream_read_available(tu_edpt_stream_t* s) +{ + return (uint32_t) tu_fifo_count(&s->ff); +} + +TU_ATTR_ALWAYS_INLINE static inline +bool tu_edpt_stream_peek(tu_edpt_stream_t* s, uint8_t* ch) +{ + return tu_fifo_peek(&s->ff, ch); +} + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h index 1bfa7c7d12f..82798a484a7 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/common/tusb_types.h @@ -69,6 +69,15 @@ typedef enum TUSB_DIR_IN_MASK = 0x80 }tusb_dir_t; +enum +{ + TUSB_EPSIZE_BULK_FS = 64, + TUSB_EPSIZE_BULK_HS= 512, + + TUSB_EPSIZE_ISO_FS_MAX = 1023, + TUSB_EPSIZE_ISO_HS_MAX = 1024, +}; + /// Isochronous End Point Attributes typedef enum { @@ -243,7 +252,6 @@ enum INTERFACE_INVALID_NUMBER = 0xff }; - typedef enum { MS_OS_20_SET_HEADER_DESCRIPTOR = 0x00, @@ -265,6 +273,11 @@ enum CONTROL_STAGE_ACK }; +enum +{ + TUSB_INDEX_INVALID = 0xff +}; + //--------------------------------------------------------------------+ // USB Descriptors //--------------------------------------------------------------------+ @@ -530,22 +543,35 @@ TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_type_str(tusb_xfer_type_ //--------------------------------------------------------------------+ // Descriptor helper //--------------------------------------------------------------------+ + +// return next descriptor TU_ATTR_ALWAYS_INLINE static inline uint8_t const * tu_desc_next(void const* desc) { uint8_t const* desc8 = (uint8_t const*) desc; return desc8 + desc8[DESC_OFFSET_LEN]; } +// get descriptor type TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_desc_type(void const* desc) { return ((uint8_t const*) desc)[DESC_OFFSET_TYPE]; } +// get descriptor length TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_desc_len(void const* desc) { return ((uint8_t const*) desc)[DESC_OFFSET_LEN]; } +// find descriptor that match byte1 (type) +uint8_t const * tu_desc_find(uint8_t const* desc, uint8_t const* end, uint8_t byte1); + +// find descriptor that match byte1 (type) and byte2 +uint8_t const * tu_desc_find2(uint8_t const* desc, uint8_t const* end, uint8_t byte1, uint8_t byte2); + +// find descriptor that match byte1 (type) and byte2 +uint8_t const * tu_desc_find3(uint8_t const* desc, uint8_t const* end, uint8_t byte1, uint8_t byte2, uint8_t byte3); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h index c156afea048..be9811641e4 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/host/usbh_classdriver.h @@ -29,11 +29,16 @@ #include "osal/osal.h" #include "common/tusb_fifo.h" +#include "common/tusb_private.h" #ifdef __cplusplus extern "C" { #endif +enum { + USBH_EPSIZE_BULK_MAX = (TUH_OPT_HIGH_SPEED ? TUSB_EPSIZE_BULK_HS : TUSB_EPSIZE_BULK_FS) +}; + //--------------------------------------------------------------------+ // Class Driver API //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal.h index 9cdab288271..afa3826fc4c 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal.h @@ -44,7 +44,7 @@ typedef void (*osal_task_func_t)( void * ); // Mutex is required when using a preempted RTOS or MCU has multiple cores #if (CFG_TUSB_OS == OPT_OS_NONE) && !TUP_MCU_MULTIPLE_CORE #define OSAL_MUTEX_REQUIRED 0 - #define OSAL_MUTEX_DEF(_name) + #define OSAL_MUTEX_DEF(_name) uint8_t :0 #else #define OSAL_MUTEX_REQUIRED 1 #define OSAL_MUTEX_DEF(_name) osal_mutex_def_t _name diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h index f8452bfb201..18eb9c69304 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/osal/osal_rtthread.h @@ -63,7 +63,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_semaphore_wait(osal_semaphore_t se } TU_ATTR_ALWAYS_INLINE static inline void osal_semaphore_reset(osal_semaphore_t const sem_hdl) { - // TODO: implement + rt_sem_control(sem_hdl, RT_IPC_CMD_RESET, 0); } //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h index b65d32fd4b1..a06407f2348 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.h @@ -11,11 +11,21 @@ #include "hardware/structs/usb.h" #include "hardware/irq.h" #include "hardware/resets.h" +#include "hardware/timer.h" #if defined(PICO_RP2040_USB_DEVICE_ENUMERATION_FIX) && !defined(TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX) #define TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX PICO_RP2040_USB_DEVICE_ENUMERATION_FIX #endif +#if defined(PICO_RP2040_USB_DEVICE_UFRAME_FIX) && !defined(TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX) +#define TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX PICO_RP2040_USB_DEVICE_UFRAME_FIX +#endif + +#if TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX +#undef PICO_RP2040_USB_FAST_IRQ +#define PICO_RP2040_USB_FAST_IRQ 1 +#endif + #ifndef PICO_RP2040_USB_FAST_IRQ #define PICO_RP2040_USB_FAST_IRQ 0 #endif @@ -26,6 +36,9 @@ #define __tusb_irq_path_func(x) x #endif +#define usb_hw_set hw_set_alias(usb_hw) +#define usb_hw_clear hw_clear_alias(usb_hw) + #define pico_info(...) TU_LOG(2, __VA_ARGS__) #define pico_trace(...) TU_LOG(3, __VA_ARGS__) @@ -38,7 +51,7 @@ typedef struct hw_endpoint // Transfer direction (i.e. IN is rx for host but tx for device) // allows us to common up transfer functions bool rx; - + uint8_t ep_addr; uint8_t next_pid; @@ -51,20 +64,25 @@ typedef struct hw_endpoint // Buffer pointer in usb dpram uint8_t *hw_data_buf; + // User buffer in main memory + uint8_t *user_buf; + // Current transfer information - bool active; uint16_t remaining_len; uint16_t xferred_len; - // User buffer in main memory - uint8_t *user_buf; - // Data needed from EP descriptor uint16_t wMaxPacketSize; + // Endpoint is in use + bool active; + // Interrupt, bulk, etc uint8_t transfer_type; - + + // Transfer scheduled but not active + uint8_t pending; + #if CFG_TUH_ENABLED // Only needed for host uint8_t dev_addr; @@ -72,13 +90,25 @@ typedef struct hw_endpoint // If interrupt endpoint uint8_t interrupt_num; #endif + } hw_endpoint_t; +#if TUD_OPT_RP2040_USB_DEVICE_UFRAME_FIX +extern volatile uint32_t e15_last_sof; +#endif + void rp2040_usb_init(void); void hw_endpoint_xfer_start(struct hw_endpoint *ep, uint8_t *buffer, uint16_t total_len); bool hw_endpoint_xfer_continue(struct hw_endpoint *ep); void hw_endpoint_reset_transfer(struct hw_endpoint *ep); +void hw_endpoint_start_next_buffer(struct hw_endpoint *ep); + +TU_ATTR_ALWAYS_INLINE static inline void hw_endpoint_lock_update(__unused struct hw_endpoint * ep, __unused int delta) { + // todo add critsec as necessary to prevent issues between worker and IRQ... + // note that this is perhaps as simple as disabling IRQs because it would make + // sense to have worker and IRQ on same core, however I think using critsec is about equivalent. +} void _hw_endpoint_buffer_control_update32(struct hw_endpoint *ep, uint32_t and_mask, uint32_t or_mask); diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h index b63d1fcd0fa..cb455bd9083 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/synopsys/dwc2/dwc2_stm32.h @@ -122,13 +122,13 @@ static const dwc2_controller_t _dwc2_controller[] = TU_ATTR_ALWAYS_INLINE static inline void dwc2_dcd_int_enable(uint8_t rhport) { - NVIC_EnableIRQ(_dwc2_controller[rhport].irqnum); + NVIC_EnableIRQ((IRQn_Type)_dwc2_controller[rhport].irqnum); } TU_ATTR_ALWAYS_INLINE static inline void dwc2_dcd_int_disable (uint8_t rhport) { - NVIC_DisableIRQ(_dwc2_controller[rhport].irqnum); + NVIC_DisableIRQ((IRQn_Type)_dwc2_controller[rhport].irqnum); } TU_ATTR_ALWAYS_INLINE diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/wch/ch32v307/ch32_usbhs_reg.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/wch/ch32v307/ch32_usbhs_reg.h new file mode 100644 index 00000000000..5a2c1fbc9a2 --- /dev/null +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/portable/wch/ch32v307/ch32_usbhs_reg.h @@ -0,0 +1,345 @@ +#ifndef _USB_CH32_USBHS_REG_H +#define _USB_CH32_USBHS_REG_H + +#include + +/******************* GLOBAL ******************/ + +// USB CONTROL +#define USBHS_CONTROL_OFFSET 0x00 +#define USBHS_DMA_EN (1 << 0) +#define USBHS_ALL_CLR (1 << 1) +#define USBHS_FORCE_RST (1 << 2) +#define USBHS_INT_BUSY_EN (1 << 3) +#define USBHS_DEV_PU_EN (1 << 4) +#define USBHS_SPEED_MASK (3 << 5) +#define USBHS_FULL_SPEED (0 << 5) +#define USBHS_HIGH_SPEED (1 << 5) +#define USBHS_LOW_SPEED (2 << 5) +#define USBHS_HOST_MODE (1 << 7) + +// USB_INT_EN +#define USBHS_INT_EN_OFFSET 0x02 +#define USBHS_BUS_RST_EN (1 << 0) +#define USBHS_DETECT_EN (1 << 0) +#define USBHS_TRANSFER_EN (1 << 1) +#define USBHS_SUSPEND_EN (1 << 2) +#define USBHS_SOF_ACT_EN (1 << 3) +#define USBHS_FIFO_OV_EN (1 << 4) +#define USBHS_SETUP_ACT_EN (1 << 5) +#define USBHS_ISO_ACT_EN (1 << 6) +#define USBHS_DEV_NAK_EN (1 << 7) + +// USB DEV AD +#define USBHS_DEV_AD_OFFSET 0x03 +// USB FRAME_NO +#define USBHS_FRAME_NO_OFFSET 0x04 +// USB SUSPEND +#define USBHS_SUSPEND_OFFSET 0x06 +#define USBHS_DEV_REMOTE_WAKEUP (1 << 2) +#define USBHS_LINESTATE_MASK (2 << 4) /* Read Only */ + +// RESERVED0 + +// USB SPEED TYPE +#define USBHS_SPEED_TYPE_OFFSET 0x08 +#define USBSPEED_MASK (0x03) + +// USB_MIS_ST +#define USBHS_MIS_ST_OFFSET 0x09 +#define USBHS_SPLIT_CAN (1 << 0) +#define USBHS_ATTACH (1 << 1) +#define USBHS_SUSPEND (1 << 2) +#define USBHS_BUS_RESET (1 << 3) +#define USBHS_R_FIFO_RDY (1 << 4) +#define USBHS_SIE_FREE (1 << 5) +#define USBHS_SOF_ACT (1 << 6) +#define USBHS_SOF_PRES (1 << 7) + +// INT_FLAG +#define USBHS_INT_FLAG_OFFSET 0x0A +#define USBHS_BUS_RST_FLAG (1 << 0) +#define USBHS_DETECT_FLAG (1 << 0) +#define USBHS_TRANSFER_FLAG (1 << 1) +#define USBHS_SUSPEND_FLAG (1 << 2) +#define USBHS_HST_SOF_FLAG (1 << 3) +#define USBHS_FIFO_OV_FLAG (1 << 4) +#define USBHS_SETUP_FLAG (1 << 5) +#define USBHS_ISO_ACT_FLAG (1 << 6) + +// INT_ST +#define USBHS_INT_ST_OFFSET 0x0B +#define USBHS_DEV_UIS_IS_NAK (1 << 7) +#define USBHS_DEV_UIS_TOG_OK (1 << 6) +#define MASK_UIS_TOKEN (3 << 4) +#define MASK_UIS_ENDP (0x0F) +#define MASK_UIS_H_RES (0x0F) + +#define USBHS_TOGGLE_OK (0x40) +#define USBHS_HOST_RES (0x0f) + +//USB_RX_LEN +#define USBHS_RX_LEN_OFFSET 0x0C +/******************* DEVICE ******************/ + +//UEP_CONFIG +#define USBHS_UEP_CONFIG_OFFSET 0x10 +#define USBHS_EP0_T_EN (1 << 0) +#define USBHS_EP0_R_EN (1 << 16) + +#define USBHS_EP1_T_EN (1 << 1) +#define USBHS_EP1_R_EN (1 << 17) + +#define USBHS_EP2_T_EN (1 << 2) +#define USBHS_EP2_R_EN (1 << 18) + +#define USBHS_EP3_T_EN (1 << 3) +#define USBHS_EP3_R_EN (1 << 19) + +#define USBHS_EP4_T_EN (1 << 4) +#define USBHS_EP4_R_EN (1 << 20) + +#define USBHS_EP5_T_EN (1 << 5) +#define USBHS_EP5_R_EN (1 << 21) + +#define USBHS_EP6_T_EN (1 << 6) +#define USBHS_EP6_R_EN (1 << 22) + +#define USBHS_EP7_T_EN (1 << 7) +#define USBHS_EP7_R_EN (1 << 23) + +#define USBHS_EP8_T_EN (1 << 8) +#define USBHS_EP8_R_EN (1 << 24) + +#define USBHS_EP9_T_EN (1 << 9) +#define USBHS_EP9_R_EN (1 << 25) + +#define USBHS_EP10_T_EN (1 << 10) +#define USBHS_EP10_R_EN (1 << 26) + +#define USBHS_EP11_T_EN (1 << 11) +#define USBHS_EP11_R_EN (1 << 27) + +#define USBHS_EP12_T_EN (1 << 12) +#define USBHS_EP12_R_EN (1 << 28) + +#define USBHS_EP13_T_EN (1 << 13) +#define USBHS_EP13_R_EN (1 << 29) + +#define USBHS_EP14_T_EN (1 << 14) +#define USBHS_EP14_R_EN (1 << 30) + +#define USBHS_EP15_T_EN (1 << 15) +#define USBHS_EP15_R_EN (1 << 31) + +//UEP_TYPE +#define USBHS_UEP_TYPE_OFFSET 0x14 +#define USBHS_EP0_T_TYP (1 << 0) +#define USBHS_EP0_R_TYP (1 << 16) + +#define USBHS_EP1_T_TYP (1 << 1) +#define USBHS_EP1_R_TYP (1 << 17) + +#define USBHS_EP2_T_TYP (1 << 2) +#define USBHS_EP2_R_TYP (1 << 18) + +#define USBHS_EP3_T_TYP (1 << 3) +#define USBHS_EP3_R_TYP (1 << 19) + +#define USBHS_EP4_T_TYP (1 << 4) +#define USBHS_EP4_R_TYP (1 << 20) + +#define USBHS_EP5_T_TYP (1 << 5) +#define USBHS_EP5_R_TYP (1 << 21) + +#define USBHS_EP6_T_TYP (1 << 6) +#define USBHS_EP6_R_TYP (1 << 22) + +#define USBHS_EP7_T_TYP (1 << 7) +#define USBHS_EP7_R_TYP (1 << 23) + +#define USBHS_EP8_T_TYP (1 << 8) +#define USBHS_EP8_R_TYP (1 << 24) + +#define USBHS_EP9_T_TYP (1 << 8) +#define USBHS_EP9_R_TYP (1 << 25) + +#define USBHS_EP10_T_TYP (1 << 10) +#define USBHS_EP10_R_TYP (1 << 26) + +#define USBHS_EP11_T_TYP (1 << 11) +#define USBHS_EP11_R_TYP (1 << 27) + +#define USBHS_EP12_T_TYP (1 << 12) +#define USBHS_EP12_R_TYP (1 << 28) + +#define USBHS_EP13_T_TYP (1 << 13) +#define USBHS_EP13_R_TYP (1 << 29) + +#define USBHS_EP14_T_TYP (1 << 14) +#define USBHS_EP14_R_TYP (1 << 30) + +#define USBHS_EP15_T_TYP (1 << 15) +#define USBHS_EP15_R_TYP (1 << 31) + +/* BUF_MOD UEP1~15 */ +#define USBHS_BUF_MOD_OFFSET 0x18 +#define USBHS_EP0_BUF_MOD (1 << 0) +#define USBHS_EP0_ISO_BUF_MOD (1 << 16) + +#define USBHS_EP1_BUF_MOD (1 << 1) +#define USBHS_EP1_ISO_BUF_MOD (1 << 17) + +#define USBHS_EP2_BUF_MOD (1 << 2) +#define USBHS_EP2_ISO_BUF_MOD (1 << 18) + +#define USBHS_EP3_BUF_MOD (1 << 3) +#define USBHS_EP3_ISO_BUF_MOD (1 << 19) + +#define USBHS_EP4_BUF_MOD (1 << 4) +#define USBHS_EP4_ISO_BUF_MOD (1 << 20) + +#define USBHS_EP5_BUF_MOD (1 << 5) +#define USBHS_EP5_ISO_BUF_MOD (1 << 21) + +#define USBHS_EP6_BUF_MOD (1 << 6) +#define USBHS_EP6_ISO_BUF_MOD (1 << 22) + +#define USBHS_EP7_BUF_MOD (1 << 7) +#define USBHS_EP7_ISO_BUF_MOD (1 << 23) + +#define USBHS_EP8_BUF_MOD (1 << 8) +#define USBHS_EP8_ISO_BUF_MOD (1 << 24) + +#define USBHS_EP9_BUF_MOD (1 << 9) +#define USBHS_EP9_ISO_BUF_MOD (1 << 25) + +#define USBHS_EP10_BUF_MOD (1 << 10) +#define USBHS_EP10_ISO_BUF_MOD (1 << 26) + +#define USBHS_EP11_BUF_MOD (1 << 11) +#define USBHS_EP11_ISO_BUF_MOD (1 << 27) + +#define USBHS_EP12_BUF_MOD (1 << 12) +#define USBHS_EP12_ISO_BUF_MOD (1 << 28) + +#define USBHS_EP13_BUF_MOD (1 << 13) +#define USBHS_EP13_ISO_BUF_MOD (1 << 29) + +#define USBHS_EP14_BUF_MOD (1 << 14) +#define USBHS_EP14_ISO_BUF_MOD (1 << 30) + +#define USBHS_EP15_BUF_MOD (1 << 15) +#define USBHS_EP15_ISO_BUF_MOD (1 << 31) +//USBHS_EPn_T_EN USBHS_EPn_R_EN USBHS_EPn_BUF_MOD Description: Arrange from low to high with UEPn_DMA as the starting address +// 0 0 x The endpoint is disabled and the UEPn_*_DMA buffers are not used. +// 1 0 0 The first address of the receive (OUT) buffer is UEPn_RX_DMA +// 1 0 1 RB_UEPn_RX_TOG[0]=0, use buffer UEPn_RX_DMA RB_UEPn_RX_TOG[0]=1, use buffer UEPn_TX_DMA +// 0 1 0 The first address of the transmit (IN) buffer is UEPn_TX_DMA. +// 0 1 1 RB_UEPn_TX_TOG[0]=0, use buffer UEPn_TX_DMA RB_UEPn_TX_TOG[0]=1, use buffer UEPn_RX_DMA + +/* USB0_DMA */ +#define USBHS_UEP0_DMA_OFFSET(n) (0x1C) // endpoint 0 DMA buffer address + +/* USBX_RX_DMA */ +#define USBHS_UEPx_RX_DMA_OFFSET(n) (0x1C + 4 * (n)) // endpoint x DMA buffer address + +#define USBHS_UEPx_TX_DMA_OFFSET(n) (0x58 + 4 * (n)) // endpoint x DMA buffer address + +#define USBHS_UEPx_MAX_LEN_OFFSET(n) (0x98 + 4 * (n)) // endpoint x DMA buffer address + +#define USBHS_UEPx_T_LEN_OFFSET(n) (0xD8 + 4 * (n)) // endpoint x DMA buffer address +#define USBHS_UEPx_TX_CTRL_OFFSET(n) (0xD8 + 4 * (n) + 2) // endpoint x DMA buffer address +#define USBHS_UEPx_RX_CTRL_OFFSET(n) (0xD8 + 4 * (n) + 3) // endpoint x DMA buffer address + +// UEPn_T_LEN +#define USBHS_EP_T_LEN_MASK (0x7FF) + +//UEPn_TX_CTRL +#define USBHS_EP_T_RES_MASK (3 << 0) +#define USBHS_EP_T_RES_ACK (0 << 0) +#define USBHS_EP_T_RES_NYET (1 << 0) +#define USBHS_EP_T_RES_NAK (2 << 0) +#define USBHS_EP_T_RES_STALL (3 << 0) + +#define USBHS_EP_T_TOG_MASK (3 << 3) +#define USBHS_EP_T_TOG_0 (0 << 3) +#define USBHS_EP_T_TOG_1 (1 << 3) +#define USBHS_EP_T_TOG_2 (2 << 3) +#define USBHS_EP_T_TOG_M (3 << 3) + +#define USBHS_EP_T_AUTOTOG (1 << 5) + +//UEPn_RX_CTRL +#define USBHS_EP_R_RES_MASK (3 << 0) +#define USBHS_EP_R_RES_ACK (0 << 0) +#define USBHS_EP_R_RES_NYET (1 << 0) +#define USBHS_EP_R_RES_NAK (2 << 0) +#define USBHS_EP_R_RES_STALL (3 << 0) + +#define USBHS_EP_R_TOG_MASK (3 << 3) +#define USBHS_EP_R_TOG_0 (0 << 3) +#define USBHS_EP_R_TOG_1 (1 << 3) +#define USBHS_EP_R_TOG_2 (2 << 3) +#define USBHS_EP_R_TOG_M (3 << 3) + +#define USBHS_EP_R_AUTOTOG (1 << 5) + +#define USBHS_TOG_MATCH (1 << 6) + +/******************* HOST ******************/ +// USB HOST_CTRL +#define USBHS_SEND_BUS_RESET (1 << 0) +#define USBHS_SEND_BUS_SUSPEND (1 << 1) +#define USBHS_SEND_BUS_RESUME (1 << 2) +#define USBHS_REMOTE_WAKE (1 << 3) +#define USBHS_PHY_SUSPENDM (1 << 4) +#define USBHS_UH_SOFT_FREE (1 << 6) +#define USBHS_SEND_SOF_EN (1 << 7) + +//UH_CONFIG +#define USBHS_HOST_TX_EN (1 << 3) +#define USBHS_HOST_RX_EN (1 << 18) + +// HOST_EP_TYPE +#define USBHS_ENDP_TX_ISO (1 << 3) +#define USBHS_ENDP_RX_ISO (1 << (16 + 2)) + +// R32_UH_EP_PID +#define USBHS_HOST_MASK_TOKEN (0x0f) +#define USBHS_HOST_MASK_ENDP (0x0f << 4) + +//R8_UH_RX_CTRL +#define USBHS_EP_R_RES_MASK (3 << 0) +#define USBHS_EP_R_RES_ACK (0 << 0) +#define USBHS_EP_R_RES_NYET (1 << 0) +#define USBHS_EP_R_RES_NAK (2 << 0) +#define USBHS_EP_R_RES_STALL (3 << 0) + +#define USBHS_UH_R_RES_NO (1 << 2) +#define USBHS_UH_R_TOG_1 (1 << 3) +#define USBHS_UH_R_TOG_2 (2 << 3) +#define USBHS_UH_R_TOG_3 (3 << 3) +#define USBHS_UH_R_TOG_AUTO (1 << 5) +#define USBHS_UH_R_DATA_NO (1 << 6) +//R8_UH_TX_CTRL +#define USBHS_UH_T_RES_MASK (3 << 0) +#define USBHS_UH_T_RES_ACK (0 << 0) +#define USBHS_UH_T_RES_NYET (1 << 0) +#define USBHS_UH_T_RES_NAK (2 << 0) +#define USBHS_UH_T_RES_STALL (3 << 0) + +#define USBHS_UH_T_RES_NO (1 << 2) +#define USBHS_UH_T_TOG_1 (1 << 3) +#define USBHS_UH_T_TOG_2 (2 << 3) +#define USBHS_UH_T_TOG_3 (3 << 3) +#define USBHS_UH_T_TOG_AUTO (1 << 5) +#define USBHS_UH_T_DATA_NO (1 << 6) + +// 00: OUT, 01:SOF, 10:IN, 11:SETUP +#define PID_OUT 0 +#define PID_SOF 1 +#define PID_IN 2 +#define PID_SETUP 3 + +#endif diff --git a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/tusb_option.h b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/tusb_option.h index 9ca6c794bda..eb46ce295b9 100644 --- a/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/tusb_option.h +++ b/tools/sdk/esp32s3/include/arduino_tinyusb/tinyusb/src/tusb_option.h @@ -27,13 +27,10 @@ #ifndef _TUSB_OPTION_H_ #define _TUSB_OPTION_H_ -// To avoid GCC compiler warnings when -pedantic option is used (strict ISO C) -typedef int make_iso_compilers_happy; - #include "common/tusb_compiler.h" #define TUSB_VERSION_MAJOR 0 -#define TUSB_VERSION_MINOR 14 +#define TUSB_VERSION_MINOR 15 #define TUSB_VERSION_REVISION 0 #define TUSB_VERSION_STRING TU_STRING(TUSB_VERSION_MAJOR) "." TU_STRING(TUSB_VERSION_MINOR) "." TU_STRING(TUSB_VERSION_REVISION) @@ -160,6 +157,9 @@ typedef int make_iso_compilers_happy; // Allwinner #define OPT_MCU_F1C100S 2100 ///< Allwinner F1C100s family +// WCH +#define OPT_MCU_CH32V307 2200 ///< WCH CH32V307 + // Helper to check if configured MCU is one of listed // Apply _TU_CHECK_MCU with || as separator to list of input #define _TU_CHECK_MCU(_m) (CFG_TUSB_MCU == _m) @@ -256,6 +256,10 @@ typedef int make_iso_compilers_happy; // For backward compatible #define TUSB_OPT_HOST_ENABLED CFG_TUH_ENABLED +// highspeed support indicator +#define TUH_OPT_HIGH_SPEED (CFG_TUH_MAX_SPEED ? (CFG_TUH_MAX_SPEED & OPT_MODE_HIGH_SPEED) : TUP_RHPORT_HIGHSPEED) + + //--------------------------------------------------------------------+ // TODO move later //--------------------------------------------------------------------+ @@ -428,6 +432,9 @@ typedef int make_iso_compilers_happy; #error Control Endpoint Max Packet Size cannot be larger than 64 #endif +// To avoid GCC compiler warnings when -pedantic option is used (strict ISO C) +typedef int make_iso_compilers_happy; + #endif /* _TUSB_OPTION_H_ */ /** @} */ diff --git a/tools/sdk/esp32s3/include/bootloader_support/include/bootloader_common.h b/tools/sdk/esp32s3/include/bootloader_support/include/bootloader_common.h index 1a641be10ec..13334f2a7ff 100644 --- a/tools/sdk/esp32s3/include/bootloader_support/include/bootloader_common.h +++ b/tools/sdk/esp32s3/include/bootloader_support/include/bootloader_common.h @@ -187,13 +187,6 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata, */ esp_err_t bootloader_common_get_partition_description(const esp_partition_pos_t *partition, esp_app_desc_t *app_desc); -/** - * @brief Get chip revision - * - * @return Chip revision number - */ -uint8_t bootloader_common_get_chip_revision(void); - /** * @brief Get chip package * diff --git a/tools/sdk/esp32s3/include/bootloader_support/include/esp_app_format.h b/tools/sdk/esp32s3/include/bootloader_support/include/esp_app_format.h index ef4f7f4f48f..1f547d3bfbf 100644 --- a/tools/sdk/esp32s3/include/bootloader_support/include/esp_app_format.h +++ b/tools/sdk/esp32s3/include/bootloader_support/include/esp_app_format.h @@ -6,6 +6,7 @@ #pragma once #include +#include "esp_assert.h" /** * @brief ESP chip ID @@ -21,7 +22,7 @@ typedef enum { } __attribute__((packed)) esp_chip_id_t; /** @cond */ -_Static_assert(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); +ESP_STATIC_ASSERT(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); /** @endcond */ /** @@ -88,7 +89,7 @@ typedef struct { } __attribute__((packed)) esp_image_header_t; /** @cond */ -_Static_assert(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); +ESP_STATIC_ASSERT(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); /** @endcond */ diff --git a/tools/sdk/esp32s3/include/bootloader_support/include/esp_image_format.h b/tools/sdk/esp32s3/include/bootloader_support/include/esp_image_format.h index 1db62442537..20545f5d7f6 100644 --- a/tools/sdk/esp32s3/include/bootloader_support/include/esp_image_format.h +++ b/tools/sdk/esp32s3/include/bootloader_support/include/esp_image_format.h @@ -9,6 +9,7 @@ #include #include "esp_flash_partitions.h" #include "esp_app_format.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -53,12 +54,18 @@ typedef struct { uint32_t crc; /*!< Check sum crc32 */ } rtc_retain_mem_t; + +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, crc) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t), "CRC field must be the last field of rtc_retain_mem_t structure"); + #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC -_Static_assert(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +/* The custom field must be the penultimate field */ +ESP_STATIC_ASSERT(offsetof(rtc_retain_mem_t, custom) == sizeof(rtc_retain_mem_t) - sizeof(uint32_t) - CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC_SIZE, + "custom field in rtc_retain_mem_t structure must be the field before the CRC one"); #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); +ESP_STATIC_ASSERT(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_RESERVE_RTC_SIZE must be a multiple of 4 bytes"); #endif #ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC @@ -68,7 +75,7 @@ _Static_assert(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE % 4 == 0, "CONFIG_BOOTLOADER_R #endif #if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP) || defined(CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC) -_Static_assert(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); +ESP_STATIC_ASSERT(sizeof(rtc_retain_mem_t) <= ESP_BOOTLOADER_RESERVE_RTC, "Reserved RTC area must exceed size of rtc_retain_mem_t"); #endif /** diff --git a/tools/sdk/esp32s3/include/bt/common/api/include/api/esp_blufi_api.h b/tools/sdk/esp32s3/include/bt/common/api/include/api/esp_blufi_api.h index 63109b20f12..ce7fe3a0d3c 100644 --- a/tools/sdk/esp32s3/include/bt/common/api/include/api/esp_blufi_api.h +++ b/tools/sdk/esp32s3/include/bt/common/api/include/api/esp_blufi_api.h @@ -57,6 +57,8 @@ typedef enum { typedef enum { ESP_BLUFI_STA_CONN_SUCCESS = 0x00, ESP_BLUFI_STA_CONN_FAIL = 0x01, + ESP_BLUFI_STA_CONNECTING = 0x02, + ESP_BLUFI_STA_NO_IP = 0x03, } esp_blufi_sta_conn_state_t; /// BLUFI init status @@ -82,6 +84,8 @@ typedef enum { ESP_BLUFI_READ_PARAM_ERROR, ESP_BLUFI_MAKE_PUBLIC_ERROR, ESP_BLUFI_DATA_FORMAT_ERROR, + ESP_BLUFI_CALC_MD5_ERROR, + ESP_BLUFI_WIFI_SCAN_FAIL, } esp_blufi_error_state_t; /** @@ -105,6 +109,12 @@ typedef struct { bool softap_max_conn_num_set; /*!< is max connection number of softap interface set */ uint8_t softap_channel; /*!< channel of softap interface */ bool softap_channel_set; /*!< is channel of softap interface set */ + uint8_t sta_max_conn_retry; /*!< max retry of sta establish connection */ + bool sta_max_conn_retry_set; /*!< is max retry of sta establish connection set */ + uint8_t sta_conn_end_reason; /*!< reason of sta connection end */ + bool sta_conn_end_reason_set; /*!< is reason of sta connection end set */ + int8_t sta_conn_rssi; /*!< rssi of sta connection */ + bool sta_conn_rssi_set; /*!< is rssi of sta connection set */ } esp_blufi_extra_info_t; /** @brief Description of an WiFi AP */ diff --git a/tools/sdk/esp32s3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h b/tools/sdk/esp32s3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h index 996621e0488..be2c72c78d5 100644 --- a/tools/sdk/esp32s3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h +++ b/tools/sdk/esp32s3/include/bt/common/btc/profile/esp/blufi/include/blufi_int.h @@ -20,7 +20,7 @@ #if (BLUFI_INCLUDED == TRUE) #define BTC_BLUFI_GREAT_VER 0x01 //Version + Subversion -#define BTC_BLUFI_SUB_VER 0x02 //Version + Subversion +#define BTC_BLUFI_SUB_VER 0x03 //Version + Subversion #define BTC_BLUFI_VERSION ((BTC_BLUFI_GREAT_VER<<8)|BTC_BLUFI_SUB_VER) //Version + Subversion typedef UINT8 tGATT_IF; @@ -129,6 +129,9 @@ extern tBLUFI_ENV *blufi_env_ptr; #define BLUFI_TYPE_DATA_SUBTYPE_WIFI_LIST 0x11 #define BLUFI_TYPE_DATA_SUBTYPE_ERROR_INFO 0x12 #define BLUFI_TYPE_DATA_SUBTYPE_CUSTOM_DATA 0x13 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_MAX_CONN_RETRY 0x14 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_END_REASON 0x15 +#define BLUFI_TYPE_DATA_SUBTYPE_STA_CONN_RSSI 0x16 #define BLUFI_TYPE_IS_CTRL(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_CTRL) #define BLUFI_TYPE_IS_DATA(type) (BLUFI_GET_TYPE((type)) == BLUFI_TYPE_DATA) diff --git a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h index 39ed1a5c1a4..ce81b6c261f 100644 --- a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h +++ b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_config_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_config_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_config_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_config_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_config_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h index a5b586d5ab7..d06785094df 100644 --- a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h +++ b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_generic_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_generic_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_generic_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_generic_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_generic_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h index 331f41c23d6..a04745485bf 100644 --- a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h +++ b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_health_model.h @@ -41,6 +41,8 @@ typedef enum { void btc_ble_mesh_health_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_health_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_health_client_call_handler(btc_msg_t *msg); void btc_ble_mesh_health_client_cb_handler(btc_msg_t *msg); diff --git a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h index 854d6521612..45ca7ee14be 100644 --- a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h +++ b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_lighting_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_lighting_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_lighting_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_lighting_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_lighting_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h index ab54cc487b8..b9cd0156d54 100644 --- a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h +++ b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_prov.h @@ -336,8 +336,12 @@ typedef union { void btc_ble_mesh_prov_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_prov_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_model_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_model_arg_deep_free(btc_msg_t *msg); + const uint8_t *btc_ble_mesh_node_get_local_net_key(uint16_t net_idx); const uint8_t *btc_ble_mesh_node_get_local_app_key(uint16_t app_idx); diff --git a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h index a0dc29f3784..3d216c7fa95 100644 --- a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h +++ b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/btc/include/btc_ble_mesh_sensor_model.h @@ -45,6 +45,8 @@ void btc_ble_mesh_sensor_client_cb_handler(btc_msg_t *msg); void btc_ble_mesh_sensor_client_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src); +void btc_ble_mesh_sensor_client_arg_deep_free(btc_msg_t *msg); + void btc_ble_mesh_sensor_client_publish_callback(uint32_t opcode, struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf); diff --git a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h index 0174c32741f..7bd95c78e0b 100644 --- a/tools/sdk/esp32s3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h +++ b/tools/sdk/esp32s3/include/bt/esp_ble_mesh/mesh_core/include/mesh_bearer_adapt.h @@ -776,29 +776,28 @@ int bt_mesh_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], uint8_t enc_data[16]); enum { - BLE_MESH_EXCEP_LIST_ADD = 0, - BLE_MESH_EXCEP_LIST_REMOVE, - BLE_MESH_EXCEP_LIST_CLEAN, + BLE_MESH_EXCEP_LIST_SUB_CODE_ADD = 0, + BLE_MESH_EXCEP_LIST_SUB_CODE_REMOVE, + BLE_MESH_EXCEP_LIST_SUB_CODE_CLEAN, }; enum { - BLE_MESH_EXCEP_INFO_ADV_ADDR = 0, - BLE_MESH_EXCEP_INFO_MESH_LINK_ID, - BLE_MESH_EXCEP_INFO_MESH_BEACON, - BLE_MESH_EXCEP_INFO_MESH_PROV_ADV, - BLE_MESH_EXCEP_INFO_MESH_PROXY_ADV, + BLE_MESH_EXCEP_LIST_TYPE_ADV_ADDR = 0, + BLE_MESH_EXCEP_LIST_TYPE_MESH_LINK_ID, + BLE_MESH_EXCEP_LIST_TYPE_MESH_BEACON, + BLE_MESH_EXCEP_LIST_TYPE_MESH_PROV_ADV, + BLE_MESH_EXCEP_LIST_TYPE_MESH_PROXY_ADV, }; -enum { - BLE_MESH_EXCEP_CLEAN_ADDR_LIST = BIT(0), - BLE_MESH_EXCEP_CLEAN_MESH_LINK_ID_LIST = BIT(1), - BLE_MESH_EXCEP_CLEAN_MESH_BEACON_LIST = BIT(2), - BLE_MESH_EXCEP_CLEAN_MESH_PROV_ADV_LIST = BIT(3), - BLE_MESH_EXCEP_CLEAN_MESH_PROXY_ADV_LIST = BIT(4), - BLE_MESH_EXCEP_CLEAN_ALL_LIST = 0xFFFF, -}; +#define BLE_MESH_EXCEP_LIST_CLEAN_ADDR_LIST BIT(0) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_LINK_ID_LIST BIT(1) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_BEACON_LIST BIT(2) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_PROV_ADV_LIST BIT(3) +#define BLE_MESH_EXCEP_LIST_CLEAN_MESH_PROXY_ADV_LIST BIT(4) +#define BLE_MESH_EXCEP_LIST_CLEAN_ALL_LIST (BIT(0) | BIT(1) | \ + BIT(2) | BIT(3) | BIT(4)) -int bt_mesh_update_exceptional_list(uint8_t sub_code, uint8_t type, void *info); +int bt_mesh_update_exceptional_list(uint8_t sub_code, uint32_t type, void *info); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h index d0e1ec00950..b85eb18a78a 100644 --- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h +++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_bt_defs.h @@ -27,6 +27,7 @@ extern "C" { return ESP_ERR_INVALID_STATE; \ } +#define ESP_BT_STATUS_BASE_FOR_HCI_ERR 0X0100 /* base for coverting HCI error code to ESP status */ /* relate to BT_STATUS_xxx in bt_def.h */ /// Status Return Value @@ -53,6 +54,71 @@ typedef enum { ESP_BT_STATUS_ERR_ILLEGAL_PARAMETER_FMT, /* relate to HCI_ERR_ILLEGAL_PARAMETER_FMT in stack/hcidefs.h */ ESP_BT_STATUS_MEMORY_FULL = 20, /* relate to BT_STATUS_MEMORY_FULL in bt_def.h */ ESP_BT_STATUS_EIR_TOO_LARGE, /* relate to BT_STATUS_EIR_TOO_LARGE in bt_def.h */ + ESP_BT_STATUS_HCI_SUCCESS = ESP_BT_STATUS_BASE_FOR_HCI_ERR, + ESP_BT_STATUS_HCI_PENDING, + ESP_BT_STATUS_HCI_ILLEGAL_COMMAND, + ESP_BT_STATUS_HCI_NO_CONNECTION, + ESP_BT_STATUS_HCI_HW_FAILURE, + ESP_BT_STATUS_HCI_PAGE_TIMEOUT, + ESP_BT_STATUS_HCI_AUTH_FAILURE, + ESP_BT_STATUS_HCI_KEY_MISSING, + ESP_BT_STATUS_HCI_MEMORY_FULL, + ESP_BT_STATUS_HCI_CONNECTION_TOUT, + ESP_BT_STATUS_HCI_MAX_NUM_OF_CONNECTIONS, + ESP_BT_STATUS_HCI_MAX_NUM_OF_SCOS, + ESP_BT_STATUS_HCI_CONNECTION_EXISTS, + ESP_BT_STATUS_HCI_COMMAND_DISALLOWED, + ESP_BT_STATUS_HCI_HOST_REJECT_RESOURCES, + ESP_BT_STATUS_HCI_HOST_REJECT_SECURITY, + ESP_BT_STATUS_HCI_HOST_REJECT_DEVICE, + ESP_BT_STATUS_HCI_HOST_TIMEOUT, + ESP_BT_STATUS_HCI_UNSUPPORTED_VALUE, + ESP_BT_STATUS_HCI_ILLEGAL_PARAMETER_FMT, + ESP_BT_STATUS_HCI_PEER_USER, + ESP_BT_STATUS_HCI_PEER_LOW_RESOURCES, + ESP_BT_STATUS_HCI_PEER_POWER_OFF, + ESP_BT_STATUS_HCI_CONN_CAUSE_LOCAL_HOST, + ESP_BT_STATUS_HCI_REPEATED_ATTEMPTS, + ESP_BT_STATUS_HCI_PAIRING_NOT_ALLOWED, + ESP_BT_STATUS_HCI_UNKNOWN_LMP_PDU, + ESP_BT_STATUS_HCI_UNSUPPORTED_REM_FEATURE, + ESP_BT_STATUS_HCI_SCO_OFFSET_REJECTED, + ESP_BT_STATUS_HCI_SCO_INTERVAL_REJECTED, + ESP_BT_STATUS_HCI_SCO_AIR_MODE, + ESP_BT_STATUS_HCI_INVALID_LMP_PARAM, + ESP_BT_STATUS_HCI_UNSPECIFIED, + ESP_BT_STATUS_HCI_UNSUPPORTED_LMP_PARAMETERS, + ESP_BT_STATUS_HCI_ROLE_CHANGE_NOT_ALLOWED, + ESP_BT_STATUS_HCI_LMP_RESPONSE_TIMEOUT, + ESP_BT_STATUS_HCI_LMP_ERR_TRANS_COLLISION, + ESP_BT_STATUS_HCI_LMP_PDU_NOT_ALLOWED, + ESP_BT_STATUS_HCI_ENCRY_MODE_NOT_ACCEPTABLE, + ESP_BT_STATUS_HCI_UNIT_KEY_USED, + ESP_BT_STATUS_HCI_QOS_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_INSTANT_PASSED, + ESP_BT_STATUS_HCI_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_DIFF_TRANSACTION_COLLISION, + ESP_BT_STATUS_HCI_UNDEFINED_0x2B, + ESP_BT_STATUS_HCI_QOS_UNACCEPTABLE_PARAM, + ESP_BT_STATUS_HCI_QOS_REJECTED, + ESP_BT_STATUS_HCI_CHAN_CLASSIF_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_INSUFFCIENT_SECURITY, + ESP_BT_STATUS_HCI_PARAM_OUT_OF_RANGE, + ESP_BT_STATUS_HCI_UNDEFINED_0x31, + ESP_BT_STATUS_HCI_ROLE_SWITCH_PENDING, + ESP_BT_STATUS_HCI_UNDEFINED_0x33, + ESP_BT_STATUS_HCI_RESERVED_SLOT_VIOLATION, + ESP_BT_STATUS_HCI_ROLE_SWITCH_FAILED, + ESP_BT_STATUS_HCI_INQ_RSP_DATA_TOO_LARGE, + ESP_BT_STATUS_HCI_SIMPLE_PAIRING_NOT_SUPPORTED, + ESP_BT_STATUS_HCI_HOST_BUSY_PAIRING, + ESP_BT_STATUS_HCI_REJ_NO_SUITABLE_CHANNEL, + ESP_BT_STATUS_HCI_CONTROLLER_BUSY, + ESP_BT_STATUS_HCI_UNACCEPT_CONN_INTERVAL, + ESP_BT_STATUS_HCI_DIRECTED_ADVERTISING_TIMEOUT, + ESP_BT_STATUS_HCI_CONN_TOUT_DUE_TO_MIC_FAILURE, + ESP_BT_STATUS_HCI_CONN_FAILED_ESTABLISHMENT, + ESP_BT_STATUS_HCI_MAC_CONNECTION_FAILED, } esp_bt_status_t; diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h index 686ad1c63e8..6b89b45a840 100644 --- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h +++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h @@ -223,6 +223,8 @@ typedef enum { ESP_BT_GAP_MODE_CHG_EVT, ESP_BT_GAP_REMOVE_BOND_DEV_COMPLETE_EVT, /*!< remove bond device complete event */ ESP_BT_GAP_QOS_CMPL_EVT, /*!< QOS complete event */ + ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT, /*!< ACL connection complete status event */ + ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT, /*!< ACL disconnection complete status event */ ESP_BT_GAP_EVT_MAX, } esp_bt_gap_cb_event_t; @@ -376,6 +378,24 @@ typedef union { which from the master to a particular slave on the ACL logical transport. unit is 0.625ms. */ } qos_cmpl; /*!< QoS complete parameter struct */ + + /** + * @brief ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT + */ + struct acl_conn_cmpl_stat_param { + esp_bt_status_t stat; /*!< ACL connection status */ + uint16_t handle; /*!< ACL connection handle */ + esp_bd_addr_t bda; /*!< remote bluetooth device address */ + } acl_conn_cmpl_stat; /*!< ACL connection complete status parameter struct */ + + /** + * @brief ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT + */ + struct acl_disconn_cmpl_stat_param { + esp_bt_status_t reason; /*!< ACL disconnection reason */ + uint16_t handle; /*!< ACL connection handle */ + esp_bd_addr_t bda; /*!< remote bluetooth device address */ + } acl_disconn_cmpl_stat; /*!< ACL disconnection complete status parameter struct */ } esp_bt_gap_cb_param_t; /** diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h index 9177753bd9d..85d68b49d68 100644 --- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h +++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatt_defs.h @@ -26,7 +26,7 @@ extern "C" { /// GATT INVALID HANDLE #define ESP_GATT_ILLEGAL_HANDLE 0 /// GATT attribute max handle -#define ESP_GATT_ATTR_HANDLE_MAX 100 +#define ESP_GATT_ATTR_HANDLE_MAX UC_CONFIG_BT_GATT_MAX_SR_ATTRIBUTES #define ESP_GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */ @@ -285,6 +285,7 @@ typedef enum { #define ESP_GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 - 0x0100 */ /* relate to BTA_GATT_PERM_WRITE_SIGNED_MITM in bta/bta_gatt_api.h */ #define ESP_GATT_PERM_READ_AUTHORIZATION (1 << 9) /* bit 9 - 0x0200 */ #define ESP_GATT_PERM_WRITE_AUTHORIZATION (1 << 10) /* bit 10 - 0x0400 */ +#define ESP_GATT_PERM_ENCRYPT_KEY_SIZE(keysize) (((keysize - 6) & 0xF) << 12) /* bit 12:15 - 0xF000 */ typedef uint16_t esp_gatt_perm_t; /* relate to BTA_GATT_CHAR_PROP_BIT_xxx in bta/bta_gatt_api.h */ diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h index 558d5d62960..ec2a327a567 100644 --- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h +++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gatts_api.h @@ -360,7 +360,7 @@ esp_err_t esp_ble_gatts_create_service(esp_gatt_if_t gatts_if, */ esp_err_t esp_ble_gatts_create_attr_tab(const esp_gatts_attr_db_t *gatts_attr_db, esp_gatt_if_t gatts_if, - uint8_t max_nb_attr, + uint16_t max_nb_attr, uint8_t srvc_inst_id); /** * @brief This function is called to add an included service. This function have to be called between diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h index c9278fbed29..239a23c3fee 100644 --- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h +++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_hidd_api.h @@ -252,123 +252,144 @@ typedef union { } esp_hidd_cb_param_t; /** - * @brief HID device callback function type. - * @param event: Event type - * @param param: Point to callback parameter, currently is union type + * @brief HID device callback function type. + * @param event: Event type + * @param param: Point to callback parameter, currently is union type */ typedef void (*esp_hd_cb_t)(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param); /** - * @brief This function is called to init callbacks with HID device module. + * @brief This function is called to init callbacks with HID device module. * - * @param[in] callback: pointer to the init callback function. + * @param[in] callback: pointer to the init callback function. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_register_callback(esp_hd_cb_t callback); /** - * @brief This function initializes HIDD. This function should be called after esp_bluedroid_enable and - * esp_blueroid_init success, and should be called after esp_bt_hid_device_register_callback. - * When the operation is complete the callback function will be called with ESP_HIDD_INIT_EVT. + * @brief Initializes HIDD interface. This function should be called after esp_bluedroid_init() and + * esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_register_callback. + * When the operation is complete, the callback function will be called with ESP_HIDD_INIT_EVT. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_init(void); /** - * @brief This function de-initializes HIDD interface. This function should be called after esp_bluedroid_enable() and - * esp_blueroid_init() success, and should be called after esp_bt_hid_device_init(). When the operation is complete the callback - * function will be called with ESP_HIDD_DEINIT_EVT. + * @brief De-initializes HIDD interface. This function should be called after esp_bluedroid_init() and + * esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). When the + * operation is complete, the callback function will be called with ESP_HIDD_DEINIT_EVT. * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_deinit(void); /** - * @brief Registers HIDD parameters with SDP and sets l2cap Quality of Service. This function should be called after - * esp_bluedroid_enable and esp_blueroid_init success, and must be done after esp_bt_hid_device_init. When the operation is complete the callback - * function will be called with ESP_HIDD_REGISTER_APP_EVT. + * @brief Registers HIDD parameters with SDP and sets l2cap Quality of Service. This function should be + * called after esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after + * esp_bt_hid_device_init(). When the operation is complete, the callback function will be called + * with ESP_HIDD_REGISTER_APP_EVT. * - * @param[in] app_param: HIDD parameters - * @param[in] in_qos: incoming QoS parameters - * @param[in] out_qos: outgoing QoS parameters + * @param[in] app_param: HIDD parameters + * @param[in] in_qos: incoming QoS parameters + * @param[in] out_qos: outgoing QoS parameters * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_register_app(esp_hidd_app_param_t *app_param, esp_hidd_qos_param_t *in_qos, esp_hidd_qos_param_t *out_qos); /** - * @brief Removes HIDD parameters from SDP and resets l2cap Quality of Service. This function should be called after esp_bluedroid_enable and - * esp_blueroid_init success, and should be called after esp_bt_hid_device_init. When the operation is complete the callback - * function will be called with ESP_HIDD_UNREGISTER_APP_EVT. + * @brief Removes HIDD parameters from SDP and resets l2cap Quality of Service. This function should be + * called after esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after + * esp_bt_hid_device_init(). When the operation is complete, the callback function will be called + * with ESP_HIDD_UNREGISTER_APP_EVT. * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_unregister_app(void); /** - * @brief This function connects HIDD interface to connected bluetooth device, if not done already. When the operation is complete the callback - * function will be called with ESP_HIDD_OPEN_EVT. + * @brief Connects to the peer HID Host with virtual cable. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_OPEN_EVT. * - * @param[in] bd_addr: Remote host bluetooth device address. + * @param[in] bd_addr: Remote host bluetooth device address. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_connect(esp_bd_addr_t bd_addr); /** - * @brief This function disconnects HIDD interface. When the operation is complete the callback - * function will be called with ESP_HIDD_CLOSE_EVT. + * @brief Disconnects from the currently connected HID Host. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_CLOSE_EVT. + * + * @note The disconnect operation will not remove the virtually cabled device. If the connect request from the + * different HID Host, it will reject the request. * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_disconnect(void); /** - * @brief Send HIDD report. When the operation is complete the callback - * function will be called with ESP_HIDD_SEND_REPORT_EVT. + * @brief Sends HID report to the currently connected HID Host. This function should be called after + * esp_bluedroid_init() and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). + * When the operation is complete, the callback function will be called with ESP_HIDD_SEND_REPORT_EVT. * - * @param[in] type: type of report - * @param[in] id: report id as defined by descriptor - * @param[in] len: length of report - * @param[in] data: report data + * @param[in] type: type of report + * @param[in] id: report id as defined by descriptor + * @param[in] len: length of report + * @param[in] data: report data * * @return - * - ESP_OK: success - * - other: failed + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_send_report(esp_hidd_report_type_t type, uint8_t id, uint16_t len, uint8_t *data); /** - * @brief Sends HIDD handshake with error info for invalid set_report. When the operation is complete the callback - * function will be called with ESP_HIDD_REPORT_ERR_EVT. + * @brief Sends HID Handshake with error info for invalid set_report to the currently connected HID Host. + * This function should be called after esp_bluedroid_init() and esp_bluedroid_enable() success, and + * should be called after esp_bt_hid_device_init(). When the operation is complete, the callback + * function will be called with ESP_HIDD_REPORT_ERR_EVT. * - * @param[in] error: type of error + * @param[in] error: type of error * - * @return - ESP_OK: success - * - other: failed + * @return + * - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_report_error(esp_hidd_handshake_error_t error); /** - * @brief Unplug virtual cable of HIDD. When the operation is complete the callback - * function will be called with ESP_HIDD_VC_UNPLUG_EVT. + * @brief Remove the virtually cabled device. This function should be called after esp_bluedroid_init() + * and esp_bluedroid_enable() success, and should be called after esp_bt_hid_device_init(). When the + * operation is complete, the callback function will be called with ESP_HIDD_VC_UNPLUG_EVT. + * + * @note If the connection exists, then HID Device will send a `VIRTUAL_CABLE_UNPLUG` control command to + * the peer HID Host, and the connection will be destroyed. If the connection does not exist, then HID + * Device will only unplug on it's single side. Once the unplug operation is success, the related + * pairing and bonding information will be removed, then the HID Device can accept connection request + * from the different HID Host, * - * @return - ESP_OK: success - * - other: failed + * @return - ESP_OK: success + * - other: failed */ esp_err_t esp_bt_hid_device_virtual_cable_unplug(void); diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h index be827649745..24331991933 100644 --- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h +++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_spp_api.h @@ -77,6 +77,8 @@ typedef enum { ESP_SPP_WRITE_EVT = 33, /*!< When SPP write operation completes, the event comes, only for ESP_SPP_MODE_CB */ ESP_SPP_SRV_OPEN_EVT = 34, /*!< When SPP Server connection open, the event comes */ ESP_SPP_SRV_STOP_EVT = 35, /*!< When SPP server stopped, the event comes */ + ESP_SPP_VFS_REGISTER_EVT = 36, /*!< When SPP VFS register, the event comes */ + ESP_SPP_VFS_UNREGISTER_EVT = 37, /*!< When SPP VFS unregister, the event comes */ } esp_spp_cb_event_t; @@ -195,6 +197,20 @@ typedef union { uint32_t handle; /*!< The connection handle */ bool cong; /*!< TRUE, congested. FALSE, uncongested */ } cong; /*!< SPP callback param of ESP_SPP_CONG_EVT */ + + /** + * @brief ESP_SPP_VFS_REGISTER_EVT + */ + struct spp_vfs_register_evt_param { + esp_spp_status_t status; /*!< status */ + } vfs_register; /*!< SPP callback param of ESP_SPP_VFS_REGISTER_EVT */ + + /** + * @brief ESP_SPP_VFS_UNREGISTER_EVT + */ + struct spp_vfs_unregister_evt_param { + esp_spp_status_t status; /*!< status */ + } vfs_unregister; /*!< SPP callback param of ESP_SPP_VFS_UNREGISTER_EVT */ } esp_spp_cb_param_t; /*!< SPP callback parameter union type */ /** @@ -358,6 +374,8 @@ esp_err_t esp_spp_write(uint32_t handle, int len, uint8_t *p_data); /** * @brief This function is used to register VFS. * For now, SPP only supports write, read and close. + * When the operation is completed, the callback function will be called with ESP_SPP_VFS_REGISTER_EVT. + * This function must be called after esp_spp_init()/esp_spp_enhanced_init() successful and before esp_spp_deinit(). * * @return * - ESP_OK: success @@ -365,6 +383,17 @@ esp_err_t esp_spp_write(uint32_t handle, int len, uint8_t *p_data); */ esp_err_t esp_spp_vfs_register(void); +/** + * @brief This function is used to unregister VFS. + * When the operation is completed, the callback function will be called with ESP_SPP_VFS_UNREGISTER_EVT. + * This function must be called after esp_spp_vfs_register() successful and before esp_spp_deinit(). + * + * @return + * - ESP_OK: success + * - other: failed + */ +esp_err_t esp_spp_vfs_unregister(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/bt/include/esp32s3/include/esp_bt.h b/tools/sdk/esp32s3/include/bt/include/esp32s3/include/esp_bt.h index d0e1a434bff..ff02cf00d0a 100644 --- a/tools/sdk/esp32s3/include/bt/include/esp32s3/include/esp_bt.h +++ b/tools/sdk/esp32s3/include/bt/include/esp32s3/include/esp_bt.h @@ -12,13 +12,14 @@ #include "esp_err.h" #include "sdkconfig.h" #include "esp_task.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { #endif #define ESP_BT_CTRL_CONFIG_MAGIC_VAL 0x5A5AA5A5 -#define ESP_BT_CTRL_CONFIG_VERSION 0x02112280 +#define ESP_BT_CTRL_CONFIG_VERSION 0x02212090 #define ESP_BT_HCI_TL_MAGIC_VALUE 0xfadebead #define ESP_BT_HCI_TL_VERSION 0x00010000 @@ -129,6 +130,18 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status); #define MESH_DUPLICATE_SCAN_CACHE_SIZE 0 #endif +#ifndef CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD +#define DUPL_SCAN_CACHE_REFRESH_PERIOD 0 +#else +#define DUPL_SCAN_CACHE_REFRESH_PERIOD CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD +#endif + +#ifdef CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX +#define BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX +#else +#define BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX 0 +#endif + #ifdef CONFIG_BT_CTRL_AGC_RECORRECT_EN #define BT_CTRL_AGC_RECORRECT_EN CONFIG_BT_CTRL_AGC_RECORRECT_EN #else @@ -180,10 +193,12 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status); .slave_ce_len_min = SLAVE_CE_LEN_MIN_DEFAULT, \ .hw_recorrect_en = AGC_RECORRECT_EN, \ .cca_thresh = CONFIG_BT_CTRL_HW_CCA_VAL, \ + .scan_backoff_upperlimitmax = BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX, \ + .dup_list_refresh_period = DUPL_SCAN_CACHE_REFRESH_PERIOD, \ } #else -#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; _Static_assert(0, "please enable bluetooth in menuconfig to use bt.h"); +#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; ESP_STATIC_ASSERT(0, "please enable bluetooth in menuconfig to use esp_bt.h"); #endif /** @@ -247,6 +262,8 @@ typedef struct { uint8_t slave_ce_len_min; /*!< slave minimum ce length*/ uint8_t hw_recorrect_en; uint8_t cca_thresh; /*!< cca threshold*/ + uint16_t scan_backoff_upperlimitmax; /*!< scan backoff upperlimitmax value */ + uint16_t dup_list_refresh_period; /*!< duplicate scan list refresh time */ } esp_bt_controller_config_t; /** diff --git a/tools/sdk/esp32s3/include/console/argtable3/argtable3.h b/tools/sdk/esp32s3/include/console/argtable3/argtable3.h index abb2009cccf..95715b1907e 100644 --- a/tools/sdk/esp32s3/include/console/argtable3/argtable3.h +++ b/tools/sdk/esp32s3/include/console/argtable3/argtable3.h @@ -1,4 +1,11 @@ +/* + * SPDX-FileCopyrightText: 1998-2001,2003-2011,2013 Stewart Heitmann + * + * SPDX-License-Identifier: BSD-3-Clause + */ /******************************************************************************* + * argtable3: Declares the main interfaces of the library + * * This file is part of the argtable3 library. * * Copyright (C) 1998-2001,2003-2011,2013 Stewart Heitmann @@ -31,274 +38,240 @@ #ifndef ARGTABLE3 #define ARGTABLE3 -#include /* FILE */ -#include /* struct tm */ +#include /* FILE */ +#include /* struct tm */ #ifdef __cplusplus extern "C" { #endif #define ARG_REX_ICASE 1 +#define ARG_DSTR_SIZE 200 +#define ARG_CMD_NAME_LEN 100 +#define ARG_CMD_DESCRIPTION_LEN 256 + +#ifndef ARG_REPLACE_GETOPT +#define ARG_REPLACE_GETOPT 0 /* ESP-IDF-specific: use newlib-provided getopt instead of the embedded one */ +#endif /* ARG_REPLACE_GETOPT */ /* bit masks for arg_hdr.flag */ -enum -{ - ARG_TERMINATOR=0x1, - ARG_HASVALUE=0x2, - ARG_HASOPTVALUE=0x4 -}; +enum { ARG_TERMINATOR = 0x1, ARG_HASVALUE = 0x2, ARG_HASOPTVALUE = 0x4 }; + +#if defined(_WIN32) + #if defined(argtable3_EXPORTS) + #define ARG_EXTERN __declspec(dllexport) + #elif defined(argtable3_IMPORTS) + #define ARG_EXTERN __declspec(dllimport) + #else + #define ARG_EXTERN + #endif +#else + #define ARG_EXTERN +#endif -typedef void (arg_resetfn)(void *parent); -typedef int (arg_scanfn)(void *parent, const char *argval); -typedef int (arg_checkfn)(void *parent); -typedef void (arg_errorfn)(void *parent, FILE *fp, int error, const char *argval, const char *progname); +typedef struct _internal_arg_dstr* arg_dstr_t; +typedef void* arg_cmd_itr_t; +typedef void(arg_resetfn)(void* parent); +typedef int(arg_scanfn)(void* parent, const char* argval); +typedef int(arg_checkfn)(void* parent); +typedef void(arg_errorfn)(void* parent, arg_dstr_t ds, int error, const char* argval, const char* progname); +typedef void(arg_dstr_freefn)(char* buf); +typedef int(arg_cmdfn)(int argc, char* argv[], arg_dstr_t res); +typedef int(arg_comparefn)(const void* k1, const void* k2); /* -* The arg_hdr struct defines properties that are common to all arg_xxx structs. -* The argtable library requires each arg_xxx struct to have an arg_hdr -* struct as its first data member. -* The argtable library functions then use this data to identify the -* properties of the command line option, such as its option tags, -* datatype string, and glossary strings, and so on. -* Moreover, the arg_hdr struct contains pointers to custom functions that -* are provided by each arg_xxx struct which perform the tasks of parsing -* that particular arg_xxx arguments, performing post-parse checks, and -* reporting errors. -* These functions are private to the individual arg_xxx source code -* and are the pointer to them are initiliased by that arg_xxx struct's -* constructor function. The user could alter them after construction -* if desired, but the original intention is for them to be set by the -* constructor and left unaltered. -*/ -struct arg_hdr -{ - char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ - const char *shortopts; /* String defining the short options */ - const char *longopts; /* String defiing the long options */ - const char *datatype; /* Description of the argument data type */ - const char *glossary; /* Description of the option as shown by arg_print_glossary function */ - int mincount; /* Minimum number of occurences of this option accepted */ - int maxcount; /* Maximum number of occurences if this option accepted */ - void *parent; /* Pointer to parent arg_xxx struct */ - arg_resetfn *resetfn; /* Pointer to parent arg_xxx reset function */ - arg_scanfn *scanfn; /* Pointer to parent arg_xxx scan function */ - arg_checkfn *checkfn; /* Pointer to parent arg_xxx check function */ - arg_errorfn *errorfn; /* Pointer to parent arg_xxx error function */ - void *priv; /* Pointer to private header data for use by arg_xxx functions */ -}; - -struct arg_rem -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ -}; - -struct arg_lit -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ -}; - -struct arg_int -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - int *ival; /* Array of parsed argument values */ -}; - -struct arg_dbl -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - double *dval; /* Array of parsed argument values */ -}; - -struct arg_str -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_rex -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args */ - const char **sval; /* Array of parsed argument values */ -}; - -struct arg_file -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of matching command line args*/ - const char **filename; /* Array of parsed filenames (eg: /home/foo.bar) */ - const char **basename; /* Array of parsed basenames (eg: foo.bar) */ - const char **extension; /* Array of parsed extensions (eg: .bar) */ -}; - -struct arg_date -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - const char *format; /* strptime format string used to parse the date */ - int count; /* Number of matching command line args */ - struct tm *tmval; /* Array of parsed time values */ -}; - -enum {ARG_ELIMIT=1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG}; -struct arg_end -{ - struct arg_hdr hdr; /* The mandatory argtable header struct */ - int count; /* Number of errors encountered */ - int *error; /* Array of error codes */ - void **parent; /* Array of pointers to offending arg_xxx struct */ - const char **argval; /* Array of pointers to offending argv[] string */ -}; - + * The arg_hdr struct defines properties that are common to all arg_xxx structs. + * The argtable library requires each arg_xxx struct to have an arg_hdr + * struct as its first data member. + * The argtable library functions then use this data to identify the + * properties of the command line option, such as its option tags, + * datatype string, and glossary strings, and so on. + * Moreover, the arg_hdr struct contains pointers to custom functions that + * are provided by each arg_xxx struct which perform the tasks of parsing + * that particular arg_xxx arguments, performing post-parse checks, and + * reporting errors. + * These functions are private to the individual arg_xxx source code + * and are the pointer to them are initiliased by that arg_xxx struct's + * constructor function. The user could alter them after construction + * if desired, but the original intention is for them to be set by the + * constructor and left unaltered. + */ +typedef struct arg_hdr { + char flag; /* Modifier flags: ARG_TERMINATOR, ARG_HASVALUE. */ + const char* shortopts; /* String defining the short options */ + const char* longopts; /* String defiing the long options */ + const char* datatype; /* Description of the argument data type */ + const char* glossary; /* Description of the option as shown by arg_print_glossary function */ + int mincount; /* Minimum number of occurences of this option accepted */ + int maxcount; /* Maximum number of occurences if this option accepted */ + void* parent; /* Pointer to parent arg_xxx struct */ + arg_resetfn* resetfn; /* Pointer to parent arg_xxx reset function */ + arg_scanfn* scanfn; /* Pointer to parent arg_xxx scan function */ + arg_checkfn* checkfn; /* Pointer to parent arg_xxx check function */ + arg_errorfn* errorfn; /* Pointer to parent arg_xxx error function */ + void* priv; /* Pointer to private header data for use by arg_xxx functions */ +} arg_hdr_t; + +typedef struct arg_rem { + struct arg_hdr hdr; /* The mandatory argtable header struct */ +} arg_rem_t; + +typedef struct arg_lit { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ +} arg_lit_t; + +typedef struct arg_int { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + int* ival; /* Array of parsed argument values */ +} arg_int_t; + +typedef struct arg_dbl { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + double* dval; /* Array of parsed argument values */ +} arg_dbl_t; + +typedef struct arg_str { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_str_t; + +typedef struct arg_rex { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args */ + const char** sval; /* Array of parsed argument values */ +} arg_rex_t; + +typedef struct arg_file { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of matching command line args*/ + const char** filename; /* Array of parsed filenames (eg: /home/foo.bar) */ + const char** basename; /* Array of parsed basenames (eg: foo.bar) */ + const char** extension; /* Array of parsed extensions (eg: .bar) */ +} arg_file_t; + +typedef struct arg_date { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + const char* format; /* strptime format string used to parse the date */ + int count; /* Number of matching command line args */ + struct tm* tmval; /* Array of parsed time values */ +} arg_date_t; + +enum { ARG_ELIMIT = 1, ARG_EMALLOC, ARG_ENOMATCH, ARG_ELONGOPT, ARG_EMISSARG }; +typedef struct arg_end { + struct arg_hdr hdr; /* The mandatory argtable header struct */ + int count; /* Number of errors encountered */ + int* error; /* Array of error codes */ + void** parent; /* Array of pointers to offending arg_xxx struct */ + const char** argval; /* Array of pointers to offending argv[] string */ +} arg_end_t; + +typedef struct arg_cmd_info { + char name[ARG_CMD_NAME_LEN]; + char description[ARG_CMD_DESCRIPTION_LEN]; + arg_cmdfn* proc; +} arg_cmd_info_t; /**** arg_xxx constructor functions *********************************/ -struct arg_rem* arg_rem(const char* datatype, const char* glossary); - -struct arg_lit* arg_lit0(const char* shortopts, - const char* longopts, - const char* glossary); -struct arg_lit* arg_lit1(const char* shortopts, - const char* longopts, - const char *glossary); -struct arg_lit* arg_litn(const char* shortopts, - const char* longopts, - int mincount, - int maxcount, - const char *glossary); - -struct arg_key* arg_key0(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_key1(const char* keyword, - int flags, - const char* glossary); -struct arg_key* arg_keyn(const char* keyword, - int flags, - int mincount, - int maxcount, - const char* glossary); - -struct arg_int* arg_int0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_int* arg_int1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_int* arg_intn(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_dbl* arg_dbl0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_dbl* arg_dbl1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_dbl* arg_dbln(const char* shortopts, - const char* longopts, - const char *datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_str* arg_str0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_str* arg_str1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_str* arg_strn(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_rex* arg_rex0(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char* glossary); -struct arg_rex* arg_rex1(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int flags, - const char *glossary); -struct arg_rex* arg_rexn(const char* shortopts, - const char* longopts, - const char* pattern, - const char* datatype, - int mincount, - int maxcount, - int flags, - const char *glossary); - -struct arg_file* arg_file0(const char* shortopts, - const char* longopts, - const char* datatype, - const char* glossary); -struct arg_file* arg_file1(const char* shortopts, - const char* longopts, - const char* datatype, - const char *glossary); -struct arg_file* arg_filen(const char* shortopts, - const char* longopts, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_date* arg_date0(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char* glossary); -struct arg_date* arg_date1(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - const char *glossary); -struct arg_date* arg_daten(const char* shortopts, - const char* longopts, - const char* format, - const char* datatype, - int mincount, - int maxcount, - const char *glossary); - -struct arg_end* arg_end(int maxerrors); +ARG_EXTERN struct arg_rem* arg_rem(const char* datatype, const char* glossary); + +ARG_EXTERN struct arg_lit* arg_lit0(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_lit1(const char* shortopts, const char* longopts, const char* glossary); +ARG_EXTERN struct arg_lit* arg_litn(const char* shortopts, const char* longopts, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_int* arg_int0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_int1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_int* arg_intn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_dbl* arg_dbl0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbl1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_dbl* arg_dbln(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_str* arg_str0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_str1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_str* arg_strn(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_rex* arg_rex0(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rex1(const char* shortopts, const char* longopts, const char* pattern, const char* datatype, int flags, const char* glossary); +ARG_EXTERN struct arg_rex* arg_rexn(const char* shortopts, + const char* longopts, + const char* pattern, + const char* datatype, + int mincount, + int maxcount, + int flags, + const char* glossary); + +ARG_EXTERN struct arg_file* arg_file0(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_file1(const char* shortopts, const char* longopts, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_file* arg_filen(const char* shortopts, const char* longopts, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_date* arg_date0(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_date1(const char* shortopts, const char* longopts, const char* format, const char* datatype, const char* glossary); +ARG_EXTERN struct arg_date* arg_daten(const char* shortopts, const char* longopts, const char* format, const char* datatype, int mincount, int maxcount, const char* glossary); + +ARG_EXTERN struct arg_end* arg_end(int maxcount); +#define ARG_DSTR_STATIC ((arg_dstr_freefn*)0) +#define ARG_DSTR_VOLATILE ((arg_dstr_freefn*)1) +#define ARG_DSTR_DYNAMIC ((arg_dstr_freefn*)3) /**** other functions *******************************************/ -int arg_nullcheck(void **argtable); -int arg_parse(int argc, char **argv, void **argtable); -void arg_print_option(FILE *fp, const char *shortopts, const char *longopts, const char *datatype, const char *suffix); -void arg_print_syntax(FILE *fp, void **argtable, const char *suffix); -void arg_print_syntaxv(FILE *fp, void **argtable, const char *suffix); -void arg_print_glossary(FILE *fp, void **argtable, const char *format); -void arg_print_glossary_gnu(FILE *fp, void **argtable); -void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); -void arg_freetable(void **argtable, size_t n); -void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN int arg_nullcheck(void** argtable); +ARG_EXTERN int arg_parse(int argc, char** argv, void** argtable); +ARG_EXTERN void arg_print_option(FILE* fp, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv(FILE* fp, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary(FILE* fp, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu(FILE* fp, void** argtable); +ARG_EXTERN void arg_print_formatted(FILE *fp, const unsigned lmargin, const unsigned rmargin, const char *text); +ARG_EXTERN void arg_print_errors(FILE* fp, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_print_option_ds(arg_dstr_t ds, const char* shortopts, const char* longopts, const char* datatype, const char* suffix); +ARG_EXTERN void arg_print_syntax_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_syntaxv_ds(arg_dstr_t ds, void** argtable, const char* suffix); +ARG_EXTERN void arg_print_glossary_ds(arg_dstr_t ds, void** argtable, const char* format); +ARG_EXTERN void arg_print_glossary_gnu_ds(arg_dstr_t ds, void** argtable); +ARG_EXTERN void arg_print_errors_ds(arg_dstr_t ds, struct arg_end* end, const char* progname); +ARG_EXTERN void arg_freetable(void** argtable, size_t n); + +ARG_EXTERN arg_dstr_t arg_dstr_create(void); +ARG_EXTERN void arg_dstr_destroy(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_reset(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_free(arg_dstr_t ds); +ARG_EXTERN void arg_dstr_set(arg_dstr_t ds, char* str, arg_dstr_freefn* free_proc); +ARG_EXTERN void arg_dstr_cat(arg_dstr_t ds, const char* str); +ARG_EXTERN void arg_dstr_catc(arg_dstr_t ds, char c); +ARG_EXTERN void arg_dstr_catf(arg_dstr_t ds, const char* fmt, ...); +ARG_EXTERN char* arg_dstr_cstr(arg_dstr_t ds); + +ARG_EXTERN void arg_cmd_init(void); +ARG_EXTERN void arg_cmd_uninit(void); +ARG_EXTERN void arg_cmd_register(const char* name, arg_cmdfn* proc, const char* description); +ARG_EXTERN void arg_cmd_unregister(const char* name); +ARG_EXTERN int arg_cmd_dispatch(const char* name, int argc, char* argv[], arg_dstr_t res); +ARG_EXTERN unsigned int arg_cmd_count(void); +ARG_EXTERN arg_cmd_info_t* arg_cmd_info(const char* name); +ARG_EXTERN arg_cmd_itr_t arg_cmd_itr_create(void); +ARG_EXTERN void arg_cmd_itr_destroy(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_advance(arg_cmd_itr_t itr); +ARG_EXTERN char* arg_cmd_itr_key(arg_cmd_itr_t itr); +ARG_EXTERN arg_cmd_info_t* arg_cmd_itr_value(arg_cmd_itr_t itr); +ARG_EXTERN int arg_cmd_itr_search(arg_cmd_itr_t itr, void* k); +ARG_EXTERN void arg_mgsort(void* data, int size, int esize, int i, int k, arg_comparefn* comparefn); +ARG_EXTERN void arg_make_get_help_msg(arg_dstr_t res); +ARG_EXTERN void arg_make_help_msg(arg_dstr_t ds, char* cmd_name, void** argtable); +ARG_EXTERN void arg_make_syntax_err_msg(arg_dstr_t ds, void** argtable, struct arg_end* end); +ARG_EXTERN int arg_make_syntax_err_help_msg(arg_dstr_t ds, char* name, int help, int nerrors, void** argtable, struct arg_end* end, int* exitcode); +ARG_EXTERN void arg_set_module_name(const char* name); +ARG_EXTERN void arg_set_module_version(int major, int minor, int patch, const char* tag); /**** deprecated functions, for back-compatibility only ********/ -void arg_free(void **argtable); +ARG_EXTERN void arg_free(void** argtable); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/console/argtable3/argtable3_private.h b/tools/sdk/esp32s3/include/console/argtable3/argtable3_private.h new file mode 100644 index 00000000000..5589fc7ffad --- /dev/null +++ b/tools/sdk/esp32s3/include/console/argtable3/argtable3_private.h @@ -0,0 +1,245 @@ +/* + * SPDX-FileCopyrightText: 2013-2019 Tom G. Huang + * + * SPDX-License-Identifier: BSD-3-Clause + */ +/******************************************************************************* + * argtable3_private: Declares private types, constants, and interfaces + * + * This file is part of the argtable3 library. + * + * Copyright (C) 2013-2019 Tom G. Huang + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of STEWART HEITMANN nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +#ifndef ARG_UTILS_H +#define ARG_UTILS_H + +#include + +#define ARG_ENABLE_TRACE 0 +#define ARG_ENABLE_LOG 0 + +#ifdef __cplusplus +extern "C" { +#endif + +enum { ARG_ERR_MINCOUNT = 1, ARG_ERR_MAXCOUNT, ARG_ERR_BADINT, ARG_ERR_OVERFLOW, ARG_ERR_BADDOUBLE, ARG_ERR_BADDATE, ARG_ERR_REGNOMATCH }; + +typedef void(arg_panicfn)(const char* fmt, ...); + +#if defined(_MSC_VER) +#define ARG_TRACE(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) + +#define ARG_LOG(x) \ + __pragma(warning(push)) __pragma(warning(disable : 4127)) do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } \ + while (0) \ + __pragma(warning(pop)) +#else +#define ARG_TRACE(x) \ + do { \ + if (ARG_ENABLE_TRACE) \ + dbg_printf x; \ + } while (0) + +#define ARG_LOG(x) \ + do { \ + if (ARG_ENABLE_LOG) \ + dbg_printf x; \ + } while (0) +#endif + +/* + * Rename a few generic names to unique names. + * They can be a problem for the platforms like NuttX, where + * the namespace is flat for everything including apps and libraries. + */ +#define xmalloc argtable3_xmalloc +#define xcalloc argtable3_xcalloc +#define xrealloc argtable3_xrealloc +#define xfree argtable3_xfree + +extern void dbg_printf(const char* fmt, ...); +extern void arg_set_panic(arg_panicfn* proc); +extern void* xmalloc(size_t size); +extern void* xcalloc(size_t count, size_t size); +extern void* xrealloc(void* ptr, size_t size); +extern void xfree(void* ptr); + +struct arg_hashtable_entry { + void *k, *v; + unsigned int h; + struct arg_hashtable_entry* next; +}; + +typedef struct arg_hashtable { + unsigned int tablelength; + struct arg_hashtable_entry** table; + unsigned int entrycount; + unsigned int loadlimit; + unsigned int primeindex; + unsigned int (*hashfn)(const void* k); + int (*eqfn)(const void* k1, const void* k2); +} arg_hashtable_t; + +/** + * @brief Create a hash table. + * + * @param minsize minimum initial size of hash table + * @param hashfn function for hashing keys + * @param eqfn function for determining key equality + * @return newly created hash table or NULL on failure + */ +arg_hashtable_t* arg_hashtable_create(unsigned int minsize, unsigned int (*hashfn)(const void*), int (*eqfn)(const void*, const void*)); + +/** + * @brief This function will cause the table to expand if the insertion would take + * the ratio of entries to table size over the maximum load factor. + * + * This function does not check for repeated insertions with a duplicate key. + * The value returned when using a duplicate key is undefined -- when + * the hash table changes size, the order of retrieval of duplicate key + * entries is reversed. + * If in doubt, remove before insert. + * + * @param h the hash table to insert into + * @param k the key - hash table claims ownership and will free on removal + * @param v the value - does not claim ownership + * @return non-zero for successful insertion + */ +void arg_hashtable_insert(arg_hashtable_t* h, void* k, void* v); + +#define ARG_DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \ + int fnname(arg_hashtable_t* h, keytype* k, valuetype* v) { return arg_hashtable_insert(h, k, v); } + +/** + * @brief Search the specified key in the hash table. + * + * @param h the hash table to search + * @param k the key to search for - does not claim ownership + * @return the value associated with the key, or NULL if none found + */ +void* arg_hashtable_search(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \ + valuetype* fnname(arg_hashtable_t* h, keytype* k) { return (valuetype*)(arg_hashtable_search(h, k)); } + +/** + * @brief Remove the specified key from the hash table. + * + * @param h the hash table to remove the item from + * @param k the key to search for - does not claim ownership + */ +void arg_hashtable_remove(arg_hashtable_t* h, const void* k); + +#define ARG_DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \ + void fnname(arg_hashtable_t* h, keytype* k) { arg_hashtable_remove(h, k); } + +/** + * @brief Return the number of keys in the hash table. + * + * @param h the hash table + * @return the number of items stored in the hash table + */ +unsigned int arg_hashtable_count(arg_hashtable_t* h); + +/** + * @brief Change the value associated with the key. + * + * function to change the value associated with a key, where there already + * exists a value bound to the key in the hash table. + * Source due to Holger Schemel. + * + * @name hashtable_change + * @param h the hash table + * @param key + * @param value + */ +int arg_hashtable_change(arg_hashtable_t* h, void* k, void* v); + +/** + * @brief Free the hash table and the memory allocated for each key-value pair. + * + * @param h the hash table + * @param free_values whether to call 'free' on the remaining values + */ +void arg_hashtable_destroy(arg_hashtable_t* h, int free_values); + +typedef struct arg_hashtable_itr { + arg_hashtable_t* h; + struct arg_hashtable_entry* e; + struct arg_hashtable_entry* parent; + unsigned int index; +} arg_hashtable_itr_t; + +arg_hashtable_itr_t* arg_hashtable_itr_create(arg_hashtable_t* h); + +void arg_hashtable_itr_destroy(arg_hashtable_itr_t* itr); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_key(arg_hashtable_itr_t* i); + +/** + * @brief Return the value of the (key,value) pair at the current position. + */ +extern void* arg_hashtable_itr_value(arg_hashtable_itr_t* i); + +/** + * @brief Advance the iterator to the next element. Returns zero if advanced to end of table. + */ +int arg_hashtable_itr_advance(arg_hashtable_itr_t* itr); + +/** + * @brief Remove current element and advance the iterator to the next element. + */ +int arg_hashtable_itr_remove(arg_hashtable_itr_t* itr); + +/** + * @brief Search and overwrite the supplied iterator, to point to the entry matching the supplied key. + * + * @return Zero if not found. + */ +int arg_hashtable_itr_search(arg_hashtable_itr_t* itr, arg_hashtable_t* h, void* k); + +#define ARG_DEFINE_HASHTABLE_ITERATOR_SEARCH(fnname, keytype) \ + int fnname(arg_hashtable_itr_t* i, arg_hashtable_t* h, keytype* k) { return (arg_hashtable_iterator_search(i, h, k)); } + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tools/sdk/esp32s3/include/driver/esp32s3/include/driver/touch_sensor.h b/tools/sdk/esp32s3/include/driver/esp32s3/include/driver/touch_sensor.h index 94eb8239e18..9278f483a99 100644 --- a/tools/sdk/esp32s3/include/driver/esp32s3/include/driver/touch_sensor.h +++ b/tools/sdk/esp32s3/include/driver/esp32s3/include/driver/touch_sensor.h @@ -67,7 +67,7 @@ esp_err_t touch_pad_set_meas_time(uint16_t sleep_cycle, uint16_t meas_times); esp_err_t touch_pad_get_meas_time(uint16_t *sleep_cycle, uint16_t *meas_times); /** - * @brief Set connection type of touch channel in idle status. + * @brief Set the connection type of touch channels in idle status. * When a channel is in measurement mode, other initialized channels are in idle mode. * The touch channel is generally adjacent to the trace, so the connection state of the idle channel * affects the stability and sensitivity of the test channel. @@ -80,7 +80,7 @@ esp_err_t touch_pad_get_meas_time(uint16_t *sleep_cycle, uint16_t *meas_times); esp_err_t touch_pad_set_idle_channel_connect(touch_pad_conn_type_t type); /** - * @brief Set connection type of touch channel in idle status. + * @brief Get the connection type of touch channels in idle status. * When a channel is in measurement mode, other initialized channels are in idle mode. * The touch channel is generally adjacent to the trace, so the connection state of the idle channel * affects the stability and sensitivity of the test channel. diff --git a/tools/sdk/esp32s3/include/driver/include/driver/gpio.h b/tools/sdk/esp32s3/include/driver/include/driver/gpio.h index b904def347b..90723c2100a 100644 --- a/tools/sdk/esp32s3/include/driver/include/driver/gpio.h +++ b/tools/sdk/esp32s3/include/driver/include/driver/gpio.h @@ -50,7 +50,9 @@ extern "C" { #define GPIO_IS_VALID_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_GPIO_MASK) != 0) /// Check whether it can be a valid GPIO number of output mode #define GPIO_IS_VALID_OUTPUT_GPIO(gpio_num) (((1ULL << (gpio_num)) & SOC_GPIO_VALID_OUTPUT_GPIO_MASK) != 0) - +/// Check whether it can be a valid digital I/O pad +#define GPIO_IS_VALID_DIGITAL_IO_PAD(gpio_num) ((gpio_num >= 0) && \ + (((1ULL << (gpio_num)) & SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK) != 0)) typedef intr_handle_t gpio_isr_handle_t; @@ -447,7 +449,6 @@ esp_err_t gpio_force_hold_all(void); esp_err_t gpio_force_unhold_all(void); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable SLP_SEL to change GPIO status automantically in lightsleep. * @param gpio_num GPIO number of the pad. @@ -494,7 +495,6 @@ esp_err_t gpio_sleep_set_direction(gpio_num_t gpio_num, gpio_mode_t mode); * - ESP_ERR_INVALID_ARG : Parameter error */ esp_err_t gpio_sleep_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull); -#endif #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32s3/include/driver/include/driver/ledc.h b/tools/sdk/esp32s3/include/driver/include/driver/ledc.h index d9b8df8edaf..599622a2c24 100644 --- a/tools/sdk/esp32s3/include/driver/include/driver/ledc.h +++ b/tools/sdk/esp32s3/include/driver/include/driver/ledc.h @@ -78,8 +78,9 @@ typedef struct { * @brief Type of LEDC event callback * @param param LEDC callback parameter * @param user_arg User registered data + * @return Whether a high priority task has been waken up by this function */ -typedef bool (* ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); +typedef bool (*ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg); /** * @brief Group of supported LEDC callbacks @@ -99,7 +100,7 @@ typedef struct { * - ESP_OK Success * - ESP_ERR_INVALID_ARG Parameter error */ -esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); +esp_err_t ledc_channel_config(const ledc_channel_config_t *ledc_conf); /** * @brief LEDC timer configuration @@ -112,7 +113,7 @@ esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf); * - ESP_ERR_INVALID_ARG Parameter error * - ESP_FAIL Can not find a proper pre-divider number base on the given frequency and the current duty_resolution. */ -esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf); +esp_err_t ledc_timer_config(const ledc_timer_config_t *timer_conf); /** * @brief LEDC update channel parameters @@ -285,7 +286,7 @@ esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t * - ESP_OK Success * - ESP_ERR_INVALID_ARG Function pointer error. */ -esp_err_t ledc_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, ledc_isr_handle_t *handle); +esp_err_t ledc_isr_register(void (*fn)(void *), void *arg, int intr_alloc_flags, ledc_isr_handle_t *handle); /** * @brief Configure LEDC settings @@ -496,6 +497,7 @@ esp_err_t ledc_set_fade_step_and_start(ledc_mode_t speed_mode, ledc_channel_t ch * - ESP_FAIL Fade function init error */ esp_err_t ledc_cb_register(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_cbs_t *cbs, void *user_arg); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/driver/include/driver/mcpwm.h b/tools/sdk/esp32s3/include/driver/include/driver/mcpwm.h index fed2c3f326d..c80bca21d23 100644 --- a/tools/sdk/esp32s3/include/driver/include/driver/mcpwm.h +++ b/tools/sdk/esp32s3/include/driver/include/driver/mcpwm.h @@ -7,6 +7,7 @@ #pragma once #include "soc/soc_caps.h" +#include "esp_assert.h" #if SOC_MCPWM_SUPPORTED #include "esp_err.h" #include "soc/soc.h" @@ -74,7 +75,7 @@ typedef enum { MCPWM_UNIT_MAX, /*! #include "soc/gdma_channel.h" +#include "hal/gdma_types.h" #include "esp_err.h" #ifdef __cplusplus @@ -23,34 +24,6 @@ extern "C" { */ typedef struct gdma_channel_t *gdma_channel_handle_t; -/** - * @brief Enumeration of peripherals which have the DMA capability - * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. - * - */ -typedef enum { - GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ - GDMA_TRIG_PERIPH_UART, /*!< GDMA trigger peripheral: UART */ - GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ - GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ - GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ - GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ - GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ - GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ - GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ - GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ - GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ -} gdma_trigger_peripheral_t; - -/** - * @brief Enumeration of GDMA channel direction - * - */ -typedef enum { - GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ - GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ -} gdma_channel_direction_t; - /** * @brief Collection of configuration items that used for allocating GDMA channel * @@ -124,13 +97,13 @@ typedef struct { */ typedef struct { gdma_trigger_peripheral_t periph; /*!< Target peripheral which will trigger DMA operations */ - int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UART0 */ + int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UHCI0 */ } gdma_trigger_t; /** * @brief Helper macro to initialize GDMA trigger * @note value of `peri` must be selected from `gdma_trigger_peripheral_t` enum. - * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_UART,0) + * e.g. GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_I2S,0) * */ #define GDMA_MAKE_TRIGGER(peri, id) \ @@ -325,6 +298,22 @@ esp_err_t gdma_append(gdma_channel_handle_t dma_chan); */ esp_err_t gdma_reset(gdma_channel_handle_t dma_chan); +/** + * @brief Get the mask of free M2M trigger IDs + * + * @note On some ESP targets (e.g. ESP32C3/S3), DMA trigger used for memory copy can be any of valid peripheral's trigger ID, + * which can bring conflict if the peripheral is also using the same trigger ID. This function can return the free IDs + * for memory copy, at the runtime. + * + * @param[in] dma_chan GDMA channel handle, allocated by `gdma_new_channel` + * @param[out] mask Returned mask of free M2M trigger IDs + * @return + * - ESP_OK: Get free M2M trigger IDs successfully + * - ESP_ERR_INVALID_ARG: Get free M2M trigger IDs failed because of invalid argument + * - ESP_FAIL: Get free M2M trigger IDs failed because of other error + */ +esp_err_t gdma_get_free_m2m_trig_id_mask(gdma_channel_handle_t dma_chan, uint32_t *mask); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/driver/include/esp_private/gpio.h b/tools/sdk/esp32s3/include/driver/include/esp_private/gpio.h index c4227dc8c4f..65211a5e4e8 100644 --- a/tools/sdk/esp32s3/include/driver/include/esp_private/gpio.h +++ b/tools/sdk/esp32s3/include/driver/include/esp_private/gpio.h @@ -12,7 +12,6 @@ #include "soc/soc_caps.h" #include "driver/gpio.h" -#if SOC_GPIO_SUPPORT_SLP_SWITCH #if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Emulate ESP32S2 behaviour to backup FUN_PU, FUN_PD information @@ -34,4 +33,3 @@ esp_err_t gpio_sleep_pupd_config_apply(gpio_num_t gpio_num); */ esp_err_t gpio_sleep_pupd_config_unapply(gpio_num_t gpio_num); #endif -#endif diff --git a/tools/sdk/esp32s3/include/efuse/esp32s3/include/esp_efuse_table.h b/tools/sdk/esp32s3/include/efuse/esp32s3/include/esp_efuse_table.h index 5fabde2bc5c..f64a33f46db 100644 --- a/tools/sdk/esp32s3/include/efuse/esp32s3/include/esp_efuse_table.h +++ b/tools/sdk/esp32s3/include/efuse/esp32s3/include/esp_efuse_table.h @@ -9,7 +9,7 @@ extern "C" { #endif -// md5_digest_table 5d853dcd3eb114e78147566245552b2d +// md5_digest_table 87c5ae68b74dbafb114e14f6febff9e2 // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. @@ -101,6 +101,8 @@ extern const esp_efuse_desc_t* ESP_EFUSE_FLASH_ECC_EN[]; extern const esp_efuse_desc_t* ESP_EFUSE_FORCE_SEND_RESUME[]; extern const esp_efuse_desc_t* ESP_EFUSE_SECURE_VERSION[]; extern const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_OTG_DOWNLOAD_MODE[]; +extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_WAFER_VERSION_MAJOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_BLK_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_CLK[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_Q_D1[]; @@ -113,12 +115,13 @@ extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D4[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D5[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D6[]; extern const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D7[]; -extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MINOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[]; -extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VER_MINOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MINOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_CAL_VOL_ATTEN3[]; extern const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[]; -extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VER_MAJOR[]; +extern const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MAJOR[]; extern const esp_efuse_desc_t* ESP_EFUSE_TEMP_CALIB[]; extern const esp_efuse_desc_t* ESP_EFUSE_OCODE[]; extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_INIT_CODE_ATTEN0[]; diff --git a/tools/sdk/esp32s3/include/efuse/include/esp_efuse.h b/tools/sdk/esp32s3/include/efuse/include/esp_efuse.h index 435b5e100fb..f2c08bad30e 100644 --- a/tools/sdk/esp32s3/include/efuse/include/esp_efuse.h +++ b/tools/sdk/esp32s3/include/efuse/include/esp_efuse.h @@ -276,13 +276,6 @@ esp_err_t esp_efuse_read_block(esp_efuse_block_t blk, void* dst_key, size_t offs */ esp_err_t esp_efuse_write_block(esp_efuse_block_t blk, const void* src_key, size_t offset_in_bits, size_t size_bits); -/** - * @brief Returns chip version from efuse - * - * @return chip version - */ -uint8_t esp_efuse_get_chip_ver(void); - /** * @brief Returns chip package from efuse * diff --git a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_conv_queue.h b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_conv_queue.h index 890689de391..280d21d7c8f 100644 --- a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_conv_queue.h +++ b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_conv_queue.h @@ -40,6 +40,15 @@ typedef struct { */ dl_conv_queue_t *dl_conv_queue_alloc(int n, int c); +/** + * @brief Allocate a convolution queue from psram + * + * @param n The length of queue + * @param c The channel number of elements in the queue + * @return The convolution queue, or NULL if out of memory + */ +dl_conv_queue_t *dl_conv_queue_alloc_from_psram(int n, int c); + /** * @brief Free a convolution queue * diff --git a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq8_queue.h b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq8_queue.h index dadb5cad26c..c37803c4c67 100644 --- a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq8_queue.h +++ b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq8_queue.h @@ -50,6 +50,16 @@ dl_convq8_queue_t *dl_convq8_queue_alloc(int n, int c); */ dl_convq8_queue_t *dl_convq8_queue_alloc_mc(int n, int c, int nch); +/** + * @brief Allocate a bit fixed-point convolution queue from PSRAM + * + * @param n The length of queue + * @param c The number of elements in the queue + * @param nch The channel of queue + * @return The convolution queue, or NULL if out of memory + */ +dl_convq8_queue_t *dl_convq8_queue_alloc_mc_from_psram(int n, int c, int nch); + /** * @brief Free a fixed-point convolution queue * @@ -64,6 +74,16 @@ void dl_convq8_queue_free(dl_convq8_queue_t *cq); */ void dl_convq8_queue_bzero(dl_convq8_queue_t *cqm); +/** + * @brief Move the front pointer of queue forward, + the First(oldest) element become the last(newest) element, + * + * @param cq Input fixed-point convolution queue + * @return Pointer of oldest element + */ +q8tp_t *dl_convq8_queue_pop(dl_convq8_queue_t *cq); +q8tp_t *dl_convq8_queue_popn(dl_convq8_queue_t *cq, int n); + /** * @brief Insert the float-point element at the end of queue. * The precision of fixed-point numbers is described by the Qm.f notation, diff --git a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq_queue.h b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq_queue.h index 80693718f95..0e8ab474cb6 100644 --- a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq_queue.h +++ b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/dl_lib_convq_queue.h @@ -93,8 +93,8 @@ void dl_convq_queue_bzero(dl_convq_queue_t *cq); * @param cq Input fixed-point convolution queue * @return Pointer of oldest element */ -inline qtp_t *dl_convq_queue_pop(dl_convq_queue_t *cq); -inline qtp_t *dl_convq_queue_popn(dl_convq_queue_t *cq, int n); +qtp_t *dl_convq_queue_pop(dl_convq_queue_t *cq); +qtp_t *dl_convq_queue_popn(dl_convq_queue_t *cq, int n); /** * @brief Remove the oldest element, then insert the input element at the end of queue * @@ -125,7 +125,7 @@ dl_conv_queue_t *dl_queue_from_convq(dl_convq_queue_t *cq1); * @param last_num Offset from the front of the queue * @return Pointer of the element */ -inline qtp_t *dl_get_queue_itemq(dl_convq_queue_t *cq, int last_num); +qtp_t *dl_get_queue_itemq(dl_convq_queue_t *cq, int last_num); /** * @brief Get the pointer of element in the queue by offset diff --git a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/esp_mn_iface.h b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/esp_mn_iface.h index f43f3263e33..e2f697b8092 100644 --- a/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/esp_mn_iface.h +++ b/tools/sdk/esp32s3/include/esp-sr/include/esp32s3/esp_mn_iface.h @@ -17,6 +17,17 @@ typedef enum { ESP_MN_STATE_TIMEOUT = 2, // time out } esp_mn_state_t; +typedef enum { + ESP_MN_GREEDY_SEARCH = 0, // greedy search + ESP_MN_BEAM_SEARCH = 1, // beam search + ESP_MN_BEAM_SEARCH_WITH_FST = 2, // beam search with trie language model +} esp_mn_search_method_t; + +typedef enum { + CHINESE_ID = 1, // Chinese language + ENGLISH_ID = 2, // English language +} language_id_t; + // Return all possible recognition results typedef struct{ esp_mn_state_t state; @@ -24,8 +35,10 @@ typedef struct{ int command_id[ESP_MN_RESULT_MAX_NUM]; // The list of command id. int phrase_id[ESP_MN_RESULT_MAX_NUM]; // The list of phrase id. float prob[ESP_MN_RESULT_MAX_NUM]; // The list of probability. + char string[256]; } esp_mn_results_t; + typedef struct{ int16_t num; // The number of error phrases, which can not added into model int16_t phrase_idx[ESP_MN_MAX_PHRASE_NUM]; // The error phrase index in singly linked list. diff --git a/tools/sdk/esp32s3/include/esp_common/include/esp_assert.h b/tools/sdk/esp32s3/include/esp_common/include/esp_assert.h index 39d6a32843f..17e4b928f83 100644 --- a/tools/sdk/esp32s3/include/esp_common/include/esp_assert.h +++ b/tools/sdk/esp32s3/include/esp_common/include/esp_assert.h @@ -16,15 +16,21 @@ #include "assert.h" +#ifndef __cplusplus + #define ESP_STATIC_ASSERT _Static_assert +#else // __cplusplus + #define ESP_STATIC_ASSERT static_assert +#endif // __cplusplus + /* Assert at compile time if possible, runtime otherwise */ #ifndef __cplusplus /* __builtin_choose_expr() is only in C, makes this a lot cleaner */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ - _Static_assert(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ + ESP_STATIC_ASSERT(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG); \ assert(#MSG && (CONDITION)); \ } while(0) #else -/* for C++, use __attribute__((error)) - works almost as well as _Static_assert */ +/* for C++, use __attribute__((error)) - works almost as well as ESP_STATIC_ASSERT */ #define TRY_STATIC_ASSERT(CONDITION, MSG) do { \ if (__builtin_constant_p(CONDITION) && !(CONDITION)) { \ extern __attribute__((error(#MSG))) void failed_compile_time_assert(void); \ diff --git a/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h b/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h index 74dda44cbdc..4caac067f95 100644 --- a/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h +++ b/tools/sdk/esp32s3/include/esp_common/include/esp_idf_version.h @@ -23,7 +23,7 @@ extern "C" { /** Minor version number (x.X.x) */ #define ESP_IDF_VERSION_MINOR 4 /** Patch version number (x.x.X) */ -#define ESP_IDF_VERSION_PATCH 3 +#define ESP_IDF_VERSION_PATCH 4 /** * Macro to convert IDF version number into an integer diff --git a/tools/sdk/esp32s3/include/esp_diagnostics/include/esp_diagnostics.h b/tools/sdk/esp32s3/include/esp_diagnostics/include/esp_diagnostics.h index 0e0fb50da36..682f316db7b 100644 --- a/tools/sdk/esp32s3/include/esp_diagnostics/include/esp_diagnostics.h +++ b/tools/sdk/esp32s3/include/esp_diagnostics/include/esp_diagnostics.h @@ -238,7 +238,7 @@ esp_err_t esp_diag_log_event(const char *tag, const char *format, ...) __attribu */ #define ESP_DIAG_EVENT(tag, format, ...) \ { \ - esp_diag_log_event(tag, "EV (%" PRIu32 ") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ + esp_diag_log_event(tag, "EV (%"PRIu32") %s: " format, esp_log_timestamp(), tag, ##__VA_ARGS__); \ ESP_LOGI(tag, format, ##__VA_ARGS__); \ } diff --git a/tools/sdk/esp32s3/include/esp_https_server/include/esp_https_server.h b/tools/sdk/esp32s3/include/esp_https_server/include/esp_https_server.h index 75720bd1ce7..f5159207216 100644 --- a/tools/sdk/esp32s3/include/esp_https_server/include/esp_https_server.h +++ b/tools/sdk/esp32s3/include/esp_https_server/include/esp_https_server.h @@ -119,6 +119,8 @@ typedef struct httpd_ssl_config httpd_ssl_config_t; .global_user_ctx_free_fn = NULL, \ .global_transport_ctx = NULL, \ .global_transport_ctx_free_fn = NULL, \ + .enable_so_linger = false, \ + .linger_timeout = 0, \ .open_fn = NULL, \ .close_fn = NULL, \ .uri_match_fn = NULL \ diff --git a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_chip_info.h b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_chip_info.h index 0b081d37e1b..a99863d7718 100644 --- a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_chip_info.h +++ b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_chip_info.h @@ -41,6 +41,7 @@ typedef enum { typedef struct { esp_chip_model_t model; //!< chip model, one of esp_chip_model_t uint32_t features; //!< bit mask of CHIP_FEATURE_x feature flags + uint16_t full_revision; //!< chip revision number (in format MXX; where M - wafer major version, XX - wafer minor version) uint8_t cores; //!< number of CPU cores uint8_t revision; //!< chip revision number } esp_chip_info_t; diff --git a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_intr_alloc.h b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_intr_alloc.h index a26fde9394f..a800c94fe86 100644 --- a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_intr_alloc.h +++ b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_intr_alloc.h @@ -64,6 +64,7 @@ extern "C" { #define ETS_INTERNAL_SW0_INTR_SOURCE -4 ///< Software int source 1 #define ETS_INTERNAL_SW1_INTR_SOURCE -5 ///< Software int source 2 #define ETS_INTERNAL_PROFILING_INTR_SOURCE -6 ///< Int source for profiling +#define ETS_INTERNAL_UNUSED_INTR_SOURCE -99 ///< Interrupt is not assigned to any source /**@}*/ diff --git a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h index ee0b72953f0..5eb5081b562 100644 --- a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h +++ b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/esp_sleep_internal.h @@ -6,6 +6,7 @@ #pragma once #include +#include "sdkconfig.h" #ifdef __cplusplus extern "C" { @@ -20,6 +21,15 @@ extern "C" { */ void esp_sleep_enable_adc_tsens_monitor(bool enable); +// IDF does not officially support esp32h2 in v4.4 +#if !CONFIG_IDF_TARGET_ESP32H2 +/** + * @brief Isolate all digital IOs except those that are held during deep sleep + * + * Reduce digital IOs current leakage during deep sleep. + */ +void esp_sleep_isolate_digital_gpio(void); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/sleep_gpio.h b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/sleep_gpio.h index abab21871a4..493687ec32d 100644 --- a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/sleep_gpio.h +++ b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_private/sleep_gpio.h @@ -18,7 +18,7 @@ extern "C" { * This file contains declarations of GPIO related functions in light sleep mode. */ -#if SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL /** * @brief Save GPIO pull-up and pull-down configuration information in the wake-up state @@ -39,7 +39,7 @@ void gpio_sleep_mode_config_apply(void); */ void gpio_sleep_mode_config_unapply(void); -#endif // SOC_GPIO_SUPPORT_SLP_SWITCH && CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL +#endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_sleep.h b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_sleep.h index 8090fe85211..1c1b51d3519 100644 --- a/tools/sdk/esp32s3/include/esp_hw_support/include/esp_sleep.h +++ b/tools/sdk/esp32s3/include/esp_hw_support/include/esp_sleep.h @@ -80,6 +80,11 @@ typedef enum { /* Leave this type define for compatibility */ typedef esp_sleep_source_t esp_sleep_wakeup_cause_t; +enum { + ESP_ERR_SLEEP_REJECT = ESP_ERR_INVALID_STATE, + ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION = ESP_ERR_INVALID_ARG, +}; + /** * @brief Disable wakeup source * @@ -101,10 +106,8 @@ esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source); #if SOC_ULP_SUPPORTED /** * @brief Enable wakeup by ULP coprocessor - * @note In revisions 0 and 1 of the ESP32, ULP wakeup source - * cannot be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when - * ext0 wakeup source is used. + * @note On ESP32, ULP wakeup source cannot be used when RTC_PERIPH power domain is forced, + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * @return * - ESP_OK on success * - ESP_ERR_NOT_SUPPORTED if additional current by touch (CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT) is enabled. @@ -128,10 +131,8 @@ esp_err_t esp_sleep_enable_timer_wakeup(uint64_t time_in_us); /** * @brief Enable wakeup by touch sensor * - * @note In revisions 0 and 1 of the ESP32, touch wakeup source - * can not be used when RTC_PERIPH power domain is forced - * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup - * source is used. + * @note On ESP32, touch wakeup source can not be used when RTC_PERIPH power domain is forced + * to be powered on (ESP_PD_OPTION_ON) or when ext0 wakeup source is used. * * @note The FSM mode of the touch button should be configured * as the timer trigger mode. @@ -179,8 +180,7 @@ bool esp_sleep_is_valid_wakeup_gpio(gpio_num_t gpio_num); * @note This function does not modify pin configuration. The pin is * configured in esp_sleep_start, immediately before entering sleep mode. * - * @note In revisions 0 and 1 of the ESP32, ext0 wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, ext0 wakeup source can not be used together with touch or ULP wakeup sources. * * @param gpio_num GPIO number used as wakeup source. Only GPIOs which are have RTC * functionality can be used: 0,2,4,12-15,25-27,32-39. @@ -265,8 +265,7 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee * wakeup level, for each GPIO which is used for wakeup. * Then call this function to enable wakeup feature. * - * @note In revisions 0 and 1 of the ESP32, GPIO wakeup source - * can not be used together with touch or ULP wakeup sources. + * @note On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources. * * @return * - ESP_OK on success @@ -351,7 +350,10 @@ void esp_deep_sleep_start(void) __attribute__((noreturn)); * * @return * - ESP_OK on success (returned after wakeup) - * - ESP_ERR_INVALID_STATE if WiFi or BT is not stopped + * - ESP_ERR_SLEEP_REJECT sleep request is rejected(wakeup source set before the sleep request) + * - ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION after deducting the sleep flow overhead, the final sleep duration + * is too short to cover the minimum sleep duration of the chip, when + * rtc timer wakeup source enabled */ esp_err_t esp_light_sleep_start(void); @@ -456,7 +458,6 @@ void esp_deep_sleep_disable_rom_logging(void); esp_err_t esp_sleep_cpu_pd_low_init(bool enable); #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Configure to isolate all GPIO pins in sleep state */ @@ -467,7 +468,6 @@ void esp_sleep_config_gpio_isolate(void); * @param enable decide whether to switch status or not */ void esp_sleep_enable_gpio_switch(bool enable); -#endif #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_io.h b/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_io.h index 2f2c613f1a8..9bc140870e4 100644 --- a/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_io.h +++ b/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_io.h @@ -19,11 +19,35 @@ typedef void *esp_lcd_spi_bus_handle_t; /*!< Type of LCD S typedef void *esp_lcd_i2c_bus_handle_t; /*!< Type of LCD I2C bus handle */ typedef struct esp_lcd_i80_bus_t *esp_lcd_i80_bus_handle_t; /*!< Type of LCD intel 8080 bus handle */ +/** + * @brief Type of LCD panel IO event data + */ +typedef struct { +} esp_lcd_panel_io_event_data_t; + +/** + * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * + * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] edata Panel IO event data, fed by driver + * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` + * @return Whether a high priority task has been waken up by this function + */ +typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); + +/** + * @brief Type of LCD panel IO callbacks + */ +typedef struct { + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ +} esp_lcd_panel_io_callbacks_t; + + /** * @brief Transmit LCD command and receive corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -42,7 +66,7 @@ esp_err_t esp_lcd_panel_io_rx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, v * @brief Transmit LCD command and corresponding parameters * * @note Commands sent by this function are short, so they are sent using polling transactions. - * The function does not return before the command tranfer is completed. + * The function does not return before the command transfer is completed. * If any queued transactions sent by `esp_lcd_panel_io_tx_color()` are still pending when this function is called, * this function will wait until they are finished and the queue is empty before sending the command(s). * @@ -65,7 +89,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c * Recycling of color buffer should be done in the callback `on_color_trans_done()`. * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] lcd_cmd The specific LCD command + * @param[in] lcd_cmd The specific LCD command, set to -1 if no command needed * @param[in] color Buffer that holds the RGB color data * @param[in] color_size Size of `color` in memory, in bytes * @return @@ -75,7 +99,7 @@ esp_err_t esp_lcd_panel_io_tx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, const void *color, size_t color_size); /** - * @brief Destory LCD panel IO handle (deinitialize panel and free all corresponding resource) + * @brief Destroy LCD panel IO handle (deinitialize panel and free all corresponding resource) * * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` * @return @@ -85,20 +109,16 @@ esp_err_t esp_lcd_panel_io_tx_color(esp_lcd_panel_io_handle_t io, int lcd_cmd, c esp_err_t esp_lcd_panel_io_del(esp_lcd_panel_io_handle_t io); /** - * @brief Type of LCD panel IO event data - */ -typedef struct { -} esp_lcd_panel_io_event_data_t; - -/** - * @brief Declare the prototype of the function that will be invoked when panel IO finishes transferring color data + * @brief Register LCD panel IO callbacks * - * @param[in] panel_io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` - * @param[in] edata Panel IO event data, fed by driver - * @param[in] user_ctx User data, passed from `esp_lcd_panel_io_xxx_config_t` - * @return Whether a high priority task has been waken up by this function + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success */ -typedef bool (*esp_lcd_panel_io_color_trans_done_cb_t)(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx); +esp_err_t esp_lcd_panel_io_register_event_callbacks(esp_lcd_panel_io_handle_t io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); /** * @brief Panel IO configuration structure, for SPI interface @@ -142,7 +162,7 @@ typedef struct { uint32_t dev_addr; /*!< I2C device address */ esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data transfer has finished */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ - size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C seclection) into control phase, in several bytes */ + size_t control_phase_bytes; /*!< I2C LCD panel will encode control information (e.g. D/C selection) into control phase, in several bytes */ unsigned int dc_bit_offset; /*!< Offset of the D/C selection bit in control phase */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ @@ -194,7 +214,7 @@ typedef struct { esp_err_t esp_lcd_new_i80_bus(const esp_lcd_i80_bus_config_t *bus_config, esp_lcd_i80_bus_handle_t *ret_bus); /** - * @brief Destory Intel 8080 bus handle + * @brief Destroy Intel 8080 bus handle * * @param[in] bus Intel 8080 bus handle, created by `esp_lcd_new_i80_bus()` * @return @@ -211,7 +231,7 @@ typedef struct { int cs_gpio_num; /*!< GPIO used for CS line, set to -1 will declaim exclusively use of I80 bus */ unsigned int pclk_hz; /*!< Frequency of pixel clock */ size_t trans_queue_depth; /*!< Transaction queue size, larger queue, higher throughput */ - esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was tranferred done */ + esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was transferred done */ void *user_ctx; /*!< User private data, passed directly to on_color_trans_done's user_ctx */ int lcd_cmd_bits; /*!< Bit-width of LCD command */ int lcd_param_bits; /*!< Bit-width of LCD parameter */ diff --git a/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_ops.h b/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_ops.h index 5099233ce83..63bc6fe2742 100644 --- a/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_ops.h +++ b/tools/sdk/esp32s3/include/esp_lcd/include/esp_lcd_panel_ops.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -110,9 +110,22 @@ esp_err_t esp_lcd_panel_set_gap(esp_lcd_panel_handle_t panel, int x_gap, int y_g */ esp_err_t esp_lcd_panel_invert_color(esp_lcd_panel_handle_t panel, bool invert_color_data); +/** + * @brief Turn on or off the display + * + * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` + * @param[in] on_off True to turns on display, False to turns off display + * @return + * - ESP_OK on success + * - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel + */ +esp_err_t esp_lcd_panel_disp_on_off(esp_lcd_panel_handle_t panel, bool on_off); + /** * @brief Turn off the display * + * @deprecated This function has similar functionality to `esp_lcd_panel_disp_on_off`. + * * @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()` * @param[in] off Whether to turn off the screen * @return diff --git a/tools/sdk/esp32s3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h b/tools/sdk/esp32s3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h index 9f2226587e5..88bf9db0d47 100644 --- a/tools/sdk/esp32s3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h +++ b/tools/sdk/esp32s3/include/esp_lcd/interface/esp_lcd_panel_io_interface.h @@ -7,6 +7,7 @@ #include #include "esp_err.h" +#include "esp_lcd_panel_io.h" #ifdef __cplusplus extern "C" { @@ -73,6 +74,18 @@ struct esp_lcd_panel_io_t { * - ESP_OK on success */ esp_err_t (*del)(esp_lcd_panel_io_t *io); + + /** + * @brief Register LCD panel IO callbacks + * + * @param[in] io LCD panel IO handle, which is created by factory API like `esp_lcd_new_panel_io_spi()` + * @param[in] cbs structure with all LCD panel IO callbacks + * @param[in] user_ctx User private data, passed directly to callback's user_ctx + * @return + * - ESP_ERR_INVALID_ARG if parameter is invalid + * - ESP_OK on success + */ + esp_err_t (*register_event_callbacks)(esp_lcd_panel_io_t *io, const esp_lcd_panel_io_callbacks_t *cbs, void *user_ctx); }; #ifdef __cplusplus diff --git a/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h b/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h index 60409b1b689..c41da24e963 100644 --- a/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h +++ b/tools/sdk/esp32s3/include/esp_littlefs/include/esp_littlefs.h @@ -8,10 +8,10 @@ extern "C" { #endif -#define ESP_LITTLEFS_VERSION_NUMBER "1.5.1" +#define ESP_LITTLEFS_VERSION_NUMBER "1.5.2" #define ESP_LITTLEFS_VERSION_MAJOR 1 #define ESP_LITTLEFS_VERSION_MINOR 5 -#define ESP_LITTLEFS_VERSION_PATCH 1 +#define ESP_LITTLEFS_VERSION_PATCH 2 /** *Configuration structure for esp_vfs_littlefs_register. diff --git a/tools/sdk/esp32s3/include/esp_phy/include/esp_phy_init.h b/tools/sdk/esp32s3/include/esp_phy/include/esp_phy_init.h index efefd114d4f..bcf3e289d3d 100644 --- a/tools/sdk/esp32s3/include/esp_phy/include/esp_phy_init.h +++ b/tools/sdk/esp32s3/include/esp_phy/include/esp_phy_init.h @@ -178,12 +178,13 @@ void esp_phy_load_cal_and_init(void); /** * @brief Initialize backup memory for Phy power up/down */ -void esp_phy_pd_mem_init(void); +void esp_phy_modem_init(void); /** * @brief Deinitialize backup memory for Phy power up/down + * Set phy_init_flag if all modems deinit on ESP32C3 */ -void esp_phy_pd_mem_deinit(void); +void esp_phy_modem_deinit(void); #if CONFIG_MAC_BB_PD /** diff --git a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_mqtt.h b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_mqtt.h index eba3615a70c..8775eb8696f 100644 --- a/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_mqtt.h +++ b/tools/sdk/esp32s3/include/esp_rainmaker/include/esp_rmaker_mqtt.h @@ -100,6 +100,17 @@ esp_err_t esp_rmaker_mqtt_setup(esp_rmaker_mqtt_config_t mqtt_config); */ void esp_rmaker_create_mqtt_topic(char *buf, size_t buf_size, const char *topic_suffix, const char *rule); +/** + * @brief Check if budget is available to publish an mqtt message + * + * @return true if budget is available + * @return false if budget is exhausted + * + * @note `esp_rmaker_mqtt_publish` API already does this check. In addition to that, + * some use-cases might still need to check for this. + */ +bool esp_rmaker_mqtt_is_budget_available(void); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/esp_rom/esp32s3/esp_rom_caps.h b/tools/sdk/esp32s3/include/esp_rom/esp32s3/esp_rom_caps.h index 65847c4064f..2b2c3370790 100644 --- a/tools/sdk/esp32s3/include/esp_rom/esp32s3/esp_rom_caps.h +++ b/tools/sdk/esp32s3/include/esp_rom/esp32s3/esp_rom_caps.h @@ -17,9 +17,9 @@ #define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian #define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian #define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library -#define ESP_ROM_SUPPORT_MULTIPLE_UART (1) // ROM has multiple UARTs available for logging #define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM #define ESP_ROM_HAS_RETARGETABLE_LOCKING (1) // ROM was built with retargetable locking #define ESP_ROM_USB_SERIAL_DEVICE_NUM (4) // The serial port ID (UART, USB, ...) of USB_SERIAL_JTAG in the ROM. #define ESP_ROM_HAS_ERASE_0_REGION_BUG (1) // ROM has esp_flash_erase_region(size=0) bug #define ESP_ROM_NEEDS_SWSETUP_WORKAROUND (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing +#define ESP_ROM_HAS_ETS_PRINTF_BUG (1) // ROM has ets_printf bug when disable the ROM log either by eFuse or RTC storage register diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/rtc.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/rtc.h index 2be040aa99d..7410180da3a 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/rtc.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -100,17 +101,17 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_RESET == RESET_REASON_CORE_SW, "SW_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TGWDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TGWDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SW_CPU_RESET == RESET_REASON_CPU0_SW, "SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/secure_boot.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/secure_boot.h index 50a3fcd4948..04c3c509f78 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/secure_boot.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -62,7 +63,7 @@ typedef struct { uint32_t block_crc; uint8_t _padding[16]; } ets_secure_boot_sig_block_t; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); /* ROM supports up to 3, but IDF only checks the first one (SECURE_BOOT_NUM_BLOCKS) */ #define SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE 3 @@ -73,7 +74,7 @@ typedef struct { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE)]; } ets_secure_boot_signature_t; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); typedef struct { const void *key_digests[SECURE_BOOT_NUM_BLOCKS]; diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/rtc.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/rtc.h index 2a7f6cb6140..1e6100cb106 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/rtc.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/rtc.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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef _ROM_RTC_H_ #define _ROM_RTC_H_ @@ -19,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -105,24 +98,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/secure_boot.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/secure_boot.h index a9d417283b7..26cd0b4b842 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/secure_boot.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32c3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/rtc.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/rtc.h index e3a8d9d63e2..2629fd9a6d9 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/rtc.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/rtc.h @@ -11,6 +11,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -98,25 +99,25 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); -_Static_assert((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)JTAG_RESET == RESET_REASON_CPU0_JTAG, "JTAG_RESET != RESET_REASON_CPU0_JTAG"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/secure_boot.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/secure_boot.h index 36a490d8584..b7dd24b00cb 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/secure_boot.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32h2/rom/secure_boot.h @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -93,7 +94,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -103,7 +104,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/rtc.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/rtc.h index 2de02a88c8e..2c5b1b2a631 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/rtc.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/rtc.h @@ -19,6 +19,7 @@ #include #include +#include "esp_assert.h" #include "soc/soc.h" #include "soc/rtc_cntl_reg.h" @@ -101,20 +102,21 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/secure_boot.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/secure_boot.h index a0fcecfd3c5..49edf7d6fd7 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/secure_boot.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,6 +9,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -92,7 +93,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "invalid sig block size"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -102,7 +103,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "invalid sig sector size"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32s2/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/rtc.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/rtc.h index d395ce3976e..168ca7997a7 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/rtc.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/rtc.h @@ -8,6 +8,7 @@ #include #include +#include "esp_assert.h" #include "soc/rtc_cntl_reg.h" #include "soc/reset_reasons.h" @@ -91,24 +92,24 @@ typedef enum { } RESET_REASON; // Check if the reset reason defined in ROM is compatible with soc/reset_reasons.h -_Static_assert((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); -_Static_assert((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); -_Static_assert((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); -_Static_assert((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); -_Static_assert((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); -_Static_assert((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); -_Static_assert((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); -_Static_assert((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); -_Static_assert((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); -_Static_assert((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); -_Static_assert((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); -_Static_assert((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); -_Static_assert((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); -_Static_assert((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); -_Static_assert((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); -_Static_assert((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); -_Static_assert((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWERON_RESET == RESET_REASON_CHIP_POWER_ON, "POWERON_RESET != RESET_REASON_CHIP_POWER_ON"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_SYS_RESET == RESET_REASON_CORE_SW, "RTC_SW_SYS_RESET != RESET_REASON_CORE_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)DEEPSLEEP_RESET == RESET_REASON_CORE_DEEP_SLEEP, "DEEPSLEEP_RESET != RESET_REASON_CORE_DEEP_SLEEP"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_SYS_RESET == RESET_REASON_CORE_MWDT0, "TG0WDT_SYS_RESET != RESET_REASON_CORE_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_SYS_RESET == RESET_REASON_CORE_MWDT1, "TG1WDT_SYS_RESET != RESET_REASON_CORE_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_SYS_RESET == RESET_REASON_CORE_RTC_WDT, "RTCWDT_SYS_RESET != RESET_REASON_CORE_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG0WDT_CPU_RESET == RESET_REASON_CPU0_MWDT0, "TG0WDT_CPU_RESET != RESET_REASON_CPU0_MWDT0"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTC_SW_CPU_RESET == RESET_REASON_CPU0_SW, "RTC_SW_CPU_RESET != RESET_REASON_CPU0_SW"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_CPU_RESET == RESET_REASON_CPU0_RTC_WDT, "RTCWDT_CPU_RESET != RESET_REASON_CPU0_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_BROWN_OUT_RESET == RESET_REASON_SYS_BROWN_OUT, "RTCWDT_BROWN_OUT_RESET != RESET_REASON_SYS_BROWN_OUT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)RTCWDT_RTC_RESET == RESET_REASON_SYS_RTC_WDT, "RTCWDT_RTC_RESET != RESET_REASON_SYS_RTC_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)TG1WDT_CPU_RESET == RESET_REASON_CPU0_MWDT1, "TG1WDT_CPU_RESET != RESET_REASON_CPU0_MWDT1"); +ESP_STATIC_ASSERT((soc_reset_reason_t)SUPER_WDT_RESET == RESET_REASON_SYS_SUPER_WDT, "SUPER_WDT_RESET != RESET_REASON_SYS_SUPER_WDT"); +ESP_STATIC_ASSERT((soc_reset_reason_t)GLITCH_RTC_RESET == RESET_REASON_SYS_CLK_GLITCH, "GLITCH_RTC_RESET != RESET_REASON_SYS_CLK_GLITCH"); +ESP_STATIC_ASSERT((soc_reset_reason_t)EFUSE_RESET == RESET_REASON_CORE_EFUSE_CRC, "EFUSE_RESET != RESET_REASON_CORE_EFUSE_CRC"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_UART_CHIP_RESET == RESET_REASON_CORE_USB_UART, "USB_UART_CHIP_RESET != RESET_REASON_CORE_USB_UART"); +ESP_STATIC_ASSERT((soc_reset_reason_t)USB_JTAG_CHIP_RESET == RESET_REASON_CORE_USB_JTAG, "USB_JTAG_CHIP_RESET != RESET_REASON_CORE_USB_JTAG"); +ESP_STATIC_ASSERT((soc_reset_reason_t)POWER_GLITCH_RESET == RESET_REASON_CORE_PWR_GLITCH, "POWER_GLITCH_RESET != RESET_REASON_CORE_PWR_GLITCH"); typedef enum { NO_SLEEP = 0, diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/secure_boot.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/secure_boot.h index a372517b7a1..3c374fe3016 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/secure_boot.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/secure_boot.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,6 +10,7 @@ #include #include "ets_sys.h" #include "rsa_pss.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -80,7 +81,7 @@ struct ets_secure_boot_sig_block { uint8_t _padding[16]; }; -_Static_assert(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_sig_block_t) == 1216, "ets_secure_boot_sig_block_t should occupy 1216 Bytes in memory"); #define SECURE_BOOT_NUM_BLOCKS 3 @@ -90,7 +91,7 @@ struct ets_secure_boot_signature { uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_NUM_BLOCKS)]; }; -_Static_assert(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); +ESP_STATIC_ASSERT(sizeof(ets_secure_boot_signature_t) == 4096, "ets_secure_boot_signature_t should occupy 4096 Bytes in memory"); #define MAX_KEY_DIGESTS 3 diff --git a/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h b/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h index 5564d41e92f..a63288c71bb 100644 --- a/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h +++ b/tools/sdk/esp32s3/include/esp_rom/include/esp32s3/rom/usb/usb_device.h @@ -38,6 +38,7 @@ #include #include #include "usb_dc.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -64,7 +65,7 @@ struct usb_setup_packet { } __packed; -_Static_assert(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); +ESP_STATIC_ASSERT(sizeof(struct usb_setup_packet) == 8, "USB setup packet struct size error"); /** * Callback function signature for the device diff --git a/tools/sdk/esp32s3/include/esp_wifi/include/esp_mesh_internal.h b/tools/sdk/esp32s3/include/esp_wifi/include/esp_mesh_internal.h index e967dbaafbc..af602bb5480 100644 --- a/tools/sdk/esp32s3/include/esp_wifi/include/esp_mesh_internal.h +++ b/tools/sdk/esp32s3/include/esp_wifi/include/esp_mesh_internal.h @@ -1,16 +1,8 @@ -// Copyright 2017-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: 2017-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef __ESP_MESH_INTERNAL_H__ #define __ESP_MESH_INTERNAL_H__ @@ -107,6 +99,9 @@ typedef struct { mesh_chain_layer_t chain; } __attribute__((packed)) mesh_chain_assoc_t; +/* mesh max connections */ +#define MESH_MAX_CONNECTIONS (10) + /** * @brief Mesh PS duties */ @@ -117,7 +112,7 @@ typedef struct { bool used; uint8_t duty; uint8_t mac[6]; - } child[ESP_WIFI_MAX_CONN_NUM]; + } child[MESH_MAX_CONNECTIONS]; } esp_mesh_ps_duties_t; /******************************************************* diff --git a/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi.h b/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi.h index 08be53cf6a4..ab138a96926 100644 --- a/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi.h +++ b/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi.h @@ -108,6 +108,7 @@ typedef struct { int mgmt_sbuf_num; /**< WiFi management short buffer number, the minimum value is 6, the maximum value is 32 */ uint64_t feature_caps; /**< Enables additional WiFi features and capabilities */ bool sta_disconnected_pm; /**< WiFi Power Management for station at disconnected status */ + int espnow_max_encrypt_num; /**< Maximum encrypt number of peers supported by espnow */ int magic; /**< WiFi init magic number, it should be the last field */ } wifi_init_config_t; @@ -227,6 +228,7 @@ extern uint64_t g_wifi_feature_caps; .mgmt_sbuf_num = WIFI_MGMT_SBUF_NUM, \ .feature_caps = g_wifi_feature_caps, \ .sta_disconnected_pm = WIFI_STA_DISCONNECTED_PM_ENABLED, \ + .espnow_max_encrypt_num = CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM, \ .magic = WIFI_INIT_CONFIG_MAGIC\ } @@ -455,6 +457,21 @@ esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number); esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records); +/** + * @brief Clear AP list found in last scan + * + * @attention When the obtained ap list fails,bss info must be cleared,otherwise it may cause memory leakage. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_MODE: WiFi mode is wrong + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_clear_ap_list(void); + + /** * @brief Get information of AP which the ESP32 station is associated with * @@ -567,6 +584,8 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); * @attention 2. When ESP32 is in STA mode, this API should not be called when STA is scanning or connecting to an external AP * @attention 3. When ESP32 is in softAP mode, this API should not be called when softAP has connected to external STAs * @attention 4. When ESP32 is in STA+softAP mode, this API should not be called when in the scenarios described above + * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remeber the channel used before wifi stop, + * you need to call this API again after wifi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. * * @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel * @param second for HT20, second is ignored, for HT40, second is the second channel @@ -776,6 +795,7 @@ esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter * @attention 2. For station configuration, bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. * @attention 3. ESP32 is limited to only one channel, so when in the soft-AP+station mode, the soft-AP will adjust its channel automatically to be the same as * the channel of the ESP32 station. + * @attention 4. The configuration will be stored in NVS * * @param interface interface * @param conf station or soft-AP configuration @@ -1161,7 +1181,9 @@ esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi); * @brief Start an FTM Initiator session by sending FTM request * If successful, event WIFI_EVENT_FTM_REPORT is generated with the result of the FTM procedure * - * @attention Use this API only in Station mode + * @attention 1. Use this API only in Station mode. + * @attention 2. If FTM is initiated on a different channel than Station is connected in or internal SoftAP is started in, + * FTM defaults to a single burst in ASAP mode. * * @param cfg FTM Initiator session configuration * @@ -1219,7 +1241,7 @@ esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable); * @attention 3. This configuration would influence nothing until some module configure wake_window * @attention 4. A sensible interval which is not too small is recommended (e.g. 100ms) * - * @param interval how much micriosecond would the chip wake up, from 1 to 65535. + * @param interval how much milliseconds would the chip wake up, from 1 to 65535. */ esp_err_t esp_wifi_set_connectionless_wake_interval(uint16_t interval); diff --git a/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi_types.h b/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi_types.h index 4dae6a8c3fa..60b22707c15 100644 --- a/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi_types.h +++ b/tools/sdk/esp32s3/include/esp_wifi/include/esp_wifi_types.h @@ -61,41 +61,63 @@ typedef enum { } wifi_auth_mode_t; typedef enum { - WIFI_REASON_UNSPECIFIED = 1, - WIFI_REASON_AUTH_EXPIRE = 2, - WIFI_REASON_AUTH_LEAVE = 3, - WIFI_REASON_ASSOC_EXPIRE = 4, - WIFI_REASON_ASSOC_TOOMANY = 5, - WIFI_REASON_NOT_AUTHED = 6, - WIFI_REASON_NOT_ASSOCED = 7, - WIFI_REASON_ASSOC_LEAVE = 8, - WIFI_REASON_ASSOC_NOT_AUTHED = 9, - WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, - WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, - WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, - WIFI_REASON_IE_INVALID = 13, - WIFI_REASON_MIC_FAILURE = 14, - WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, - WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, - WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, - WIFI_REASON_GROUP_CIPHER_INVALID = 18, - WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, - WIFI_REASON_AKMP_INVALID = 20, - WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, - WIFI_REASON_INVALID_RSN_IE_CAP = 22, - WIFI_REASON_802_1X_AUTH_FAILED = 23, - WIFI_REASON_CIPHER_SUITE_REJECTED = 24, - - WIFI_REASON_INVALID_PMKID = 53, - - WIFI_REASON_BEACON_TIMEOUT = 200, - WIFI_REASON_NO_AP_FOUND = 201, - WIFI_REASON_AUTH_FAIL = 202, - WIFI_REASON_ASSOC_FAIL = 203, - WIFI_REASON_HANDSHAKE_TIMEOUT = 204, - WIFI_REASON_CONNECTION_FAIL = 205, - WIFI_REASON_AP_TSF_RESET = 206, - WIFI_REASON_ROAMING = 207, + WIFI_REASON_UNSPECIFIED = 1, + WIFI_REASON_AUTH_EXPIRE = 2, + WIFI_REASON_AUTH_LEAVE = 3, + WIFI_REASON_ASSOC_EXPIRE = 4, + WIFI_REASON_ASSOC_TOOMANY = 5, + WIFI_REASON_NOT_AUTHED = 6, + WIFI_REASON_NOT_ASSOCED = 7, + WIFI_REASON_ASSOC_LEAVE = 8, + WIFI_REASON_ASSOC_NOT_AUTHED = 9, + WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, + WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, + WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, + WIFI_REASON_IE_INVALID = 13, + WIFI_REASON_MIC_FAILURE = 14, + WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, + WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, + WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, + WIFI_REASON_GROUP_CIPHER_INVALID = 18, + WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, + WIFI_REASON_AKMP_INVALID = 20, + WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, + WIFI_REASON_INVALID_RSN_IE_CAP = 22, + WIFI_REASON_802_1X_AUTH_FAILED = 23, + WIFI_REASON_CIPHER_SUITE_REJECTED = 24, + WIFI_REASON_TDLS_PEER_UNREACHABLE = 25, + WIFI_REASON_TDLS_UNSPECIFIED = 26, + WIFI_REASON_SSP_REQUESTED_DISASSOC = 27, + WIFI_REASON_NO_SSP_ROAMING_AGREEMENT = 28, + WIFI_REASON_BAD_CIPHER_OR_AKM = 29, + WIFI_REASON_NOT_AUTHORIZED_THIS_LOCATION = 30, + WIFI_REASON_SERVICE_CHANGE_PERCLUDES_TS = 31, + WIFI_REASON_UNSPECIFIED_QOS = 32, + WIFI_REASON_NOT_ENOUGH_BANDWIDTH = 33, + WIFI_REASON_MISSING_ACKS = 34, + WIFI_REASON_EXCEEDED_TXOP = 35, + WIFI_REASON_STA_LEAVING = 36, + WIFI_REASON_END_BA = 37, + WIFI_REASON_UNKNOWN_BA = 38, + WIFI_REASON_TIMEOUT = 39, + WIFI_REASON_PEER_INITIATED = 46, + WIFI_REASON_AP_INITIATED = 47, + WIFI_REASON_INVALID_FT_ACTION_FRAME_COUNT = 48, + WIFI_REASON_INVALID_PMKID = 49, + WIFI_REASON_INVALID_MDE = 50, + WIFI_REASON_INVALID_FTE = 51, + WIFI_REASON_TRANSMISSION_LINK_ESTABLISH_FAILED = 67, + WIFI_REASON_ALTERATIVE_CHANNEL_OCCUPIED = 68, + + WIFI_REASON_BEACON_TIMEOUT = 200, + WIFI_REASON_NO_AP_FOUND = 201, + WIFI_REASON_AUTH_FAIL = 202, + WIFI_REASON_ASSOC_FAIL = 203, + WIFI_REASON_HANDSHAKE_TIMEOUT = 204, + WIFI_REASON_CONNECTION_FAIL = 205, + WIFI_REASON_AP_TSF_RESET = 206, + WIFI_REASON_ROAMING = 207, + WIFI_REASON_ASSOC_COMEBACK_TIME_TOO_LONG = 208, } wifi_err_reason_t; typedef enum { @@ -235,7 +257,7 @@ typedef struct { uint8_t channel; /**< Channel of ESP32 soft-AP */ wifi_auth_mode_t authmode; /**< Auth mode of ESP32 soft-AP. Do not support AUTH_WEP in soft-AP mode */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ - uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 10 */ + uint8_t max_connection; /**< Max number of stations allowed to connect in */ uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */ wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of SoftAP, group cipher will be derived using this. cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */ bool ftm_responder; /**< Enable FTM Responder mode */ @@ -256,8 +278,10 @@ typedef struct { uint32_t rm_enabled:1; /**< Whether Radio Measurements are enabled for the connection */ uint32_t btm_enabled:1; /**< Whether BSS Transition Management is enabled for the connection */ uint32_t mbo_enabled:1; /**< Whether MBO is enabled for the connection */ - uint32_t reserved:29; /**< Reserved for future feature set */ + uint32_t transition_disable:1; /**< Whether to enable transition disable feature */ + uint32_t reserved:28; /**< Reserved for future feature set */ wifi_sae_pwe_method_t sae_pwe_h2e; /**< Whether SAE hash to element is enabled */ + uint8_t failure_retry_cnt; /**< Number of connection retries station will do before moving to next AP. scan_method should be set as WIFI_ALL_CHANNEL_SCAN to use this config. Note: Enabling this may cause connection time to increase incase best AP doesn't behave properly. */ } wifi_sta_config_t; /** @brief Configuration data for ESP32 AP or STA. @@ -283,7 +307,11 @@ typedef struct { uint32_t reserved:27; /**< bit: 5..31 reserved */ } wifi_sta_info_t; -#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32 soft-AP */ +#if CONFIG_IDF_TARGET_ESP32C3 +#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */ +#else +#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */ +#endif /** @brief List of stations associated with the ESP32 Soft-AP */ typedef struct { @@ -640,6 +668,7 @@ typedef struct { uint8_t ssid_len; /**< SSID length of disconnected AP */ uint8_t bssid[6]; /**< BSSID of disconnected AP */ uint8_t reason; /**< reason of disconnection */ + int8_t rssi; /**< rssi of disconnection */ } wifi_event_sta_disconnected_t; /** Argument structure for WIFI_EVENT_STA_AUTHMODE_CHANGE event */ diff --git a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_common.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_common.h similarity index 83% rename from tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_common.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_common.h index bc8dc619544..988fdf35f57 100644 --- a/tools/sdk/esp32c3/include/esp-dsp/modules/common/include/dsp_common.h +++ b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_common.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -52,6 +52,19 @@ bool dsp_is_power_of_two(int x); */ int dsp_power_of_two(int x); + +/** + * @brief Logginng for esp32s3 TIE core + * Registers covered q0 to q7, ACCX and SAR_BYTE + * + * @param n_regs: number of registers to be logged at once + * @param ...: register codes 0, 1, 2, 3, 4, 5, 6, 7, 'a', 's' + * + * @return ESP_OK + * + */ +esp_err_t tie_log(int n_regs, ...); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_err.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_err.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_err.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_err.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_err_codes.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h similarity index 89% rename from tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_err_codes.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h index c8827781a80..a4176e5a818 100644 --- a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_err_codes.h +++ b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_err_codes.h @@ -1,4 +1,4 @@ -// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD +// Copyright 2018-2022 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. @@ -22,6 +22,7 @@ #define ESP_ERR_DSP_PARAM_OUTOFRANGE (ESP_ERR_DSP_BASE + 3) #define ESP_ERR_DSP_UNINITIALIZED (ESP_ERR_DSP_BASE + 4) #define ESP_ERR_DSP_REINITIALIZED (ESP_ERR_DSP_BASE + 5) +#define ESP_ERR_DSP_ARRAY_NOT_ALIGNED (ESP_ERR_DSP_BASE + 6) #endif // _dsp_error_codes_H_ \ No newline at end of file diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_tests.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_tests.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_tests.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_tests.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_types.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_types.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/common/include/dsp_types.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/dsp_types.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/common/include/esp_dsp.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/esp_dsp.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/common/include/esp_dsp.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/common/include/esp_dsp.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_ccorr.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_ccorr.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_ccorr.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_conv.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_conv.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_conv.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_conv_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_conv_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_conv_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_corr.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/conv/include/dsps_corr.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/conv/include/dsps_corr.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/dct/include/dsps_dct.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/dct/include/dsps_dct.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dct/include/dsps_dct.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dspi_dotprod.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dspi_dotprod_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dsps_dotprod.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/dotprod/include/dsps_dotprod_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft2r.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft2r.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft2r_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft2r_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft4r.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft4r.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft4r_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft4r_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft_tables.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/fft/include/dsps_fft_tables.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fft/include/dsps_fft_tables.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/fir/include/dsps_fir.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h similarity index 71% rename from tools/sdk/esp32s3/include/esp-dsp/modules/fir/include/dsps_fir.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h index a7d3d09003e..c06b1f34b77 100644 --- a/tools/sdk/esp32s3/include/esp-dsp/modules/fir/include/dsps_fir.h +++ b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fir/include/dsps_fir.h @@ -19,6 +19,7 @@ #include "dsp_err.h" #include "dsps_fir_platform.h" +#include "dsp_common.h" #ifdef __cplusplus extern "C" @@ -49,13 +50,16 @@ typedef struct fir_f32_s { * All fields of this structure are initialized by the dsps_fir_init_s16(...) function. */ typedef struct fir_s16_s{ - int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ - int16_t *delay; /*!< Pointer to the delay line buffer.*/ - int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ - int16_t pos; /*!< Position in delay line.*/ - int16_t decim; /*!< Decimation factor.*/ - int16_t d_pos; /*!< Actual decimation counter.*/ - int16_t shift; /*!< shift value of the result.*/ + int16_t *coeffs; /*!< Pointer to the coefficient buffer.*/ + int16_t *delay; /*!< Pointer to the delay line buffer.*/ + int16_t coeffs_len; /*!< FIR filter coefficients amount.*/ + int16_t pos; /*!< Position in delay line.*/ + int16_t decim; /*!< Decimation factor.*/ + int16_t d_pos; /*!< Actual decimation counter.*/ + int16_t shift; /*!< Shift value of the result.*/ + int32_t *rounding_buff; /*!< Rounding buffer for the purposes of esp32s3 ee.ld.accx.ip assembly instruction */ + int32_t rounding_val; /*!< Rounding value*/ + int16_t free_status; /*!< Indicator for dsps_fird_s16_aes3_free() function*/ }fir_s16_t; /** @@ -173,7 +177,43 @@ int dsps_fird_f32_ae32(fir_f32_t *fir, const float *input, float *output, int le */ int32_t dsps_fird_s16_ansi(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); +int32_t dsps_fird_s16_aes3(fir_s16_t *fir, const int16_t *input, int16_t *output, int32_t len); + + /**@}*/ +/** + * @brief support arrays freeing function + * + * Function frees all the arrays, which were created during the initialization of the fir_s16_t structure + * 1. frees allocated memory for rounding buffer, for the purposes of esp32s3 ee.ld.accx.ip assembly instruction + * 2. frees allocated memory in case the delay line is NULL + * 3. frees allocated memory in case the length of the filter (and the delay line) is not divisible by 8 + * and new delay line and filter coefficients arrays are created for the purpose of the esp32s3 assembly + * + * @param fir: pointer to fir filter structure, that must be initialized before + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_fird_s16_aexx_free(fir_s16_t *fir); +/**@}*/ + + +/**@{*/ +/** + * @brief Array reversal + * + * Function reverses 16-bit long array members for the purpose of the dsps_fird_s16_aes3 implementation + * The function has to be called either during the fir struct initialization or every time the coefficients change + * + * @param fir: pointer to the array to be reversed + * @param len: length of the array to be reversed + * + * @return + * - ESP_OK on success + */ +esp_err_t dsps_16_array_rev(int16_t *arr, int16_t len); +/**@{*/ #ifdef __cplusplus } @@ -182,28 +222,34 @@ int32_t dsps_fird_s16_ae32(fir_s16_t *fir, const int16_t *input, int16_t *output #if CONFIG_DSP_OPTIMIZED -#if (dsps_fir_f32_ae32_enabled == 1) -#define dsps_fir_f32 dsps_fir_f32_ae32 -#else -#define dsps_fir_f32 dsps_fir_f32_ansi -#endif + #if (dsps_fir_f32_ae32_enabled == 1) + #define dsps_fir_f32 dsps_fir_f32_ae32 + #else + #define dsps_fir_f32 dsps_fir_f32_ansi + #endif -#if (dsps_fird_f32_ae32_enabled == 1) -#define dsps_fird_f32 dsps_fird_f32_ae32 -#else -#define dsps_fird_f32 dsps_fird_f32_ansi -#endif + #if (dsps_fird_f32_ae32_enabled == 1) + #define dsps_fird_f32 dsps_fird_f32_ae32 + #else + #define dsps_fird_f32 dsps_fird_f32_ansi + #endif -#if (dsps_fird_s16_ae32_enabled == 1) -#define dsps_fird_s16 dsps_fird_s16_ae32 -#else -#define dsps_fird_s16 dsps_fird_s16_ansi -#endif + #if (dsps_fird_s16_ae32_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_ae32 + + #elif (dsps_fird_s16_aes3_enabled == 1) + #define dsps_fird_s16 dsps_fird_s16_aes3 + + #else + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif #else // CONFIG_DSP_OPTIMIZED -#define dsps_fir_f32 dsps_fir_f32_ansi -#define dsps_fird_f32 dsps_fird_f32_ansi -#define dsps_fird_s16 dsps_fird_s16_ansi + + #define dsps_fir_f32 dsps_fir_f32_ansi + #define dsps_fird_f32 dsps_fird_f32_ansi + #define dsps_fird_s16 dsps_fird_s16_ansi + #endif // CONFIG_DSP_OPTIMIZED #endif // _dsps_fir_H_ \ No newline at end of file diff --git a/tools/sdk/esp32/include/esp-dsp/modules/fir/include/dsps_fir_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h similarity index 64% rename from tools/sdk/esp32/include/esp-dsp/modules/fir/include/dsps_fir_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h index f352fa85fc4..a20fa0a6bb6 100644 --- a/tools/sdk/esp32/include/esp-dsp/modules/fir/include/dsps_fir_platform.h +++ b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/fir/include/dsps_fir_platform.h @@ -12,8 +12,14 @@ #define dsps_fir_f32_ae32_enabled 1 #define dsps_fird_f32_ae32_enabled 1 -#define dsps_fird_s16_ae32_enabled 1 -#define dsps_fird_s16_ae32_mul_enabled 1 + +#if CONFIG_IDF_TARGET_ESP32S3 + #define dsps_fird_s16_aes3_enabled 1 + #define dsps_fird_s16_ae32_enabled 0 +#else + #define dsps_fird_s16_aes3_enabled 0 + #define dsps_fird_s16_ae32_enabled 1 +#endif #endif // #endif // __XTENSA__ diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/iir/include/dsps_biquad.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/iir/include/dsps_biquad.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/iir/include/dsps_biquad_gen.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_gen.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/iir/include/dsps_biquad_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/iir/include/dsps_biquad_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/kalman/ekf/include/ekf.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/kalman/ekf/include/ekf.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/kalman/ekf/include/ekf.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/kalman/ekf_imu13states/include/ekf_imu13states.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/add/include/dsps_add.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/add/include/dsps_add.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/add/include/dsps_add.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/add/include/dsps_add_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/add/include/dsps_add_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/add/include/dsps_add_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/addc/include/dsps_addc.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/addc/include/dsps_addc.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/addc/include/dsps_addc_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/addc/include/dsps_addc_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/include/dsps_math.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/include/dsps_math.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/include/dsps_math.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/include/dsps_math.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/mul/include/dsps_mul.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/mul/include/dsps_mul.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/mul/include/dsps_mul_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mul/include/dsps_mul_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/mulc/include/dsps_mulc.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/mulc/include/dsps_mulc_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/sqrt/include/dsps_sqrt.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/sqrt/include/dsps_sqrt.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/sub/include/dsps_sub.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/sub/include/dsps_sub.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/math/sub/include/dsps_sub_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/math/sub/include/dsps_sub_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/matrix/include/dspm_mult.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/matrix/include/dspm_mult.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/matrix/include/dspm_mult_platform.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/matrix/include/dspm_mult_platform.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/matrix/include/mat.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/matrix/include/mat.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/matrix/include/mat.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/matrix/include/mat.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_d_gen.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_d_gen.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_d_gen.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_h_gen.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_h_gen.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_h_gen.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_sfdr.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_sfdr.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_sfdr.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_snr.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_snr.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_snr.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_snr.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_tone_gen.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_tone_gen.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_tone_gen.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_view.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_view.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/support/include/dsps_view.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/support/include/dsps_view.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/blackman/include/dsps_wind_blackman.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/blackman_harris/include/dsps_wind_blackman_harris.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/blackman_nuttall/include/dsps_wind_blackman_nuttall.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/flat_top/include/dsps_wind_flat_top.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/windows/hann/include/dsps_wind_hann.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/hann/include/dsps_wind_hann.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/windows/include/dsps_wind.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/windows/include/dsps_wind.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/include/dsps_wind.h diff --git a/tools/sdk/esp32s3/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h b/tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h similarity index 100% rename from tools/sdk/esp32s3/include/esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h rename to tools/sdk/esp32s3/include/espressif__esp-dsp/modules/windows/nuttall/include/dsps_wind_nuttall.h diff --git a/tools/sdk/esp32s3/include/expat/expat/expat/lib/expat.h b/tools/sdk/esp32s3/include/expat/expat/expat/lib/expat.h index e2020a4a29e..1c83563cbf6 100644 --- a/tools/sdk/esp32s3/include/expat/expat/expat/lib/expat.h +++ b/tools/sdk/esp32s3/include/expat/expat/expat/lib/expat.h @@ -1054,8 +1054,8 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold( See http://semver.org. */ #define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 4 -#define XML_MICRO_VERSION 8 +#define XML_MINOR_VERSION 5 +#define XML_MICRO_VERSION 0 #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/expat/expat/expat/lib/internal.h b/tools/sdk/esp32s3/include/expat/expat/expat/lib/internal.h index 444eba0fb03..e09f533b23c 100644 --- a/tools/sdk/esp32s3/include/expat/expat/expat/lib/internal.h +++ b/tools/sdk/esp32s3/include/expat/expat/expat/lib/internal.h @@ -28,7 +28,7 @@ Copyright (c) 2002-2003 Fred L. Drake, Jr. Copyright (c) 2002-2006 Karl Waclawek Copyright (c) 2003 Greg Stein - Copyright (c) 2016-2021 Sebastian Pipping + Copyright (c) 2016-2022 Sebastian Pipping Copyright (c) 2018 Yury Gribov Copyright (c) 2019 David Loffredo Licensed under the MIT license: @@ -107,7 +107,9 @@ #include // ULONG_MAX -#if defined(_WIN32) && ! defined(__USE_MINGW_ANSI_STDIO) +#if defined(_WIN32) \ + && (! defined(__USE_MINGW_ANSI_STDIO) \ + || (1 - __USE_MINGW_ANSI_STDIO - 1 == 0)) # define EXPAT_FMT_ULL(midpart) "%" midpart "I64u" # if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW # define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d" diff --git a/tools/sdk/esp32s3/include/expat/expat/expat/lib/siphash.h b/tools/sdk/esp32s3/include/expat/expat/expat/lib/siphash.h index e5406d7ee9e..303283ad2de 100644 --- a/tools/sdk/esp32s3/include/expat/expat/expat/lib/siphash.h +++ b/tools/sdk/esp32s3/include/expat/expat/expat/lib/siphash.h @@ -106,7 +106,7 @@ * if this code is included and compiled as C++; related GCC warning is: * warning: use of C++11 long long integer constant [-Wlong-long] */ -#define _SIP_ULL(high, low) (((uint64_t)high << 32) | low) +#define _SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low)) #define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) diff --git a/tools/sdk/esp32s3/include/expat/expat/expat/lib/xmltok_impl.h b/tools/sdk/esp32s3/include/expat/expat/expat/lib/xmltok_impl.h index c518aada013..3469c4ae138 100644 --- a/tools/sdk/esp32s3/include/expat/expat/expat/lib/xmltok_impl.h +++ b/tools/sdk/esp32s3/include/expat/expat/expat/lib/xmltok_impl.h @@ -45,7 +45,7 @@ enum { BT_LF, /* line feed = "\n" */ BT_GT, /* greater than = ">" */ BT_QUOT, /* quotation character = "\"" */ - BT_APOS, /* aposthrophe = "'" */ + BT_APOS, /* apostrophe = "'" */ BT_EQUALS, /* equal sign = "=" */ BT_QUEST, /* question mark = "?" */ BT_EXCL, /* exclamation mark = "!" */ diff --git a/tools/sdk/esp32s3/include/expat/port/include/expat_config.h b/tools/sdk/esp32s3/include/expat/port/include/expat_config.h index 42acb52a5ca..c5a086c1357 100644 --- a/tools/sdk/esp32s3/include/expat/port/include/expat_config.h +++ b/tools/sdk/esp32s3/include/expat/port/include/expat_config.h @@ -63,7 +63,7 @@ #define PACKAGE_NAME "expat" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "expat 2.4.8" +#define PACKAGE_STRING "expat 2.5.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "expat" @@ -72,13 +72,13 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.4.8" +#define PACKAGE_VERSION "2.5.0" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "2.4.8" +#define VERSION "2.5.0" /* whether byteorder is bigendian */ /* #undef WORDS_BIGENDIAN */ diff --git a/tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_common.h b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_common.h similarity index 87% rename from tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_common.h rename to tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_common.h index 9c65f08b90d..f443286ae87 100644 --- a/tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_common.h +++ b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_common.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _MB_IFACE_COMMON_H @@ -24,6 +15,7 @@ extern "C" { #if __has_include("esp_check.h") #include "esp_check.h" +#include "esp_log.h" #define MB_RETURN_ON_FALSE(a, err_code, tag, format, ...) ESP_RETURN_ON_FALSE(a, err_code, tag, format __VA_OPT__(,) __VA_ARGS__) @@ -44,10 +36,10 @@ extern "C" { #define MB_CONTROLLER_PRIORITY (CONFIG_FMB_PORT_TASK_PRIO - 1) // priority of MB controller task // Default port defines -#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus -#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined +#define MB_DEVICE_ADDRESS (1) // Default slave device address in Modbus +#define MB_DEVICE_SPEED (115200) // Default Modbus speed for now hard defined #define MB_UART_PORT (UART_NUM_MAX - 1) // Default UART port number -#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info +#define MB_PAR_INFO_TOUT (10) // Timeout for get parameter info #define MB_PARITY_NONE (UART_PARITY_DISABLE) // The Macros below handle the endianness while transfer N byte data into buffer diff --git a/tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_master.h b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_master.h similarity index 95% rename from tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_master.h rename to tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_master.h index 8084e689027..d11ade7a4d8 100644 --- a/tools/sdk/esp32c3/include/freemodbus/common/include/esp_modbus_master.h +++ b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_master.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_MASTER_INTERFACE_H diff --git a/tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_slave.h b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h similarity index 88% rename from tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_slave.h rename to tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h index 040d18265bf..7d79b513a67 100644 --- a/tools/sdk/esp32s3/include/freemodbus/common/include/esp_modbus_slave.h +++ b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/esp_modbus_slave.h @@ -1,16 +1,7 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 */ #ifndef _ESP_MB_SLAVE_INTERFACE_H diff --git a/tools/sdk/esp32s2/include/freemodbus/common/include/mbcontroller.h b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/mbcontroller.h similarity index 51% rename from tools/sdk/esp32s2/include/freemodbus/common/include/mbcontroller.h rename to tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/mbcontroller.h index 08b3c183c8f..10205f8951a 100644 --- a/tools/sdk/esp32s2/include/freemodbus/common/include/mbcontroller.h +++ b/tools/sdk/esp32s3/include/freemodbus/freemodbus/common/include/mbcontroller.h @@ -1,17 +1,8 @@ -/* Copyright 2018 Espressif Systems (Shanghai) PTE LTD +/* + * SPDX-FileCopyrightText: 2016-2021 Espressif Systems (Shanghai) CO 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-License-Identifier: Apache-2.0 + */ // mbcontroller.h // mbcontroller - common Modbus controller header file diff --git a/tools/sdk/esp32s3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h b/tools/sdk/esp32s3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h index 6bb81894593..3d0c3380556 100644 --- a/tools/sdk/esp32s3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h +++ b/tools/sdk/esp32s3/include/freertos/include/esp_additions/freertos/FreeRTOSConfig.h @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H diff --git a/tools/sdk/esp32s3/include/freertos/include/freertos/FreeRTOS.h b/tools/sdk/esp32s3/include/freertos/include/freertos/FreeRTOS.h index eb0ee6be357..296b2878377 100644 --- a/tools/sdk/esp32s3/include/freertos/include/freertos/FreeRTOS.h +++ b/tools/sdk/esp32s3/include/freertos/include/freertos/FreeRTOS.h @@ -1296,7 +1296,9 @@ typedef struct xSTATIC_QUEUE UBaseType_t uxDummy8; uint8_t ucDummy9; #endif - portMUX_TYPE xDummy10; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy10; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticQueue_t; typedef StaticQueue_t StaticSemaphore_t; @@ -1326,7 +1328,9 @@ typedef struct xSTATIC_EVENT_GROUP #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) uint8_t ucDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticEventGroup_t; /* @@ -1378,7 +1382,9 @@ typedef struct xSTATIC_STREAM_BUFFER #if ( configUSE_TRACE_FACILITY == 1 ) UBaseType_t uxDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticStreamBuffer_t; /* Message buffers are built on stream buffers. */ diff --git a/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h b/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h index f2aab51ccfc..f543e1881f3 100644 --- a/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h +++ b/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/FreeRTOSConfig_arch.h @@ -1,71 +1,8 @@ /* - FreeRTOS V10 - Copyright (C) 2021 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ + * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #ifndef FREERTOS_CONFIG_XTENSA_H #define FREERTOS_CONFIG_XTENSA_H diff --git a/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/portmacro.h b/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/portmacro.h index 2ee4c12c2b8..bce731d331d 100644 --- a/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/portmacro.h +++ b/tools/sdk/esp32s3/include/freertos/port/xtensa/include/freertos/portmacro.h @@ -106,7 +106,7 @@ typedef uint32_t TickType_t; #define portCRITICAL_NESTING_IN_TCB 0 #define portSTACK_GROWTH ( -1 ) #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) -#define portBYTE_ALIGNMENT 4 +#define portBYTE_ALIGNMENT 16 // Xtensa Windowed ABI requires the stack pointer to always be 16-byte aligned. See "isa_rm.pdf 8.1.1 Windowed Register Usage and Stack Layout" #define portNOP() XT_NOP() diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/clk_gate_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/clk_gate_ll.h index 29f7508ff1f..d3bd68d0851 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/clk_gate_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/clk_gate_ll.h @@ -111,6 +111,8 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en return SYSTEM_RMT_RST; case PERIPH_LEDC_MODULE: return SYSTEM_LEDC_RST; + case PERIPH_WIFI_MODULE: + return SYSTEM_WIFIMAC_RST; case PERIPH_BT_MODULE: return (SYSTEM_BTBB_RST | SYSTEM_BTBB_REG_RST | SYSTEM_RW_BTMAC_RST | SYSTEM_RW_BTLP_RST | SYSTEM_RW_BTMAC_REG_RST | SYSTEM_RW_BTLP_REG_RST); case PERIPH_UART0_MODULE: diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/efuse_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/efuse_ll.h new file mode 100644 index 00000000000..07e17f9c3f2 --- /dev/null +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/efuse_ll.h @@ -0,0 +1,132 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include +#include "soc/efuse_periph.h" +#include "hal/assert.h" +#include "esp32s3/rom/efuse.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Always inline these functions even no gcc optimization is applied. + +/******************* eFuse fields *************************/ + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_flash_crypt_cnt(void) +{ + return EFUSE.rd_repeat_data1.reg_spi_boot_crypt_cnt; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_wdt_delay_sel(void) +{ + return EFUSE.rd_repeat_data1.reg_wdt_delay_sel; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_flash_type(void) +{ + return EFUSE.rd_repeat_data3.reg_flash_type; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac0(void) +{ + return EFUSE.rd_mac_spi_sys_0; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_mac1(void) +{ + return EFUSE.rd_mac_spi_sys_1.reg_mac_1; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_secure_boot_v2_en(void) +{ + return EFUSE.rd_repeat_data2.reg_secure_boot_en; +} + +// use efuse_hal_get_major_chip_version() to get major chip version +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_major(void) +{ + return EFUSE.rd_mac_spi_sys_5.wafer_version_major; +} + +// use efuse_hal_get_minor_chip_version() to get minor chip version +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_minor(void) +{ + return (EFUSE.rd_mac_spi_sys_5.wafer_version_minor_high << 3) + EFUSE.rd_mac_spi_sys_3.wafer_version_minor_low; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_wafer_version_major(void) +{ + return EFUSE.rd_repeat_data4.disable_wafer_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_blk_version_major(void) +{ + return EFUSE.rd_sys_part1_data4.blk_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_blk_version_minor(void) +{ + return EFUSE.rd_mac_spi_sys_3.blk_version_minor; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_disable_blk_version_major(void) +{ + return EFUSE.rd_repeat_data4.disable_blk_version_major; +} + +__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_ver_pkg(void) +{ + return 0; +} + +/******************* eFuse control functions *************************/ + +__attribute__((always_inline)) static inline bool efuse_ll_get_read_cmd(void) +{ + return EFUSE.cmd.read_cmd; +} + +__attribute__((always_inline)) static inline bool efuse_ll_get_pgm_cmd(void) +{ + return EFUSE.cmd.pgm_cmd; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_read_cmd(void) +{ + EFUSE.cmd.read_cmd = 1; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_pgm_cmd(uint32_t block) +{ + HAL_ASSERT(block < ETS_EFUSE_BLOCK_MAX); + EFUSE.cmd.val = ((block << EFUSE_BLK_NUM_S) & EFUSE_BLK_NUM_M) | EFUSE_PGM_CMD; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_read_op_code(void) +{ + EFUSE.conf.op_code = EFUSE_READ_OP_CODE; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_conf_write_op_code(void) +{ + EFUSE.conf.op_code = EFUSE_WRITE_OP_CODE; +} + +__attribute__((always_inline)) static inline void efuse_ll_set_pwr_off_num(uint16_t value) +{ + EFUSE.wr_tim_conf2.pwr_off_num = value; +} + +/******************* eFuse control functions *************************/ + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gdma_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gdma_ll.h index 4035c76934c..b2f69e6b78f 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gdma_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gdma_ll.h @@ -7,7 +7,7 @@ #include #include -#include "soc/soc_caps.h" +#include "hal/gdma_types.h" #include "soc/gdma_struct.h" #include "soc/gdma_reg.h" @@ -20,6 +20,10 @@ extern "C" { #define GDMA_LL_RX_EVENT_MASK (0x3FF) #define GDMA_LL_TX_EVENT_MASK (0xFF) +// any "valid" peripheral ID can be used for M2M mode +#define GDMA_LL_M2M_FREE_PERIPH_ID_MASK (0x3FF) +#define GDMA_LL_INVALID_PERIPH_ID (0x3F) + #define GDMA_LL_EVENT_TX_L3_FIFO_UDF (1<<7) #define GDMA_LL_EVENT_TX_L3_FIFO_OVF (1<<6) #define GDMA_LL_EVENT_TX_L1_FIFO_UDF (1<<5) @@ -48,19 +52,6 @@ extern "C" { #define GDMA_LL_EXT_MEM_BK_SIZE_64B (2) ///////////////////////////////////// Common ///////////////////////////////////////// -/** - * @brief Enable DMA channel M2M mode (TX channel n forward data to RX channel n), disabled by default - */ -static inline void gdma_ll_enable_m2m_mode(gdma_dev_t *dev, uint32_t channel, bool enable) -{ - dev->channel[channel].in.conf0.mem_trans_en = enable; - if (enable) { - // to enable m2m mode, the tx chan has to be the same to rx chan, and set to a valid value - dev->channel[channel].in.peri_sel.sel = 0; - dev->channel[channel].out.peri_sel.sel = 0; - } -} - /** * @brief Enable DMA clock gating */ @@ -300,9 +291,19 @@ static inline void gdma_ll_rx_set_priority(gdma_dev_t *dev, uint32_t channel, ui /** * @brief Connect DMA RX channel to a given peripheral */ -static inline void gdma_ll_rx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, int periph_id) +static inline void gdma_ll_rx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, gdma_trigger_peripheral_t periph, int periph_id) { dev->channel[channel].in.peri_sel.sel = periph_id; + dev->channel[channel].in.conf0.mem_trans_en = (periph == GDMA_TRIG_PERIPH_M2M); +} + +/** + * @brief Disconnect DMA RX channel from peripheral + */ +static inline void gdma_ll_rx_disconnect_from_periph(gdma_dev_t *dev, uint32_t channel) +{ + dev->channel[channel].in.peri_sel.sel = GDMA_LL_INVALID_PERIPH_ID; + dev->channel[channel].in.conf0.mem_trans_en = false; } ///////////////////////////////////// TX ///////////////////////////////////////// @@ -527,11 +528,20 @@ static inline void gdma_ll_tx_set_priority(gdma_dev_t *dev, uint32_t channel, ui /** * @brief Connect DMA TX channel to a given peripheral */ -static inline void gdma_ll_tx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, int periph_id) +static inline void gdma_ll_tx_connect_to_periph(gdma_dev_t *dev, uint32_t channel, gdma_trigger_peripheral_t periph, int periph_id) { + (void)periph; dev->channel[channel].out.peri_sel.sel = periph_id; } +/** + * @brief Disconnect DMA TX channel from peripheral + */ +static inline void gdma_ll_tx_disconnect_from_periph(gdma_dev_t *dev, uint32_t channel) +{ + dev->channel[channel].out.peri_sel.sel = GDMA_LL_INVALID_PERIPH_ID; +} + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gpio_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gpio_ll.h index a68ff6729c3..7ed456103d6 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gpio_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/gpio_ll.h @@ -14,6 +14,7 @@ #pragma once +#include #include "soc/soc.h" #include "soc/gpio_periph.h" #include "soc/rtc_cntl_reg.h" @@ -50,6 +51,7 @@ static inline void gpio_ll_pullup_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pullup_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { // The pull-up value of the USB pins are controlled by the pins’ pull-up value together with USB pull-up value @@ -60,7 +62,7 @@ static inline void gpio_ll_pullup_dis(gpio_dev_t *hw, gpio_num_t gpio_num) SET_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_PAD_PULL_OVERRIDE); CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_DP_PULLUP); } - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PU); + REG_CLR_BIT(IO_MUX_GPIO0_REG + (gpio_num * 4), FUN_PU); } /** @@ -80,9 +82,10 @@ static inline void gpio_ll_pulldown_en(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_pulldown_dis(gpio_dev_t *hw, gpio_num_t gpio_num) { - REG_CLR_BIT(GPIO_PIN_MUX_REG[gpio_num], FUN_PD); + REG_CLR_BIT(IO_MUX_GPIO0_REG + (gpio_num * 4), FUN_PD); } /** @@ -177,9 +180,10 @@ static inline void gpio_ll_intr_disable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_input_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { - PIN_INPUT_DISABLE(GPIO_PIN_MUX_REG[gpio_num]); + PIN_INPUT_DISABLE(IO_MUX_GPIO0_REG + (gpio_num * 4)); } /** @@ -199,6 +203,7 @@ static inline void gpio_ll_input_enable(gpio_dev_t *hw, gpio_num_t gpio_num) * @param hw Peripheral GPIO hardware instance address. * @param gpio_num GPIO number */ +__attribute__((always_inline)) static inline void gpio_ll_output_disable(gpio_dev_t *hw, gpio_num_t gpio_num) { if (gpio_num < 32) { @@ -249,6 +254,21 @@ static inline void gpio_ll_od_enable(gpio_dev_t *hw, gpio_num_t gpio_num) hw->pin[gpio_num].pad_driver = 1; } +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +static inline __attribute__((always_inline)) void gpio_ll_func_sel(gpio_dev_t *hw, uint8_t gpio_num, uint32_t func) +{ + if (gpio_num == 19 || gpio_num == 20) { + CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE); + } + PIN_FUNC_SELECT(IO_MUX_GPIO0_REG + (gpio_num * 4), func); +} + /** * @brief GPIO set output level * @@ -349,6 +369,7 @@ static inline void gpio_ll_get_drive_capability(gpio_dev_t *hw, gpio_num_t gpio_ */ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) { + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD); SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } @@ -359,7 +380,22 @@ static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw) */ static inline void gpio_ll_deep_sleep_hold_dis(gpio_dev_t *hw) { - SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CLR_DG_PAD_AUTOHOLD); + CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); +} + +/** + * @brief Get deep sleep hold status + * + * @param hw Peripheral GPIO hardware instance address. + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +__attribute__((always_inline)) +static inline bool gpio_ll_deep_sleep_hold_is_en(gpio_dev_t *hw) +{ + return !GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD) && GET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M); } /** @@ -384,6 +420,24 @@ static inline void gpio_ll_hold_dis(gpio_dev_t *hw, gpio_num_t gpio_num) CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PAD_HOLD_REG, GPIO_HOLD_MASK[gpio_num]); } +/** + * @brief Get gpio pad hold status. + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number, only support output GPIOs + * + * @note caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +__attribute__((always_inline)) +static inline bool gpio_ll_is_digital_io_hold(gpio_dev_t *hw, uint32_t gpio_num) +{ + return GET_PERI_REG_MASK(RTC_CNTL_DIG_PAD_HOLD_REG, BIT(gpio_num - 21)); +} + /** * @brief Set pad input to a peripheral signal through the IOMUX. * diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2c_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2c_ll.h index 20b5c7d9ede..334fe8287af 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2c_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2c_ll.h @@ -13,6 +13,7 @@ #include "soc/soc_caps.h" #include "soc/i2c_struct.h" #include "hal/i2c_types.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -129,6 +130,7 @@ static inline void i2c_ll_cal_bus_clk(uint32_t source_clk, uint32_t bus_freq, i2 * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_update(i2c_dev_t *hw) { hw->ctr.conf_upgate = 1; @@ -272,6 +274,7 @@ static inline void i2c_ll_disable_intr_mask(i2c_dev_t *hw, uint32_t mask) * * @return I2C interrupt status */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_intsts_mask(i2c_dev_t *hw) { return hw->int_status.val; @@ -327,10 +330,11 @@ static inline void i2c_ll_set_slave_addr(i2c_dev_t *hw, uint16_t slave_addr, boo * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_write_cmd_reg(i2c_dev_t *hw, i2c_hw_cmd_t cmd, int cmd_idx) { - _Static_assert(sizeof(i2c_comd0_reg_t) == sizeof(i2c_hw_cmd_t), - "i2c_comdX_reg_t structure size must be equal to i2c_hw_cmd_t structure size"); + ESP_STATIC_ASSERT(sizeof(i2c_comd0_reg_t) == sizeof(i2c_hw_cmd_t), + "i2c_comdX_reg_t structure size must be equal to i2c_hw_cmd_t structure size"); volatile i2c_hw_cmd_t* commands = (volatile i2c_hw_cmd_t*) &hw->comd0; commands[cmd_idx].val = cmd.val; } @@ -494,6 +498,7 @@ static inline bool i2c_ll_is_master_mode(i2c_dev_t *hw) * * @return RxFIFO readable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) { return hw->sr.rxfifo_cnt; @@ -506,6 +511,7 @@ static inline uint32_t i2c_ll_get_rxfifo_cnt(i2c_dev_t *hw) * * @return TxFIFO writable length */ +__attribute__((always_inline)) static inline uint32_t i2c_ll_get_txfifo_len(i2c_dev_t *hw) { return SOC_I2C_FIFO_LEN - hw->sr.txfifo_cnt; @@ -530,6 +536,7 @@ static inline uint32_t i2c_ll_get_tout(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_trans_start(i2c_dev_t *hw) { hw->ctr.trans_start = 1; @@ -605,6 +612,7 @@ static inline void i2c_ll_get_scl_clk_timing(i2c_dev_t *hw, int *high_period, in * * @return None. */ +__attribute__((always_inline)) static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { for (int i = 0; i< len; i++) { @@ -621,6 +629,7 @@ static inline void i2c_ll_write_txfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_read_rxfifo(i2c_dev_t *hw, uint8_t *ptr, uint8_t len) { for(int i = 0; i < len; i++) { @@ -669,6 +678,7 @@ static inline uint8_t i2c_ll_get_filter(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -682,6 +692,7 @@ static inline void i2c_ll_master_enable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) { hw->int_clr.val = ~0; @@ -695,6 +706,7 @@ static inline void i2c_ll_master_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_TX_INT); @@ -707,6 +719,7 @@ static inline void i2c_ll_master_disable_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_MASTER_RX_INT); @@ -719,6 +732,7 @@ static inline void i2c_ll_master_disable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_TX_INT; @@ -731,6 +745,7 @@ static inline void i2c_ll_master_clr_tx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_clr_rx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_MASTER_RX_INT; @@ -767,6 +782,7 @@ static inline void i2c_ll_slave_enable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_disable_tx_it(i2c_dev_t *hw) { hw->int_ena.val &= (~I2C_LL_SLAVE_TX_INT); @@ -791,6 +807,7 @@ static inline void i2c_ll_slave_disable_rx_it(i2c_dev_t *hw) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_slave_clr_tx_it(i2c_dev_t *hw) { hw->int_clr.val = I2C_LL_SLAVE_TX_INT; @@ -859,6 +876,7 @@ static inline void i2c_ll_set_source_clk(i2c_dev_t *hw, i2c_sclk_t src_clk) * * @return None */ +__attribute__((always_inline)) static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; @@ -885,6 +903,8 @@ static inline void i2c_ll_master_get_event(i2c_dev_t *hw, i2c_intr_event_t *even * * @return None */ + +__attribute__((always_inline)) static inline void i2c_ll_slave_get_event(i2c_dev_t *hw, i2c_intr_event_t *event) { typeof(hw->int_status) int_sts = hw->int_status; diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2s_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2s_ll.h index f8a63ed16cd..1281a27baa2 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2s_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/i2s_ll.h @@ -311,8 +311,8 @@ static inline void i2s_ll_rx_set_clk(i2s_dev_t *hw, i2s_ll_mclk_div_t *set) */ static inline void i2s_ll_tx_start(i2s_dev_t *hw) { - hw->tx_conf.tx_update = 0; hw->tx_conf.tx_update = 1; + while (hw->tx_conf.tx_update); hw->tx_conf.tx_start = 1; } @@ -323,8 +323,8 @@ static inline void i2s_ll_tx_start(i2s_dev_t *hw) */ static inline void i2s_ll_rx_start(i2s_dev_t *hw) { - hw->rx_conf.rx_update = 0; hw->rx_conf.rx_update = 1; + while (hw->rx_conf.rx_update); hw->rx_conf.rx_start = 1; } diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/mwdt_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/mwdt_ll.h index c15d7b8cd52..34bca0fd4b8 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/mwdt_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/mwdt_ll.h @@ -28,6 +28,7 @@ extern "C" { #include "soc/timer_group_struct.h" #include "hal/wdt_types.h" #include "esp_attr.h" +#include "esp_assert.h" /* The value that needs to be written to MWDT_LL_WKEY to write-enable the wdt registers */ #define MWDT_LL_WKEY_VALUE 0x50D83AA1 @@ -49,19 +50,19 @@ extern "C" { #define MWDT_LL_RESET_LENGTH_3200_NS 7 //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == MWDT_LL_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == MWDT_LL_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == MWDT_LL_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == MWDT_LL_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == MWDT_LL_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == MWDT_LL_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == MWDT_LL_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == MWDT_LL_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == MWDT_LL_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == MWDT_LL_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == MWDT_LL_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == MWDT_LL_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == MWDT_LL_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == MWDT_LL_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == MWDT_LL_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == MWDT_LL_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == MWDT_LL_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == MWDT_LL_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == MWDT_LL_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == MWDT_LL_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == MWDT_LL_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == MWDT_LL_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == MWDT_LL_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == MWDT_LL_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); /** * @brief Enable the MWDT diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rmt_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rmt_ll.h index 2e6ddd563a1..02cb83bb0ac 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rmt_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rmt_ll.h @@ -22,18 +22,21 @@ extern "C" { // Note: TX and RX channel number are all index from zero in the LL driver // i.e. tx_channel belongs to [0,3], and rx_channel belongs to [0,3] +__attribute__((always_inline)) static inline void rmt_ll_enable_drive_clock(rmt_dev_t *dev, bool enable) { dev->sys_conf.clk_en = enable; // register clock gating dev->sys_conf.mem_clk_force_on = enable; // memory clock gating } +__attribute__((always_inline)) static inline void rmt_ll_power_down_mem(rmt_dev_t *dev, bool enable) { dev->sys_conf.mem_force_pu = !enable; dev->sys_conf.mem_force_pd = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_mem_power_down(rmt_dev_t *dev) { // the RTC domain can also power down RMT memory @@ -42,11 +45,13 @@ static inline bool rmt_ll_is_mem_power_down(rmt_dev_t *dev) return (dev->sys_conf.mem_force_pd) || !(dev->sys_conf.mem_force_pu); } +__attribute__((always_inline)) static inline void rmt_ll_enable_mem_access(rmt_dev_t *dev, bool enable) { dev->sys_conf.apb_fifo_mask = enable; } +__attribute__((always_inline)) static inline void rmt_ll_set_group_clock_src(rmt_dev_t *dev, uint32_t channel, uint8_t src, uint8_t div_num, uint8_t div_a, uint8_t div_b) { // Formula: rmt_sclk = module_clock_src / (1 + div_num + div_a / div_b) @@ -58,26 +63,31 @@ static inline void rmt_ll_set_group_clock_src(rmt_dev_t *dev, uint32_t channel, dev->sys_conf.sclk_active = 1; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_group_clock_src(rmt_dev_t *dev, uint32_t channel) { return dev->sys_conf.sclk_sel; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->ref_cnt_rst.val |= (1 << channel); } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_channels_clock_div(rmt_dev_t *dev, uint32_t channel_mask) { dev->ref_cnt_rst.val |= channel_mask; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { dev->ref_cnt_rst.val |= (1 << (channel + 4)); } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->chnconf0[channel].mem_rd_rst_n = 1; @@ -86,6 +96,7 @@ static inline void rmt_ll_tx_reset_pointer(rmt_dev_t *dev, uint32_t channel) dev->chnconf0[channel].apb_mem_rst_n = 0; } +__attribute__((always_inline)) static inline void rmt_ll_rx_reset_pointer(rmt_dev_t *dev, uint32_t channel) { dev->chmconf[channel].conf1.mem_wr_rst_m = 1; @@ -94,190 +105,227 @@ static inline void rmt_ll_rx_reset_pointer(rmt_dev_t *dev, uint32_t channel) dev->chmconf[channel].conf1.apb_mem_rst_m = 0; } +__attribute__((always_inline)) static inline void rmt_ll_tx_start(rmt_dev_t *dev, uint32_t channel) { dev->chnconf0[channel].conf_update_n = 1; dev->chnconf0[channel].tx_start_n = 1; } +__attribute__((always_inline)) static inline void rmt_ll_tx_stop(rmt_dev_t *dev, uint32_t channel) { dev->chnconf0[channel].tx_stop_n = 1; dev->chnconf0[channel].conf_update_n = 1; } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chmconf[channel].conf1.rx_en_m = enable; dev->chmconf[channel].conf1.conf_update_m = 1; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->chnconf0[channel].mem_size_n = block_num; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_blocks(rmt_dev_t *dev, uint32_t channel, uint8_t block_num) { dev->chmconf[channel].conf0.mem_size_m = block_num; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->chnconf0[channel].mem_size_n; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_blocks(rmt_dev_t *dev, uint32_t channel) { return dev->chmconf[channel].conf0.mem_size_m; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->chnconf0[channel], div_cnt_n, div); } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_channel_clock_div(rmt_dev_t *dev, uint32_t channel, uint32_t div) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->chmconf[channel].conf0, div_cnt_m, div); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { return HAL_FORCE_READ_U32_REG_FIELD(dev->chnconf0[channel], div_cnt_n); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_clock_div(rmt_dev_t *dev, uint32_t channel) { return HAL_FORCE_READ_U32_REG_FIELD(dev->chmconf[channel].conf0, div_cnt_m); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_pingpong(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chnconf0[channel].mem_tx_wrap_en_n = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_idle_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { dev->chmconf[channel].conf0.idle_thres_m = thres; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_idle_thres(rmt_dev_t *dev, uint32_t channel) { return dev->chmconf[channel].conf0.idle_thres_m; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_mem_owner(rmt_dev_t *dev, uint32_t channel, uint8_t owner) { dev->chmconf[channel].conf1.mem_owner_m = owner; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_mem_owner(rmt_dev_t *dev, uint32_t channel) { return dev->chmconf[channel].conf1.mem_owner_m; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chnconf0[channel].tx_conti_mode_n = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_loop_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->chnconf0[channel].tx_conti_mode_n; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop_autostop(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chn_tx_lim[channel].loop_stop_en_chn = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_loop_count(rmt_dev_t *dev, uint32_t channel, uint32_t count) { dev->chn_tx_lim[channel].tx_loop_num_chn = count; } +__attribute__((always_inline)) static inline void rmt_ll_tx_reset_loop(rmt_dev_t *dev, uint32_t channel) { dev->chn_tx_lim[channel].loop_count_reset_chn = 1; dev->chn_tx_lim[channel].loop_count_reset_chn = 0; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_loop_count(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chn_tx_lim[channel].tx_loop_cnt_en_chn = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_sync(rmt_dev_t *dev, bool enable) { dev->tx_sim.tx_sim_en = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_add_to_sync_group(rmt_dev_t *dev, uint32_t channel) { dev->tx_sim.val |= 1 << channel; } +__attribute__((always_inline)) static inline void rmt_ll_tx_remove_from_sync_group(rmt_dev_t *dev, uint32_t channel) { dev->tx_sim.val &= ~(1 << channel); } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_filter(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chmconf[channel].conf1.rx_filter_en_m = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_filter_thres(rmt_dev_t *dev, uint32_t channel, uint32_t thres) { HAL_FORCE_MODIFY_U32_REG_FIELD(dev->chmconf[channel].conf1, rx_filter_thres_m, thres); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_idle(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chnconf0[channel].idle_out_en_n = enable; } +__attribute__((always_inline)) static inline bool rmt_ll_is_tx_idle_enabled(rmt_dev_t *dev, uint32_t channel) { return dev->chnconf0[channel].idle_out_en_n; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_idle_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->chnconf0[channel].idle_out_lv_n = level; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_idle_level(rmt_dev_t *dev, uint32_t channel) { return dev->chnconf0[channel].idle_out_lv_n; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->chmstatus[channel].val; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_tx_get_channel_status(rmt_dev_t *dev, uint32_t channel) { return dev->chnstatus[channel].val; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_limit(rmt_dev_t *dev, uint32_t channel, uint32_t limit) { dev->chn_tx_lim[channel].tx_lim_chn = limit; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_limit(rmt_dev_t *dev, uint32_t channel, uint32_t limit) { dev->chm_rx_lim[channel].chm_rx_lim_reg = limit; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_rx_get_limit(rmt_dev_t *dev, uint32_t channel) { return dev->chm_rx_lim[channel].chm_rx_lim_reg; } +__attribute__((always_inline)) static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool enable) { if (enable) { @@ -287,6 +335,7 @@ static inline void rmt_ll_enable_interrupt(rmt_dev_t *dev, uint32_t mask, bool e } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -296,6 +345,7 @@ static inline void rmt_ll_enable_tx_end_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -305,6 +355,7 @@ static inline void rmt_ll_enable_tx_err_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -314,6 +365,7 @@ static inline void rmt_ll_enable_rx_end_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -323,6 +375,7 @@ static inline void rmt_ll_enable_rx_err_interrupt(rmt_dev_t *dev, uint32_t chann } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -332,6 +385,7 @@ static inline void rmt_ll_enable_tx_thres_interrupt(rmt_dev_t *dev, uint32_t cha } } +__attribute__((always_inline)) static inline void rmt_ll_enable_tx_loop_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -341,6 +395,7 @@ static inline void rmt_ll_enable_tx_loop_interrupt(rmt_dev_t *dev, uint32_t chan } } +__attribute__((always_inline)) static inline void rmt_ll_enable_rx_thres_interrupt(rmt_dev_t *dev, uint32_t channel, bool enable) { if (enable) { @@ -350,76 +405,91 @@ static inline void rmt_ll_enable_rx_thres_interrupt(rmt_dev_t *dev, uint32_t cha } } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_end_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 16)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 4)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_err_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 20)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_thres_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 8)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_tx_loop_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 12)); } +__attribute__((always_inline)) static inline void rmt_ll_clear_rx_thres_interrupt(rmt_dev_t *dev, uint32_t channel) { dev->int_clr.val = (1 << (channel + 24)); } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_end_interrupt_status(rmt_dev_t *dev) { return dev->int_st.val & 0x0F; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_end_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 16) & 0x0F; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_err_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 4) & 0x0F; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_err_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 20) & 0x0F; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_thres_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 8) & 0x0F; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_rx_thres_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 24) & 0x0F; } +__attribute__((always_inline)) static inline uint32_t rmt_ll_get_tx_loop_interrupt_status(rmt_dev_t *dev) { return (dev->int_st.val >> 12) & 0x0F; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { // In case the compiler optimise a 32bit instruction (e.g. s32i) into two 16bit instruction (e.g. s16i, which is not allowed to access a register) @@ -430,6 +500,7 @@ static inline void rmt_ll_tx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t dev->chncarrier_duty[channel].val = reg.val; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { rmt_chm_rx_carrier_rm_reg_t reg; @@ -438,33 +509,39 @@ static inline void rmt_ll_rx_set_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t dev->chm_rx_carrier_rm[channel].val = reg.val; } +__attribute__((always_inline)) static inline void rmt_ll_tx_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t *high_ticks, uint32_t *low_ticks ) { *high_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->chncarrier_duty[channel], carrier_high_chn); *low_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->chncarrier_duty[channel], carrier_low_chn); } +__attribute__((always_inline)) static inline void rmt_ll_rx_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t *high_ticks, uint32_t *low_ticks) { *high_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->chm_rx_carrier_rm[channel], carrier_high_thres_chm); *low_ticks = HAL_FORCE_READ_U32_REG_FIELD(dev->chm_rx_carrier_rm[channel], carrier_low_thres_chm); } +__attribute__((always_inline)) static inline void rmt_ll_tx_enable_carrier_modulation(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chnconf0[channel].carrier_en_n = enable; } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_carrier_demodulation(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chmconf[channel].conf0.carrier_en_m = enable; } +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->chnconf0[channel].carrier_out_lv_n = level; } +__attribute__((always_inline)) static inline void rmt_ll_rx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, uint8_t level) { dev->chmconf[channel].conf0.carrier_out_lv_m = level; @@ -472,6 +549,7 @@ static inline void rmt_ll_rx_set_carrier_level(rmt_dev_t *dev, uint32_t channel, // set true, enable carrier in all RMT state (idle, reading, sending) // set false, enable carrier only in sending state (i.e. there're effective data in RAM to be sent) +__attribute__((always_inline)) static inline void rmt_ll_tx_set_carrier_always_on(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chnconf0[channel].carrier_eff_en_n = !enable; @@ -479,6 +557,7 @@ static inline void rmt_ll_tx_set_carrier_always_on(rmt_dev_t *dev, uint32_t chan //Writes items to the specified TX channel memory with the given offset and length. //the caller should ensure that (length + off) <= (memory block * SOC_RMT_MEM_WORDS_PER_CHANNEL) +__attribute__((always_inline)) static inline void rmt_ll_write_memory(rmt_mem_t *mem, uint32_t channel, const void *data, size_t length_in_words, size_t off) { volatile uint32_t *to = (volatile uint32_t *)&mem->chan[channel].data32[off]; @@ -488,6 +567,7 @@ static inline void rmt_ll_write_memory(rmt_mem_t *mem, uint32_t channel, const v } } +__attribute__((always_inline)) static inline void rmt_ll_rx_enable_pingpong(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->chmconf[channel].conf1.mem_rx_wrap_en_m = enable; diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rtc_io_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rtc_io_ll.h index 97eff5f3687..b68154fa364 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rtc_io_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rtc_io_ll.h @@ -19,6 +19,7 @@ #include "hal/gpio_types.h" #include "soc/io_mux_reg.h" #include "soc/usb_serial_jtag_reg.h" +#include "soc/usb_serial_jtag_struct.h" #define RTCIO_LL_PIN_FUNC 0 @@ -52,6 +53,10 @@ typedef enum { static inline void rtcio_ll_function_select(int rtcio_num, rtcio_ll_func_t func) { if (func == RTCIO_FUNC_RTC) { + // Disable USB Serial JTAG if pin 19 or pin 20 needs to select the rtc function + if (rtcio_num == rtc_io_num_map[USB_DM_GPIO_NUM] || rtcio_num == rtc_io_num_map[USB_DP_GPIO_NUM]) { + USB_SERIAL_JTAG.conf0.usb_pad_enable = 0; + } SENS.sar_peri_clk_gate_conf.iomux_clk_en = 1; // 0: GPIO connected to digital GPIO module. 1: GPIO connected to analog RTC module. SET_PERI_REG_MASK(rtc_io_desc[rtcio_num].reg, (rtc_io_desc[rtcio_num].mux)); @@ -60,6 +65,8 @@ static inline void rtcio_ll_function_select(int rtcio_num, rtcio_ll_func_t func) } else if (func == RTCIO_FUNC_DIGITAL) { CLEAR_PERI_REG_MASK(rtc_io_desc[rtcio_num].reg, (rtc_io_desc[rtcio_num].mux)); SENS.sar_peri_clk_gate_conf.iomux_clk_en = 0; + // USB Serial JTAG pad re-enable won't be done here (it requires both DM and DP pins not in rtc function) + // Instead, USB_SERIAL_JTAG_USB_PAD_ENABLE needs to be guaranteed to be set in usb_serial_jtag driver } } diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rwdt_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rwdt_ll.h index da716126ffd..9b92cda0c8f 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rwdt_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/rwdt_ll.h @@ -1,16 +1,8 @@ -// Copyright 2015-2019 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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ // The LL layer for Timer Group register operations. // Note that most of the register operations in this layer are non-atomic operations. @@ -28,6 +20,7 @@ extern "C" { #include "soc/rtc_cntl_struct.h" #include "soc/efuse_reg.h" #include "esp_attr.h" +#include "esp_assert.h" /* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */ #define RWDT_LL_WDT_WKEY_VALUE 0x50D83AA1 @@ -51,20 +44,20 @@ extern "C" { #define RWDT_LL_RESET_LENGTH_3200_NS 7 //Type check wdt_stage_action_t -_Static_assert(WDT_STAGE_ACTION_OFF == RWDT_LL_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_INT == RWDT_LL_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_CPU == RWDT_LL_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_SYSTEM == RWDT_LL_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); -_Static_assert(WDT_STAGE_ACTION_RESET_RTC == RWDT_LL_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == RWDT_LL_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_INT == RWDT_LL_STG_SEL_INT, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_CPU == RWDT_LL_STG_SEL_RESET_CPU, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_SYSTEM == RWDT_LL_STG_SEL_RESET_SYSTEM, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); +ESP_STATIC_ASSERT(WDT_STAGE_ACTION_RESET_RTC == RWDT_LL_STG_SEL_RESET_RTC, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t"); //Type check wdt_reset_sig_length_t -_Static_assert(WDT_RESET_SIG_LENGTH_100ns == RWDT_LL_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_200ns == RWDT_LL_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_300ns == RWDT_LL_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_400ns == RWDT_LL_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_500ns == RWDT_LL_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_800ns == RWDT_LL_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_1_6us == RWDT_LL_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); -_Static_assert(WDT_RESET_SIG_LENGTH_3_2us == RWDT_LL_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_100ns == RWDT_LL_RESET_LENGTH_100_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_200ns == RWDT_LL_RESET_LENGTH_200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_300ns == RWDT_LL_RESET_LENGTH_300_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_400ns == RWDT_LL_RESET_LENGTH_400_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_500ns == RWDT_LL_RESET_LENGTH_500_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_800ns == RWDT_LL_RESET_LENGTH_800_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_1_6us == RWDT_LL_RESET_LENGTH_1600_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); +ESP_STATIC_ASSERT(WDT_RESET_SIG_LENGTH_3_2us == RWDT_LL_RESET_LENGTH_3200_NS, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_reset_sig_length_t"); /** * @brief Enable the RWDT diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/twai_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/twai_ll.h index e9eef59104d..32b010173a0 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/twai_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/twai_ll.h @@ -28,6 +28,7 @@ extern "C" { #include #include +#include "esp_assert.h" #include "hal/misc.h" #include "hal/twai_types.h" #include "soc/twai_periph.h" @@ -85,7 +86,7 @@ typedef union { uint8_t bytes[13]; } __attribute__((packed)) twai_ll_frame_buffer_t; -_Static_assert(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); +ESP_STATIC_ASSERT(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should be 13 bytes"); /* ---------------------------- Mode Register ------------------------------- */ diff --git a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/uart_ll.h b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/uart_ll.h index 0cb979ea794..87a90145c7d 100644 --- a/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/uart_ll.h +++ b/tools/sdk/esp32s3/include/hal/esp32s3/include/hal/uart_ll.h @@ -351,7 +351,7 @@ FORCE_INLINE_ATTR void uart_ll_set_stop_bits(uart_dev_t *hw, uart_stop_bits_t st */ FORCE_INLINE_ATTR void uart_ll_get_stop_bits(uart_dev_t *hw, uart_stop_bits_t *stop_bit) { - *stop_bit = hw->conf0.stop_bit_num; + *stop_bit = (uart_stop_bits_t)hw->conf0.stop_bit_num; } /** @@ -381,7 +381,7 @@ FORCE_INLINE_ATTR void uart_ll_set_parity(uart_dev_t *hw, uart_parity_t parity_m FORCE_INLINE_ATTR void uart_ll_get_parity(uart_dev_t *hw, uart_parity_t *parity_mode) { if (hw->conf0.parity_en) { - *parity_mode = 0X2 | hw->conf0.parity; + *parity_mode = (uart_parity_t)(0x2 | hw->conf0.parity); } else { *parity_mode = UART_PARITY_DISABLE; } @@ -496,10 +496,10 @@ FORCE_INLINE_ATTR void uart_ll_get_hw_flow_ctrl(uart_dev_t *hw, uart_hw_flowcont { *flow_ctrl = UART_HW_FLOWCTRL_DISABLE; if (hw->conf1.rx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_RTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_RTS); } if (hw->conf0.tx_flow_en) { - *flow_ctrl |= UART_HW_FLOWCTRL_CTS; + *flow_ctrl = (uart_hw_flowcontrol_t)((unsigned int)(*flow_ctrl) | (unsigned int)UART_HW_FLOWCTRL_CTS); } } @@ -755,7 +755,7 @@ FORCE_INLINE_ATTR uint32_t uart_ll_get_wakeup_thrd(uart_dev_t *hw) */ FORCE_INLINE_ATTR void uart_ll_get_data_bit_num(uart_dev_t *hw, uart_word_length_t *data_bit) { - *data_bit = hw->conf0.bit_num; + *data_bit = (uart_word_length_t)hw->conf0.bit_num; } /** diff --git a/tools/sdk/esp32s3/include/hal/include/hal/dma_types.h b/tools/sdk/esp32s3/include/hal/include/hal/dma_types.h index 66c8677e98f..5a832950999 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/dma_types.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/dma_types.h @@ -15,6 +15,7 @@ #pragma once #include +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -38,7 +39,7 @@ typedef struct dma_descriptor_s { struct dma_descriptor_s *next; /*!< Pointer to the next descriptor (set to NULL if the descriptor is the last one, e.g. suc_eof=1) */ } dma_descriptor_t; -_Static_assert(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(dma_descriptor_t) == 12, "dma_descriptor_t should occupy 12 bytes in memory"); #define DMA_DESCRIPTOR_BUFFER_OWNER_CPU (0) /*!< DMA buffer is allowed to be accessed by CPU */ #define DMA_DESCRIPTOR_BUFFER_OWNER_DMA (1) /*!< DMA buffer is allowed to be accessed by DMA engine */ diff --git a/tools/sdk/esp32s3/include/hal/include/hal/efuse_hal.h b/tools/sdk/esp32s3/include/hal/include/hal/efuse_hal.h new file mode 100644 index 00000000000..ca7fcd2003e --- /dev/null +++ b/tools/sdk/esp32s3/include/hal/include/hal/efuse_hal.h @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @brief Returns chip version + * + * @return Chip version in format: Major * 100 + Minor + */ +uint32_t efuse_hal_chip_revision(void); + +/** + * @brief Returns major chip version + */ +uint32_t efuse_hal_get_major_chip_version(void); + +/** + * @brief Returns minor chip version + */ +uint32_t efuse_hal_get_minor_chip_version(void); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s3/include/hal/include/hal/emac_hal.h b/tools/sdk/esp32s3/include/hal/include/hal/emac_hal.h index 27cd38456dc..fbf0a8ebd66 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/emac_hal.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/emac_hal.h @@ -12,6 +12,7 @@ extern "C" { #include #include +#include "esp_assert.h" #include "esp_err.h" #include "hal/eth_types.h" #include "soc/emac_dma_struct.h" @@ -76,7 +77,7 @@ typedef struct { #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPSEGMENT 2 /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */ #define EMAC_DMATXDESC_CHECKSUM_TCPUDPICMPFULL 3 /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */ -_Static_assert(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_tx_descriptor_t) == 32, "eth_dma_tx_descriptor_t should occupy 32 bytes in memory"); /** * @brief Ethernet DMA RX Descriptor @@ -150,7 +151,7 @@ typedef struct { uint32_t TimeStampHigh; /*!< Receive frame timestamp high */ } eth_dma_rx_descriptor_t; -_Static_assert(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(eth_dma_rx_descriptor_t) == 32, "eth_dma_rx_descriptor_t should occupy 32 bytes in memory"); typedef struct { emac_mac_dev_t *mac_regs; diff --git a/tools/sdk/esp32s3/include/hal/include/hal/gdma_types.h b/tools/sdk/esp32s3/include/hal/include/hal/gdma_types.h new file mode 100644 index 00000000000..eb1447a78f4 --- /dev/null +++ b/tools/sdk/esp32s3/include/hal/include/hal/gdma_types.h @@ -0,0 +1,43 @@ +/* + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enumeration of peripherals which have the DMA capability + * @note Some peripheral might not be available on certain chip, please refer to `soc_caps.h` for detail. + * + */ +typedef enum { + GDMA_TRIG_PERIPH_M2M, /*!< GDMA trigger peripheral: M2M */ + GDMA_TRIG_PERIPH_UHCI, /*!< GDMA trigger peripheral: UHCI */ + GDMA_TRIG_PERIPH_SPI, /*!< GDMA trigger peripheral: SPI */ + GDMA_TRIG_PERIPH_I2S, /*!< GDMA trigger peripheral: I2S */ + GDMA_TRIG_PERIPH_AES, /*!< GDMA trigger peripheral: AES */ + GDMA_TRIG_PERIPH_SHA, /*!< GDMA trigger peripheral: SHA */ + GDMA_TRIG_PERIPH_ADC, /*!< GDMA trigger peripheral: ADC */ + GDMA_TRIG_PERIPH_DAC, /*!< GDMA trigger peripheral: DAC */ + GDMA_TRIG_PERIPH_LCD, /*!< GDMA trigger peripheral: LCD */ + GDMA_TRIG_PERIPH_CAM, /*!< GDMA trigger peripheral: CAM */ + GDMA_TRIG_PERIPH_RMT, /*!< GDMA trigger peripheral: RMT */ +} gdma_trigger_peripheral_t; + +/** + * @brief Enumeration of GDMA channel direction + * + */ +typedef enum { + GDMA_CHANNEL_DIRECTION_TX, /*!< GDMA channel direction: TX */ + GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */ +} gdma_channel_direction_t; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s3/include/hal/include/hal/gpio_hal.h b/tools/sdk/esp32s3/include/hal/include/hal/gpio_hal.h index 018b4be1288..5a3ce27b0b4 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/gpio_hal.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/gpio_hal.h @@ -187,6 +187,15 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_od_enable(hal, gpio_num) gpio_ll_od_enable((hal)->dev, gpio_num) +/** + * @brief Select a function for the pin in the IOMUX + * + * @param hw Peripheral GPIO hardware instance address. + * @param gpio_num GPIO number + * @param func Function to assign to the pin + */ +#define gpio_hal_func_sel(hal, gpio_num, func) gpio_ll_func_sel((hal)->dev, gpio_num, func) + /** * @brief GPIO set output level * @@ -280,6 +289,22 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_hold_dis(hal, gpio_num) gpio_ll_hold_dis((hal)->dev, gpio_num) +/** + * @brief Get wether digital gpio pad is held + * + * @param hal Context of the HAL layer + * @param gpio_num GPIO number, only support output GPIOs + * + * @note digital io means io pad powered by VDD3P3_CPU or VDD_SPI + * rtc io means io pad powered by VDD3P3_RTC + * caller must ensure that gpio_num is a digital io pad + * + * @return + * - true digital gpio pad is held + * - false digital gpio pad is unheld + */ +#define gpio_hal_is_digital_io_hold(hal, gpio_num) gpio_ll_is_digital_io_hold((hal)->dev, gpio_num) + /** * @brief Enable all digital gpio pad hold function during Deep-sleep. * @@ -300,6 +325,17 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); */ #define gpio_hal_deep_sleep_hold_dis(hal) gpio_ll_deep_sleep_hold_dis((hal)->dev) +/** + * @brief Get whether all digital gpio pad hold function during Deep-sleep is enabled. + * + * @param hal Context of the HAL layer + * + * @return + * - true deep sleep hold is enabled + * - false deep sleep hold is disabled + */ +#define gpio_hal_deep_sleep_hold_is_en(hal) gpio_ll_deep_sleep_hold_is_en((hal)->dev) + /** * @brief Set pad input to a peripheral signal through the IOMUX. * @@ -322,7 +358,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #if SOC_GPIO_SUPPORT_FORCE_HOLD /** - * @brief Force hold digital and rtc gpio pad. + * @brief Force hold digital gpio pad. * @note GPIO force hold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -330,7 +366,7 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_hold_all(hal) gpio_ll_force_hold_all((hal)->dev) /** - * @brief Force unhold digital and rtc gpio pad. + * @brief Force unhold digital gpio pad. * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. * * @param hal Context of the HAL layer @@ -338,7 +374,6 @@ void gpio_hal_intr_disable(gpio_hal_context_t *hal, gpio_num_t gpio_num); #define gpio_hal_force_unhold_all() gpio_ll_force_unhold_all() #endif -#if SOC_GPIO_SUPPORT_SLP_SWITCH /** * @brief Enable pull-up on GPIO when system sleep. * @@ -436,7 +471,6 @@ void gpio_hal_sleep_pupd_config_apply(gpio_hal_context_t *hal, gpio_num_t gpio_n */ void gpio_hal_sleep_pupd_config_unapply(gpio_hal_context_t *hal, gpio_num_t gpio_num); #endif // CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL -#endif //SOC_GPIO_SUPPORT_SLP_SWITCH #if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP diff --git a/tools/sdk/esp32s3/include/hal/include/hal/spi_flash_hal.h b/tools/sdk/esp32s3/include/hal/include/hal/spi_flash_hal.h index ae37016fa2d..e51251b4593 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/spi_flash_hal.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/spi_flash_hal.h @@ -26,6 +26,7 @@ #include "hal/spi_types.h" #include "hal/spi_flash_types.h" #include "soc/soc_memory_types.h" +#include "esp_assert.h" /* Hardware host-specific constants */ #define SPI_FLASH_HAL_MAX_WRITE_BYTES 64 @@ -56,7 +57,7 @@ typedef struct { uint32_t slicer_flags; /// Slicer flags for configuring how to slice data correctly while reading or writing. #define SPI_FLASH_HOST_CONTEXT_SLICER_FLAG_DTR BIT(0) ///< Slice data according to DTR mode, the address and length must be even (A0=0). } spi_flash_hal_context_t; -_Static_assert(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); +ESP_STATIC_ASSERT(sizeof(spi_flash_hal_context_t) == 40, "size of spi_flash_hal_context_t incorrect. Please check data compatibility with the ROM"); /// This struct provide MSPI Flash necessary timing related config, should be consistent with that in union in `spi_flash_hal_config_t`. typedef struct { diff --git a/tools/sdk/esp32s3/include/hal/include/hal/spi_slave_hal.h b/tools/sdk/esp32s3/include/hal/include/hal/spi_slave_hal.h index 3ad5f485f1f..49d8b0ca12c 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/spi_slave_hal.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/spi_slave_hal.h @@ -150,6 +150,7 @@ void spi_slave_hal_store_result(spi_slave_hal_context_t *hal); */ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); +#if CONFIG_IDF_TARGET_ESP32 /** * Check whether we need to reset the DMA according to the status of last transactions. * @@ -161,3 +162,4 @@ uint32_t spi_slave_hal_get_rcv_bitlen(spi_slave_hal_context_t *hal); * @return true if reset is needed, else false. */ bool spi_slave_hal_dma_need_reset(const spi_slave_hal_context_t *hal); +#endif //#if CONFIG_IDF_TARGET_ESP32 diff --git a/tools/sdk/esp32s3/include/hal/include/hal/spi_types.h b/tools/sdk/esp32s3/include/hal/include/hal/spi_types.h index 9c008838a19..c7caa95df9a 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/spi_types.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/spi_types.h @@ -27,7 +27,9 @@ typedef enum { //SPI1 can be used as GPSPI only on ESP32 SPI1_HOST=0, ///< SPI1 SPI2_HOST=1, ///< SPI2 +#if SOC_SPI_PERIPH_NUM > 2 SPI3_HOST=2, ///< SPI3 +#endif } spi_host_device_t; /// SPI Events diff --git a/tools/sdk/esp32s3/include/hal/include/hal/systimer_types.h b/tools/sdk/esp32s3/include/hal/include/hal/systimer_types.h index d4583dc7ae0..0ed44feb4eb 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/systimer_types.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/systimer_types.h @@ -16,6 +16,7 @@ #include #include "soc/soc_caps.h" +#include "esp_assert.h" #ifdef __cplusplus extern "C" { @@ -39,7 +40,7 @@ typedef struct { } systimer_counter_value_t; /** @cond */ -_Static_assert(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); +ESP_STATIC_ASSERT(sizeof(systimer_counter_value_t) == 8, "systimer_counter_value_t should occupy 8 bytes in memory"); /** @endcond */ /** diff --git a/tools/sdk/esp32s3/include/hal/include/hal/usbh_hal.h b/tools/sdk/esp32s3/include/hal/include/hal/usb_dwc_hal.h similarity index 67% rename from tools/sdk/esp32s3/include/hal/include/hal/usbh_hal.h rename to tools/sdk/esp32s3/include/hal/include/hal/usb_dwc_hal.h index 5326deb2dca..d52e882cb9f 100644 --- a/tools/sdk/esp32s3/include/hal/include/hal/usbh_hal.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/usb_dwc_hal.h @@ -17,8 +17,8 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL #include #include -#include "soc/usbh_struct.h" -#include "hal/usbh_ll.h" +#include "soc/usb_dwc_struct.h" +#include "hal/usb_dwc_ll.h" #include "hal/usb_types_private.h" #include "hal/assert.h" @@ -26,11 +26,11 @@ NOTE: Thread safety is the responsibility fo the HAL user. All USB Host HAL // ------------------ Constants/Configs -------------------- -#define USBH_HAL_DMA_MEM_ALIGN 512 -#define USBH_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) -#define USBH_HAL_NUM_CHAN 8 -#define USBH_HAL_XFER_DESC_SIZE (sizeof(usbh_ll_dma_qtd_t)) -#define USBH_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL +#define USB_DWC_HAL_DMA_MEM_ALIGN 512 +#define USB_DWC_HAL_FRAME_LIST_MEM_ALIGN 512 //The frame list needs to be 512 bytes aligned (contrary to the databook) +#define USB_DWC_HAL_NUM_CHAN 8 +#define USB_DWC_HAL_XFER_DESC_SIZE (sizeof(usb_dwc_ll_dma_qtd_t)) +#define USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES 200 //Although we have a 256 lines, only 200 lines are usuable due to EPINFO_CTL /** * @brief FIFO size configuration structure @@ -39,7 +39,7 @@ typedef struct { uint32_t rx_fifo_lines; /**< Size of the RX FIFO in terms the number of FIFO lines */ uint32_t nptx_fifo_lines; /**< Size of the Non-periodic FIFO in terms the number of FIFO lines */ uint32_t ptx_fifo_lines; /**< Size of the Periodic FIFO in terms the number of FIFO lines */ -} usbh_hal_fifo_config_t; +} usb_dwc_hal_fifo_config_t; // --------------------- HAL Events ------------------------ @@ -47,25 +47,25 @@ typedef struct { * @brief Host port HAL events */ typedef enum { - USBH_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ - USBH_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ - USBH_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ - USBH_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ - USBH_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ - USBH_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ - USBH_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ - USBH_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ -} usbh_hal_port_event_t; + USB_DWC_HAL_PORT_EVENT_NONE, /**< No event occurred, or could not decode interrupt */ + USB_DWC_HAL_PORT_EVENT_CHAN, /**< A channel event has occurred. Call the the channel event handler instead */ + USB_DWC_HAL_PORT_EVENT_CONN, /**< The host port has detected a connection */ + USB_DWC_HAL_PORT_EVENT_DISCONN, /**< The host port has been disconnected */ + USB_DWC_HAL_PORT_EVENT_ENABLED, /**< The host port has been enabled (i.e., connected to a device that has been reset. Started sending SOFs) */ + USB_DWC_HAL_PORT_EVENT_DISABLED, /**< The host port has been disabled (no more SOFs). Could be due to disable/reset request, or a port error (e.g. port babble condition. See 11.8.1 of USB2.0 spec) */ + USB_DWC_HAL_PORT_EVENT_OVRCUR, /**< The host port has encountered an overcurrent condition */ + USB_DWC_HAL_PORT_EVENT_OVRCUR_CLR, /**< The host port has been cleared of the overcurrent condition */ +} usb_dwc_hal_port_event_t; /** * @brief Channel events */ typedef enum { - USBH_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USBH_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ - USBH_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ - USBH_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ - USBH_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ -} usbh_hal_chan_event_t; + USB_DWC_HAL_CHAN_EVENT_CPLT, /**< The channel has completed execution of a transfer descriptor that had the USB_DWC_HAL_XFER_DESC_FLAG_HOC flag set. Channel is now halted */ + USB_DWC_HAL_CHAN_EVENT_ERROR, /**< The channel has encountered an error. Channel is now halted. */ + USB_DWC_HAL_CHAN_EVENT_HALT_REQ, /**< The channel has been successfully halted as requested */ + USB_DWC_HAL_CHAN_EVENT_NONE, /**< No event (interrupt ran for internal processing) */ +} usb_dwc_hal_chan_event_t; // --------------------- HAL Errors ------------------------ @@ -73,20 +73,20 @@ typedef enum { * @brief Channel errors */ typedef enum { - USBH_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ - USBH_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ - USBH_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ - USBH_HAL_CHAN_ERROR_STALL, /**< STALL response received */ -} usbh_hal_chan_error_t; + USB_DWC_HAL_CHAN_ERROR_XCS_XACT = 0, /**< Excessive (three consecutive) transaction errors (e.g., no response, bad CRC etc */ + USB_DWC_HAL_CHAN_ERROR_BNA, /**< Buffer Not Available error (i.e., An inactive transfer descriptor was fetched by the channel) */ + USB_DWC_HAL_CHAN_ERROR_PKT_BBL, /**< Packet babbler error (packet exceeded MPS) */ + USB_DWC_HAL_CHAN_ERROR_STALL, /**< STALL response received */ +} usb_dwc_hal_chan_error_t; // ------------- Transfer Descriptor Related --------------- /** * @brief Flags used to describe the type of transfer descriptor to fill */ -#define USBH_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ -#define USBH_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ -#define USBH_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ +#define USB_DWC_HAL_XFER_DESC_FLAG_IN 0x01 /**< Indicates this transfer descriptor is of the IN direction */ +#define USB_DWC_HAL_XFER_DESC_FLAG_SETUP 0x02 /**< Indicates this transfer descriptor is an OUT setup */ +#define USB_DWC_HAL_XFER_DESC_FLAG_HOC 0x04 /**< Indicates that the channel will be halted after this transfer descriptor completes */ /** * @brief Status value of a transfer descriptor @@ -95,10 +95,10 @@ typedef enum { * or an error). Therefore, if a channel halt is requested before a transfer descriptor completes, the transfer * descriptor remains unexecuted. */ -#define USBH_HAL_XFER_DESC_STS_SUCCESS USBH_LL_QTD_STATUS_SUCCESS -#define USBH_HAL_XFER_DESC_STS_PKTERR USBH_LL_QTD_STATUS_PKTERR -#define USBH_HAL_XFER_DESC_STS_BUFFER_ERR USBH_LL_QTD_STATUS_BUFFER -#define USBH_HAL_XFER_DESC_STS_NOT_EXECUTED USBH_LL_QTD_STATUS_NOT_EXECUTED +#define USB_DWC_HAL_XFER_DESC_STS_SUCCESS USB_DWC_LL_QTD_STATUS_SUCCESS +#define USB_DWC_HAL_XFER_DESC_STS_PKTERR USB_DWC_LL_QTD_STATUS_PKTERR +#define USB_DWC_HAL_XFER_DESC_STS_BUFFER_ERR USB_DWC_LL_QTD_STATUS_BUFFER +#define USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED USB_DWC_LL_QTD_STATUS_NOT_EXECUTED // -------------------- Object Types ----------------------- @@ -122,7 +122,7 @@ typedef struct { usb_hal_interval_t interval; /**< The interval of the endpoint */ uint32_t phase_offset_frames; /**< Phase offset in number of frames */ } periodic; /**< Characteristic for periodic (interrupt/isochronous) endpoints only */ -} usbh_hal_ep_char_t; +} usb_dwc_hal_ep_char_t; /** * @brief Channel object @@ -139,18 +139,18 @@ typedef struct { }; uint32_t val; } flags; /**< Flags regarding channel's status and information */ - usb_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ - usbh_hal_chan_error_t error; /**< The last error that occurred on the channel */ + usb_dwc_host_chan_regs_t *regs; /**< Pointer to the channel's register set */ + usb_dwc_hal_chan_error_t error; /**< The last error that occurred on the channel */ usb_priv_xfer_type_t type; /**< The transfer type of the channel */ void *chan_ctx; /**< Context variable for the owner of the channel */ -} usbh_hal_chan_t; +} usb_dwc_hal_chan_t; /** * @brief HAL context structure */ typedef struct { //Context - usbh_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ + usb_dwc_dev_t *dev; /**< Pointer to base address of DWC_OTG registers */ //Host Port related uint32_t *periodic_frame_list; /**< Pointer to scheduling frame list */ usb_hal_frame_list_len_t frame_list_len; /**< Length of the periodic scheduling frame list */ @@ -168,9 +168,9 @@ typedef struct { struct { int num_allocd; /**< Number of channels currently allocated */ uint32_t chan_pend_intrs_msk; /**< Bit mask of channels with pending interrupts */ - usbh_hal_chan_t *hdls[USBH_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ + usb_dwc_hal_chan_t *hdls[USB_DWC_HAL_NUM_CHAN]; /**< Handles of each channel. Set to NULL if channel has not been allocated */ } channels; -} usbh_hal_context_t; +} usb_dwc_hal_context_t; // -------------------------------------------------- Core (Global) ---------------------------------------------------- @@ -188,12 +188,12 @@ typedef struct { * - Sets default values to some global and OTG registers (GAHBCFG and GUSBCFG) * - Umask global interrupt signal * - Put DWC_OTG into host mode. Require 25ms delay before this takes effect. - * - State -> USBH_HAL_PORT_STATE_OTG + * - State -> USB_DWC_HAL_PORT_STATE_OTG * - Interrupts cleared. Users can now enable their ISR * * @param[inout] hal Context of the HAL layer */ -void usbh_hal_init(usbh_hal_context_t *hal); +void usb_dwc_hal_init(usb_dwc_hal_context_t *hal); /** * @brief Deinitialize the HAL context @@ -206,20 +206,20 @@ void usbh_hal_init(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -void usbh_hal_deinit(usbh_hal_context_t *hal); +void usb_dwc_hal_deinit(usb_dwc_hal_context_t *hal); /** * @brief Issue a soft reset to the controller * * This should be called when the host port encounters an error event or has been disconnected. Before calling this, * users are responsible for safely freeing all channels as a soft reset will wipe all host port and channel registers. - * This function will result in the host port being put back into same state as after calling usbh_hal_init(). + * This function will result in the host port being put back into same state as after calling usb_dwc_hal_init(). * * @note This has nothing to do with a USB bus reset. It simply resets the peripheral * * @param hal Context of the HAL layer */ -void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); +void usb_dwc_hal_core_soft_reset(usb_dwc_hal_context_t *hal); /** * @brief Set FIFO sizes @@ -229,14 +229,14 @@ void usbh_hal_core_soft_reset(usbh_hal_context_t *hal); * may be situations where this function may need to be called again to resize the FIFOs. If resizing FIFOs dynamically, * it is the user's responsibility to ensure there are no active channels when this function is called. * - * @note The totol size of all the FIFOs must be less than or equal to USBH_HAL_FIFO_TOTAL_USABLE_LINES + * @note The totol size of all the FIFOs must be less than or equal to USB_DWC_HAL_FIFO_TOTAL_USABLE_LINES * @note After a port reset, the FIFO size registers will reset to their default values, so this function must be called * again post reset. * * @param hal Context of the HAL layer * @param fifo_config FIFO configuration */ -void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_t *fifo_config); +void usb_dwc_hal_set_fifo_size(usb_dwc_hal_context_t *hal, const usb_dwc_hal_fifo_config_t *fifo_config); // ---------------------------------------------------- Host Port ------------------------------------------------------ @@ -249,11 +249,11 @@ void usbh_hal_set_fifo_size(usbh_hal_context_t *hal, const usbh_hal_fifo_config_ * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_init(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_init(usb_dwc_hal_context_t *hal) { //Configure Host related interrupts - usbh_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_haintmsk_dis_chan_intr(hal->dev, 0xFFFFFFFF); //Disable interrupts for all channels + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -263,10 +263,10 @@ static inline void usbh_hal_port_init(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_deinit(usb_dwc_hal_context_t *hal) { //Disable Host port and channel interrupts - usb_ll_dis_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_HCHINT); + usb_dwc_ll_gintmsk_dis_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_HCHINT); } /** @@ -275,12 +275,12 @@ static inline void usbh_hal_port_deinit(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param power_on Whether to power ON or OFF the port */ -static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool power_on) +static inline void usb_dwc_hal_port_toggle_power(usb_dwc_hal_context_t *hal, bool power_on) { if (power_on) { - usbh_ll_hprt_en_pwr(hal->dev); + usb_dwc_ll_hprt_en_pwr(hal->dev); } else { - usbh_ll_hprt_dis_pwr(hal->dev); + usb_dwc_ll_hprt_dis_pwr(hal->dev); } } @@ -291,19 +291,19 @@ static inline void usbh_hal_port_toggle_power(usbh_hal_context_t *hal, bool powe * Entry: * - Host port detects a device connection or Host port is already enabled * Exit: - * - On release of the reset signal, a USBH_HAL_PORT_EVENT_ENABLED will be generated + * - On release of the reset signal, a USB_DWC_HAL_PORT_EVENT_ENABLED will be generated * * @note If the host port is already enabled, then issuing a reset will cause it be disabled and generate a - * USBH_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus - * generating the USBH_HAL_PORT_EVENT_ENABLED event) + * USB_DWC_HAL_PORT_EVENT_DISABLED event. The host port will not be enabled until the reset signal is released (thus + * generating the USB_DWC_HAL_PORT_EVENT_ENABLED event) * * @param hal Context of the HAL layer * @param enable Enable/disable reset signal */ -static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_reset(usb_dwc_hal_context_t *hal, bool enable) { HAL_ASSERT(hal->channels.num_allocd == 0); //Cannot reset if there are still allocated channels - usbh_ll_hprt_set_port_reset(hal->dev, enable); + usb_dwc_ll_hprt_set_port_reset(hal->dev, enable); } /** @@ -317,7 +317,7 @@ static inline void usbh_hal_port_toggle_reset(usbh_hal_context_t *hal, bool enab * * @param hal Context of the HAL layer */ -void usbh_hal_port_enable(usbh_hal_context_t *hal); +void usb_dwc_hal_port_enable(usb_dwc_hal_context_t *hal); /** * @brief Disable the host port @@ -327,9 +327,9 @@ void usbh_hal_port_enable(usbh_hal_context_t *hal); * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_disable(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_port_dis(hal->dev); + usb_dwc_ll_hprt_port_dis(hal->dev); } /** @@ -337,9 +337,9 @@ static inline void usbh_hal_port_disable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layers */ -static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_suspend(usb_dwc_hal_context_t *hal) { - usbh_ll_hprt_set_port_suspend(hal->dev); + usb_dwc_ll_hprt_set_port_suspend(hal->dev); } /** @@ -352,12 +352,12 @@ static inline void usbh_hal_port_suspend(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @param enable Enable/disable resume signal */ -static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool enable) +static inline void usb_dwc_hal_port_toggle_resume(usb_dwc_hal_context_t *hal, bool enable) { if (enable) { - usbh_ll_hprt_set_port_resume(hal->dev); + usb_dwc_ll_hprt_set_port_resume(hal->dev); } else { - usbh_ll_hprt_clr_port_resume(hal->dev); + usb_dwc_ll_hprt_clr_port_resume(hal->dev); } } @@ -371,9 +371,9 @@ static inline void usbh_hal_port_toggle_resume(usbh_hal_context_t *hal, bool ena * @return true Resume signal is still being driven * @return false Resume signal is no longer driven */ -static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_resume(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_port_resume(hal->dev); + return usb_dwc_ll_hprt_get_port_resume(hal->dev); } // ---------------- Host Port Scheduling ------------------- @@ -382,13 +382,13 @@ static inline bool usbh_hal_port_check_resume(usbh_hal_context_t *hal) * @brief Sets the periodic scheduling frame list * * @note This function must be called before attempting configuring any channels to be period via - * usbh_hal_chan_set_ep_char() + * usb_dwc_hal_chan_set_ep_char() * * @param hal Context of the HAL layer * @param frame_list Base address of the frame list * @param frame_list_len Number of entries in the frame list (can only be 8, 16, 32, 64) */ -static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) +static inline void usb_dwc_hal_port_set_frame_list(usb_dwc_hal_context_t *hal, uint32_t *frame_list, usb_hal_frame_list_len_t len) { //Clear and save frame list hal->periodic_frame_list = frame_list; @@ -401,7 +401,7 @@ static inline void usbh_hal_port_set_frame_list(usbh_hal_context_t *hal, uint32_ * @param hal Context of the HAL layer * @return uint32_t* Base address of the periodic scheduling frame list */ -static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) +static inline uint32_t *usb_dwc_hal_port_get_frame_list(usb_dwc_hal_context_t *hal) { return hal->periodic_frame_list; } @@ -409,18 +409,18 @@ static inline uint32_t *usbh_hal_port_get_frame_list(usbh_hal_context_t *hal) /** * @brief Enable periodic scheduling * - * @note The periodic frame list must be set via usbh_hal_port_set_frame_list() should be set before calling this + * @note The periodic frame list must be set via usb_dwc_hal_port_set_frame_list() should be set before calling this * function * @note This function must be called before activating any periodic channels * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_enable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->periodic_frame_list != NULL); - usbh_ll_set_frame_list_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); - usbh_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); - usbh_ll_hcfg_en_perio_sched(hal->dev); + usb_dwc_ll_hflbaddr_set_base_addr(hal->dev, (uint32_t)hal->periodic_frame_list); + usb_dwc_ll_hcfg_set_num_frame_list_entries(hal->dev, hal->frame_list_len); + usb_dwc_ll_hcfg_en_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 1; } @@ -435,16 +435,16 @@ static inline void usbh_hal_port_periodic_enable(usbh_hal_context_t *hal) * * @param hal Context of the HAL layer */ -static inline void usbh_hal_port_periodic_disable(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_port_periodic_disable(usb_dwc_hal_context_t *hal) { HAL_ASSERT(hal->flags.periodic_sched_enabled); - usbh_ll_hcfg_dis_perio_sched(hal->dev); + usb_dwc_ll_hcfg_dis_perio_sched(hal->dev); hal->flags.periodic_sched_enabled = 0; } -static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) +static inline uint32_t usb_dwc_hal_port_get_cur_frame_num(usb_dwc_hal_context_t *hal) { - return usbh_ll_get_frm_num(hal->dev); + return usb_dwc_ll_hfnum_get_frame_num(hal->dev); } // --------------- Host Port Status/State ------------------ @@ -453,19 +453,19 @@ static inline uint32_t usbh_hal_port_get_cur_frame_num(usbh_hal_context_t *hal) * @brief Check if a device is currently connected to the host port * * This function is intended to be called after one of the following events followed by an adequate debounce delay - * - USBH_HAL_PORT_EVENT_CONN - * - USBH_HAL_PORT_EVENT_DISCONN + * - USB_DWC_HAL_PORT_EVENT_CONN + * - USB_DWC_HAL_PORT_EVENT_DISCONN * * @note No other connection/disconnection event will occur again until the debounce lock is disabled via - * usbh_hal_disable_debounce_lock() + * usb_dwc_hal_disable_debounce_lock() * * @param hal Context of the HAL layer * @return true A device is connected to the host port * @return false A device is not connected to the host port */ -static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) +static inline bool usb_dwc_hal_port_check_if_connected(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_conn_status(hal->dev); + return usb_dwc_ll_hprt_get_conn_status(hal->dev); } /** @@ -476,27 +476,27 @@ static inline bool usbh_hal_port_check_if_connected(usbh_hal_context_t *hal) * @param hal Context of the HAL layer * @return usb_priv_speed_t Speed of the connected device (FS or LS only on the esp32-s2 and esp32-s3) */ -static inline usb_priv_speed_t usbh_hal_port_get_conn_speed(usbh_hal_context_t *hal) +static inline usb_priv_speed_t usb_dwc_hal_port_get_conn_speed(usb_dwc_hal_context_t *hal) { - return usbh_ll_hprt_get_speed(hal->dev); + return usb_dwc_ll_hprt_get_speed(hal->dev); } /** * @brief Disable the debounce lock * - * This function must be called after calling usbh_hal_port_check_if_connected() and will allow connection/disconnection + * This function must be called after calling usb_dwc_hal_port_check_if_connected() and will allow connection/disconnection * events to occur again. Any pending connection or disconenction interrupts are cleared. * * @param hal Context of the HAL layer */ -static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) +static inline void usb_dwc_hal_disable_debounce_lock(usb_dwc_hal_context_t *hal) { hal->flags.dbnc_lock_enabled = 0; //Clear Conenction and disconenction interrupt in case it triggered again - usb_ll_intr_clear(hal->dev, USB_LL_INTR_CORE_DISCONNINT); - usbh_ll_hprt_intr_clear(hal->dev, USBH_LL_INTR_HPRT_PRTCONNDET); + usb_dwc_ll_gintsts_clear_intrs(hal->dev, USB_DWC_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_hprt_intr_clear(hal->dev, USB_DWC_LL_INTR_HPRT_PRTCONNDET); //Reenable the hprt (connection) and disconnection interrupts - usb_ll_en_intrs(hal->dev, USB_LL_INTR_CORE_PRTINT | USB_LL_INTR_CORE_DISCONNINT); + usb_dwc_ll_gintmsk_en_intrs(hal->dev, USB_DWC_LL_INTR_CORE_PRTINT | USB_DWC_LL_INTR_CORE_DISCONNINT); } // ----------------------------------------------------- Channel ------------------------------------------------------- @@ -512,7 +512,7 @@ static inline void usbh_hal_disable_debounce_lock(usbh_hal_context_t *hal) * @return true Channel successfully allocated * @return false Failed to allocate channel */ -bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, void *chan_ctx); +bool usb_dwc_hal_chan_alloc(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, void *chan_ctx); /** * @brief Free a channel @@ -520,7 +520,7 @@ bool usbh_hal_chan_alloc(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, voi * @param[in] hal Context of the HAL layer * @param[in] chan_obj Channel object */ -void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); +void usb_dwc_hal_chan_free(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj); // ---------------- Channel Configuration ------------------ @@ -530,7 +530,7 @@ void usbh_hal_chan_free(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj); * @param[in] chan_obj Channel object * @return void* The context variable of the channel */ -static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) +static inline void *usb_dwc_hal_chan_get_context(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->chan_ctx; } @@ -547,7 +547,7 @@ static inline void *usbh_hal_chan_get_context(usbh_hal_chan_t *chan_obj) * @param chan_obj Channel object * @param ep_char Endpoint characteristics */ -void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_obj, usbh_hal_ep_char_t *ep_char); +void usb_dwc_hal_chan_set_ep_char(usb_dwc_hal_context_t *hal, usb_dwc_hal_chan_t *chan_obj, usb_dwc_hal_ep_char_t *ep_char); /** * @brief Set the direction of the channel @@ -561,11 +561,11 @@ void usbh_hal_chan_set_ep_char(usbh_hal_context_t *hal, usbh_hal_chan_t *chan_ob * @param chan_obj Channel object * @param is_in Whether the direction is IN */ -static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) +static inline void usb_dwc_hal_chan_set_dir(usb_dwc_hal_chan_t *chan_obj, bool is_in) { //Cannot change direction whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); - usbh_ll_chan_set_dir(chan_obj->regs, is_in); + usb_dwc_ll_hcchar_set_dir(chan_obj->regs, is_in); } /** @@ -580,12 +580,12 @@ static inline void usbh_hal_chan_set_dir(usbh_hal_chan_t *chan_obj, bool is_in) * @param chan_obj Channel object * @param pid PID of the next DATA packet (DATA0 or DATA1) */ -static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) +static inline void usb_dwc_hal_chan_set_pid(usb_dwc_hal_chan_t *chan_obj, int pid) { //Cannot change pid whilst channel is still active or in error HAL_ASSERT(!chan_obj->flags.active); //Update channel object and set the register - usbh_ll_chan_set_pid(chan_obj->regs, pid); + usb_dwc_ll_hctsiz_set_pid(chan_obj->regs, pid); } /** @@ -598,10 +598,10 @@ static inline void usbh_hal_chan_set_pid(usbh_hal_chan_t *chan_obj, int pid) * @param chan_obj Channel object * @return uint32_t Starting PID of the next transfer (DATA0 or DATA1) */ -static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) +static inline uint32_t usb_dwc_hal_chan_get_pid(usb_dwc_hal_chan_t *chan_obj) { HAL_ASSERT(!chan_obj->flags.active); - return usbh_ll_chan_get_pid(chan_obj->regs); + return usb_dwc_ll_hctsiz_get_pid(chan_obj->regs); } // ------------------- Channel Control --------------------- @@ -619,7 +619,7 @@ static inline uint32_t usbh_hal_chan_get_pid(usbh_hal_chan_t *chan_obj) * @param desc_list_len Transfer descriptor list length * @param start_idx Index of the starting transfer descriptor in the list */ -void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); +void usb_dwc_hal_chan_activate(usb_dwc_hal_chan_t *chan_obj, void *xfer_desc_list, int desc_list_len, int start_idx); /** * @brief Get the index of the current transfer descriptor @@ -627,9 +627,9 @@ void usbh_hal_chan_activate(usbh_hal_chan_t *chan_obj, void *xfer_desc_list, int * @param chan_obj Channel object * @return int Descriptor index */ -static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) +static inline int usb_dwc_hal_chan_get_qtd_idx(usb_dwc_hal_chan_t *chan_obj) { - return usbh_ll_chan_get_ctd(chan_obj->regs); + return usb_dwc_ll_hcdam_get_cur_qtd_idx(chan_obj->regs); } /** @@ -637,24 +637,24 @@ static inline int usbh_hal_chan_get_qtd_idx(usbh_hal_chan_t *chan_obj) * * This function should be called in order to halt a channel. If the channel is already halted, this function will * return true. If the channel is still active, this function will return false and users must wait for the - * USBH_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. + * USB_DWC_HAL_CHAN_EVENT_HALT_REQ event before treating the channel as halted. * * @note When a transfer is in progress (i.e., the channel is active) and a halt is requested, the channel will halt * after the next USB packet is completed. If the transfer has more pending packets, the transfer will just be - * marked as USBH_HAL_XFER_DESC_STS_NOT_EXECUTED. + * marked as USB_DWC_HAL_XFER_DESC_STS_NOT_EXECUTED. * * @param chan_obj Channel object * @return true The channel is already halted - * @return false The halt was requested, wait for USBH_HAL_CHAN_EVENT_HALT_REQ + * @return false The halt was requested, wait for USB_DWC_HAL_CHAN_EVENT_HALT_REQ */ -bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); +bool usb_dwc_hal_chan_request_halt(usb_dwc_hal_chan_t *chan_obj); /** * @brief Indicate that a channel is halted after a port error * * When a port error occurs (e.g., discconect, overcurrent): * - Any previously active channels will remain active (i.e., they will not receive a channel interrupt) - * - Attempting to disable them using usbh_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels + * - Attempting to disable them using usb_dwc_hal_chan_request_halt() will NOT generate an interrupt for ISOC channels * (probalby something to do with the periodic scheduling) * * However, the channel's enable bit can be left as 1 since after a port error, a soft reset will be done anyways. @@ -663,7 +663,7 @@ bool usbh_hal_chan_request_halt(usbh_hal_chan_t *chan_obj); * * @param chan_obj Channel object */ -static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) +static inline void usb_dwc_hal_chan_mark_halted(usb_dwc_hal_chan_t *chan_obj) { chan_obj->flags.active = 0; } @@ -672,9 +672,9 @@ static inline void usbh_hal_chan_mark_halted(usbh_hal_chan_t *chan_obj) * @brief Get a channel's error * * @param chan_obj Channel object - * @return usbh_hal_chan_error_t The type of error the channel has encountered + * @return usb_dwc_hal_chan_error_t The type of error the channel has encountered */ -static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *chan_obj) +static inline usb_dwc_hal_chan_error_t usb_dwc_hal_chan_get_error(usb_dwc_hal_chan_t *chan_obj) { return chan_obj->error; } @@ -688,8 +688,8 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * - A stage of a transfer (for control transfers) * - A frame of a transfer interval (for interrupt and isoc) * - An entire transfer (for bulk transfers) - * - Check the various USBH_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor - * - For IN transfer entries, set the USBH_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of + * - Check the various USB_DWC_HAL_XFER_DESC_FLAG_ flags for filling a specific type of descriptor + * - For IN transfer entries, set the USB_DWC_HAL_XFER_DESC_FLAG_IN. The transfer size must also be an integer multiple of * the endpoint's MPS * * @note Critical section is not required for this function @@ -700,19 +700,19 @@ static inline usbh_hal_chan_error_t usbh_hal_chan_get_error(usbh_hal_chan_t *cha * @param xfer_len Transfer length * @param flags Transfer flags */ -static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) +static inline void usb_dwc_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, uint8_t *xfer_data_buff, int xfer_len, uint32_t flags) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - if (flags & USBH_HAL_XFER_DESC_FLAG_IN) { - usbh_ll_set_qtd_in(&qtd_list[desc_idx], + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + if (flags & USB_DWC_HAL_XFER_DESC_FLAG_IN) { + usb_dwc_ll_qtd_set_in(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC); } else { - usbh_ll_set_qtd_out(&qtd_list[desc_idx], + usb_dwc_ll_qtd_set_out(&qtd_list[desc_idx], xfer_data_buff, xfer_len, - flags & USBH_HAL_XFER_DESC_FLAG_HOC, - flags & USBH_HAL_XFER_DESC_FLAG_SETUP); + flags & USB_DWC_HAL_XFER_DESC_FLAG_HOC, + flags & USB_DWC_HAL_XFER_DESC_FLAG_SETUP); } } @@ -722,10 +722,10 @@ static inline void usbh_hal_xfer_desc_fill(void *desc_list, uint32_t desc_idx, u * @param desc_list Transfer descriptor list * @param desc_idx Transfer descriptor index */ -static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) +static inline void usb_dwc_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } /** @@ -738,12 +738,12 @@ static inline void usbh_hal_xfer_desc_clear(void *desc_list, uint32_t desc_idx) * * @note Critical section is not required for this function */ -static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) +static inline void usb_dwc_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, int *xfer_rem_len, int *xfer_status) { - usbh_ll_dma_qtd_t *qtd_list = (usbh_ll_dma_qtd_t *)desc_list; - usbh_ll_get_qtd_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); + usb_dwc_ll_dma_qtd_t *qtd_list = (usb_dwc_ll_dma_qtd_t *)desc_list; + usb_dwc_ll_qtd_get_status(&qtd_list[desc_idx], xfer_rem_len, xfer_status); //Clear the QTD to prevent it from being read again - usbh_ll_set_qtd_null(&qtd_list[desc_idx]); + usb_dwc_ll_qtd_set_null(&qtd_list[desc_idx]); } // ------------------------------------------------- Event Handling ---------------------------------------------------- @@ -757,9 +757,9 @@ static inline void usbh_hal_xfer_desc_parse(void *desc_list, uint32_t desc_idx, * @note This should be the first interrupt decode function to be run * * @param hal Context of the HAL layer - * @return usbh_hal_port_event_t Host port event + * @return usb_dwc_hal_port_event_t Host port event */ -usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); +usb_dwc_hal_port_event_t usb_dwc_hal_decode_intr(usb_dwc_hal_context_t *hal); /** * @brief Gets the next channel with a pending interrupt @@ -768,9 +768,9 @@ usbh_hal_port_event_t usbh_hal_decode_intr(usbh_hal_context_t *hal); * interrupt, this function returns one of the channel's objects. Call this function repeatedly until it returns NULL. * * @param hal Context of the HAL layer - * @return usbh_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. + * @return usb_dwc_hal_chan_t* Channel object. NULL if no channel are pending an interrupt. */ -usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); +usb_dwc_hal_chan_t *usb_dwc_hal_get_chan_pending_intr(usb_dwc_hal_context_t *hal); /** * @brief Decode a particular channel's interrupt @@ -781,9 +781,9 @@ usbh_hal_chan_t *usbh_hal_get_chan_pending_intr(usbh_hal_context_t *hal); * @param chan_obj Channel object * @note If the host port has an error (e.g., a sudden disconnect or an port error), any active channels will not * receive an interrupt. Each active channel must be manually halted. - * @return usbh_hal_chan_event_t Channel event + * @return usb_dwc_hal_chan_event_t Channel event */ -usbh_hal_chan_event_t usbh_hal_chan_decode_intr(usbh_hal_chan_t *chan_obj); +usb_dwc_hal_chan_event_t usb_dwc_hal_chan_decode_intr(usb_dwc_hal_chan_t *chan_obj); #ifdef __cplusplus } diff --git a/tools/sdk/esp32c3/include/hal/include/hal/usbh_ll.h b/tools/sdk/esp32s3/include/hal/include/hal/usb_dwc_ll.h similarity index 59% rename from tools/sdk/esp32c3/include/hal/include/hal/usbh_ll.h rename to tools/sdk/esp32s3/include/hal/include/hal/usb_dwc_ll.h index 4320ead0a3b..3bbaeca4c2e 100644 --- a/tools/sdk/esp32c3/include/hal/include/hal/usbh_ll.h +++ b/tools/sdk/esp32s3/include/hal/include/hal/usb_dwc_ll.h @@ -12,7 +12,7 @@ extern "C" { #include #include -#include "soc/usbh_struct.h" +#include "soc/usb_dwc_struct.h" #include "hal/usb_types_private.h" #include "hal/misc.h" @@ -24,48 +24,48 @@ extern "C" { /* * Interrupt bit masks of the GINTSTS and GINTMSK registers */ -#define USB_LL_INTR_CORE_WKUPINT (1 << 31) -#define USB_LL_INTR_CORE_SESSREQINT (1 << 30) -#define USB_LL_INTR_CORE_DISCONNINT (1 << 29) -#define USB_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) -#define USB_LL_INTR_CORE_PTXFEMP (1 << 26) -#define USB_LL_INTR_CORE_HCHINT (1 << 25) -#define USB_LL_INTR_CORE_PRTINT (1 << 24) -#define USB_LL_INTR_CORE_RESETDET (1 << 23) -#define USB_LL_INTR_CORE_FETSUSP (1 << 22) -#define USB_LL_INTR_CORE_INCOMPIP (1 << 21) -#define USB_LL_INTR_CORE_INCOMPISOIN (1 << 20) -#define USB_LL_INTR_CORE_OEPINT (1 << 19) -#define USB_LL_INTR_CORE_IEPINT (1 << 18) -#define USB_LL_INTR_CORE_EPMIS (1 << 17) -#define USB_LL_INTR_CORE_EOPF (1 << 15) -#define USB_LL_INTR_CORE_ISOOUTDROP (1 << 14) -#define USB_LL_INTR_CORE_ENUMDONE (1 << 13) -#define USB_LL_INTR_CORE_USBRST (1 << 12) -#define USB_LL_INTR_CORE_USBSUSP (1 << 11) -#define USB_LL_INTR_CORE_ERLYSUSP (1 << 10) -#define USB_LL_INTR_CORE_GOUTNAKEFF (1 << 7) -#define USB_LL_INTR_CORE_GINNAKEFF (1 << 6) -#define USB_LL_INTR_CORE_NPTXFEMP (1 << 5) -#define USB_LL_INTR_CORE_RXFLVL (1 << 4) -#define USB_LL_INTR_CORE_SOF (1 << 3) -#define USB_LL_INTR_CORE_OTGINT (1 << 2) -#define USB_LL_INTR_CORE_MODEMIS (1 << 1) -#define USB_LL_INTR_CORE_CURMOD (1 << 0) +#define USB_DWC_LL_INTR_CORE_WKUPINT (1 << 31) +#define USB_DWC_LL_INTR_CORE_SESSREQINT (1 << 30) +#define USB_DWC_LL_INTR_CORE_DISCONNINT (1 << 29) +#define USB_DWC_LL_INTR_CORE_CONIDSTSCHNG (1 << 28) +#define USB_DWC_LL_INTR_CORE_PTXFEMP (1 << 26) +#define USB_DWC_LL_INTR_CORE_HCHINT (1 << 25) +#define USB_DWC_LL_INTR_CORE_PRTINT (1 << 24) +#define USB_DWC_LL_INTR_CORE_RESETDET (1 << 23) +#define USB_DWC_LL_INTR_CORE_FETSUSP (1 << 22) +#define USB_DWC_LL_INTR_CORE_INCOMPIP (1 << 21) +#define USB_DWC_LL_INTR_CORE_INCOMPISOIN (1 << 20) +#define USB_DWC_LL_INTR_CORE_OEPINT (1 << 19) +#define USB_DWC_LL_INTR_CORE_IEPINT (1 << 18) +#define USB_DWC_LL_INTR_CORE_EPMIS (1 << 17) +#define USB_DWC_LL_INTR_CORE_EOPF (1 << 15) +#define USB_DWC_LL_INTR_CORE_ISOOUTDROP (1 << 14) +#define USB_DWC_LL_INTR_CORE_ENUMDONE (1 << 13) +#define USB_DWC_LL_INTR_CORE_USBRST (1 << 12) +#define USB_DWC_LL_INTR_CORE_USBSUSP (1 << 11) +#define USB_DWC_LL_INTR_CORE_ERLYSUSP (1 << 10) +#define USB_DWC_LL_INTR_CORE_GOUTNAKEFF (1 << 7) +#define USB_DWC_LL_INTR_CORE_GINNAKEFF (1 << 6) +#define USB_DWC_LL_INTR_CORE_NPTXFEMP (1 << 5) +#define USB_DWC_LL_INTR_CORE_RXFLVL (1 << 4) +#define USB_DWC_LL_INTR_CORE_SOF (1 << 3) +#define USB_DWC_LL_INTR_CORE_OTGINT (1 << 2) +#define USB_DWC_LL_INTR_CORE_MODEMIS (1 << 1) +#define USB_DWC_LL_INTR_CORE_CURMOD (1 << 0) /* * Bit mask of interrupt generating bits of the the HPRT register. These bits - * are ORd into the USB_LL_INTR_CORE_PRTINT interrupt. + * are ORd into the USB_DWC_LL_INTR_CORE_PRTINT interrupt. * * Note: Some fields of the HPRT are W1C (write 1 clear), this we cannot do a * simple read and write-back to clear the HPRT interrupt bits. Instead we need * a W1C mask the non-interrupt related bits */ -#define USBH_LL_HPRT_W1C_MSK (0x2E) -#define USBH_LL_HPRT_ENA_MSK (0x04) -#define USBH_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) -#define USBH_LL_INTR_HPRT_PRTENCHNG (1 << 3) -#define USBH_LL_INTR_HPRT_PRTCONNDET (1 << 1) +#define USB_DWC_LL_HPRT_W1C_MSK (0x2E) +#define USB_DWC_LL_HPRT_ENA_MSK (0x04) +#define USB_DWC_LL_INTR_HPRT_PRTOVRCURRCHNG (1 << 5) +#define USB_DWC_LL_INTR_HPRT_PRTENCHNG (1 << 3) +#define USB_DWC_LL_INTR_HPRT_PRTCONNDET (1 << 1) /* * Bit mask of channel interrupts (HCINTi and HCINTMSKi registers) @@ -78,22 +78,22 @@ extern "C" { * - XFERCOMPL * The remaining interrupt bits will still be set (when the corresponding event occurs) * but will not generate an interrupt. Therefore we must proxy through the - * USBH_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. + * USB_DWC_LL_INTR_CHAN_CHHLTD interrupt to check the other interrupt bits. */ -#define USBH_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) -#define USBH_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) -#define USBH_LL_INTR_CHAN_BNAINTR (1 << 11) -#define USBH_LL_INTR_CHAN_DATATGLERR (1 << 10) -#define USBH_LL_INTR_CHAN_FRMOVRUN (1 << 9) -#define USBH_LL_INTR_CHAN_BBLEER (1 << 8) -#define USBH_LL_INTR_CHAN_XACTERR (1 << 7) -#define USBH_LL_INTR_CHAN_NYET (1 << 6) -#define USBH_LL_INTR_CHAN_ACK (1 << 5) -#define USBH_LL_INTR_CHAN_NAK (1 << 4) -#define USBH_LL_INTR_CHAN_STALL (1 << 3) -#define USBH_LL_INTR_CHAN_AHBERR (1 << 2) -#define USBH_LL_INTR_CHAN_CHHLTD (1 << 1) -#define USBH_LL_INTR_CHAN_XFERCOMPL (1 << 0) +#define USB_DWC_LL_INTR_CHAN_DESC_LS_ROLL (1 << 13) +#define USB_DWC_LL_INTR_CHAN_XCS_XACT_ERR (1 << 12) +#define USB_DWC_LL_INTR_CHAN_BNAINTR (1 << 11) +#define USB_DWC_LL_INTR_CHAN_DATATGLERR (1 << 10) +#define USB_DWC_LL_INTR_CHAN_FRMOVRUN (1 << 9) +#define USB_DWC_LL_INTR_CHAN_BBLEER (1 << 8) +#define USB_DWC_LL_INTR_CHAN_XACTERR (1 << 7) +#define USB_DWC_LL_INTR_CHAN_NYET (1 << 6) +#define USB_DWC_LL_INTR_CHAN_ACK (1 << 5) +#define USB_DWC_LL_INTR_CHAN_NAK (1 << 4) +#define USB_DWC_LL_INTR_CHAN_STALL (1 << 3) +#define USB_DWC_LL_INTR_CHAN_AHBERR (1 << 2) +#define USB_DWC_LL_INTR_CHAN_CHHLTD (1 << 1) +#define USB_DWC_LL_INTR_CHAN_XFERCOMPL (1 << 0) /* * QTD (Queue Transfer Descriptor) structure used in Scatter/Gather DMA mode. @@ -150,7 +150,7 @@ typedef struct { uint32_t buffer_status_val; }; uint8_t *buffer; -} usbh_ll_dma_qtd_t; +} usb_dwc_ll_dma_qtd_t; /* ----------------------------------------------------------------------------- @@ -159,61 +159,61 @@ typedef struct { // --------------------------- GAHBCFG Register -------------------------------- -static inline void usb_ll_en_dma_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_dma_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 1; } -static inline void usb_ll_en_slave_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_slave_mode(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.dmaen = 0; } -static inline void usb_ll_set_hbstlen(usbh_dev_t *hw, uint32_t burst_len) +static inline void usb_dwc_ll_gahbcfg_set_hbstlen(usb_dwc_dev_t *hw, uint32_t burst_len) { hw->gahbcfg_reg.hbstlen = burst_len; } -static inline void usb_ll_en_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_en_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 1; } -static inline void usb_ll_dis_global_intr(usbh_dev_t *hw) +static inline void usb_dwc_ll_gahbcfg_dis_global_intr(usb_dwc_dev_t *hw) { hw->gahbcfg_reg.glbllntrmsk = 0; } // --------------------------- GUSBCFG Register -------------------------------- -static inline void usb_ll_set_host_mode(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_force_host_mode(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.forcehstmode = 1; } -static inline void usb_ll_dis_hnp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_hnp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.hnpcap = 0; } -static inline void usb_ll_dis_srp_cap(usbh_dev_t *hw) +static inline void usb_dwc_ll_gusbcfg_dis_srp_cap(usb_dwc_dev_t *hw) { hw->gusbcfg_reg.srpcap = 0; } // --------------------------- GRSTCTL Register -------------------------------- -static inline bool usb_ll_check_ahb_idle(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_ahb_idle(usb_dwc_dev_t *hw) { return hw->grstctl_reg.ahbidle; } -static inline bool usb_ll_check_dma_req_in_progress(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_dma_req_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.dmareq; } -static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_nptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 0; //Set the TX FIFO number to 0 to select the non-periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //Flush the selected TX FIFO @@ -223,7 +223,7 @@ static inline void usb_ll_flush_nptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_ptx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.txfnum = 1; //Set the TX FIFO number to 1 to select the periodic TX FIFO hw->grstctl_reg.txfflsh = 1; //FLush the select TX FIFO @@ -233,7 +233,7 @@ static inline void usb_ll_flush_ptx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_flush_rx_fifo(usb_dwc_dev_t *hw) { hw->grstctl_reg.rxfflsh = 1; //Wait for the flushing to complete @@ -242,17 +242,17 @@ static inline void usb_ll_flush_rx_fifo(usbh_dev_t *hw) } } -static inline void usb_ll_reset_frame_counter(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_reset_frame_counter(usb_dwc_dev_t *hw) { hw->grstctl_reg.frmcntrrst = 1; } -static inline void usb_ll_core_soft_reset(usbh_dev_t *hw) +static inline void usb_dwc_ll_grstctl_core_soft_reset(usb_dwc_dev_t *hw) { hw->grstctl_reg.csftrst = 1; } -static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_grstctl_is_core_soft_reset_in_progress(usb_dwc_dev_t *hw) { return hw->grstctl_reg.csftrst; } @@ -265,9 +265,9 @@ static inline bool usb_ll_check_core_soft_reset(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @return uint32_t Mask of interrupts */ -static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_gintsts_read_and_clear_intrs(usb_dwc_dev_t *hw) { - usb_gintsts_reg_t gintsts; + usb_dwc_gintsts_reg_t gintsts; gintsts.val = hw->gintsts_reg.val; hw->gintsts_reg.val = gintsts.val; //Write back to clear return gintsts.val; @@ -279,7 +279,7 @@ static inline uint32_t usb_ll_intr_read_and_clear(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param intr_msk Mask of interrupts to clear */ -static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) +static inline void usb_dwc_ll_gintsts_clear_intrs(usb_dwc_dev_t *hw, uint32_t intr_msk) { //All GINTSTS fields are either W1C or read only. So safe to write directly hw->gintsts_reg.val = intr_msk; @@ -287,19 +287,19 @@ static inline void usb_ll_intr_clear(usbh_dev_t *hw, uint32_t intr_msk) // --------------------------- GINTMSK Register -------------------------------- -static inline void usb_ll_en_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_en_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val |= intr_mask; } -static inline void usb_ll_dis_intrs(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_gintmsk_dis_intrs(usb_dwc_dev_t *hw, uint32_t intr_mask) { hw->gintmsk_reg.val &= ~intr_mask; } // --------------------------- GRXFSIZ Register -------------------------------- -static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) +static inline void usb_dwc_ll_grxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t num_lines) { //Set size in words HAL_FORCE_MODIFY_U32_REG_FIELD(hw->grxfsiz_reg, rxfdep, num_lines); @@ -307,20 +307,24 @@ static inline void usb_ll_set_rx_fifo_size(usbh_dev_t *hw, uint32_t num_lines) // -------------------------- GNPTXFSIZ Register ------------------------------- -static inline void usb_ll_set_nptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_gnptxfsiz_set_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_gnptxfsiz_reg_t gnptxfsiz; + usb_dwc_gnptxfsiz_reg_t gnptxfsiz; gnptxfsiz.val = hw->gnptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(gnptxfsiz, nptxfdep, num_lines); hw->gnptxfsiz_reg.val = gnptxfsiz.val; } -static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) +// --------------------------- GSNPSID Register -------------------------------- + +static inline uint32_t usb_dwc_ll_gsnpsid_get_id(usb_dwc_dev_t *hw) { return hw->gsnpsid_reg.val; } +// --------------------------- GHWCFGx Register -------------------------------- + /** * @brief Get the hardware configuration regiters of the DWC_OTG controller * @@ -333,7 +337,7 @@ static inline uint32_t usb_ll_get_controller_core_id(usbh_dev_t *hw) * @param[out] ghwcfg3 Hardware configuration registesr 3 * @param[out] ghwcfg4 Hardware configuration registesr 4 */ -static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) +static inline void usb_dwc_ll_ghwcfg_get_hw_config(usb_dwc_dev_t *hw, uint32_t *ghwcfg1, uint32_t *ghwcfg2, uint32_t *ghwcfg3, uint32_t *ghwcfg4) { *ghwcfg1 = hw->ghwcfg1_reg.val; *ghwcfg2 = hw->ghwcfg2_reg.val; @@ -343,9 +347,9 @@ static inline void usb_ll_get_hardware_config(usbh_dev_t *hw, uint32_t *ghwcfg1, // --------------------------- HPTXFSIZ Register ------------------------------- -static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint32_t num_lines) +static inline void usb_dwc_ll_hptxfsiz_set_ptx_fifo_size(usb_dwc_dev_t *hw, uint32_t addr, uint32_t num_lines) { - usb_hptxfsiz_reg_t hptxfsiz; + usb_dwc_hptxfsiz_reg_t hptxfsiz; hptxfsiz.val = hw->hptxfsiz_reg.val; HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfstaddr, addr); HAL_FORCE_MODIFY_U32_REG_FIELD(hptxfsiz, ptxfsize, num_lines); @@ -358,12 +362,12 @@ static inline void usbh_ll_set_ptx_fifo_size(usbh_dev_t *hw, uint32_t addr, uint // ----------------------------- HCFG Register --------------------------------- -static inline void usbh_ll_hcfg_en_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 1; } -static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_dis_perio_sched(usb_dwc_dev_t *hw) { hw->hcfg_reg.perschedena = 0; } @@ -373,7 +377,7 @@ static inline void usbh_ll_hcfg_dis_perio_sched(usbh_dev_t *hw) * * @param num_entires Number of entires in the frame list */ -static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_hal_frame_list_len_t num_entries) +static inline void usb_dwc_ll_hcfg_set_num_frame_list_entries(usb_dwc_dev_t *hw, usb_hal_frame_list_len_t num_entries) { uint32_t frlisten; switch (num_entries) { @@ -393,17 +397,17 @@ static inline void usbh_ll_hcfg_set_num_frame_list_entries(usbh_dev_t *hw, usb_h hw->hcfg_reg.frlisten = frlisten; } -static inline void usbh_ll_hcfg_en_scatt_gatt_dma(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_en_scatt_gatt_dma(usb_dwc_dev_t *hw) { hw->hcfg_reg.descdma = 1; } -static inline void usbh_ll_hcfg_set_fsls_supp_only(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_supp_only(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslssupp = 1; } -static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) +static inline void usb_dwc_ll_hcfg_set_fsls_pclk_sel(usb_dwc_dev_t *hw) { hw->hcfg_reg.fslspclksel = 1; } @@ -414,7 +418,7 @@ static inline void usbh_ll_hcfg_set_fsls_pclk_sel(usbh_dev_t *hw) * @param hw Start address of the DWC_OTG registers * @param speed Speed to initialize the host port at */ -static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hcfg_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { hw->hcfg_reg.descdma = 1; //Enable scatt/gatt hw->hcfg_reg.fslssupp = 1; //FS/LS support only @@ -429,9 +433,9 @@ static inline void usbh_ll_hcfg_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFIR Register --------------------------------- -static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t speed) +static inline void usb_dwc_ll_hfir_set_defaults(usb_dwc_dev_t *hw, usb_priv_speed_t speed) { - usb_hfir_reg_t hfir; + usb_dwc_hfir_reg_t hfir; hfir.val = hw->hfir_reg.val; hfir.hfirrldctrl = 0; //Disable dynamic loading /* @@ -445,49 +449,49 @@ static inline void usbh_ll_hfir_set_defaults(usbh_dev_t *hw, usb_priv_speed_t sp // ----------------------------- HFNUM Register -------------------------------- -static inline uint32_t usbh_ll_get_frm_time_rem(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_time_rem(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hfnum_reg, frrem); } -static inline uint32_t usbh_ll_get_frm_num(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hfnum_get_frame_num(usb_dwc_dev_t *hw) { return hw->hfnum_reg.frnum; } // ---------------------------- HPTXSTS Register ------------------------------- -static inline uint32_t usbh_ll_get_p_tx_queue_top(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_top(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxqtop); } -static inline uint32_t usbh_ll_get_p_tx_queue_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hptxsts_get_ptxq_space_avail(usb_dwc_dev_t *hw) { return hw->hptxsts_reg.ptxqspcavail; } -static inline uint32_t usbh_ll_get_p_tx_fifo_space_avail(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_ptxsts_get_ptxf_space_avail(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->hptxsts_reg, ptxfspcavail); } // ----------------------------- HAINT Register -------------------------------- -static inline uint32_t usbh_ll_get_chan_intrs_msk(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_haint_get_chan_intrs(usb_dwc_dev_t *hw) { return HAL_FORCE_READ_U32_REG_FIELD(hw->haint_reg, haint); } // --------------------------- HAINTMSK Register ------------------------------- -static inline void usbh_ll_haintmsk_en_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_en_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val |= mask; } -static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) +static inline void usb_dwc_ll_haintmsk_dis_chan_intr(usb_dwc_dev_t *hw, uint32_t mask) { hw->haintmsk_reg.val &= ~mask; } @@ -504,7 +508,7 @@ static inline void usbh_ll_haintmsk_dis_chan_intr(usbh_dev_t *hw, uint32_t mask) * @param hw Start address of the DWC_OTG registers * @param addr Base address of the scheduling frame list */ -static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t addr) +static inline void usb_dwc_ll_hflbaddr_set_base_addr(usb_dwc_dev_t *hw, uint32_t addr) { hw->hflbaddr_reg.hflbaddr = addr; } @@ -515,14 +519,14 @@ static inline void usbh_ll_set_frame_list_base_addr(usbh_dev_t *hw, uint32_t add * @param hw Start address of the DWC_OTG registers * @return uint32_t Base address of the scheduling frame list */ -static inline uint32_t usbh_ll_get_frame_list_base_addr(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hflbaddr_get_base_addr(usb_dwc_dev_t *hw) { return hw->hflbaddr_reg.hflbaddr; } // ----------------------------- HPRT Register --------------------------------- -static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) +static inline usb_priv_speed_t usb_dwc_ll_hprt_get_speed(usb_dwc_dev_t *hw) { usb_priv_speed_t speed; //esp32-s2 and esp32-s3 only support FS or LS @@ -537,163 +541,163 @@ static inline usb_priv_speed_t usbh_ll_hprt_get_speed(usbh_dev_t *hw) return speed; } -static inline uint32_t usbh_ll_hprt_get_test_ctl(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_test_ctl(usb_dwc_dev_t *hw) { return hw->hprt_reg.prttstctl; } -static inline void usbh_ll_hprt_set_test_ctl(usbh_dev_t *hw, uint32_t test_mode) +static inline void usb_dwc_ll_hprt_set_test_ctl(usb_dwc_dev_t *hw, uint32_t test_mode) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prttstctl = test_mode; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_en_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_en_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_dis_pwr(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_dis_pwr(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtpwr = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline uint32_t usbh_ll_hprt_get_pwr_line_status(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_get_pwr_line_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtlnsts; } -static inline void usbh_ll_hprt_set_port_reset(usbh_dev_t *hw, bool reset) +static inline void usb_dwc_ll_hprt_set_port_reset(usb_dwc_dev_t *hw, bool reset) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtrst = reset; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_reset(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_reset(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtrst; } -static inline void usbh_ll_hprt_set_port_suspend(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_suspend(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtsusp = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_suspend(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_suspend(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtsusp; } -static inline void usbh_ll_hprt_set_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_set_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 1; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline void usbh_ll_hprt_clr_port_resume(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_clr_port_resume(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtres = 0; - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_W1C_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_W1C_MSK); } -static inline bool usbh_ll_hprt_get_port_resume(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_resume(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtres; } -static inline bool usbh_ll_hprt_get_port_overcur(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_overcur(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtovrcurract; } -static inline bool usbh_ll_hprt_get_port_en(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_port_en(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtena; } -static inline void usbh_ll_hprt_port_dis(usbh_dev_t *hw) +static inline void usb_dwc_ll_hprt_port_dis(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; hprt.prtena = 1; //W1C to disable //we want to W1C ENA but not W1C the interrupt bits - hw->hprt_reg.val = hprt.val & ((~USBH_LL_HPRT_W1C_MSK) | USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & ((~USB_DWC_LL_HPRT_W1C_MSK) | USB_DWC_LL_HPRT_ENA_MSK); } -static inline bool usbh_ll_hprt_get_conn_status(usbh_dev_t *hw) +static inline bool usb_dwc_ll_hprt_get_conn_status(usb_dwc_dev_t *hw) { return hw->hprt_reg.prtconnsts; } -static inline uint32_t usbh_ll_hprt_intr_read_and_clear(usbh_dev_t *hw) +static inline uint32_t usb_dwc_ll_hprt_intr_read_and_clear(usb_dwc_dev_t *hw) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; //We want to W1C the interrupt bits but not that ENA - hw->hprt_reg.val = hprt.val & (~USBH_LL_HPRT_ENA_MSK); + hw->hprt_reg.val = hprt.val & (~USB_DWC_LL_HPRT_ENA_MSK); //Return only the interrupt bits - return (hprt.val & (USBH_LL_HPRT_W1C_MSK & ~(USBH_LL_HPRT_ENA_MSK))); + return (hprt.val & (USB_DWC_LL_HPRT_W1C_MSK & ~(USB_DWC_LL_HPRT_ENA_MSK))); } -static inline void usbh_ll_hprt_intr_clear(usbh_dev_t *hw, uint32_t intr_mask) +static inline void usb_dwc_ll_hprt_intr_clear(usb_dwc_dev_t *hw, uint32_t intr_mask) { - usb_hprt_reg_t hprt; + usb_dwc_hprt_reg_t hprt; hprt.val = hw->hprt_reg.val; - hw->hprt_reg.val = ((hprt.val & ~USBH_LL_HPRT_ENA_MSK) & ~USBH_LL_HPRT_W1C_MSK) | intr_mask; + hw->hprt_reg.val = ((hprt.val & ~USB_DWC_LL_HPRT_ENA_MSK) & ~USB_DWC_LL_HPRT_W1C_MSK) | intr_mask; } //Per Channel registers // --------------------------- HCCHARi Register -------------------------------- -static inline void usbh_ll_chan_start(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_enable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chena = 1; } -static inline bool usbh_ll_chan_is_active(volatile usb_host_chan_regs_t *chan) +static inline bool usb_dwc_ll_hcchar_chan_is_enabled(volatile usb_dwc_host_chan_regs_t *chan) { return chan->hcchar_reg.chena; } -static inline void usbh_ll_chan_halt(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_disable_chan(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.chdis = 1; } -static inline void usbh_ll_chan_xfer_odd_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_odd_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 1; } -static inline void usbh_ll_chan_xfer_even_frame(volatile usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hcchar_set_even_frame(volatile usb_dwc_host_chan_regs_t *chan) { chan->hcchar_reg.oddfrm = 0; } -static inline void usbh_ll_chan_set_dev_addr(volatile usb_host_chan_regs_t *chan, uint32_t addr) +static inline void usb_dwc_ll_hcchar_set_dev_addr(volatile usb_dwc_host_chan_regs_t *chan, uint32_t addr) { chan->hcchar_reg.devaddr = addr; } -static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, usb_priv_xfer_type_t type) +static inline void usb_dwc_ll_hcchar_set_ep_type(volatile usb_dwc_host_chan_regs_t *chan, usb_priv_xfer_type_t type) { uint32_t ep_type; switch (type) { @@ -715,42 +719,42 @@ static inline void usbh_ll_chan_set_ep_type(volatile usb_host_chan_regs_t *chan, //Indicates whether channel is commuunicating with a LS device connected via a FS hub. Setting this bit to 1 will cause //each packet to be preceded by a PREamble packet -static inline void usbh_ll_chan_set_lspddev(volatile usb_host_chan_regs_t *chan, bool is_ls) +static inline void usb_dwc_ll_hcchar_set_lspddev(volatile usb_dwc_host_chan_regs_t *chan, bool is_ls) { chan->hcchar_reg.lspddev = is_ls; } -static inline void usbh_ll_chan_set_dir(volatile usb_host_chan_regs_t *chan, bool is_in) +static inline void usb_dwc_ll_hcchar_set_dir(volatile usb_dwc_host_chan_regs_t *chan, bool is_in) { chan->hcchar_reg.epdir = is_in; } -static inline void usbh_ll_chan_set_ep_num(volatile usb_host_chan_regs_t *chan, uint32_t num) +static inline void usb_dwc_ll_hcchar_set_ep_num(volatile usb_dwc_host_chan_regs_t *chan, uint32_t num) { chan->hcchar_reg.epnum = num; } -static inline void usbh_ll_chan_set_mps(volatile usb_host_chan_regs_t *chan, uint32_t mps) +static inline void usb_dwc_ll_hcchar_set_mps(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mps) { chan->hcchar_reg.mps = mps; } -static inline void usbh_ll_chan_hcchar_init(volatile usb_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) +static inline void usb_dwc_ll_hcchar_init(volatile usb_dwc_host_chan_regs_t *chan, int dev_addr, int ep_num, int mps, usb_priv_xfer_type_t type, bool is_in, bool is_ls) { //Sets all persistent fields of the channel over its lifetimez - usbh_ll_chan_set_dev_addr(chan, dev_addr); - usbh_ll_chan_set_ep_type(chan, type); - usbh_ll_chan_set_lspddev(chan, is_ls); - usbh_ll_chan_set_dir(chan, is_in); - usbh_ll_chan_set_ep_num(chan, ep_num); - usbh_ll_chan_set_mps(chan, mps); + usb_dwc_ll_hcchar_set_dev_addr(chan, dev_addr); + usb_dwc_ll_hcchar_set_ep_type(chan, type); + usb_dwc_ll_hcchar_set_lspddev(chan, is_ls); + usb_dwc_ll_hcchar_set_dir(chan, is_in); + usb_dwc_ll_hcchar_set_ep_num(chan, ep_num); + usb_dwc_ll_hcchar_set_mps(chan, mps); } // ---------------------------- HCINTi Register -------------------------------- -static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_regs_t *chan) +static inline uint32_t usb_dwc_ll_hcint_read_and_clear_intrs(volatile usb_dwc_host_chan_regs_t *chan) { - usb_hcint_reg_t hcint; + usb_dwc_hcint_reg_t hcint; hcint.val = chan->hcint_reg.val; chan->hcint_reg.val = hcint.val; return hcint.val; @@ -758,14 +762,14 @@ static inline uint32_t usbh_ll_chan_intr_read_and_clear(volatile usb_host_chan_r // --------------------------- HCINTMSKi Register ------------------------------ -static inline void usbh_ll_chan_set_intr_mask(volatile usb_host_chan_regs_t *chan, uint32_t mask) +static inline void usb_dwc_ll_hcintmsk_set_intr_mask(volatile usb_dwc_host_chan_regs_t *chan, uint32_t mask) { chan->hcintmsk_reg.val = mask; } -// ---------------------- HCTSIZi and HCDMAi Registers ------------------------- +// ---------------------------- HCTSIZi Register ------------------------------- -static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uint32_t data_pid) +static inline void usb_dwc_ll_hctsiz_set_pid(volatile usb_dwc_host_chan_regs_t *chan, uint32_t data_pid) { if (data_pid == 0) { chan->hctsiz_reg.pid = 0; @@ -774,7 +778,8 @@ static inline void usbh_ll_chan_set_pid(volatile usb_host_chan_regs_t *chan, uin } } -static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) { +static inline uint32_t usb_dwc_ll_hctsiz_get_pid(volatile usb_dwc_host_chan_regs_t *chan) +{ if (chan->hctsiz_reg.pid == 0) { return 0; //DATA0 } else { @@ -782,35 +787,35 @@ static inline uint32_t usbh_ll_chan_get_pid(volatile usb_host_chan_regs_t *chan) } } -static inline void usbh_ll_chan_set_dma_addr_non_iso(volatile usb_host_chan_regs_t *chan, - void *dmaaddr, - uint32_t qtd_idx) +static inline void usb_dwc_ll_hctsiz_set_qtd_list_len(volatile usb_dwc_host_chan_regs_t *chan, int qtd_list_len) { - //Set HCDMAi - chan->hcdma_reg.val = 0; - chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address - chan->hcdma_reg.non_iso.ctd = qtd_idx; + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list } -static inline int usbh_ll_chan_get_ctd(usb_host_chan_regs_t *chan) +static inline void usb_dwc_ll_hctsiz_init(volatile usb_dwc_host_chan_regs_t *chan) { - return chan->hcdma_reg.non_iso.ctd; + chan->hctsiz_reg.dopng = 0; //Don't do ping + HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels } -static inline void usbh_ll_chan_hctsiz_init(volatile usb_host_chan_regs_t *chan) +// ---------------------------- HCDMAi Register -------------------------------- + +static inline void usb_dwc_ll_hcdma_set_qtd_list_addr(volatile usb_dwc_host_chan_regs_t *chan, void *dmaaddr, uint32_t qtd_idx) { - chan->hctsiz_reg.dopng = 0; //Don't do ping - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, sched_info, 0xFF); //Schedinfo is always 0xFF for fullspeed. Not used in Bulk/Ctrl channels + //Set HCDMAi + chan->hcdma_reg.val = 0; + chan->hcdma_reg.non_iso.dmaaddr = (((uint32_t)dmaaddr) >> 9) & 0x7FFFFF; //MSB of 512 byte aligned address + chan->hcdma_reg.non_iso.ctd = qtd_idx; } -static inline void usbh_ll_chan_set_qtd_list_len(volatile usb_host_chan_regs_t *chan, int qtd_list_len) +static inline int usb_dwc_ll_hcdam_get_cur_qtd_idx(usb_dwc_host_chan_regs_t *chan) { - HAL_FORCE_MODIFY_U32_REG_FIELD(chan->hctsiz_reg, ntd, qtd_list_len - 1); //Set the length of the descriptor list + return chan->hcdma_reg.non_iso.ctd; } // ---------------------------- HCDMABi Register ------------------------------- -static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t *chan) +static inline void *usb_dwc_ll_hcdmab_get_buff_addr(volatile usb_dwc_host_chan_regs_t *chan) { return (void *)chan->hcdmab_reg.hcdmab; } @@ -826,20 +831,20 @@ static inline void *usbh_ll_chan_get_cur_buff_addr(volatile usb_host_chan_regs_t * * @param dev Start address of the DWC_OTG registers * @param chan_idx The channel's index - * @return usb_host_chan_regs_t* Pointer to channel's registers + * @return usb_dwc_host_chan_regs_t* Pointer to channel's registers */ -static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int chan_idx) +static inline usb_dwc_host_chan_regs_t *usb_dwc_ll_chan_get_regs(usb_dwc_dev_t *dev, int chan_idx) { return &dev->host_chans[chan_idx]; } // ------------------------------ QTD related ---------------------------------- -#define USBH_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully -#define USBH_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). +#define USB_DWC_LL_QTD_STATUS_SUCCESS 0x0 //If QTD was processed, it indicates the data was transmitted/received successfully +#define USB_DWC_LL_QTD_STATUS_PKTERR 0x1 //Data trasnmitted/received with errors (CRC/Timeout/Stuff/False EOP/Excessive NAK). //Note: 0x2 is reserved -#define USBH_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. -#define USBH_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed +#define USB_DWC_LL_QTD_STATUS_BUFFER 0x3 //AHB error occurred. +#define USB_DWC_LL_QTD_STATUS_NOT_EXECUTED 0x4 //QTD as never processed /** * @brief Set a QTD for a non isochronous IN transfer @@ -850,7 +855,7 @@ static inline usb_host_chan_regs_t *usbh_ll_get_chan_regs(usbh_dev_t *dev, int c * Non zero length must be mulitple of the endpoint's MPS. * @param hoc Halt on complete (will generate an interrupt and halt the channel) */ -static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) +static inline void usb_dwc_ll_qtd_set_in(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -873,7 +878,7 @@ static inline void usbh_ll_set_qtd_in(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff * @param is_setup Indicates whether this is a control transfer setup packet or a normal OUT Data transfer. * (As per the USB protocol, setup packets cannot be STALLd or NAKd by the device) */ -static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) +static inline void usb_dwc_ll_qtd_set_out(usb_dwc_ll_dma_qtd_t *qtd, uint8_t *data_buff, int xfer_len, bool hoc, bool is_setup) { qtd->buffer = data_buff; //Set pointer to data buffer qtd->buffer_status_val = 0; //Reset all flags to zero @@ -896,7 +901,7 @@ static inline void usbh_ll_set_qtd_out(usbh_ll_dma_qtd_t *qtd, uint8_t *data_buf * * @param qtd Pointer to the QTD */ -static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) +static inline void usb_dwc_ll_qtd_set_null(usb_dwc_ll_dma_qtd_t *qtd) { qtd->buffer = NULL; qtd->buffer_status_val = 0; //Disable qtd by clearing it to zero. Used by interrupt/isoc as an unscheudled frame @@ -911,12 +916,12 @@ static inline void usbh_ll_set_qtd_null(usbh_ll_dma_qtd_t *qtd) * @param[out] rem_len Number of bytes ramining in the QTD * @param[out] status Status of the QTD */ -static inline void usbh_ll_get_qtd_status(usbh_ll_dma_qtd_t *qtd, int *rem_len, int *status) +static inline void usb_dwc_ll_qtd_get_status(usb_dwc_ll_dma_qtd_t *qtd, int *rem_len, int *status) { //Status is the same regardless of IN or OUT if (qtd->in_non_iso.active) { //QTD was never processed - *status = USBH_LL_QTD_STATUS_NOT_EXECUTED; + *status = USB_DWC_LL_QTD_STATUS_NOT_EXECUTED; } else { *status = qtd->in_non_iso.rx_status; } diff --git a/tools/sdk/esp32s3/include/hal/platform_port/include/hal/check.h b/tools/sdk/esp32s3/include/hal/platform_port/include/hal/check.h index 3ad02946c71..df2d4af46ed 100644 --- a/tools/sdk/esp32s3/include/hal/platform_port/include/hal/check.h +++ b/tools/sdk/esp32s3/include/hal/platform_port/include/hal/check.h @@ -1,17 +1,11 @@ -// Copyright 2021 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: 2021-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once -#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) _Static_assert((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") +#include "esp_assert.h" + +#define STATIC_HAL_REG_CHECK(TAG, ENUM, VAL) ESP_STATIC_ASSERT((ENUM) == (VAL), #TAG": "#ENUM" definition no longer matches register value") diff --git a/tools/sdk/esp32s3/include/lwip/include/apps/ping/ping_sock.h b/tools/sdk/esp32s3/include/lwip/include/apps/ping/ping_sock.h index fb946f7e162..6abe6f77bd7 100644 --- a/tools/sdk/esp32s3/include/lwip/include/apps/ping/ping_sock.h +++ b/tools/sdk/esp32s3/include/lwip/include/apps/ping/ping_sock.h @@ -88,7 +88,7 @@ typedef struct { .tos = 0, \ .ttl = IP_DEFAULT_TTL, \ .target_addr = *(IP_ANY_TYPE), \ - .task_stack_size = 2048, \ + .task_stack_size = 2048 + TASK_EXTRA_STACK_SIZE, \ .task_prio = 2, \ .interface = 0,\ } diff --git a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/dhcp.h b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/dhcp.h index 8a528219da6..56e35223df3 100644 --- a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/dhcp.h +++ b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/dhcp.h @@ -151,6 +151,9 @@ u8_t dhcp_supplied_address(const struct netif *netif); void dhcp_coarse_tmr(void); /* to be called every half second */ void dhcp_fine_tmr(void); +#if ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND +void dhcp_fine_timeout_cb(void *arg); +#endif #if LWIP_DHCP_GET_NTP_SRV /** This function must exist, in other to add offered NTP servers to diff --git a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/ip4_napt.h b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/ip4_napt.h index 8d98e120dfa..8246d6fd36e 100644 --- a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/ip4_napt.h +++ b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/ip4_napt.h @@ -60,16 +60,21 @@ extern "C" { #include "lwip/err.h" #include "lwip/ip4.h" + +#ifndef NAPT_TMR_INTERVAL +#define NAPT_TMR_INTERVAL 2000 +#endif + /** -* NAPT for a forwarded packet. It checks weather we need NAPT and modify -* the packet source address and port if needed. -* -* @param p the packet to forward (p->payload points to IP header) -* @param iphdr the IP header of the input packet -* @param inp the netif on which this packet was received -* @param outp the netif on which this packet will be sent -* @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped -*/ + * NAPT for a forwarded packet. It checks weather we need NAPT and modify + * the packet source address and port if needed. + * + * @param p the packet to forward (p->payload points to IP header) + * @param iphdr the IP header of the input packet + * @param inp the netif on which this packet was received + * @param outp the netif on which this packet will be sent + * @return ERR_OK if packet should be sent, or ERR_RTE if it should be dropped + */ err_t ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct netif *outp); @@ -79,7 +84,6 @@ ip_napt_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp, struct * * @param p the packet to forward (p->payload points to IP header) * @param iphdr the IP header of the input packet - * @param inp the netif on which this packet was received */ void ip_napt_recv(struct pbuf *p, struct ip_hdr *iphdr); diff --git a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/lwip_napt.h b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/lwip_napt.h index a1816d42034..ccea172585a 100644 --- a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/lwip_napt.h +++ b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/lwip_napt.h @@ -59,13 +59,24 @@ extern "C" { #endif /* Timeouts in sec for the various protocol types */ +#ifndef IP_NAPT_TIMEOUT_MS_TCP #define IP_NAPT_TIMEOUT_MS_TCP (30*60*1000) -#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (20*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_TCP_DISCON +#define IP_NAPT_TIMEOUT_MS_TCP_DISCON (TCP_MSL) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_UDP #define IP_NAPT_TIMEOUT_MS_UDP (2*1000) +#endif +#ifndef IP_NAPT_TIMEOUT_MS_ICMP #define IP_NAPT_TIMEOUT_MS_ICMP (2*1000) - +#endif +#ifndef IP_NAPT_PORT_RANGE_START #define IP_NAPT_PORT_RANGE_START 49152 +#endif +#ifndef IP_NAPT_PORT_RANGE_END #define IP_NAPT_PORT_RANGE_END 61439 +#endif /** * Enable/Disable NAPT for a specified interface. @@ -80,13 +91,12 @@ ip_napt_enable(u32_t addr, int enable); /** * Enable/Disable NAPT for a specified interface. * - * @param netif number of the interface + * @param number number of the interface * @param enable non-zero to enable NAPT, or 0 to disable. */ void ip_napt_enable_no(u8_t number, int enable); - /** * Register port mapping on the external interface to internal interface. * When the same port mapping is registered again, the old mapping is overwritten. @@ -101,16 +111,31 @@ ip_napt_enable_no(u8_t number, int enable); u8_t ip_portmap_add(u8_t proto, u32_t maddr, u16_t mport, u32_t daddr, u16_t dport); +u8_t +ip_portmap_get(u8_t proto, u16_t mport, u32_t *maddr, u32_t *daddr, u16_t *dport); + /** * Unregister port mapping on the external interface to internal interface. * * @param proto target protocol - * @param maddr ip address of the external interface + * @param mport mapped port on the external interface, in host byte order. */ u8_t ip_portmap_remove(u8_t proto, u16_t mport); + + +#if LWIP_STATS +/** + * Get statistics. + * + * @param stats struct to receive current stats + */ +void +ip_napt_get_stats(struct stats_ip_napt *stats); +#endif + #endif /* IP_NAPT */ #endif /* IP_FORWARD */ #endif /* ESP_LWIP */ diff --git a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/opt.h b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/opt.h index b314c59a439..11c9b10b886 100644 --- a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/opt.h +++ b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/opt.h @@ -506,7 +506,7 @@ * The default number of timeouts is calculated here for all enabled modules. */ #if ESP_LWIP -#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) +#define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + (LWIP_ARP + (ESP_GRATUITOUS_ARP ? 1 : 0)) + (ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND ? LWIP_DHCP : 2*LWIP_DHCP + (ESP_DHCPS_TIMER ? 1 : 0)) + LWIP_AUTOIP + LWIP_IGMP + (ESP_LWIP_DNS_TIMERS_ONDEMAND ? 0 : LWIP_DNS) + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #else #define LWIP_NUM_SYS_TIMEOUT_INTERNAL (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD))) #endif @@ -2273,6 +2273,14 @@ #define MIB2_STATS 0 #endif +/** + * IP_NAPT_STATS==1: Stats for IP NAPT. + */ +#if !defined IP_NAPT_STATS || defined __DOXYGEN__ +#define IP_NAPT_STATS (IP_NAPT) +#endif + + #else #define LINK_STATS 0 @@ -2293,6 +2301,7 @@ #define MLD6_STATS 0 #define ND6_STATS 0 #define MIB2_STATS 0 +#define IP_NAPT_STATS 0 #endif /* LWIP_STATS */ /** diff --git a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h index 72f9126d465..92e582448aa 100644 --- a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h +++ b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/priv/tcp_priv.h @@ -128,7 +128,9 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb); #define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in milliseconds */ #endif /* TCP_SLOW_INTERVAL */ +#ifndef TCP_FIN_WAIT_TIMEOUT #define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ +#endif /* TCP_FIN_WAIT_TIMEOUT */ #define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */ #define TCP_OOSEQ_TIMEOUT 6U /* x RTO */ diff --git a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/stats.h b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/stats.h index b570dbacf58..94e16691ca4 100644 --- a/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/stats.h +++ b/tools/sdk/esp32s3/include/lwip/lwip/src/include/lwip/stats.h @@ -228,6 +228,18 @@ struct stats_mib2_netif_ctrs { u32_t ifouterrors; }; +#if ESP_LWIP && IP_NAPT_STATS +/** + * IP NAPT stats + */ +struct stats_ip_napt { + STAT_COUNTER nr_active_tcp; + STAT_COUNTER nr_active_udp; + STAT_COUNTER nr_active_icmp; + STAT_COUNTER nr_forced_evictions; +}; +#endif /* ESP_LWIP && IP_NAPT */ + /** lwIP stats container */ struct stats_ { #if LINK_STATS @@ -298,6 +310,11 @@ struct stats_ { /** SNMP MIB2 */ struct stats_mib2 mib2; #endif +#if ESP_LWIP && IP_NAPT_STATS + /** IP NAPT */ + struct stats_ip_napt ip_napt; +#endif + }; /** Global variable containing lwIP internal statistics. Add this to your debugger's watchlist. */ @@ -467,6 +484,19 @@ void stats_init(void); #define MIB2_STATS_INC(x) #endif +#if IP_NAPT_STATS +#define IP_NAPT_STATS_INC(x) STATS_INC(x) +#else +#define IP_NAPT_STATS_INC(x) +#endif + +#if LWIP_STATS_DISPLAY && IP_NAPT_STATS +void stats_display_ip_napt(struct stats_ip_napt *napt); +#define IP_NAPT_STATS_DISPLAY() stats_display_ip_napt(&lwip_stats.ip_napt) +#else +#define IP_NAPT_STATS_DISPLAY() +#endif + /* Display of statistics */ #if LWIP_STATS_DISPLAY void stats_display(void); diff --git a/tools/sdk/esp32s3/include/lwip/port/esp32/include/lwipopts.h b/tools/sdk/esp32s3/include/lwip/port/esp32/include/lwipopts.h index bb0d371c6ee..bbae6d42412 100644 --- a/tools/sdk/esp32s3/include/lwip/port/esp32/include/lwipopts.h +++ b/tools/sdk/esp32s3/include/lwip/port/esp32/include/lwipopts.h @@ -254,6 +254,14 @@ */ #define ESP_DHCP_DISABLE_VENDOR_CLASS_IDENTIFIER CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID +#define DHCP_DEFINE_CUSTOM_TIMEOUTS 1 +/* Since for embedded devices it's not that hard to miss a discover packet, so lower + * the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s. + */ + #define DHCP_REQUEST_TIMEOUT_SEQUENCE(state, tries) (state == DHCP_STATE_REQUESTING ? \ + (uint16_t)(1 * 1000) : \ + (uint16_t)(((tries) < 6 ? 1 << (tries) : 60) * 250)) + /* ------------------------------------ ---------- AUTOIP options ---------- @@ -359,6 +367,11 @@ */ #define TCP_MSL CONFIG_LWIP_TCP_MSL +/** + * TCP_FIN_WAIT_TIMEOUT: The maximum FIN segment lifetime in milliseconds + */ +#define TCP_FIN_WAIT_TIMEOUT CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT + /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ @@ -1021,9 +1034,25 @@ #ifdef CONFIG_LWIP_TIMERS_ONDEMAND #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 1 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 1 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 1 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 1 +#endif /* LWIP_IPV6_REASS */ #else #define ESP_LWIP_IGMP_TIMERS_ONDEMAND 0 #define ESP_LWIP_MLD6_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND 0 +#define ESP_LWIP_DNS_TIMERS_ONDEMAND 0 +#if IP_REASSEMBLY +#define ESP_LWIP_IP4_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* IP_REASSEMBLY */ +#if LWIP_IPV6_REASS +#define ESP_LWIP_IP6_REASSEMBLY_TIMERS_ONDEMAND 0 +#endif /* LWIP_IPV6_REASS */ #endif #define TCP_SND_BUF CONFIG_LWIP_TCP_SND_BUF_DEFAULT diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h index 44afae0e560..5da7654bb40 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/asn1write.h @@ -90,7 +90,7 @@ int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start, #if defined(MBEDTLS_BIGNUM_C) /** - * \brief Write a arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) + * \brief Write an arbitrary-precision number (#MBEDTLS_ASN1_INTEGER) * in ASN.1 format. * * \note This function works backwards in data buffer. diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bignum.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bignum.h index c71a1d40227..95b9485acf1 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bignum.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bignum.h @@ -184,6 +184,20 @@ #endif /* !MBEDTLS_NO_UDBL_DIVISION */ #endif /* !MBEDTLS_HAVE_INT64 */ +/** \typedef mbedtls_mpi_uint + * \brief The type of machine digits in a bignum, called _limbs_. + * + * This is always an unsigned integer type with no padding bits. The size + * is platform-dependent. + */ + +/** \typedef mbedtls_mpi_sint + * \brief The signed type corresponding to #mbedtls_mpi_uint. + * + * This is always a signed integer type with no padding bits. The size + * is platform-dependent. + */ + #ifdef __cplusplus extern "C" { #endif @@ -193,9 +207,27 @@ extern "C" { */ typedef struct mbedtls_mpi { - int s; /*!< Sign: -1 if the mpi is negative, 1 otherwise */ - size_t n; /*!< total # of limbs */ - mbedtls_mpi_uint *p; /*!< pointer to limbs */ + /** Sign: -1 if the mpi is negative, 1 otherwise. + * + * The number 0 must be represented with `s = +1`. Although many library + * functions treat all-limbs-zero as equivalent to a valid representation + * of 0 regardless of the sign bit, there are exceptions, so bignum + * functions and external callers must always set \c s to +1 for the + * number zero. + * + * Note that this implies that calloc() or `... = {0}` does not create + * a valid MPI representation. You must call mbedtls_mpi_init(). + */ + int s; + + /** Total number of limbs in \c p. */ + size_t n; + + /** Pointer to limbs. + * + * This may be \c NULL if \c n is 0. + */ + mbedtls_mpi_uint *p; } mbedtls_mpi; @@ -282,7 +314,7 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * \param Y The MPI to be assigned from. This must point to an * initialized MPI. * \param assign The condition deciding whether to perform the - * assignment or not. Possible values: + * assignment or not. Must be either 0 or 1: * * \c 1: Perform the assignment `X = Y`. * * \c 0: Keep the original value of \p X. * @@ -293,6 +325,10 @@ void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p assign is neither 0 nor 1, the result of this function + * is indeterminate, and the resulting value in \p X might be + * neither its original value nor the value in \p Y. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. @@ -305,24 +341,28 @@ int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned * * \param X The first MPI. This must be initialized. * \param Y The second MPI. This must be initialized. - * \param assign The condition deciding whether to perform - * the swap or not. Possible values: + * \param swap The condition deciding whether to perform + * the swap or not. Must be either 0 or 1: * * \c 1: Swap the values of \p X and \p Y. * * \c 0: Keep the original values of \p X and \p Y. * * \note This function is equivalent to - * if( assign ) mbedtls_mpi_swap( X, Y ); + * if( swap ) mbedtls_mpi_swap( X, Y ); * except that it avoids leaking any information about whether - * the assignment was done or not (the above code may leak + * the swap was done or not (the above code may leak * information through branch prediction and/or memory access * patterns analysis). * + * \warning If \p swap is neither 0 nor 1, the result of this function + * is indeterminate, and both \p X and \p Y might end up with + * values different to either of the original ones. + * * \return \c 0 if successful. * \return #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed. * \return Another negative error code on other kinds of failure. * */ -int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign ); +int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char swap ); /** * \brief Store integer value in MPI. @@ -755,11 +795,11 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A or B. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. - * \param A The dividend. This must point to an initialized MPi. + * remainder is not needed. This must not alias A or B. + * \param A The dividend. This must point to an initialized MPI. * \param B The divisor. This must point to an initialized MPI. * * \return \c 0 if successful. @@ -776,10 +816,10 @@ int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, * * \param Q The destination MPI for the quotient. * This may be \c NULL if the value of the - * quotient is not needed. + * quotient is not needed. This must not alias A. * \param R The destination MPI for the remainder value. * This may be \c NULL if the value of the - * remainder is not needed. + * remainder is not needed. This must not alias A. * \param A The dividend. This must point to an initialized MPi. * \param b The divisor. * @@ -834,6 +874,7 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, * \brief Perform a sliding-window exponentiation: X = A^E mod N * * \param X The destination MPI. This must point to an initialized MPI. + * This must not alias E or N. * \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. diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h index 31137cd4c23..a3fc3638150 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/bn_mul.h @@ -94,13 +94,29 @@ #if defined(__GNUC__) && \ ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) +/* + * GCC < 5.0 treated the x86 ebx (which is used for the GOT) as a + * fixed reserved register when building as PIC, leading to errors + * like: bn_mul.h:46:13: error: PIC register clobbered by 'ebx' in 'asm' + * + * This is fixed by an improved register allocator in GCC 5+. From the + * release notes: + * Register allocation improvements: Reuse of the PIC hard register, + * instead of using a fixed register, was implemented on x86/x86-64 + * targets. This improves generated PIC code performance as more hard + * registers can be used. + */ +#if defined(__GNUC__) && __GNUC__ < 5 && defined(__PIC__) +#define MULADDC_CANNOT_USE_EBX +#endif + /* * Disable use of the i386 assembly code below if option -O0, to disable all * compiler optimisations, is passed, detected with __OPTIMIZE__ * This is done as the number of registers used in the assembly code doesn't * work with the -O0 option. */ -#if defined(__i386__) && defined(__OPTIMIZE__) +#if defined(__i386__) && defined(__OPTIMIZE__) && !defined(MULADDC_CANNOT_USE_EBX) #define MULADDC_INIT \ asm( \ @@ -563,10 +579,20 @@ "andi r7, r6, 0xffff \n\t" \ "bsrli r6, r6, 16 \n\t" -#define MULADDC_CORE \ +#if(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#define MULADDC_LHUI \ + "lhui r9, r3, 0 \n\t" \ + "addi r3, r3, 2 \n\t" \ + "lhui r8, r3, 0 \n\t" +#else +#define MULADDC_LHUI \ "lhui r8, r3, 0 \n\t" \ "addi r3, r3, 2 \n\t" \ - "lhui r9, r3, 0 \n\t" \ + "lhui r9, r3, 0 \n\t" +#endif + +#define MULADDC_CORE \ + MULADDC_LHUI \ "addi r3, r3, 2 \n\t" \ "mul r10, r9, r6 \n\t" \ "mul r11, r8, r7 \n\t" \ diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/check_config.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/check_config.h index be5c548e561..7ae1ff94db9 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/check_config.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/check_config.h @@ -525,6 +525,20 @@ #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously" #endif +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_ALT defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO defined, but not all prerequisites" +#endif + +#if defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO) &&\ + ( defined(MBEDTLS_PLATFORM_STD_VSNPRINTF) ||\ + defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) ) +#error "MBEDTLS_PLATFORM_VSNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_VSNPRINTF/MBEDTLS_PLATFORM_VSNPRINTF_ALT cannot be defined simultaneously" +#endif + #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\ !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites" @@ -650,10 +664,9 @@ MBEDTLS_ECDSA_C requires MBEDTLS_PK_WRITE_C to be defined." #endif -#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PKCS1_V15) && \ - !defined(MBEDTLS_PK_WRITE_C) && defined(MBEDTLS_PSA_CRYPTO_C) -#error "MBEDTLS_PSA_CRYPTO_C, MBEDTLS_RSA_C and MBEDTLS_PKCS1_V15 defined, \ - but not all prerequisites" +#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_RSA_C) && \ + !( defined(MBEDTLS_PK_PARSE_C) && defined(MBEDTLS_PK_WRITE_C) ) +#error "MBEDTLS_PSA_CRYPTO_C with MBEDTLS_RSA_C requires MBEDTLS_PK_PARSE_C and MBEDTLS_PK_WRITE_C" #endif #if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ @@ -812,6 +825,11 @@ #error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_TICKET_C) && \ + !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" +#endif + #if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) && \ !defined(MBEDTLS_SSL_PROTO_SSL3) && !defined(MBEDTLS_SSL_PROTO_TLS1) #error "MBEDTLS_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites" @@ -926,6 +944,10 @@ #error "MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH defined, but not all prerequisites" #endif +#if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) && !( defined(MBEDTLS_GCM_C) || defined(MBEDTLS_CCM_C) || defined(MBEDTLS_CHACHAPOLY_C) ) +#error "MBEDTLS_SSL_CONTEXT_SERIALIZATION defined, but not all prerequisites" +#endif + /* * Avoid warning from -pedantic. This is a convenient place for this * workaround since this is included by every single file before the diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config.h index 1cd6eb66348..61db79362f7 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config.h @@ -1329,7 +1329,7 @@ * Include backtrace information with each allocated block. * * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * GLIBC-compatible backtrace() an backtrace_symbols() support + * GLIBC-compatible backtrace() and backtrace_symbols() support * * Uncomment this macro to include backtrace information */ @@ -1620,6 +1620,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #define MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -2425,7 +2427,7 @@ * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * * \warning ARC4 is considered a weak cipher and its use constitutes a - * security risk. If possible, we recommend avoidng dependencies on + * security risk. If possible, we recommend avoiding dependencies on * it, and considering stronger ciphers instead. * */ @@ -3030,7 +3032,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/net_sockets.c * @@ -3400,7 +3402,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #define MBEDTLS_SSL_TICKET_C @@ -3456,7 +3459,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * @@ -3488,7 +3491,7 @@ * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h index 1bf750ad5ee..d27fb54b033 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/config_psa.h @@ -7,7 +7,7 @@ * those definitions to define symbols used in the library code. * * Users and integrators should not edit this file, please edit - * include/mbedtls/config.h for MBETLS_XXX settings or + * include/mbedtls/config.h for MBEDTLS_XXX settings or * include/psa/crypto_config.h for PSA_WANT_XXX settings. */ /* @@ -446,6 +446,8 @@ extern "C" { #if !defined(MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305) #if defined(PSA_WANT_KEY_TYPE_CHACHA20) #define MBEDTLS_CHACHAPOLY_C +#define MBEDTLS_CHACHA20_C +#define MBEDTLS_POLY1305_C #define MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 1 #endif /* PSA_WANT_KEY_TYPE_CHACHA20 */ #endif /* !MBEDTLS_PSA_ACCEL_ALG_CHACHA20_POLY1305 */ diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h index 264a638bb52..118f7cedb1e 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ecdsa.h @@ -309,10 +309,8 @@ int mbedtls_ecdsa_sign_det_ext( mbedtls_ecp_group *grp, mbedtls_mpi *r, * This must be initialized. * * \return \c 0 on success. - * \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the signature - * is invalid. * \return An \c MBEDTLS_ERR_ECP_XXX or \c MBEDTLS_MPI_XXX - * error code on failure for any other reason. + * error code on failure. */ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp, const unsigned char *buf, size_t blen, diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/md.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/md.h index 84fafd2ac77..9cea40a89c6 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/md.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/md.h @@ -215,7 +215,7 @@ MBEDTLS_CHECK_RETURN_TYPICAL int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ); /** - * \brief This function clones the state of an message-digest + * \brief This function clones the state of a message-digest * context. * * \note You must call mbedtls_md_setup() on \c dst before calling diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/platform.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/platform.h index 06dd192eab9..eaf5122bec7 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/platform.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/platform.h @@ -11,6 +11,13 @@ * implementations of these functions, or implementations specific to * their platform, which can be statically linked to the library or * dynamically configured at runtime. + * + * When all compilation options related to platform abstraction are + * disabled, this header just defines `mbedtls_xxx` function names + * as aliases to the standard `xxx` function. + * + * Most modules in the library and example programs are expected to + * include this header. */ /* * Copyright The Mbed TLS Contributors diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h index 63270d12394..f890aefaeec 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ripemd160.h @@ -74,7 +74,7 @@ void mbedtls_ripemd160_init( mbedtls_ripemd160_context *ctx ); void mbedtls_ripemd160_free( mbedtls_ripemd160_context *ctx ); /** - * \brief Clone (the state of) an RIPEMD-160 context + * \brief Clone (the state of) a RIPEMD-160 context * * \param dst The destination context * \param src The context to be cloned diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/rsa.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/rsa.h index 062df73aa06..8559f67bb97 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/rsa.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/rsa.h @@ -491,7 +491,7 @@ int mbedtls_rsa_check_pubkey( const mbedtls_rsa_context *ctx ); * the current function does not have access to them, * and therefore cannot check them. See mbedtls_rsa_complete(). * If you want to check the consistency of the entire - * content of an PKCS1-encoded RSA private key, for example, you + * content of a PKCS1-encoded RSA private key, for example, you * should use mbedtls_rsa_validate_params() before setting * up the RSA context. * Additionally, if the implementation performs empirical checks, diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl.h index 5064ec56891..aecac93f334 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl.h @@ -624,7 +624,7 @@ typedef int mbedtls_ssl_recv_t( void *ctx, * \param ctx Context for the receive callback (typically a file descriptor) * \param buf Buffer to write the received data to * \param len Length of the receive buffer - * \param timeout Maximum nomber of millisecondes to wait for data + * \param timeout Maximum number of milliseconds to wait for data * 0 means no timeout (potentially waiting forever) * * \return The callback must return the number of bytes received, @@ -652,7 +652,7 @@ typedef int mbedtls_ssl_recv_timeout_t( void *ctx, * for the associated \c mbedtls_ssl_get_timer_t callback to * return correct information. * - * \note If using a event-driven style of programming, an event must + * \note If using an event-driven style of programming, an event must * be generated when the final delay is passed. The event must * cause a call to \c mbedtls_ssl_handshake() with the proper * SSL context to be scheduled. Care must be taken to ensure @@ -2000,7 +2000,7 @@ int mbedtls_ssl_check_record( mbedtls_ssl_context const *ssl, * here, except if using an event-driven style. * * \note See also the "DTLS tutorial" article in our knowledge base. - * https://tls.mbed.org/kb/how-to/dtls-tutorial + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/dtls-tutorial */ void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl, void *p_timer, diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h index 46ade67b9c4..77ad755477a 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/ssl_internal.h @@ -782,7 +782,7 @@ struct mbedtls_ssl_transform #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) uint8_t in_cid_len; uint8_t out_cid_len; - unsigned char in_cid [ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; + unsigned char in_cid [ MBEDTLS_SSL_CID_IN_LEN_MAX ]; unsigned char out_cid[ MBEDTLS_SSL_CID_OUT_LEN_MAX ]; #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */ diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/version.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/version.h index 44adcbfe037..b3b441d46b6 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/version.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/version.h @@ -38,16 +38,16 @@ */ #define MBEDTLS_VERSION_MAJOR 2 #define MBEDTLS_VERSION_MINOR 28 -#define MBEDTLS_VERSION_PATCH 1 +#define MBEDTLS_VERSION_PATCH 2 /** * The single version number has the following structure: * MMNNPP00 * Major version | Minor version | Patch version */ -#define MBEDTLS_VERSION_NUMBER 0x021C0100 -#define MBEDTLS_VERSION_STRING "2.28.1" -#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.1" +#define MBEDTLS_VERSION_NUMBER 0x021C0200 +#define MBEDTLS_VERSION_STRING "2.28.2" +#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.28.2" #if defined(MBEDTLS_VERSION_C) diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto.h index d6d3e4f559f..faa3b9e3fb0 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto.h @@ -551,7 +551,7 @@ psa_status_t psa_copy_key(mbedtls_svc_key_id_t source_key, * \retval #PSA_ERROR_INVALID_HANDLE * \p key is not a valid identifier nor \c 0. * \retval #PSA_ERROR_COMMUNICATION_FAILURE - * There was an failure in communication with the cryptoprocessor. + * There was a failure in communication with the cryptoprocessor. * The key material may still be present in the cryptoprocessor. * \retval #PSA_ERROR_DATA_INVALID * This error is typically a result of either storage corruption on a diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h index a875b237041..711c43df785 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_builtin_composites.h @@ -43,6 +43,12 @@ #define MBEDTLS_PSA_BUILTIN_MAC #endif +#if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CCM) || \ + defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305) +#define MBEDTLS_PSA_BUILTIN_AEAD 1 +#endif + #if defined(MBEDTLS_PSA_BUILTIN_ALG_HMAC) || defined(PSA_CRYPTO_DRIVER_TEST) typedef struct { diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_compat.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_compat.h index 09ac488398f..0d184042e34 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_compat.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_compat.h @@ -44,7 +44,7 @@ typedef mbedtls_svc_key_id_t psa_key_handle_t; #define PSA_KEY_HANDLE_INIT MBEDTLS_SVC_KEY_ID_INIT -/** Check whether an handle is null. +/** Check whether a handle is null. * * \param handle Handle * diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_extra.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_extra.h index a48a4bb5eb9..a34d5516458 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_extra.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_extra.h @@ -356,7 +356,7 @@ psa_status_t mbedtls_psa_inject_entropy(const uint8_t *seed, */ #define PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) -/** Whether a key type is an DSA key (pair or public-only). */ +/** Whether a key type is a DSA key (pair or public-only). */ #define PSA_KEY_TYPE_IS_DSA(type) \ (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_platform.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_platform.h index 66f46879305..d3f518e3276 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_platform.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_platform.h @@ -60,8 +60,8 @@ * * The function psa_its_identifier_of_slot() in psa_crypto_storage.c that * translates a key identifier to a key storage file name assumes that - * mbedtls_key_owner_id_t is an 32 bits integer. This function thus needs - * reworking if mbedtls_key_owner_id_t is not defined as a 32 bits integer + * mbedtls_key_owner_id_t is a 32-bit integer. This function thus needs + * reworking if mbedtls_key_owner_id_t is not defined as a 32-bit integer * here anymore. */ typedef int32_t mbedtls_key_owner_id_t; diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h index 1dc8f9b5c40..f8f8c92e883 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_se_driver.h @@ -225,7 +225,7 @@ typedef psa_status_t (*psa_drv_se_mac_finish_t)(void *op_context, * operation by comparing the resulting MAC against a provided value * * \param[in,out] op_context A hardware-specific structure for the previously - * started MAC operation to be fiinished + * started MAC operation to be finished * \param[in] p_mac The MAC value against which the resulting MAC * will be compared against * \param[in] mac_length The size in bytes of the value stored in `p_mac` @@ -336,7 +336,7 @@ typedef struct { /** Function that completes a MAC operation with a verify check */ psa_drv_se_mac_finish_verify_t p_finish_verify; - /** Function that aborts a previoustly started MAC operation + /** Function that aborts a previously started MAC operation */ psa_drv_se_mac_abort_t p_abort; /** Function that performs a MAC operation in one call @@ -394,7 +394,7 @@ typedef psa_status_t (*psa_drv_se_cipher_setup_t)(psa_drv_se_context_t *drv_cont psa_encrypt_or_decrypt_t direction); /** \brief A function that sets the initialization vector (if - * necessary) for an secure element cipher operation + * necessary) for a secure element cipher operation * * Rationale: The `psa_se_cipher_*` operation in the PSA Cryptographic API has * two IV functions: one to set the IV, and one to generate it internally. The @@ -745,7 +745,7 @@ typedef psa_status_t (*psa_drv_se_aead_encrypt_t)(psa_drv_se_context_t *drv_cont size_t ciphertext_size, size_t *p_ciphertext_length); -/** A function that peforms a secure element authenticated decryption operation +/** A function that performs a secure element authenticated decryption operation * * \param[in,out] drv_context The driver context structure. * \param[in] key_slot Slot containing the key to use @@ -1156,7 +1156,7 @@ typedef struct { * * Different key derivation algorithms require a different number of inputs. * Instead of having an API that takes as input variable length arrays, which - * can be problemmatic to manage on embedded platforms, the inputs are passed + * can be problematic to manage on embedded platforms, the inputs are passed * to the driver via a function, `psa_drv_se_key_derivation_collateral`, that * is called multiple times with different `collateral_id`s. Thus, for a key * derivation algorithm that required 3 parameter inputs, the flow would look @@ -1270,7 +1270,7 @@ typedef struct { psa_drv_se_key_derivation_collateral_t p_collateral; /** Function that performs a final key derivation step */ psa_drv_se_key_derivation_derive_t p_derive; - /** Function that perforsm a final key derivation or agreement and + /** Function that performs a final key derivation or agreement and * exports the key */ psa_drv_se_key_derivation_export_t p_export; } psa_drv_se_key_derivation_t; diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h index 0d4532200e7..a0a52876bef 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_sizes.h @@ -716,7 +716,7 @@ (PSA_KEY_EXPORT_ASN1_INTEGER_MAX_SIZE(key_bits) + 11) /* Maximum size of the export encoding of an RSA key pair. - * Assumes thatthe public exponent is less than 2^32 and that the size + * Assumes that the public exponent is less than 2^32 and that the size * difference between the two primes is at most 1 bit. * * RSAPrivateKey ::= SEQUENCE { diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_types.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_types.h index 8f23021a45a..679cbc48e6a 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_types.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_types.h @@ -104,7 +104,7 @@ typedef uint8_t psa_ecc_family_t; * Values of this type are generally constructed by macros called * `PSA_DH_FAMILY_xxx`. * - * The group identifier is required to create an Diffie-Hellman key using the + * The group identifier is required to create a Diffie-Hellman key using the * PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY() * macros. * @@ -296,7 +296,7 @@ typedef psa_key_id_t mbedtls_svc_key_id_t; #else /* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */ /* Implementation-specific: The Mbed Cryptography library can be built as - * part of a multi-client service that exposes the PSA Cryptograpy API in each + * part of a multi-client service that exposes the PSA Cryptography API in each * client and encodes the client identity in the key identifier argument of * functions such as psa_open_key(). */ diff --git a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_values.h b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_values.h index 8b3a815ac19..a4b4927e9d0 100644 --- a/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_values.h +++ b/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/psa/crypto_values.h @@ -1195,7 +1195,7 @@ */ #define PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x05100500) -/* In the encoding of a AEAD algorithm, the bits corresponding to +/* In the encoding of an AEAD algorithm, the bits corresponding to * PSA_ALG_AEAD_TAG_LENGTH_MASK encode the length of the AEAD tag. * The constants for default lengths follow this encoding. */ @@ -1330,9 +1330,11 @@ * This is the signature scheme defined by RFC 8017 * (PKCS#1: RSA Cryptography Specifications) under the name * RSASSA-PSS, with the message generation function MGF1, and with - * a salt length equal to the length of the hash. The specified - * hash algorithm is used to hash the input message, to create the - * salted hash, and for the mask generation. + * a salt length equal to the length of the hash, or the largest + * possible salt length for the algorithm and key size if that is + * smaller than the hash length. The specified hash algorithm is + * used to hash the input message, to create the salted hash, and + * for the mask generation. * * \param hash_alg A hash algorithm (\c PSA_ALG_XXX value such that * #PSA_ALG_IS_HASH(\p hash_alg) is true). diff --git a/tools/sdk/esp32s3/include/mbedtls/port/include/mbedtls/esp_config.h b/tools/sdk/esp32s3/include/mbedtls/port/include/mbedtls/esp_config.h index 607d35ffc69..95bd65883c4 100644 --- a/tools/sdk/esp32s3/include/mbedtls/port/include/mbedtls/esp_config.h +++ b/tools/sdk/esp32s3/include/mbedtls/port/include/mbedtls/esp_config.h @@ -44,7 +44,12 @@ * The time does not need to be correct, only time differences are used, * by contrast with MBEDTLS_HAVE_TIME_DATE * - * Comment if your system does not support time functions + * Comment if your system does not support time functions. + * + * \note If MBEDTLS_TIMING_C is set - to enable the semi-portable timing + * interface - timing.c will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. */ #ifdef CONFIG_MBEDTLS_HAVE_TIME #define MBEDTLS_HAVE_TIME @@ -253,9 +258,8 @@ #define MBEDTLS_CIPHER_PADDING_ZEROS /** - * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES & MBEDTLS_ARC4_C + * \def MBEDTLS_ARC4_C * - * MBEDTLS_ARC4_C * Enable the ARCFOUR stream cipher. * * This module enables/disables the following ciphersuites @@ -270,7 +274,14 @@ * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA * - * MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * \warning ARC4 is considered a weak cipher and its use constitutes a + * security risk. If possible, we recommend avoiding dependencies on + * it, and considering stronger ciphers instead. + * + * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES + * + * Remove RC4 ciphersuites by default in SSL / TLS. + * * This flag removes the ciphersuites based on RC4 from the default list as * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them @@ -941,6 +952,8 @@ * saved after the handshake to allow for more efficient serialization, so if * you don't need this feature you'll save RAM by disabling it. * + * Requires: MBEDTLS_GCM_C or MBEDTLS_CCM_C or MBEDTLS_CHACHAPOLY_C + * * Comment to disable the context serialization APIs. */ #ifdef CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION @@ -976,7 +989,7 @@ * Enable support for RFC 7627: Session Hash and Extended Master Secret * Extension. * - * This was introduced as "the proper fix" to the Triple Handshake familiy of + * This was introduced as "the proper fix" to the Triple Handshake family of * attacks, but it is recommended to always use it (even if you disable * renegotiation), since it actually fixes a more fundamental issue in the * original SSL/TLS design, and has implications beyond Triple Handshake. @@ -1026,7 +1039,7 @@ * \note This option has no influence on the protection against the * triple handshake attack. Even if it is disabled, Mbed TLS will * still ensure that certificates do not change during renegotiation, - * for exaple by keeping a hash of the peer's certificate. + * for example by keeping a hash of the peer's certificate. * * Comment this macro to disable storing the peer's certificate * after the handshake. @@ -1209,7 +1222,7 @@ * unless you know for sure amplification cannot be a problem in the * environment in which your server operates. * - * \warning Disabling this can ba a security risk! (see above) + * \warning Disabling this can be a security risk! (see above) * * Requires: MBEDTLS_SSL_PROTO_DTLS * @@ -1944,7 +1957,7 @@ * * Requires: MBEDTLS_MD_C * - * Uncomment to enable the HMAC_DRBG random number geerator. + * Uncomment to enable the HMAC_DRBG random number generator. */ #define MBEDTLS_HMAC_DRBG_C @@ -1978,11 +1991,19 @@ /** * \def MBEDTLS_NET_C * - * Enable the TCP/IP networking routines. + * Enable the TCP and UDP over IPv6/IPv4 networking routines. * - * Module: library/net.c + * \note This module only works on POSIX/Unix (including Linux, BSD and OS X) + * and Windows. For other platforms, you'll want to disable it, and write your + * own networking callbacks to be passed to \c mbedtls_ssl_set_bio(). * - * This module provides TCP/IP networking routines. + * \note See also our Knowledge Base article about porting to a new + * environment: + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * + * Module: library/net_sockets.c + * + * This module provides networking routines. */ #ifdef MBEDTLS_NET_C #undef MBEDTLS_NET_C @@ -2070,7 +2091,7 @@ /** * \def MBEDTLS_PK_C * - * Enable the generic public (asymetric) key layer. + * Enable the generic public (asymmetric) key layer. * * Module: library/pk.c * Caller: library/ssl_tls.c @@ -2086,7 +2107,7 @@ /** * \def MBEDTLS_PK_PARSE_C * - * Enable the generic public (asymetric) key parser. + * Enable the generic public (asymmetric) key parser. * * Module: library/pkparse.c * Caller: library/mbedtls_x509_crt.c @@ -2101,7 +2122,7 @@ /** * \def MBEDTLS_PK_WRITE_C * - * Enable the generic public (asymetric) key writer. + * Enable the generic public (asymmetric) key writer. * * Module: library/pkwrite.c * Caller: library/x509write.c @@ -2290,7 +2311,8 @@ * Module: library/ssl_ticket.c * Caller: * - * Requires: MBEDTLS_CIPHER_C + * Requires: MBEDTLS_CIPHER_C && + * ( MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C ) */ #ifdef CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS #define MBEDTLS_SSL_TICKET_C @@ -2366,9 +2388,13 @@ * your own implementation of the whole module by setting * \c MBEDTLS_TIMING_ALT in the current file. * + * \note The timing module will include time.h on suitable platforms + * regardless of the setting of MBEDTLS_HAVE_TIME, unless + * MBEDTLS_TIMING_ALT is used. See timing.c for more information. + * * \note See also our Knowledge Base article about porting to a new * environment: - * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS + * https://mbed-tls.readthedocs.io/en/latest/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS * * Module: library/timing.c * Caller: library/havege.c @@ -2680,7 +2706,7 @@ * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. See also our Knowledge Base article about threading: - * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading + * https://mbed-tls.readthedocs.io/en/latest/kb/development/thread-safety-and-multi-threading * * Module: library/threading.c * diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_reg.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_reg.h index df7a70a56fa..94e6851ae01 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_reg.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_reg.h @@ -1732,6 +1732,9 @@ ing user data failed and the number of error bytes is over 6..*/ #define EFUSE_MEM_FORCE_PD_V 0x1 #define EFUSE_MEM_FORCE_PD_S 0 +#define EFUSE_WRITE_OP_CODE 0x5a5a +#define EFUSE_READ_OP_CODE 0x5aa5 + #define EFUSE_CONF_REG (DR_REG_EFUSE_BASE + 0x1CC) /* EFUSE_OP_CODE : R/W ;bitpos:[15:0] ;default: 16'h0 ; */ /*description: 0x5A5A: Operate programming command 0x5AA5: Operate read command..*/ diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_struct.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_struct.h index fb62d48ce77..2f6f821553a 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_struct.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/efuse_struct.h @@ -120,8 +120,10 @@ typedef volatile struct efuse_dev_s { } rd_repeat_data3; union { struct { - uint32_t reg_rpt4_reserved2 : 24; /*Reserved (used for four backups method).*/ - uint32_t reserved24 : 8; /*Reserved.*/ + uint32_t disable_wafer_version_major : 1; + uint32_t disable_blk_version_major : 1; + uint32_t reg_rpt4_reserved2 : 22; /*Reserved.*/ + uint32_t reserved24 : 8; /*Reserved.*/ }; uint32_t val; } rd_repeat_data4; @@ -136,18 +138,35 @@ typedef volatile struct efuse_dev_s { uint32_t rd_mac_spi_sys_2; union { struct { - uint32_t reg_spi_pad_conf_2 : 18; /*Stores the second part of SPI_PAD_CONF.*/ - uint32_t reg_sys_data_part0_0 : 14; /*Stores the fist 14 bits of the zeroth part of system data.*/ + uint32_t spi_pad_conf_2: 18; /*Stores the second part of SPI_PAD_CONF.*/ + uint32_t wafer_version_minor_low: 3; + uint32_t pkg_version: 3; + uint32_t blk_version_minor:3; + uint32_t reg_sys_data_part0_0: 5; }; uint32_t val; } rd_mac_spi_sys_3; uint32_t rd_mac_spi_sys_4; - uint32_t rd_mac_spi_sys_5; + union { + struct { + uint32_t reserved1: 23; + uint32_t wafer_version_minor_high: 1; + uint32_t wafer_version_major: 2; + uint32_t reserved2: 6; + }; + uint32_t val; + } rd_mac_spi_sys_5; uint32_t rd_sys_part1_data0; uint32_t rd_sys_part1_data1; uint32_t rd_sys_part1_data2; uint32_t rd_sys_part1_data3; - uint32_t rd_sys_part1_data4; + union { + struct { + uint32_t blk_version_major : 2; + uint32_t reserved1: 30; + }; + uint32_t val; + } rd_sys_part1_data4; uint32_t rd_sys_part1_data5; uint32_t rd_sys_part1_data6; uint32_t rd_sys_part1_data7; diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/gdma_channel.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/gdma_channel.h index 2aaf59c35ab..61878ccf125 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/gdma_channel.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/gdma_channel.h @@ -18,7 +18,7 @@ #define SOC_GDMA_TRIG_PERIPH_M2M0 (-1) #define SOC_GDMA_TRIG_PERIPH_SPI2 (0) #define SOC_GDMA_TRIG_PERIPH_SPI3 (1) -#define SOC_GDMA_TRIG_PERIPH_UART0 (2) +#define SOC_GDMA_TRIG_PERIPH_UHCI0 (2) #define SOC_GDMA_TRIG_PERIPH_I2S0 (3) #define SOC_GDMA_TRIG_PERIPH_I2S1 (4) #define SOC_GDMA_TRIG_PERIPH_LCD0 (5) diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/lcd_cam_struct.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/lcd_cam_struct.h index 7eeec503fcb..acb1d499c3b 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/lcd_cam_struct.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/lcd_cam_struct.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc.h index 8aab38acb65..977ce6e2d84 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc.h @@ -106,6 +106,7 @@ extern "C" { #define RTC_CNTL_PLL_BUF_WAIT_SLP_CYCLES (1) #define RTC_CNTL_CK8M_WAIT_SLP_CYCLES (4) #define RTC_CNTL_WAKEUP_DELAY_CYCLES (4) +#define RTC_CNTL_MIN_SLP_VAL_MIN (2) #define RTC_CNTL_CK8M_DFREQ_DEFAULT 100 #define RTC_CNTL_SCK_DCAP_DEFAULT 255 diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc_cntl_reg.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc_cntl_reg.h index 8fc99515ecf..e4ceaf0b62d 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc_cntl_reg.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/rtc_cntl_reg.h @@ -369,7 +369,6 @@ ork.*/ #define RTC_CNTL_MIN_SLP_VAL_M ((RTC_CNTL_MIN_SLP_VAL_V)<<(RTC_CNTL_MIN_SLP_VAL_S)) #define RTC_CNTL_MIN_SLP_VAL_V 0xFF #define RTC_CNTL_MIN_SLP_VAL_S 8 -#define RTC_CNTL_MIN_SLP_VAL_MIN 2 #define RTC_CNTL_TIMER6_REG (DR_REG_RTCCNTL_BASE + 0x30) /* RTC_CNTL_DG_PERI_POWERUP_TIMER : R/W ;bitpos:[31:25] ;default: 7'h8 ; */ diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/sdmmc_struct.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/sdmmc_struct.h index 599528a34a2..3f8e5f420e4 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/sdmmc_struct.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/sdmmc_struct.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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #include @@ -46,7 +38,9 @@ typedef struct sdmmc_desc_s { #define SDMMC_DMA_MAX_BUF_LEN 4096 +#ifndef __cplusplus _Static_assert(sizeof(sdmmc_desc_t) == 16, "invalid size of sdmmc_desc_t structure"); +#endif typedef struct sdmmc_hw_cmd_s { @@ -75,7 +69,9 @@ typedef struct sdmmc_hw_cmd_s { uint32_t start_command: 1; ///< Start command; once command is sent to the card, bit is cleared. } sdmmc_hw_cmd_t; ///< command format used in cmd register; this structure is defined to make it easier to build command values +#ifndef __cplusplus _Static_assert(sizeof(sdmmc_hw_cmd_t) == 4, "invalid size of sdmmc_cmd_t structure"); +#endif typedef volatile struct sdmmc_dev_s { @@ -392,7 +388,9 @@ typedef volatile struct sdmmc_dev_s { } sdmmc_dev_t; extern sdmmc_dev_t SDMMC; +#ifndef __cplusplus _Static_assert(sizeof(sdmmc_dev_t) == 0x804, "invalid size of sdmmc_dev_t structure"); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/soc_caps.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/soc_caps.h index 9028c37ac6b..795a6f4ce38 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/soc_caps.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/soc_caps.h @@ -113,9 +113,8 @@ #define SOC_GPIO_VALID_GPIO_MASK (0x1FFFFFFFFFFFFULL & ~(0ULL | BIT22 | BIT23 | BIT24 | BIT25)) // No GPIO is input only #define SOC_GPIO_VALID_OUTPUT_GPIO_MASK (SOC_GPIO_VALID_GPIO_MASK) - -// Support to configure slept status -#define SOC_GPIO_SUPPORT_SLP_SWITCH (1) +// digital I/O pad powered by VDD3P3_CPU or VDD_SPI(GPIO_NUM_26~GPIO_NUM_48) +#define SOC_GPIO_VALID_DIGITAL_IO_PAD_MASK 0x0001FFFFFC000000ULL /*-------------------------- Dedicated GPIO CAPS -----------------------------*/ #define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */ diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/syscon_reg.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/syscon_reg.h index f3f08c1e4fb..e22f18c92ee 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/syscon_reg.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/syscon_reg.h @@ -199,6 +199,7 @@ extern "C" { #define SYSTEM_WIFI_RST_M ((SYSTEM_WIFI_RST_V) << (SYSTEM_WIFI_RST_S)) #define SYSTEM_WIFI_RST_V 0xFFFFFFFF #define SYSTEM_WIFI_RST_S 0 + #define SYSTEM_WIFIBB_RST BIT(0) #define SYSTEM_FE_RST BIT(1) #define SYSTEM_WIFIMAC_RST BIT(2) @@ -213,6 +214,15 @@ extern "C" { #define SYSTEM_RW_BTLP_REG_RST BIT(12) /* Bluetooth Low Power Registers */ #define SYSTEM_BTBB_REG_RST BIT(13) /* Bluetooth Baseband Registers */ +#define MODEM_RESET_FIELD_WHEN_PU (SYSTEM_WIFIBB_RST | \ + SYSTEM_FE_RST | \ + SYSTEM_WIFIMAC_RST | \ + SYSTEM_BTBB_RST | \ + SYSTEM_BTMAC_RST | \ + SYSTEM_RW_BTMAC_RST | \ + SYSTEM_RW_BTMAC_REG_RST | \ + SYSTEM_BTBB_REG_RST) + #define SYSCON_HOST_INF_SEL_REG (DR_REG_SYSCON_BASE + 0x1C) /* SYSCON_PERI_IO_SWAP : R/W ;bitpos:[7:0] ;default: 8'h0 ; */ /*description: .*/ diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/timer_group_struct.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/timer_group_struct.h index 8d5e4a6be77..91d0c7293d4 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/timer_group_struct.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/timer_group_struct.h @@ -552,7 +552,9 @@ typedef struct { extern timg_dev_t TIMERG0; extern timg_dev_t TIMERG1; +#ifndef __cplusplus _Static_assert(sizeof(timg_dev_t) == 0x100, "Invalid size of timg_dev_t structure"); +#endif #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/twai_struct.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/twai_struct.h index df022feb471..3e873135206 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/twai_struct.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/twai_struct.h @@ -207,7 +207,9 @@ typedef volatile struct twai_dev_s { } clock_divider_reg; /* Address 0x007C */ } twai_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(twai_dev_t) == 128, "TWAI registers should be 32 * 4 bytes"); +#endif extern twai_dev_t TWAI; diff --git a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usbh_struct.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usb_dwc_struct.h similarity index 71% rename from tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usbh_struct.h rename to tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usb_dwc_struct.h index 182a6034d1d..0402c4a83ed 100644 --- a/tools/sdk/esp32s2/include/soc/esp32s2/include/soc/usbh_struct.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usb_dwc_struct.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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once @@ -48,7 +40,7 @@ typedef union { uint32_t reserved10: 10; }; uint32_t val; -} usb_gotgctl_reg_t; +} usb_dwc_gotgctl_reg_t; typedef union { struct { @@ -64,7 +56,7 @@ typedef union { uint32_t reserved12: 12; }; uint32_t val; -} usb_gotgint_reg_t; +} usb_dwc_gotgint_reg_t; typedef union { struct { @@ -83,7 +75,7 @@ typedef union { }; uint32_t val; //Checked -} usb_gahbcfg_reg_t; +} usb_dwc_gahbcfg_reg_t; typedef union { struct { @@ -105,7 +97,7 @@ typedef union { uint32_t corrupttxpkt: 1; }; uint32_t val; -} usb_gusbcfg_reg_t; +} usb_dwc_gusbcfg_reg_t; typedef union { struct { @@ -121,7 +113,7 @@ typedef union { uint32_t ahbidle: 1; }; uint32_t val; -} usb_grstctl_reg_t; +} usb_dwc_grstctl_reg_t; typedef union { struct { @@ -158,7 +150,7 @@ typedef union { uint32_t wkupint: 1; }; uint32_t val; -} usb_gintsts_reg_t; +} usb_dwc_gintsts_reg_t; typedef union { struct { @@ -195,7 +187,7 @@ typedef union { uint32_t wkupintmsk: 1; }; uint32_t val; -} usb_gintmsk_reg_t; +} usb_dwc_gintmsk_reg_t; typedef union { struct { @@ -207,7 +199,7 @@ typedef union { uint32_t reserved7: 7; }; uint32_t val; -} usb_grxstsr_reg_t; +} usb_dwc_grxstsr_reg_t; typedef union { struct { @@ -219,7 +211,7 @@ typedef union { uint32_t reserved7: 7; }; uint32_t val; -} usb_grxstsp_reg_t; +} usb_dwc_grxstsp_reg_t; typedef union { struct { @@ -227,7 +219,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_grxfsiz_reg_t; +} usb_dwc_grxfsiz_reg_t; typedef union { struct { @@ -235,7 +227,7 @@ typedef union { uint32_t nptxfdep: 16; }; uint32_t val; -} usb_gnptxfsiz_reg_t; +} usb_dwc_gnptxfsiz_reg_t; typedef union { struct { @@ -246,21 +238,21 @@ typedef union { uint32_t reserved1: 1; }; uint32_t val; -} usb_gnptxsts_reg_t; +} usb_dwc_gnptxsts_reg_t; typedef union { struct { uint32_t synopsysid; }; uint32_t val; -} usb_gsnpsid_reg_t; +} usb_dwc_gsnpsid_reg_t; typedef union { struct { uint32_t epdir; }; uint32_t val; -} usb_ghwcfg1_reg_t; +} usb_dwc_ghwcfg1_reg_t; typedef union { struct { @@ -281,7 +273,7 @@ typedef union { uint32_t reserved1b: 1; }; uint32_t val; -} usb_ghwcfg2_reg_t; +} usb_dwc_ghwcfg2_reg_t; typedef union { struct { @@ -299,7 +291,7 @@ typedef union { uint32_t dfifodepth: 16; }; uint32_t val; -} usb_ghwcfg3_reg_t; +} usb_dwc_ghwcfg3_reg_t; typedef union { struct { @@ -324,7 +316,7 @@ typedef union { uint32_t g_descdma: 1; }; uint32_t val; -} usb_ghwcfg4_reg_t; +} usb_dwc_ghwcfg4_reg_t; typedef union { struct { @@ -333,7 +325,7 @@ typedef union { }; uint32_t val; -} usb_gdfifocfg_reg_t; +} usb_dwc_gdfifocfg_reg_t; typedef union { struct { @@ -341,7 +333,7 @@ typedef union { uint32_t ptxfsize: 16; }; uint32_t val; -} usb_hptxfsiz_reg_t; +} usb_dwc_hptxfsiz_reg_t; typedef union { struct { @@ -349,7 +341,7 @@ typedef union { uint32_t inep1txfdep: 16; }; uint32_t val; -} usb_dieptxfi_reg_t; +} usb_dwc_dieptxfi_reg_t; typedef union { struct { @@ -367,7 +359,7 @@ typedef union { uint32_t modechtimen: 1; }; uint32_t val; -} usb_hcfg_reg_t; +} usb_dwc_hcfg_reg_t; typedef union { struct { @@ -376,7 +368,7 @@ typedef union { uint32_t reserved15: 15; }; uint32_t val; -} usb_hfir_reg_t; +} usb_dwc_hfir_reg_t; typedef union { struct { @@ -385,7 +377,7 @@ typedef union { uint32_t frrem: 16; }; uint32_t val; -} usb_hfnum_reg_t; +} usb_dwc_hfnum_reg_t; typedef union { struct { @@ -395,7 +387,7 @@ typedef union { uint32_t ptxqtop: 8; }; uint32_t val; -} usb_hptxsts_reg_t; +} usb_dwc_hptxsts_reg_t; typedef union { struct { @@ -403,7 +395,7 @@ typedef union { uint32_t reserved24: 24; }; uint32_t val; -} usb_haint_reg_t; +} usb_dwc_haint_reg_t; typedef union { struct { @@ -411,14 +403,14 @@ typedef union { uint32_t reserved24: 24; }; uint32_t val; -} usb_haintmsk_reg_t; +} usb_dwc_haintmsk_reg_t; typedef union { struct { uint32_t hflbaddr; }; uint32_t val; -} usb_hflbaddr_reg_t; +} usb_dwc_hflbaddr_reg_t; typedef union { struct { @@ -439,7 +431,7 @@ typedef union { uint32_t reserved13: 13; }; uint32_t val; -} usb_hprt_reg_t; +} usb_dwc_hprt_reg_t; typedef union { struct { @@ -456,8 +448,7 @@ typedef union { uint32_t chena: 1; }; uint32_t val; - //Checked with changes -} usb_hcchar_reg_t; +} usb_dwc_hcchar_reg_t; typedef union { struct { @@ -478,8 +469,7 @@ typedef union { uint32_t reserved18: 18; }; uint32_t val; - //Checked -} usb_hcint_reg_t; +} usb_dwc_hcint_reg_t; typedef union { struct { @@ -500,8 +490,7 @@ typedef union { uint32_t reserved18: 18; }; uint32_t val; - //Checked -} usb_hcintmsk_reg_t; +} usb_dwc_hcintmsk_reg_t; typedef union { struct { @@ -513,8 +502,7 @@ typedef union { uint32_t dopng: 1; }; uint32_t val; - //Checked -} usb_hctsiz_reg_t; +} usb_dwc_hctsiz_reg_t; typedef union { struct { @@ -527,15 +515,14 @@ typedef union { uint32_t dmaaddr_ctd: 29; } iso; uint32_t val; - //Checked -} usb_hcdma_reg_t; +} usb_dwc_hcdma_reg_t; typedef union { struct { uint32_t hcdmab; }; uint32_t val; -} usb_hcdmab_reg_t; +} usb_dwc_hcdmab_reg_t; typedef union { struct { @@ -554,7 +541,7 @@ typedef union { uint32_t resvalid: 6; }; uint32_t val; -} usb_dcfg_reg_t; +} usb_dwc_dcfg_reg_t; typedef union { struct { @@ -577,7 +564,7 @@ typedef union { uint32_t reserved3: 13; }; uint32_t val; -} usb_dctl_reg_t; +} usb_dwc_dctl_reg_t; typedef union { struct { @@ -590,7 +577,7 @@ typedef union { uint32_t reserved8: 8; }; uint32_t val; -} usb_dsts_reg_t; +} usb_dwc_dsts_reg_t; typedef union { struct { @@ -609,7 +596,7 @@ typedef union { uint32_t reserved18: 18; }; uint32_t val; -} usb_diepmsk_reg_t; +} usb_dwc_diepmsk_reg_t; typedef union { struct { @@ -630,7 +617,7 @@ typedef union { uint32_t reserved17: 17; }; uint32_t val; -} usb_doepmsk_reg_t; +} usb_dwc_doepmsk_reg_t; typedef union { struct { @@ -652,7 +639,7 @@ typedef union { uint32_t reserved9b: 9; }; uint32_t val; -} usb_daint_reg_t; +} usb_dwc_daint_reg_t; typedef union { struct { @@ -674,7 +661,7 @@ typedef union { uint32_t reserved9b: 9; }; uint32_t val; -} usb_daintmsk_reg_t; +} usb_dwc_daintmsk_reg_t; typedef union { struct { @@ -682,7 +669,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_dvbusdis_reg_t; +} usb_dwc_dvbusdis_reg_t; typedef union { struct { @@ -690,7 +677,7 @@ typedef union { uint32_t reserved20: 20; }; uint32_t val; -} usb_dvbuspulse_reg_t; +} usb_dwc_dvbuspulse_reg_t; typedef union { struct { @@ -706,7 +693,7 @@ typedef union { uint32_t reserved4: 4; }; uint32_t val; -} usb_dthrctl_reg_t; +} usb_dwc_dthrctl_reg_t; typedef union { struct { @@ -714,7 +701,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_diepempmsk_reg_t; +} usb_dwc_diepempmsk_reg_t; typedef union { struct { @@ -735,7 +722,7 @@ typedef union { uint32_t epena0: 1; }; uint32_t val; -} usb_diepctl0_reg_t; +} usb_dwc_diepctl0_reg_t; typedef union { struct { @@ -757,7 +744,7 @@ typedef union { uint32_t reserved17: 17; }; uint32_t val; -} usb_diepint0_reg_t; +} usb_dwc_diepint0_reg_t; typedef union { struct { @@ -767,14 +754,14 @@ typedef union { uint32_t reserved11: 11; }; uint32_t val; -} usb_dieptsiz0_reg_t; +} usb_dwc_dieptsiz0_reg_t; typedef union { struct { uint32_t dmaaddr0; }; uint32_t val; -} usb_diepdma0_reg_t; +} usb_dwc_diepdma0_reg_t; typedef union { struct { @@ -782,14 +769,14 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_dtxfsts0_reg_t; +} usb_dwc_dtxfsts0_reg_t; typedef union { struct { uint32_t dmabufferaddr0; }; uint32_t val; -} usb_diepdmab0_reg_t; +} usb_dwc_diepdmab0_reg_t; typedef union { struct { @@ -811,7 +798,7 @@ typedef union { uint32_t epena: 1; }; uint32_t val; -} usb_diepctl_reg_t; +} usb_dwc_diepctl_reg_t; typedef union { struct { @@ -833,7 +820,7 @@ typedef union { uint32_t reserved15: 17; }; uint32_t val; -} usb_diepint_reg_t; +} usb_dwc_diepint_reg_t; typedef union { struct { @@ -843,14 +830,14 @@ typedef union { uint32_t reserved11: 11; }; uint32_t val; -} usb_dieptsiz_reg_t; +} usb_dwc_dieptsiz_reg_t; typedef union { struct { uint32_t dmaddr1; }; uint32_t val; -} usb_diepdma_reg_t; +} usb_dwc_diepdma_reg_t; typedef union { struct { @@ -858,14 +845,14 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_dtxfsts_reg_t; +} usb_dwc_dtxfsts_reg_t; typedef union { struct { uint32_t dmabufferaddr1; }; uint32_t val; -} usb_diepdmab_reg_t; +} usb_dwc_diepdmab_reg_t; typedef union { struct { @@ -885,7 +872,7 @@ typedef union { uint32_t epena0: 1; }; uint32_t val; -} usb_doepctl0_reg_t; +} usb_dwc_doepctl0_reg_t; typedef union { struct { @@ -908,7 +895,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_doepint0_reg_t; +} usb_dwc_doepint0_reg_t; typedef union { struct { @@ -920,21 +907,21 @@ typedef union { uint32_t reserved1: 1; }; uint32_t val; -} usb_doeptsiz0_reg_t; +} usb_dwc_doeptsiz0_reg_t; typedef union { struct { uint32_t dmaaddr0; }; uint32_t val; -} usb_doepdma0_reg_t; +} usb_dwc_doepdma0_reg_t; typedef union { struct { uint32_t dmabufferaddr0; }; uint32_t val; -} usb_doepdmab0_reg_t; +} usb_dwc_doepdmab0_reg_t; typedef union { struct { @@ -955,7 +942,7 @@ typedef union { uint32_t epena: 1; }; uint32_t val; -} usb_doepctl_reg_t; +} usb_dwc_doepctl_reg_t; typedef union { struct { @@ -978,7 +965,7 @@ typedef union { uint32_t reserved16: 16; }; uint32_t val; -} usb_doepint_reg_t; +} usb_dwc_doepint_reg_t; typedef union { struct { @@ -990,21 +977,21 @@ typedef union { uint32_t reserved1: 1; }; uint32_t val; -} usb_doeptsiz_reg_t; +} usb_dwc_doeptsiz_reg_t; typedef union { struct { uint32_t dmaaddr; }; uint32_t val; -} usb_doepdma_reg_t; +} usb_dwc_doepdma_reg_t; typedef union { struct { uint32_t dmabufferaddr; }; uint32_t val; -} usb_doepdmab_reg_t; +} usb_dwc_doepdmab_reg_t; typedef union { struct { @@ -1019,143 +1006,145 @@ typedef union { uint32_t reserved23: 23; }; uint32_t val; -} usb_pcgcctl_reg_t; +} usb_dwc_pcgcctl_reg_t; /* --------------------------- Register Groups ------------------------------ */ typedef struct { - volatile usb_hcchar_reg_t hcchar_reg; //0x00 - uint32_t reserved_0x04_0x08[1]; //0x04 - volatile usb_hcint_reg_t hcint_reg; //0x08 - volatile usb_hcintmsk_reg_t hcintmsk_reg; //0x0c - volatile usb_hctsiz_reg_t hctsiz_reg; //0x10 - volatile usb_hcdma_reg_t hcdma_reg; //0x14 - uint32_t reserved_0x14_0x14[1]; //0x18* - volatile usb_hcdmab_reg_t hcdmab_reg; //0x1c -} usb_host_chan_regs_t; + volatile usb_dwc_hcchar_reg_t hcchar_reg; // 0x00 + uint32_t reserved_0x04_0x08[1]; // 0x04 + volatile usb_dwc_hcint_reg_t hcint_reg; // 0x08 + volatile usb_dwc_hcintmsk_reg_t hcintmsk_reg; // 0x0c + volatile usb_dwc_hctsiz_reg_t hctsiz_reg; // 0x10 + volatile usb_dwc_hcdma_reg_t hcdma_reg; // 0x14 + uint32_t reserved_0x14_0x14[1]; // 0x18 + volatile usb_dwc_hcdmab_reg_t hcdmab_reg; // 0x1c +} usb_dwc_host_chan_regs_t; typedef struct { - volatile usb_diepctl_reg_t diepctl_reg; //0x00 - uint32_t reserved_0x04_0x08[1]; //0x04 - volatile usb_diepint_reg_t diepint_reg; //0x08 - uint32_t reserved_0x0c_0x10[1]; //0x0c - volatile usb_dieptsiz_reg_t dieptsiz_reg; //0x010 - volatile usb_diepdma_reg_t diepdma_reg; //0x14 - volatile usb_dtxfsts_reg_t dtxfsts_reg; //0x18 - volatile usb_diepdmab_reg_t diepdmab_reg; //0x1c -} usb_in_ep_regs_t; + volatile usb_dwc_diepctl_reg_t diepctl_reg; // 0x00 + uint32_t reserved_0x04_0x08[1]; // 0x04 + volatile usb_dwc_diepint_reg_t diepint_reg; // 0x08 + uint32_t reserved_0x0c_0x10[1]; // 0x0c + volatile usb_dwc_dieptsiz_reg_t dieptsiz_reg; // 0x010 + volatile usb_dwc_diepdma_reg_t diepdma_reg; // 0x14 + volatile usb_dwc_dtxfsts_reg_t dtxfsts_reg; // 0x18 + volatile usb_dwc_diepdmab_reg_t diepdmab_reg; // 0x1c +} usb_dwc_in_ep_regs_t; typedef struct { - volatile usb_doepctl_reg_t doepctl_reg; //0x00 - uint32_t reserved_0x04_0x08[1]; //0x04 - volatile usb_doepint_reg_t doepint_reg; //0x08 - uint32_t reserved_0x0c_0x10[1]; //0x0c - volatile usb_doeptsiz_reg_t doeptsiz_reg; //0x10 - volatile usb_doepdma_reg_t doepdma_reg; //0x14 - uint32_t reserved_0x18_0x1c[1]; //0x18 - volatile usb_doepdmab_reg_t doepdmab_reg; //0x1c -} usb_out_ep_regs_t; + volatile usb_dwc_doepctl_reg_t doepctl_reg; // 0x00 + uint32_t reserved_0x04_0x08[1]; // 0x04 + volatile usb_dwc_doepint_reg_t doepint_reg; // 0x08 + uint32_t reserved_0x0c_0x10[1]; // 0x0c + volatile usb_dwc_doeptsiz_reg_t doeptsiz_reg; // 0x10 + volatile usb_dwc_doepdma_reg_t doepdma_reg; // 0x14 + uint32_t reserved_0x18_0x1c[1]; // 0x18 + volatile usb_dwc_doepdmab_reg_t doepdmab_reg; // 0x1c +} usb_dwc_out_ep_regs_t; /* --------------------------- Register Layout ------------------------------ */ typedef struct { //Global Registers - volatile usb_gotgctl_reg_t gotgctl_reg; //0x0000 - volatile usb_gotgint_reg_t gotgint_reg; //0x0004 - volatile usb_gahbcfg_reg_t gahbcfg_reg; //0x0008 - volatile usb_gusbcfg_reg_t gusbcfg_reg; //0x000c - volatile usb_grstctl_reg_t grstctl_reg; //0x0010 - volatile usb_gintsts_reg_t gintsts_reg; //0x0014 - volatile usb_gintmsk_reg_t gintmsk_reg; //0x0018 - volatile usb_grxstsr_reg_t grxstsr_reg; //0x001c - volatile usb_grxstsp_reg_t grxstsp_reg; //0x0020 - volatile usb_grxfsiz_reg_t grxfsiz_reg; //0x0024 - volatile usb_gnptxfsiz_reg_t gnptxfsiz_reg; //0x0028 - volatile usb_gnptxsts_reg_t gnptxsts_reg; //0x002c - uint32_t reserved_0x0030_0x0040[4]; //0x0030 to 0x0040 - volatile usb_gsnpsid_reg_t gsnpsid_reg; //0x0040 - volatile usb_ghwcfg1_reg_t ghwcfg1_reg; //0x0044 - volatile usb_ghwcfg2_reg_t ghwcfg2_reg; //0x0048 - volatile usb_ghwcfg3_reg_t ghwcfg3_reg; //0x004c - volatile usb_ghwcfg4_reg_t ghwcfg4_reg; //0x0050 - uint32_t reserved_0x0054_0x005c[2]; //0x0054 to 0x005c + volatile usb_dwc_gotgctl_reg_t gotgctl_reg; // 0x0000 + volatile usb_dwc_gotgint_reg_t gotgint_reg; // 0x0004 + volatile usb_dwc_gahbcfg_reg_t gahbcfg_reg; // 0x0008 + volatile usb_dwc_gusbcfg_reg_t gusbcfg_reg; // 0x000c + volatile usb_dwc_grstctl_reg_t grstctl_reg; // 0x0010 + volatile usb_dwc_gintsts_reg_t gintsts_reg; // 0x0014 + volatile usb_dwc_gintmsk_reg_t gintmsk_reg; // 0x0018 + volatile usb_dwc_grxstsr_reg_t grxstsr_reg; // 0x001c + volatile usb_dwc_grxstsp_reg_t grxstsp_reg; // 0x0020 + volatile usb_dwc_grxfsiz_reg_t grxfsiz_reg; // 0x0024 + volatile usb_dwc_gnptxfsiz_reg_t gnptxfsiz_reg; // 0x0028 + volatile usb_dwc_gnptxsts_reg_t gnptxsts_reg; // 0x002c + uint32_t reserved_0x0030_0x0040[4]; // 0x0030 to 0x0040 + volatile usb_dwc_gsnpsid_reg_t gsnpsid_reg; // 0x0040 + volatile usb_dwc_ghwcfg1_reg_t ghwcfg1_reg; // 0x0044 + volatile usb_dwc_ghwcfg2_reg_t ghwcfg2_reg; // 0x0048 + volatile usb_dwc_ghwcfg3_reg_t ghwcfg3_reg; // 0x004c + volatile usb_dwc_ghwcfg4_reg_t ghwcfg4_reg; // 0x0050 + uint32_t reserved_0x0054_0x005c[2]; // 0x0054 to 0x005c //FIFO Configurations - volatile usb_gdfifocfg_reg_t gdfifocfg_reg; //0x005c - uint32_t reserved_0x0060_0x0100[40]; //0x0060 to 0x0100 - volatile usb_hptxfsiz_reg_t hptxfsiz_reg; //0x0100 - volatile usb_dieptxfi_reg_t dieptxfi_regs[4]; //0x0104 to 0x0114 - usb_dieptxfi_reg_t reserved_0x0114_0x0140[11]; //0x0114 to 0x0140 - uint32_t reserved_0x140_0x400[176]; //0x0140 to 0x0400 + volatile usb_dwc_gdfifocfg_reg_t gdfifocfg_reg; // 0x005c + uint32_t reserved_0x0060_0x0100[40]; // 0x0060 to 0x0100 + volatile usb_dwc_hptxfsiz_reg_t hptxfsiz_reg; // 0x0100 + volatile usb_dwc_dieptxfi_reg_t dieptxfi_regs[4]; // 0x0104 to 0x0114 + usb_dwc_dieptxfi_reg_t reserved_0x0114_0x0140[11]; // 0x0114 to 0x0140 + uint32_t reserved_0x140_0x400[176]; // 0x0140 to 0x0400 //Host Mode Registers - volatile usb_hcfg_reg_t hcfg_reg; //0x0400 - volatile usb_hfir_reg_t hfir_reg; //0x0404 - volatile usb_hfnum_reg_t hfnum_reg; //0x0408 - uint32_t reserved_0x40c_0x410[1]; //0x040c to 0x0410 - volatile usb_hptxsts_reg_t hptxsts_reg; //0x0410 - volatile usb_haint_reg_t haint_reg; //0x0414 - volatile usb_haintmsk_reg_t haintmsk_reg; //0x0418 - volatile usb_hflbaddr_reg_t hflbaddr_reg; //0x041c - uint32_t reserved_0x420_0x440[8]; //0x0420 to 0x0440 - volatile usb_hprt_reg_t hprt_reg; //0x0440 - uint32_t reserved_0x0444_0x0500[47]; //0x0444 to 0x0500 - usb_host_chan_regs_t host_chans[8]; //0x0500 to 0x0600 - usb_host_chan_regs_t reserved_0x0600_0x0700[8]; //0x0600 to 0x0700 - uint32_t reserved_0x0700_0x0800[64]; //0x0700 to 0x0800 - volatile usb_dcfg_reg_t dcfg_reg; //0x0800 - volatile usb_dctl_reg_t dctl_reg; //0x0804 - volatile usb_dsts_reg_t dsts_reg; //0x0808 - uint32_t reserved_0x080c_0x0810[1]; //0x080c to 0x0810 + volatile usb_dwc_hcfg_reg_t hcfg_reg; // 0x0400 + volatile usb_dwc_hfir_reg_t hfir_reg; // 0x0404 + volatile usb_dwc_hfnum_reg_t hfnum_reg; // 0x0408 + uint32_t reserved_0x40c_0x410[1]; // 0x040c to 0x0410 + volatile usb_dwc_hptxsts_reg_t hptxsts_reg; // 0x0410 + volatile usb_dwc_haint_reg_t haint_reg; // 0x0414 + volatile usb_dwc_haintmsk_reg_t haintmsk_reg; // 0x0418 + volatile usb_dwc_hflbaddr_reg_t hflbaddr_reg; // 0x041c + uint32_t reserved_0x420_0x440[8]; // 0x0420 to 0x0440 + volatile usb_dwc_hprt_reg_t hprt_reg; // 0x0440 + uint32_t reserved_0x0444_0x0500[47]; // 0x0444 to 0x0500 + usb_dwc_host_chan_regs_t host_chans[8]; // 0x0500 to 0x0600 + usb_dwc_host_chan_regs_t reserved_0x0600_0x0700[8]; // 0x0600 to 0x0700 + uint32_t reserved_0x0700_0x0800[64]; // 0x0700 to 0x0800 + volatile usb_dwc_dcfg_reg_t dcfg_reg; // 0x0800 + volatile usb_dwc_dctl_reg_t dctl_reg; // 0x0804 + volatile usb_dwc_dsts_reg_t dsts_reg; // 0x0808 + uint32_t reserved_0x080c_0x0810[1]; // 0x080c to 0x0810 //Device Mode Registers - volatile usb_diepmsk_reg_t diepmsk_reg; //0x810 - volatile usb_doepmsk_reg_t doepmsk_reg; //0x0814 - volatile usb_daint_reg_t daint_reg; //0x0818 - volatile usb_daintmsk_reg_t daintmsk_reg; //0x081c - uint32_t reserved_0x0820_0x0828[2]; //0x0820 to 0x0828 - volatile usb_dvbusdis_reg_t dvbusdis_reg; //0x0828 - volatile usb_dvbuspulse_reg_t dvbuspulse_reg; //0x082c - volatile usb_dthrctl_reg_t dthrctl_reg; //0x0830 - volatile usb_diepempmsk_reg_t diepempmsk_reg; //0x0834 - uint32_t reserved_0x0838_0x0900[50]; //0x0838 to 0x0900 + volatile usb_dwc_diepmsk_reg_t diepmsk_reg; // 0x810 + volatile usb_dwc_doepmsk_reg_t doepmsk_reg; // 0x0814 + volatile usb_dwc_daint_reg_t daint_reg; // 0x0818 + volatile usb_dwc_daintmsk_reg_t daintmsk_reg; // 0x081c + uint32_t reserved_0x0820_0x0828[2]; // 0x0820 to 0x0828 + volatile usb_dwc_dvbusdis_reg_t dvbusdis_reg; // 0x0828 + volatile usb_dwc_dvbuspulse_reg_t dvbuspulse_reg; // 0x082c + volatile usb_dwc_dthrctl_reg_t dthrctl_reg; // 0x0830 + volatile usb_dwc_diepempmsk_reg_t diepempmsk_reg; // 0x0834 + uint32_t reserved_0x0838_0x0900[50]; // 0x0838 to 0x0900 //Deivce: IN EP0 reigsters - volatile usb_diepctl0_reg_t diepctl0_reg; //0x0900 - uint32_t reserved_0x0904_0x0908[1]; //0x0904 to 0x0908 - volatile usb_diepint0_reg_t diepint0_reg; //0x0908 - uint32_t reserved_0x090c_0x0910[1]; //0x090c to 0x0910 - volatile usb_dieptsiz0_reg_t dieptsiz0_reg; //0x0910 - volatile usb_diepdma0_reg_t diepdma0_reg; //0x0914 - volatile usb_dtxfsts0_reg_t dtxfsts0_reg; //0x0918 - volatile usb_diepdmab0_reg_t diepdmab0_reg; //0x091c + volatile usb_dwc_diepctl0_reg_t diepctl0_reg; // 0x0900 + uint32_t reserved_0x0904_0x0908[1]; // 0x0904 to 0x0908 + volatile usb_dwc_diepint0_reg_t diepint0_reg; // 0x0908 + uint32_t reserved_0x090c_0x0910[1]; // 0x090c to 0x0910 + volatile usb_dwc_dieptsiz0_reg_t dieptsiz0_reg; // 0x0910 + volatile usb_dwc_diepdma0_reg_t diepdma0_reg; // 0x0914 + volatile usb_dwc_dtxfsts0_reg_t dtxfsts0_reg; // 0x0918 + volatile usb_dwc_diepdmab0_reg_t diepdmab0_reg; // 0x091c //Deivce: IN EP registers - usb_in_ep_regs_t in_eps[6]; //0x0920 to 0x09e0 - usb_in_ep_regs_t reserved_0x09e0_0x0b00[9]; //0x09e0 to 0x0b00 + usb_dwc_in_ep_regs_t in_eps[6]; // 0x0920 to 0x09e0 + usb_dwc_in_ep_regs_t reserved_0x09e0_0x0b00[9]; // 0x09e0 to 0x0b00 //Device: OUT EP0 reigsters - volatile usb_doepctl0_reg_t doepctl0_reg; //0x0b00 - uint32_t reserved_0x0b04_0x0b08[1]; //0x0b04 to 0x0b08 - volatile usb_doepint0_reg_t doepint0_reg; //0b0b08 - uint32_t reserved_0x0b0c_0x0b10[1]; //0x0b0c to 0x0b10 - volatile usb_doeptsiz0_reg_t doeptsiz0_reg; //0x0b10 - volatile usb_doepdma0_reg_t doepdma0_reg; //0x0b14 - uint32_t reserved_0x0b18_0x0b1c[1]; //0x0b18 to 0x0b1c - volatile usb_doepdmab0_reg_t doepdmab0_reg; //0x0b1c + volatile usb_dwc_doepctl0_reg_t doepctl0_reg; // 0x0b00 + uint32_t reserved_0x0b04_0x0b08[1]; // 0x0b04 to 0x0b08 + volatile usb_dwc_doepint0_reg_t doepint0_reg; // 0b0b08 + uint32_t reserved_0x0b0c_0x0b10[1]; // 0x0b0c to 0x0b10 + volatile usb_dwc_doeptsiz0_reg_t doeptsiz0_reg; // 0x0b10 + volatile usb_dwc_doepdma0_reg_t doepdma0_reg; // 0x0b14 + uint32_t reserved_0x0b18_0x0b1c[1]; // 0x0b18 to 0x0b1c + volatile usb_dwc_doepdmab0_reg_t doepdmab0_reg; // 0x0b1c //Deivce: OUT EP registers - usb_out_ep_regs_t out_eps[6]; //0xb1c - usb_out_ep_regs_t reserved_0x0be0_0x0d00[9]; //0x0be0 to 0x0d00 - uint32_t reserved_0x0d00_0x0e00[64]; //0x0d00 to 0x0e00 - volatile usb_pcgcctl_reg_t pcgcctl_reg; //0x0e00 - uint32_t reserved_0x0e04_0x0e08[1]; //0x0d00 to 0x0e00 -} usbh_dev_t; + usb_dwc_out_ep_regs_t out_eps[6]; // 0xb1c + usb_dwc_out_ep_regs_t reserved_0x0be0_0x0d00[9]; // 0x0be0 to 0x0d00 + uint32_t reserved_0x0d00_0x0e00[64]; // 0x0d00 to 0x0e00 + volatile usb_dwc_pcgcctl_reg_t pcgcctl_reg; // 0x0e00 + uint32_t reserved_0x0e04_0x0e08[1]; // 0x0d00 to 0x0e00 +} usb_dwc_dev_t; -_Static_assert(sizeof(usbh_dev_t) == 0xe08, "USB new struct should be 0xe08 large"); +#ifndef __cplusplus +_Static_assert(sizeof(usb_dwc_dev_t) == 0xe08, "Invalid size of usb_dwc_dev_t structure"); +#endif -extern usbh_dev_t USBH; +extern usb_dwc_dev_t USB_DWC; #ifdef __cplusplus diff --git a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usb_wrap_struct.h b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usb_wrap_struct.h index 3df4106cd5b..ac0b8710341 100644 --- a/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usb_wrap_struct.h +++ b/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/usb_wrap_struct.h @@ -434,7 +434,9 @@ typedef struct { volatile usb_wrap_date_reg_t date; } usb_wrap_dev_t; +#ifndef __cplusplus _Static_assert(sizeof(usb_wrap_dev_t)==0x400, "Invalid USB_WRAP size"); +#endif extern usb_wrap_dev_t USB_WRAP; diff --git a/tools/sdk/esp32s3/include/soc/include/soc/efuse_periph.h b/tools/sdk/esp32s3/include/soc/include/soc/efuse_periph.h index 76a118e3b68..a7fc65042c6 100644 --- a/tools/sdk/esp32s3/include/soc/include/soc/efuse_periph.h +++ b/tools/sdk/esp32s3/include/soc/include/soc/efuse_periph.h @@ -14,3 +14,4 @@ #pragma once #include "soc/efuse_reg.h" +#include "soc/efuse_struct.h" diff --git a/tools/sdk/esp32s3/include/spi_flash/include/esp_flash.h b/tools/sdk/esp32s3/include/spi_flash/include/esp_flash.h index c5adb279dcd..3529898bce6 100644 --- a/tools/sdk/esp32s3/include/spi_flash/include/esp_flash.h +++ b/tools/sdk/esp32s3/include/spi_flash/include/esp_flash.h @@ -103,7 +103,8 @@ struct esp_flash_t { uint32_t size; ///< Size of SPI flash in bytes. If 0, size will be detected during initialisation. uint32_t chip_id; ///< Detected chip id. uint32_t busy :1; ///< This flag is used to verify chip's status. - uint32_t reserved_flags :31; ///< reserved. + uint32_t hpm_dummy_ena :1; ///< This flag is used to verify whether flash works under HPM status. + uint32_t reserved_flags :30; ///< reserved. }; diff --git a/tools/sdk/esp32s3/include/spi_flash/include/esp_private/spi_flash_os.h b/tools/sdk/esp32s3/include/spi_flash/include/esp_private/spi_flash_os.h index 996606dbcee..f2a89112eb6 100644 --- a/tools/sdk/esp32s3/include/spi_flash/include/esp_private/spi_flash_os.h +++ b/tools/sdk/esp32s3/include/spi_flash/include/esp_private/spi_flash_os.h @@ -35,6 +35,7 @@ #include "esp_flash.h" #include "hal/spi_flash_hal.h" #include "soc/soc_caps.h" +#include "spi_flash_override.h" #ifdef __cplusplus extern "C" { @@ -138,6 +139,28 @@ bool spi_timing_is_tuned(void); */ void spi_flash_set_vendor_required_regs(void); +/** + * @brief Enable SPI flash high performance mode. + * + * @return ESP_OK if success. + */ +esp_err_t spi_flash_enable_high_performance_mode(void); + +/** + * @brief Get the flash dummy through this function + * This can be used when one flash has several dummy configurations to enable the high performance mode. + * @note Don't forget to subtract one when assign to the register of mspi e.g. if the value you get is 4, (4-1=3) should be assigned to the register. + * + * @return Pointer to spi_flash_hpm_dummy_conf_t. + */ +const spi_flash_hpm_dummy_conf_t *spi_flash_hpm_get_dummy(void); + +/** + * @brief Used to judge whether flash works under HPM mode with dummy adjustment. + * + * @return true Yes, and work under HPM with adjusting dummy. Otherwise, false. + */ +bool spi_flash_hpm_dummy_adjust(void); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/spi_flash/include/spi_flash/spi_flash_defs.h b/tools/sdk/esp32s3/include/spi_flash/include/spi_flash/spi_flash_defs.h index 1ff0bfdea5c..b248b24dcde 100644 --- a/tools/sdk/esp32s3/include/spi_flash/include/spi_flash/spi_flash_defs.h +++ b/tools/sdk/esp32s3/include/spi_flash/include/spi_flash/spi_flash_defs.h @@ -1,16 +1,8 @@ -// Copyright 2015-2019 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-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once @@ -52,6 +44,7 @@ #define CMD_PROGRAM_PAGE_4B 0x12 #define CMD_SUSPEND 0x75 #define CMD_RESUME 0x7A +#define CMD_HPMEN 0xA3 /* Enable High Performance mode on flash */ #define CMD_RST_EN 0x66 #define CMD_RST_DEV 0x99 @@ -72,3 +65,5 @@ #define SPI_FLASH_OPISTR_DUMMY_BITLEN 20 #define SPI_FLASH_OPIDTR_ADDR_BITLEN 32 #define SPI_FLASH_OPIDTR_DUMMY_BITLEN 40 +#define SPI_FLASH_QIO_HPM_DUMMY_BITLEN 10 +#define SPI_FLASH_DIO_HPM_DUMMY_BITLEN 8 diff --git a/tools/sdk/esp32s3/include/spi_flash/include/spi_flash_override.h b/tools/sdk/esp32s3/include/spi_flash/include/spi_flash_override.h new file mode 100644 index 00000000000..7f01576deed --- /dev/null +++ b/tools/sdk/esp32s3/include/spi_flash/include/spi_flash_override.h @@ -0,0 +1,62 @@ +/* + * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include "sdkconfig.h" +#include "esp_err.h" + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Structure for flash dummy bits. + * For some flash chips, dummy bits are configurable under different conditions. + */ +typedef struct { + uint8_t dio_dummy; + uint8_t dout_dummy; + uint8_t qio_dummy; + uint8_t qout_dummy; + uint8_t fastrd_dummy; +} spi_flash_hpm_dummy_conf_t; + +typedef enum { + SPI_FLASH_HPM_CMD_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by command. + SPI_FLASH_HPM_DUMMY_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by adjusting dummy. + SPI_FLASH_HPM_WRITE_SR_NEEDED, // Means that in the certain condition, flash needs to enter the high performance mode by writing status register. + SPI_FLASH_HPM_UNNEEDED, // Means that flash doesn't need to enter the high performance mode. + SPI_FLASH_HPM_BEYOND_LIMIT, // Means that flash has no capability to meet that condition. +} spi_flash_requirement_t; + +typedef void (*spi_flash_hpm_enable_fn_t)(void); +typedef esp_err_t (*spi_flash_hpf_check_fn_t)(void); +typedef void (*spi_flash_get_chip_dummy_fn_t)(spi_flash_hpm_dummy_conf_t *dummy_conf); +typedef esp_err_t (*spi_flash_hpm_probe_fn_t)(uint32_t flash_id); +typedef spi_flash_requirement_t (*spi_flash_hpm_chip_requirement_check_t)(uint32_t flash_id, uint32_t freq_mhz, int voltage_mv, int temperature); + +typedef struct __attribute__((packed)) +{ + const char *method; /* Flash HPM method */ + spi_flash_hpm_probe_fn_t probe; + spi_flash_hpm_chip_requirement_check_t chip_hpm_requirement_check; + spi_flash_hpm_enable_fn_t flash_hpm_enable; + spi_flash_hpf_check_fn_t flash_hpf_check; + spi_flash_get_chip_dummy_fn_t flash_get_dummy; +} spi_flash_hpm_info_t; + +/** + * Array of known flash chips and method to enable flash high performance mode. + * + * Users can override this array. + */ +extern const spi_flash_hpm_info_t __attribute__((weak)) spi_flash_hpm_enable_list[]; + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s3/include/spiffs/include/spiffs_config.h b/tools/sdk/esp32s3/include/spiffs/include/spiffs_config.h index 5cc3d78049c..5e915039215 100644 --- a/tools/sdk/esp32s3/include/spiffs/include/spiffs_config.h +++ b/tools/sdk/esp32s3/include/spiffs/include/spiffs_config.h @@ -20,6 +20,7 @@ #include #include #include +#include "esp_assert.h" // compile time switches #define SPIFFS_TAG "SPIFFS" @@ -161,7 +162,7 @@ extern void spiffs_api_unlock(struct spiffs_t *fs); // spiffs_object_ix_header fields + at least some LUT entries) #define SPIFFS_OBJ_META_LEN (CONFIG_SPIFFS_META_LENGTH) #define SPIFFS_PAGE_EXTRA_SIZE (64) -_Static_assert(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE +ESP_STATIC_ASSERT(SPIFFS_OBJ_META_LEN + SPIFFS_OBJ_NAME_LEN + SPIFFS_PAGE_EXTRA_SIZE <= CONFIG_SPIFFS_PAGE_SIZE, "SPIFFS_OBJ_META_LEN or SPIFFS_OBJ_NAME_LEN too long"); // Size of buffer allocated on stack used when copying data. diff --git a/tools/sdk/esp32s3/include/ulp/include/esp32/ulp.h b/tools/sdk/esp32s3/include/ulp/include/esp32/ulp.h index 583c77c383c..bd104013dc8 100644 --- a/tools/sdk/esp32s3/include/ulp/include/esp32/ulp.h +++ b/tools/sdk/esp32s3/include/ulp/include/esp32/ulp.h @@ -16,6 +16,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -289,7 +290,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32s3/include/ulp/include/esp32s2/ulp.h b/tools/sdk/esp32s3/include/ulp/include/esp32s2/ulp.h index 184c7c2a203..e55c162a64a 100644 --- a/tools/sdk/esp32s3/include/ulp/include/esp32s2/ulp.h +++ b/tools/sdk/esp32s3/include/ulp/include/esp32s2/ulp.h @@ -8,6 +8,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -265,7 +266,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32s3/include/ulp/include/esp32s3/ulp.h b/tools/sdk/esp32s3/include/ulp/include/esp32s3/ulp.h index 8adbb2ebcfe..e1e50880740 100644 --- a/tools/sdk/esp32s3/include/ulp/include/esp32s3/ulp.h +++ b/tools/sdk/esp32s3/include/ulp/include/esp32s3/ulp.h @@ -8,6 +8,7 @@ #include #include #include +#include "esp_assert.h" #include "esp_err.h" #include "soc/soc.h" #include "ulp_common.h" @@ -265,7 +266,7 @@ union ulp_insn { }; -_Static_assert(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); +ESP_STATIC_ASSERT(sizeof(ulp_insn_t) == 4, "ULP coprocessor instruction size should be 4 bytes"); /** * Delay (nop) for a given number of cycles diff --git a/tools/sdk/esp32s3/include/usb/include/usb/usb_types_ch9.h b/tools/sdk/esp32s3/include/usb/include/usb/usb_types_ch9.h index 177fc15bf90..69886c74269 100644 --- a/tools/sdk/esp32s3/include/usb/include/usb/usb_types_ch9.h +++ b/tools/sdk/esp32s3/include/usb/include/usb/usb_types_ch9.h @@ -11,6 +11,7 @@ Warning: The USB Host Library API is still a beta version and may be subject to #pragma once #include +#include "esp_assert.h" #ifdef __cplusplus extern "C" @@ -98,7 +99,7 @@ typedef union { } __attribute__((packed)); uint8_t val[USB_SETUP_PACKET_SIZE]; /**< Descriptor value */ } usb_setup_packet_t; -_Static_assert(sizeof(usb_setup_packet_t) == USB_SETUP_PACKET_SIZE, "Size of usb_setup_packet_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_setup_packet_t) == USB_SETUP_PACKET_SIZE, "Size of usb_setup_packet_t incorrect"); /** * @brief Bit masks belonging to the bmRequestType field of a setup packet @@ -244,7 +245,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_STANDARD_DESC_SIZE]; /**< Descriptor value */ } usb_standard_desc_t; -_Static_assert(sizeof(usb_standard_desc_t) == USB_STANDARD_DESC_SIZE, "Size of usb_standard_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_standard_desc_t) == USB_STANDARD_DESC_SIZE, "Size of usb_standard_desc_t incorrect"); // ------------------ Device Descriptor -------------------- @@ -277,7 +278,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_DEVICE_DESC_SIZE]; /**< Descriptor value */ } usb_device_desc_t; -_Static_assert(sizeof(usb_device_desc_t) == USB_DEVICE_DESC_SIZE, "Size of usb_device_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_device_desc_t) == USB_DEVICE_DESC_SIZE, "Size of usb_device_desc_t incorrect"); /** * @brief Possible base class values of the bDeviceClass field of a USB device descriptor @@ -340,7 +341,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_CONFIG_DESC_SIZE]; /**< Descriptor value */ } usb_config_desc_t; -_Static_assert(sizeof(usb_config_desc_t) == USB_CONFIG_DESC_SIZE, "Size of usb_config_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_config_desc_t) == USB_CONFIG_DESC_SIZE, "Size of usb_config_desc_t incorrect"); /** * @brief Bit masks belonging to the bmAttributes field of a configuration descriptor @@ -373,7 +374,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_IAD_DESC_SIZE]; /**< Descriptor value */ } usb_iad_desc_t; -_Static_assert(sizeof(usb_iad_desc_t) == USB_IAD_DESC_SIZE, "Size of usb_iad_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_iad_desc_t) == USB_IAD_DESC_SIZE, "Size of usb_iad_desc_t incorrect"); // ---------------- Interface Descriptor ------------------- @@ -401,7 +402,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_INTF_DESC_SIZE]; /**< Descriptor value */ } usb_intf_desc_t; -_Static_assert(sizeof(usb_intf_desc_t) == USB_INTF_DESC_SIZE, "Size of usb_intf_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_intf_desc_t) == USB_INTF_DESC_SIZE, "Size of usb_intf_desc_t incorrect"); // ----------------- Endpoint Descriptor ------------------- @@ -426,7 +427,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_EP_DESC_SIZE]; /**< Descriptor value */ } usb_ep_desc_t; -_Static_assert(sizeof(usb_ep_desc_t) == USB_EP_DESC_SIZE, "Size of usb_ep_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_ep_desc_t) == USB_EP_DESC_SIZE, "Size of usb_ep_desc_t incorrect"); /** * @brief Bit masks belonging to the bEndpointAddress field of an endpoint descriptor @@ -478,7 +479,7 @@ typedef union { } USB_DESC_ATTR; /**< USB descriptor attributes */ uint8_t val[USB_STR_DESC_SIZE]; /**< Descriptor value */ } usb_str_desc_t; -_Static_assert(sizeof(usb_str_desc_t) == USB_STR_DESC_SIZE, "Size of usb_str_desc_t incorrect"); +ESP_STATIC_ASSERT(sizeof(usb_str_desc_t) == USB_STR_DESC_SIZE, "Size of usb_str_desc_t incorrect"); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s3/include/xtensa/include/xt_instr_macros.h b/tools/sdk/esp32s3/include/xtensa/include/xt_instr_macros.h index efcdbd4a78c..e3a11990208 100644 --- a/tools/sdk/esp32s3/include/xtensa/include/xt_instr_macros.h +++ b/tools/sdk/esp32s3/include/xtensa/include/xt_instr_macros.h @@ -84,11 +84,11 @@ do { \ uint32_t sp = (uint32_t)new_sp - SAVE_AREA_OFFSET; \ *(uint32_t*)(sp - BASE_AREA_SP_OFFSET) = (uint32_t)new_sp; \ + const uint32_t mask = ~(PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK); \ uint32_t tmp1 = 0, tmp2 = 0; \ asm volatile ( \ "rsr.ps %1 \n"\ - "movi %2, ~" XTSTR( PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK ) " \n"\ - "and %1, %1, %2 \n"\ + "and %1, %1, %3 \n"\ "wsr.ps %1 \n"\ "rsync \n"\ " \n"\ @@ -99,6 +99,7 @@ "wsr.windowstart %1 \n"\ "rsync \n"\ " \n"\ + "movi a0, 0\n" \ "mov sp, %0 \n"\ "rsr.ps %1 \n"\ " \n"\ @@ -107,6 +108,6 @@ "or %1, %1, %2 \n"\ "wsr.ps %1 \n"\ "rsync \n"\ - : "+r"(sp), "+r"(tmp1), "+r"(tmp2)); \ + : "+r"(sp), "+r"(tmp1), "+r"(tmp2) : "r"(mask)); \ } while (0); #endif // __ASSEMBLER__ diff --git a/tools/sdk/esp32s3/ld/esp32s3.peripherals.ld b/tools/sdk/esp32s3/ld/esp32s3.peripherals.ld index 27343e9dd9f..6dfffd99005 100644 --- a/tools/sdk/esp32s3/ld/esp32s3.peripherals.ld +++ b/tools/sdk/esp32s3/ld/esp32s3.peripherals.ld @@ -8,6 +8,7 @@ PROVIDE ( SPIMEM1 = 0x60002000 ); PROVIDE ( SPIMEM0 = 0x60003000 ); PROVIDE ( GPIO = 0x60004000 ); PROVIDE ( SIGMADELTA = 0x60004f00 ); +PROVIDE ( EFUSE = 0x60007000 ); PROVIDE ( RTCCNTL = 0x60008000 ); PROVIDE ( RTCIO = 0x60008400 ); PROVIDE ( SENS = 0x60008800 ); @@ -44,5 +45,5 @@ PROVIDE ( APB_SARADC = 0x60040000 ); PROVIDE ( LCD_CAM = 0x60041000 ); PROVIDE ( USB_SERIAL_JTAG = 0x60038000 ); PROVIDE ( USB0 = 0x60080000 ); -PROVIDE ( USBH = 0x60080000 ); +PROVIDE ( USB_DWC = 0x60080000 ); PROVIDE ( USB_WRAP = 0x60039000 ); diff --git a/tools/sdk/esp32s3/ld/esp32s3.rom.ld b/tools/sdk/esp32s3/ld/esp32s3.rom.ld index 7259d1b452f..6eb9487b68d 100644 --- a/tools/sdk/esp32s3/ld/esp32s3.rom.ld +++ b/tools/sdk/esp32s3/ld/esp32s3.rom.ld @@ -1853,7 +1853,7 @@ pm_keep_alive = 0x400054a8; /* pm_on_beacon_rx = 0x400054b4; */ pm_on_data_rx = 0x400054c0; pm_on_tbtt = 0x400054cc; -pm_parse_beacon = 0x400054d8; +/* pm_parse_beacon = 0x400054d8; */ pm_process_tim = 0x400054e4; /*pm_rx_beacon_process = 0x400054f0;*/ pm_rx_data_process = 0x400054fc; @@ -2043,7 +2043,7 @@ ieee80211_recycle_cache_eb = 0x40005afc; ieee80211_search_node = 0x40005b08; roundup2 = 0x40005b14; ieee80211_crypto_encap = 0x40005b20; -ieee80211_crypto_decap = 0x40005b2c; +/* ieee80211_crypto_decap = 0x40005b2c; */ /* ieee80211_decap = 0x40005b38; */ ieee80211_set_tx_pti = 0x40005b44; wifi_is_started = 0x40005b50; diff --git a/tools/sdk/esp32s3/ld/libbtbb.a b/tools/sdk/esp32s3/ld/libbtbb.a index 7b054f0258a..b02b487b41a 100644 Binary files a/tools/sdk/esp32s3/ld/libbtbb.a and b/tools/sdk/esp32s3/ld/libbtbb.a differ diff --git a/tools/sdk/esp32s3/ld/libbtdm_app.a b/tools/sdk/esp32s3/ld/libbtdm_app.a index 1981e575b76..c0b26e9b20a 100644 Binary files a/tools/sdk/esp32s3/ld/libbtdm_app.a and b/tools/sdk/esp32s3/ld/libbtdm_app.a differ diff --git a/tools/sdk/esp32s3/ld/libc_speech_features.a b/tools/sdk/esp32s3/ld/libc_speech_features.a index a5bffe2e636..a53b6e4602f 100644 Binary files a/tools/sdk/esp32s3/ld/libc_speech_features.a and b/tools/sdk/esp32s3/ld/libc_speech_features.a differ diff --git a/tools/sdk/esp32s3/ld/libdl_lib.a b/tools/sdk/esp32s3/ld/libdl_lib.a index 2f661308a68..b57019564f3 100644 Binary files a/tools/sdk/esp32s3/ld/libdl_lib.a and b/tools/sdk/esp32s3/ld/libdl_lib.a differ diff --git a/tools/sdk/esp32s3/ld/libesp-dsp.a b/tools/sdk/esp32s3/ld/libesp-dsp.a deleted file mode 100644 index 3dd4511018d..00000000000 Binary files a/tools/sdk/esp32s3/ld/libesp-dsp.a and /dev/null differ diff --git a/tools/sdk/esp32s3/ld/libfst.a b/tools/sdk/esp32s3/ld/libfst.a new file mode 100644 index 00000000000..215cfe209fb Binary files /dev/null and b/tools/sdk/esp32s3/ld/libfst.a differ diff --git a/tools/sdk/esp32s3/ld/libphy.a b/tools/sdk/esp32s3/ld/libphy.a index 8a5744d5c2d..bcc26bf4f7e 100644 Binary files a/tools/sdk/esp32s3/ld/libphy.a and b/tools/sdk/esp32s3/ld/libphy.a differ diff --git a/tools/sdk/esp32s3/lib/libapp_trace.a b/tools/sdk/esp32s3/lib/libapp_trace.a index 478c9d0d86f..167a6e8df9b 100644 Binary files a/tools/sdk/esp32s3/lib/libapp_trace.a and b/tools/sdk/esp32s3/lib/libapp_trace.a differ diff --git a/tools/sdk/esp32s3/lib/libapp_update.a b/tools/sdk/esp32s3/lib/libapp_update.a index 490941ae22a..85cf7c0f516 100644 Binary files a/tools/sdk/esp32s3/lib/libapp_update.a and b/tools/sdk/esp32s3/lib/libapp_update.a differ diff --git a/tools/sdk/esp32s3/lib/libarduino_tinyusb.a b/tools/sdk/esp32s3/lib/libarduino_tinyusb.a index 181925b0339..0409fe43150 100644 Binary files a/tools/sdk/esp32s3/lib/libarduino_tinyusb.a and b/tools/sdk/esp32s3/lib/libarduino_tinyusb.a differ diff --git a/tools/sdk/esp32s3/lib/libasio.a b/tools/sdk/esp32s3/lib/libasio.a index 11bd48fb018..9aedfc939da 100644 Binary files a/tools/sdk/esp32s3/lib/libasio.a and b/tools/sdk/esp32s3/lib/libasio.a differ diff --git a/tools/sdk/esp32s3/lib/libbt.a b/tools/sdk/esp32s3/lib/libbt.a index 30a961396fc..63c9482db22 100644 Binary files a/tools/sdk/esp32s3/lib/libbt.a and b/tools/sdk/esp32s3/lib/libbt.a differ diff --git a/tools/sdk/esp32s3/lib/libcbor.a b/tools/sdk/esp32s3/lib/libcbor.a index 22b773c7900..975a4ffd11d 100644 Binary files a/tools/sdk/esp32s3/lib/libcbor.a and b/tools/sdk/esp32s3/lib/libcbor.a differ diff --git a/tools/sdk/esp32s3/lib/libcmock.a b/tools/sdk/esp32s3/lib/libcmock.a index 5b64ec60081..4f933a9a7c5 100644 Binary files a/tools/sdk/esp32s3/lib/libcmock.a and b/tools/sdk/esp32s3/lib/libcmock.a differ diff --git a/tools/sdk/esp32s3/lib/libcoap.a b/tools/sdk/esp32s3/lib/libcoap.a index bd66a1583e1..b285650c551 100644 Binary files a/tools/sdk/esp32s3/lib/libcoap.a and b/tools/sdk/esp32s3/lib/libcoap.a differ diff --git a/tools/sdk/esp32s3/lib/libcoexist.a b/tools/sdk/esp32s3/lib/libcoexist.a index 51efa9db0a4..4e847fda868 100644 Binary files a/tools/sdk/esp32s3/lib/libcoexist.a and b/tools/sdk/esp32s3/lib/libcoexist.a differ diff --git a/tools/sdk/esp32s3/lib/libconsole.a b/tools/sdk/esp32s3/lib/libconsole.a index 6aba93836f5..a28b3736c7f 100644 Binary files a/tools/sdk/esp32s3/lib/libconsole.a and b/tools/sdk/esp32s3/lib/libconsole.a differ diff --git a/tools/sdk/esp32s3/lib/libcore.a b/tools/sdk/esp32s3/lib/libcore.a index 85019bb2d9f..db287053742 100644 Binary files a/tools/sdk/esp32s3/lib/libcore.a and b/tools/sdk/esp32s3/lib/libcore.a differ diff --git a/tools/sdk/esp32s3/lib/libcxx.a b/tools/sdk/esp32s3/lib/libcxx.a index 0039cb7662b..3ffb5633ca0 100644 Binary files a/tools/sdk/esp32s3/lib/libcxx.a and b/tools/sdk/esp32s3/lib/libcxx.a differ diff --git a/tools/sdk/esp32s3/lib/libdriver.a b/tools/sdk/esp32s3/lib/libdriver.a index ddf2530b401..f46d1a2ab00 100644 Binary files a/tools/sdk/esp32s3/lib/libdriver.a and b/tools/sdk/esp32s3/lib/libdriver.a differ diff --git a/tools/sdk/esp32s3/lib/libefuse.a b/tools/sdk/esp32s3/lib/libefuse.a index c7a02b5768e..f5249da705c 100644 Binary files a/tools/sdk/esp32s3/lib/libefuse.a and b/tools/sdk/esp32s3/lib/libefuse.a differ diff --git a/tools/sdk/esp32s3/lib/libesp-sr.a b/tools/sdk/esp32s3/lib/libesp-sr.a index e57506eb3d6..78c405b3c92 100644 Binary files a/tools/sdk/esp32s3/lib/libesp-sr.a and b/tools/sdk/esp32s3/lib/libesp-sr.a differ diff --git a/tools/sdk/esp32s3/lib/libesp-tls.a b/tools/sdk/esp32s3/lib/libesp-tls.a index bde9487cd7f..233b4dd1cc1 100644 Binary files a/tools/sdk/esp32s3/lib/libesp-tls.a and b/tools/sdk/esp32s3/lib/libesp-tls.a differ diff --git a/tools/sdk/esp32s3/lib/libesp32-camera.a b/tools/sdk/esp32s3/lib/libesp32-camera.a index 40a05146ff0..c3d7c6d5ecc 100644 Binary files a/tools/sdk/esp32s3/lib/libesp32-camera.a and b/tools/sdk/esp32s3/lib/libesp32-camera.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_adc_cal.a b/tools/sdk/esp32s3/lib/libesp_adc_cal.a index 1ec6a78ac6d..7184b4cba02 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_adc_cal.a and b/tools/sdk/esp32s3/lib/libesp_adc_cal.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_audio_front_end.a b/tools/sdk/esp32s3/lib/libesp_audio_front_end.a index b78f84f474d..699b1b2b3e6 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_audio_front_end.a and b/tools/sdk/esp32s3/lib/libesp_audio_front_end.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_audio_processor.a b/tools/sdk/esp32s3/lib/libesp_audio_processor.a index 7f2271fc5ec..e60ccc800f4 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_audio_processor.a and b/tools/sdk/esp32s3/lib/libesp_audio_processor.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_common.a b/tools/sdk/esp32s3/lib/libesp_common.a index 89180be84a2..07099b5320d 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_common.a and b/tools/sdk/esp32s3/lib/libesp_common.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_diagnostics.a b/tools/sdk/esp32s3/lib/libesp_diagnostics.a index bc25861e4ea..072f92dc979 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_diagnostics.a and b/tools/sdk/esp32s3/lib/libesp_diagnostics.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_eth.a b/tools/sdk/esp32s3/lib/libesp_eth.a index 5f073d67b54..a6090db4f29 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_eth.a and b/tools/sdk/esp32s3/lib/libesp_eth.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_event.a b/tools/sdk/esp32s3/lib/libesp_event.a index 63b6c681331..92a6f8910cd 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_event.a and b/tools/sdk/esp32s3/lib/libesp_event.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_gdbstub.a b/tools/sdk/esp32s3/lib/libesp_gdbstub.a index 5866efbe3fd..1b903bfe0da 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_gdbstub.a and b/tools/sdk/esp32s3/lib/libesp_gdbstub.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_hid.a b/tools/sdk/esp32s3/lib/libesp_hid.a index c130db20ef0..26e3a46a418 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_hid.a and b/tools/sdk/esp32s3/lib/libesp_hid.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_http_client.a b/tools/sdk/esp32s3/lib/libesp_http_client.a index 40f848ac297..52ba663650f 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_http_client.a and b/tools/sdk/esp32s3/lib/libesp_http_client.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_http_server.a b/tools/sdk/esp32s3/lib/libesp_http_server.a index 55dcd914159..124be5bc43d 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_http_server.a and b/tools/sdk/esp32s3/lib/libesp_http_server.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_https_ota.a b/tools/sdk/esp32s3/lib/libesp_https_ota.a index efea68f5973..03d2bee4d99 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_https_ota.a and b/tools/sdk/esp32s3/lib/libesp_https_ota.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_https_server.a b/tools/sdk/esp32s3/lib/libesp_https_server.a index 1741ed3fea9..cbf554ea7f6 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_https_server.a and b/tools/sdk/esp32s3/lib/libesp_https_server.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_insights.a b/tools/sdk/esp32s3/lib/libesp_insights.a index 0f5fa1a820c..165e4e459e5 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_insights.a and b/tools/sdk/esp32s3/lib/libesp_insights.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_ipc.a b/tools/sdk/esp32s3/lib/libesp_ipc.a index 25c496bed1d..2daeddfc9ab 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_ipc.a and b/tools/sdk/esp32s3/lib/libesp_ipc.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_lcd.a b/tools/sdk/esp32s3/lib/libesp_lcd.a index 73269adfcfb..1cdf87714d0 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_lcd.a and b/tools/sdk/esp32s3/lib/libesp_lcd.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_littlefs.a b/tools/sdk/esp32s3/lib/libesp_littlefs.a index 39058b5c7f0..ab5dd00bced 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_littlefs.a and b/tools/sdk/esp32s3/lib/libesp_littlefs.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_local_ctrl.a b/tools/sdk/esp32s3/lib/libesp_local_ctrl.a index 4b2b6b5e511..14ab7ab07f8 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_local_ctrl.a and b/tools/sdk/esp32s3/lib/libesp_local_ctrl.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_netif.a b/tools/sdk/esp32s3/lib/libesp_netif.a index e1626fb26ed..e96414c4dd7 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_netif.a and b/tools/sdk/esp32s3/lib/libesp_netif.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_phy.a b/tools/sdk/esp32s3/lib/libesp_phy.a index 71017e9c8bf..5263bbef51a 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_phy.a and b/tools/sdk/esp32s3/lib/libesp_phy.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_pm.a b/tools/sdk/esp32s3/lib/libesp_pm.a index 76ea0acdf8f..a288bb3f399 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_pm.a and b/tools/sdk/esp32s3/lib/libesp_pm.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_rainmaker.a b/tools/sdk/esp32s3/lib/libesp_rainmaker.a index 22961842c09..c1beadf21d9 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_rainmaker.a and b/tools/sdk/esp32s3/lib/libesp_rainmaker.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_ringbuf.a b/tools/sdk/esp32s3/lib/libesp_ringbuf.a index 014ccd9ec6f..6b8a7468442 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_ringbuf.a and b/tools/sdk/esp32s3/lib/libesp_ringbuf.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_rom.a b/tools/sdk/esp32s3/lib/libesp_rom.a index 5db4c731d8f..b0cc36ed913 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_rom.a and b/tools/sdk/esp32s3/lib/libesp_rom.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_schedule.a b/tools/sdk/esp32s3/lib/libesp_schedule.a index 0aed857be87..53344749100 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_schedule.a and b/tools/sdk/esp32s3/lib/libesp_schedule.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_serial_slave_link.a b/tools/sdk/esp32s3/lib/libesp_serial_slave_link.a index 062a8e2b6c3..18ec6e90e1c 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_serial_slave_link.a and b/tools/sdk/esp32s3/lib/libesp_serial_slave_link.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_timer.a b/tools/sdk/esp32s3/lib/libesp_timer.a index c5814981e94..3e417edf93d 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_timer.a and b/tools/sdk/esp32s3/lib/libesp_timer.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_websocket_client.a b/tools/sdk/esp32s3/lib/libesp_websocket_client.a index af71b4e5200..7787d21d44b 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_websocket_client.a and b/tools/sdk/esp32s3/lib/libesp_websocket_client.a differ diff --git a/tools/sdk/esp32s3/lib/libesp_wifi.a b/tools/sdk/esp32s3/lib/libesp_wifi.a index e58eb9b0afa..bc160c3349a 100644 Binary files a/tools/sdk/esp32s3/lib/libesp_wifi.a and b/tools/sdk/esp32s3/lib/libesp_wifi.a differ diff --git a/tools/sdk/esp32s3/lib/libespcoredump.a b/tools/sdk/esp32s3/lib/libespcoredump.a index 917202b4f27..7f60d2e3ab4 100644 Binary files a/tools/sdk/esp32s3/lib/libespcoredump.a and b/tools/sdk/esp32s3/lib/libespcoredump.a differ diff --git a/tools/sdk/esp32s3/lib/libespnow.a b/tools/sdk/esp32s3/lib/libespnow.a index a151f90b7eb..247114e0047 100644 Binary files a/tools/sdk/esp32s3/lib/libespnow.a and b/tools/sdk/esp32s3/lib/libespnow.a differ diff --git a/tools/sdk/esp32s3/lib/libesp-dsp.a b/tools/sdk/esp32s3/lib/libespressif__esp-dsp.a similarity index 51% rename from tools/sdk/esp32s3/lib/libesp-dsp.a rename to tools/sdk/esp32s3/lib/libespressif__esp-dsp.a index acb75b6b950..e51d0ba4f75 100644 Binary files a/tools/sdk/esp32s3/lib/libesp-dsp.a and b/tools/sdk/esp32s3/lib/libespressif__esp-dsp.a differ diff --git a/tools/sdk/esp32s3/lib/libexpat.a b/tools/sdk/esp32s3/lib/libexpat.a index eee5157a1f2..6a673e2ecd8 100644 Binary files a/tools/sdk/esp32s3/lib/libexpat.a and b/tools/sdk/esp32s3/lib/libexpat.a differ diff --git a/tools/sdk/esp32s3/lib/libfatfs.a b/tools/sdk/esp32s3/lib/libfatfs.a index e1141f3f99f..69ea0180634 100644 Binary files a/tools/sdk/esp32s3/lib/libfatfs.a and b/tools/sdk/esp32s3/lib/libfatfs.a differ diff --git a/tools/sdk/esp32s3/lib/libfb_gfx.a b/tools/sdk/esp32s3/lib/libfb_gfx.a index 1118b6f5680..5ed6297d1c8 100644 Binary files a/tools/sdk/esp32s3/lib/libfb_gfx.a and b/tools/sdk/esp32s3/lib/libfb_gfx.a differ diff --git a/tools/sdk/esp32s3/lib/libfreemodbus.a b/tools/sdk/esp32s3/lib/libfreemodbus.a index 7eb59357f9c..445f8d6a7da 100644 Binary files a/tools/sdk/esp32s3/lib/libfreemodbus.a and b/tools/sdk/esp32s3/lib/libfreemodbus.a differ diff --git a/tools/sdk/esp32s3/lib/libgpio_button.a b/tools/sdk/esp32s3/lib/libgpio_button.a index efd7f57c978..5540cccdb24 100644 Binary files a/tools/sdk/esp32s3/lib/libgpio_button.a and b/tools/sdk/esp32s3/lib/libgpio_button.a differ diff --git a/tools/sdk/esp32s3/lib/libhal.a b/tools/sdk/esp32s3/lib/libhal.a index 0d559ddf767..2d8827bb08a 100644 Binary files a/tools/sdk/esp32s3/lib/libhal.a and b/tools/sdk/esp32s3/lib/libhal.a differ diff --git a/tools/sdk/esp32s3/lib/libheap.a b/tools/sdk/esp32s3/lib/libheap.a index bfdd7b1dad1..cd174f365f1 100644 Binary files a/tools/sdk/esp32s3/lib/libheap.a and b/tools/sdk/esp32s3/lib/libheap.a differ diff --git a/tools/sdk/esp32s3/lib/libhufzip.a b/tools/sdk/esp32s3/lib/libhufzip.a index 38dfe122708..9f6a22ecd79 100644 Binary files a/tools/sdk/esp32s3/lib/libhufzip.a and b/tools/sdk/esp32s3/lib/libhufzip.a differ diff --git a/tools/sdk/esp32s3/lib/libjsmn.a b/tools/sdk/esp32s3/lib/libjsmn.a index 14343e7dc7e..b5638fd8cd0 100644 Binary files a/tools/sdk/esp32s3/lib/libjsmn.a and b/tools/sdk/esp32s3/lib/libjsmn.a differ diff --git a/tools/sdk/esp32s3/lib/libjson.a b/tools/sdk/esp32s3/lib/libjson.a index b4a93744c91..af2211b677f 100644 Binary files a/tools/sdk/esp32s3/lib/libjson.a and b/tools/sdk/esp32s3/lib/libjson.a differ diff --git a/tools/sdk/esp32s3/lib/libjson_generator.a b/tools/sdk/esp32s3/lib/libjson_generator.a index 8d25faaea1a..9b6bbfc3781 100644 Binary files a/tools/sdk/esp32s3/lib/libjson_generator.a and b/tools/sdk/esp32s3/lib/libjson_generator.a differ diff --git a/tools/sdk/esp32s3/lib/libjson_parser.a b/tools/sdk/esp32s3/lib/libjson_parser.a index 0db8f3a37c3..0be4c0efd24 100644 Binary files a/tools/sdk/esp32s3/lib/libjson_parser.a and b/tools/sdk/esp32s3/lib/libjson_parser.a differ diff --git a/tools/sdk/esp32s3/lib/liblibsodium.a b/tools/sdk/esp32s3/lib/liblibsodium.a index 0e1aa3f6326..063fc4c7392 100644 Binary files a/tools/sdk/esp32s3/lib/liblibsodium.a and b/tools/sdk/esp32s3/lib/liblibsodium.a differ diff --git a/tools/sdk/esp32s3/lib/liblog.a b/tools/sdk/esp32s3/lib/liblog.a index 38ac4b581ff..9d6adbddd7b 100644 Binary files a/tools/sdk/esp32s3/lib/liblog.a and b/tools/sdk/esp32s3/lib/liblog.a differ diff --git a/tools/sdk/esp32s3/lib/liblwip.a b/tools/sdk/esp32s3/lib/liblwip.a index 32fad5c9552..6fb596136e0 100644 Binary files a/tools/sdk/esp32s3/lib/liblwip.a and b/tools/sdk/esp32s3/lib/liblwip.a differ diff --git a/tools/sdk/esp32s3/lib/libmbedcrypto.a b/tools/sdk/esp32s3/lib/libmbedcrypto.a index dd7ab4a452d..21d12899fd7 100644 Binary files a/tools/sdk/esp32s3/lib/libmbedcrypto.a and b/tools/sdk/esp32s3/lib/libmbedcrypto.a differ diff --git a/tools/sdk/esp32s3/lib/libmbedtls.a b/tools/sdk/esp32s3/lib/libmbedtls.a index 9a93d307596..1b4f17dbb32 100644 Binary files a/tools/sdk/esp32s3/lib/libmbedtls.a and b/tools/sdk/esp32s3/lib/libmbedtls.a differ diff --git a/tools/sdk/esp32s3/lib/libmbedtls_2.a b/tools/sdk/esp32s3/lib/libmbedtls_2.a index 0bf5b91c3bf..b4c9a026505 100644 Binary files a/tools/sdk/esp32s3/lib/libmbedtls_2.a and b/tools/sdk/esp32s3/lib/libmbedtls_2.a differ diff --git a/tools/sdk/esp32s3/lib/libmbedx509.a b/tools/sdk/esp32s3/lib/libmbedx509.a index 3b92fd1c38d..3ffaaba4388 100644 Binary files a/tools/sdk/esp32s3/lib/libmbedx509.a and b/tools/sdk/esp32s3/lib/libmbedx509.a differ diff --git a/tools/sdk/esp32s3/lib/libmdns.a b/tools/sdk/esp32s3/lib/libmdns.a index 35f9dc6f175..5d170d4f2de 100644 Binary files a/tools/sdk/esp32s3/lib/libmdns.a and b/tools/sdk/esp32s3/lib/libmdns.a differ diff --git a/tools/sdk/esp32s3/lib/libmesh.a b/tools/sdk/esp32s3/lib/libmesh.a index 890e314beaa..bf26c5ec7ab 100644 Binary files a/tools/sdk/esp32s3/lib/libmesh.a and b/tools/sdk/esp32s3/lib/libmesh.a differ diff --git a/tools/sdk/esp32s3/lib/libmqtt.a b/tools/sdk/esp32s3/lib/libmqtt.a index ad027213653..b9893cdcaf8 100644 Binary files a/tools/sdk/esp32s3/lib/libmqtt.a and b/tools/sdk/esp32s3/lib/libmqtt.a differ diff --git a/tools/sdk/esp32s3/lib/libmultinet.a b/tools/sdk/esp32s3/lib/libmultinet.a index 55683270c79..fc19cebecd2 100644 Binary files a/tools/sdk/esp32s3/lib/libmultinet.a and b/tools/sdk/esp32s3/lib/libmultinet.a differ diff --git a/tools/sdk/esp32s3/lib/libnet80211.a b/tools/sdk/esp32s3/lib/libnet80211.a index d32a1716ac5..91ad77342e5 100644 Binary files a/tools/sdk/esp32s3/lib/libnet80211.a and b/tools/sdk/esp32s3/lib/libnet80211.a differ diff --git a/tools/sdk/esp32s3/lib/libnewlib.a b/tools/sdk/esp32s3/lib/libnewlib.a index 9ea842c8cba..01d832a6286 100644 Binary files a/tools/sdk/esp32s3/lib/libnewlib.a and b/tools/sdk/esp32s3/lib/libnewlib.a differ diff --git a/tools/sdk/esp32s3/lib/libnghttp.a b/tools/sdk/esp32s3/lib/libnghttp.a index 565fca56722..d6d02a574a6 100644 Binary files a/tools/sdk/esp32s3/lib/libnghttp.a and b/tools/sdk/esp32s3/lib/libnghttp.a differ diff --git a/tools/sdk/esp32s3/lib/libnvs_flash.a b/tools/sdk/esp32s3/lib/libnvs_flash.a index 78c3342f569..9fe13b0fc93 100644 Binary files a/tools/sdk/esp32s3/lib/libnvs_flash.a and b/tools/sdk/esp32s3/lib/libnvs_flash.a differ diff --git a/tools/sdk/esp32s3/lib/libopenssl.a b/tools/sdk/esp32s3/lib/libopenssl.a index 409188e8cb3..6ba7bbe9c17 100644 Binary files a/tools/sdk/esp32s3/lib/libopenssl.a and b/tools/sdk/esp32s3/lib/libopenssl.a differ diff --git a/tools/sdk/esp32s3/lib/libperfmon.a b/tools/sdk/esp32s3/lib/libperfmon.a index 37878c5f03f..b891f338d60 100644 Binary files a/tools/sdk/esp32s3/lib/libperfmon.a and b/tools/sdk/esp32s3/lib/libperfmon.a differ diff --git a/tools/sdk/esp32s3/lib/libpp.a b/tools/sdk/esp32s3/lib/libpp.a index 9f96fa5c2b3..b61ad368a2f 100644 Binary files a/tools/sdk/esp32s3/lib/libpp.a and b/tools/sdk/esp32s3/lib/libpp.a differ diff --git a/tools/sdk/esp32s3/lib/libprotobuf-c.a b/tools/sdk/esp32s3/lib/libprotobuf-c.a index 4651a18fb4b..0bb7574035e 100644 Binary files a/tools/sdk/esp32s3/lib/libprotobuf-c.a and b/tools/sdk/esp32s3/lib/libprotobuf-c.a differ diff --git a/tools/sdk/esp32s3/lib/libprotocomm.a b/tools/sdk/esp32s3/lib/libprotocomm.a index 2b63e288e67..e0c00aa4a9e 100644 Binary files a/tools/sdk/esp32s3/lib/libprotocomm.a and b/tools/sdk/esp32s3/lib/libprotocomm.a differ diff --git a/tools/sdk/esp32s3/lib/libpthread.a b/tools/sdk/esp32s3/lib/libpthread.a index c7fdd775320..0aaecc60bfd 100644 Binary files a/tools/sdk/esp32s3/lib/libpthread.a and b/tools/sdk/esp32s3/lib/libpthread.a differ diff --git a/tools/sdk/esp32s3/lib/libqrcode.a b/tools/sdk/esp32s3/lib/libqrcode.a index cf8d24639fd..e5a53da3f65 100644 Binary files a/tools/sdk/esp32s3/lib/libqrcode.a and b/tools/sdk/esp32s3/lib/libqrcode.a differ diff --git a/tools/sdk/esp32s3/lib/librmaker_common.a b/tools/sdk/esp32s3/lib/librmaker_common.a index 2d97c610884..0229614de3a 100644 Binary files a/tools/sdk/esp32s3/lib/librmaker_common.a and b/tools/sdk/esp32s3/lib/librmaker_common.a differ diff --git a/tools/sdk/esp32s3/lib/librtc_store.a b/tools/sdk/esp32s3/lib/librtc_store.a index dd2646b9b7c..622f6518d40 100644 Binary files a/tools/sdk/esp32s3/lib/librtc_store.a and b/tools/sdk/esp32s3/lib/librtc_store.a differ diff --git a/tools/sdk/esp32s3/lib/libsdmmc.a b/tools/sdk/esp32s3/lib/libsdmmc.a index 740f058c495..f5266f5ee3a 100644 Binary files a/tools/sdk/esp32s3/lib/libsdmmc.a and b/tools/sdk/esp32s3/lib/libsdmmc.a differ diff --git a/tools/sdk/esp32s3/lib/libsmartconfig.a b/tools/sdk/esp32s3/lib/libsmartconfig.a index 6f2a0b73f90..b6fae79b8a3 100644 Binary files a/tools/sdk/esp32s3/lib/libsmartconfig.a and b/tools/sdk/esp32s3/lib/libsmartconfig.a differ diff --git a/tools/sdk/esp32s3/lib/libsoc.a b/tools/sdk/esp32s3/lib/libsoc.a index b379a6f4014..06163e72d96 100644 Binary files a/tools/sdk/esp32s3/lib/libsoc.a and b/tools/sdk/esp32s3/lib/libsoc.a differ diff --git a/tools/sdk/esp32s3/lib/libspiffs.a b/tools/sdk/esp32s3/lib/libspiffs.a index d8523d89ebd..a9253e17ccc 100644 Binary files a/tools/sdk/esp32s3/lib/libspiffs.a and b/tools/sdk/esp32s3/lib/libspiffs.a differ diff --git a/tools/sdk/esp32s3/lib/libtcp_transport.a b/tools/sdk/esp32s3/lib/libtcp_transport.a index 590bf7e822d..25cd7dab474 100644 Binary files a/tools/sdk/esp32s3/lib/libtcp_transport.a and b/tools/sdk/esp32s3/lib/libtcp_transport.a differ diff --git a/tools/sdk/esp32s3/lib/libtcpip_adapter.a b/tools/sdk/esp32s3/lib/libtcpip_adapter.a index f922b737860..214e70e8999 100644 Binary files a/tools/sdk/esp32s3/lib/libtcpip_adapter.a and b/tools/sdk/esp32s3/lib/libtcpip_adapter.a differ diff --git a/tools/sdk/esp32s3/lib/libulp.a b/tools/sdk/esp32s3/lib/libulp.a index a5020e360d6..7b88d203e04 100644 Binary files a/tools/sdk/esp32s3/lib/libulp.a and b/tools/sdk/esp32s3/lib/libulp.a differ diff --git a/tools/sdk/esp32s3/lib/libunity.a b/tools/sdk/esp32s3/lib/libunity.a index 827b5066836..7ad3f50c705 100644 Binary files a/tools/sdk/esp32s3/lib/libunity.a and b/tools/sdk/esp32s3/lib/libunity.a differ diff --git a/tools/sdk/esp32s3/lib/libusb.a b/tools/sdk/esp32s3/lib/libusb.a index 2086eee575f..86e4f2445a8 100644 Binary files a/tools/sdk/esp32s3/lib/libusb.a and b/tools/sdk/esp32s3/lib/libusb.a differ diff --git a/tools/sdk/esp32s3/lib/libvfs.a b/tools/sdk/esp32s3/lib/libvfs.a index 5349eb5ebed..03958e4c0d7 100644 Binary files a/tools/sdk/esp32s3/lib/libvfs.a and b/tools/sdk/esp32s3/lib/libvfs.a differ diff --git a/tools/sdk/esp32s3/lib/libwakenet.a b/tools/sdk/esp32s3/lib/libwakenet.a index a0c8c54e318..afeb02bf7f4 100644 Binary files a/tools/sdk/esp32s3/lib/libwakenet.a and b/tools/sdk/esp32s3/lib/libwakenet.a differ diff --git a/tools/sdk/esp32s3/lib/libwapi.a b/tools/sdk/esp32s3/lib/libwapi.a index c0e762d4900..04f399c8cc9 100644 Binary files a/tools/sdk/esp32s3/lib/libwapi.a and b/tools/sdk/esp32s3/lib/libwapi.a differ diff --git a/tools/sdk/esp32s3/lib/libwear_levelling.a b/tools/sdk/esp32s3/lib/libwear_levelling.a index e4b0d74dbd0..bc729c041cb 100644 Binary files a/tools/sdk/esp32s3/lib/libwear_levelling.a and b/tools/sdk/esp32s3/lib/libwear_levelling.a differ diff --git a/tools/sdk/esp32s3/lib/libwifi_provisioning.a b/tools/sdk/esp32s3/lib/libwifi_provisioning.a index 94d678f1a82..915476f71c3 100644 Binary files a/tools/sdk/esp32s3/lib/libwifi_provisioning.a and b/tools/sdk/esp32s3/lib/libwifi_provisioning.a differ diff --git a/tools/sdk/esp32s3/lib/libwpa_supplicant.a b/tools/sdk/esp32s3/lib/libwpa_supplicant.a index 41e107bd273..68069239b77 100644 Binary files a/tools/sdk/esp32s3/lib/libwpa_supplicant.a and b/tools/sdk/esp32s3/lib/libwpa_supplicant.a differ diff --git a/tools/sdk/esp32s3/lib/libws2812_led.a b/tools/sdk/esp32s3/lib/libws2812_led.a index 1e094cdb764..84cbe95dd9e 100644 Binary files a/tools/sdk/esp32s3/lib/libws2812_led.a and b/tools/sdk/esp32s3/lib/libws2812_led.a differ diff --git a/tools/sdk/esp32s3/lib/libxtensa.a b/tools/sdk/esp32s3/lib/libxtensa.a index cb2726e8bc8..aec68b34961 100644 Binary files a/tools/sdk/esp32s3/lib/libxtensa.a and b/tools/sdk/esp32s3/lib/libxtensa.a differ diff --git a/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h b/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h index 0c305ab2062..88e5cf597f2 100644 --- a/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/opi_opi/include/sdkconfig.h @@ -562,8 +562,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -571,6 +571,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF 0 #define CONFIG_BT_CTRL_SLEEP_MODE_EFF 0 @@ -584,9 +585,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -697,8 +700,8 @@ #define CONFIG_SPIRAM_MODE_OCT 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_BOOT_INIT 1 @@ -805,12 +808,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -841,10 +846,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 #define CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1 1 @@ -908,6 +909,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -1063,8 +1065,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -1102,11 +1102,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -1135,60 +1130,94 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -1201,22 +1230,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -1228,6 +1265,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -1255,5 +1293,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/opi_opi/libbootloader_support.a b/tools/sdk/esp32s3/opi_opi/libbootloader_support.a index acbb302fce6..b4a579f7fbc 100644 Binary files a/tools/sdk/esp32s3/opi_opi/libbootloader_support.a and b/tools/sdk/esp32s3/opi_opi/libbootloader_support.a differ diff --git a/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a b/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a index 559b13977d8..64d32de9344 100644 Binary files a/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a and b/tools/sdk/esp32s3/opi_opi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/opi_opi/libesp_system.a b/tools/sdk/esp32s3/opi_opi/libesp_system.a index dd4b2aafd1f..f9e69b31eff 100644 Binary files a/tools/sdk/esp32s3/opi_opi/libesp_system.a and b/tools/sdk/esp32s3/opi_opi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/opi_opi/libfreertos.a b/tools/sdk/esp32s3/opi_opi/libfreertos.a index 3f93fbb3433..abce7f31034 100644 Binary files a/tools/sdk/esp32s3/opi_opi/libfreertos.a and b/tools/sdk/esp32s3/opi_opi/libfreertos.a differ diff --git a/tools/sdk/esp32s3/opi_opi/libspi_flash.a b/tools/sdk/esp32s3/opi_opi/libspi_flash.a index 81cb993451d..32b10111dd5 100644 Binary files a/tools/sdk/esp32s3/opi_opi/libspi_flash.a and b/tools/sdk/esp32s3/opi_opi/libspi_flash.a differ diff --git a/tools/sdk/esp32s3/opi_opi/sections.ld b/tools/sdk/esp32s3/opi_opi/sections.ld index 2c078b29215..e1a21e26f50 100644 --- a/tools/sdk/esp32s3/opi_opi/sections.ld +++ b/tools/sdk/esp32s3/opi_opi/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32s3/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -219,9 +219,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -243,6 +278,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_th.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_winbond.*(.literal .literal.* .text .text.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_oct_flash_init.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_timing_tuning.*(.literal .literal.* .text .text.*) @@ -284,10 +320,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -309,13 +347,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -331,6 +367,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_th.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_winbond.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_oct_flash_init.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_rom_patch.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_timing_tuning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) @@ -362,22 +399,40 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.ext_ram.bss*) - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -403,7 +458,7 @@ SECTIONS _instruction_reserved_start = ABSOLUTE(.); _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) *(.wifi0iram .wifi0iram.*) *(.wifiorslpiram .wifiorslpiram.*) *(.wifirxiram .wifirxiram.*) @@ -416,6 +471,9 @@ SECTIONS *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port.*(.literal.esp_startup_start_app_other_cores .text.esp_startup_start_app_other_cores) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) @@ -479,7 +537,7 @@ SECTIONS _flash_rodata_start = ABSOLUTE(.); *(.rodata_wlog_error .rodata_wlog_error.*) - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) diff --git a/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h b/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h index 65f20bf24b9..5d43e1363fa 100644 --- a/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/opi_qspi/include/sdkconfig.h @@ -562,8 +562,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -571,6 +571,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF 0 #define CONFIG_BT_CTRL_SLEEP_MODE_EFF 0 @@ -584,9 +585,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -697,8 +700,8 @@ #define CONFIG_SPIRAM_MODE_QUAD 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 @@ -803,12 +806,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -839,10 +844,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 #define CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1 1 @@ -906,6 +907,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -1061,8 +1063,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -1100,11 +1100,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -1133,60 +1128,94 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -1199,22 +1228,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -1226,6 +1263,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -1253,5 +1291,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/opi_qspi/libbootloader_support.a b/tools/sdk/esp32s3/opi_qspi/libbootloader_support.a index acbb302fce6..b4a579f7fbc 100644 Binary files a/tools/sdk/esp32s3/opi_qspi/libbootloader_support.a and b/tools/sdk/esp32s3/opi_qspi/libbootloader_support.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a b/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a index b69c167534e..11984c84371 100644 Binary files a/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a and b/tools/sdk/esp32s3/opi_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/libesp_system.a b/tools/sdk/esp32s3/opi_qspi/libesp_system.a index d0bb9c06ce9..f4fb87b0449 100644 Binary files a/tools/sdk/esp32s3/opi_qspi/libesp_system.a and b/tools/sdk/esp32s3/opi_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/libfreertos.a b/tools/sdk/esp32s3/opi_qspi/libfreertos.a index 3f93fbb3433..abce7f31034 100644 Binary files a/tools/sdk/esp32s3/opi_qspi/libfreertos.a and b/tools/sdk/esp32s3/opi_qspi/libfreertos.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/libspi_flash.a b/tools/sdk/esp32s3/opi_qspi/libspi_flash.a index 85254b19e0e..10f0afbcebc 100644 Binary files a/tools/sdk/esp32s3/opi_qspi/libspi_flash.a and b/tools/sdk/esp32s3/opi_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32s3/opi_qspi/sections.ld b/tools/sdk/esp32s3/opi_qspi/sections.ld index 64f7aeb3ff4..bdcb644f396 100644 --- a/tools/sdk/esp32s3/opi_qspi/sections.ld +++ b/tools/sdk/esp32s3/opi_qspi/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32s3/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -219,9 +219,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -243,6 +278,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_th.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_winbond.*(.literal .literal.* .text .text.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_oct_flash_init.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_timing_tuning.*(.literal .literal.* .text .text.*) @@ -284,10 +320,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -309,13 +347,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -331,6 +367,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_th.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_winbond.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_oct_flash_init.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_rom_patch.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_timing_tuning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) @@ -362,22 +399,40 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.ext_ram.bss*) - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -403,7 +458,7 @@ SECTIONS _instruction_reserved_start = ABSOLUTE(.); _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) *(.wifi0iram .wifi0iram.*) *(.wifiorslpiram .wifiorslpiram.*) *(.wifirxiram .wifirxiram.*) @@ -416,6 +471,9 @@ SECTIONS *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port.*(.literal.esp_startup_start_app_other_cores .text.esp_startup_start_app_other_cores) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) @@ -478,8 +536,8 @@ SECTIONS { _flash_rodata_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.rodata_wlog_error .rodata_wlog_error.*) + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_oct_flash_init.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) diff --git a/tools/sdk/esp32s3/qio_opi/include/sdkconfig.h b/tools/sdk/esp32s3/qio_opi/include/sdkconfig.h index d50576947a4..d314b134af8 100644 --- a/tools/sdk/esp32s3/qio_opi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/qio_opi/include/sdkconfig.h @@ -561,8 +561,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -570,6 +570,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF 0 #define CONFIG_BT_CTRL_SLEEP_MODE_EFF 0 @@ -583,9 +584,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -696,8 +699,8 @@ #define CONFIG_SPIRAM_MODE_OCT 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_BOOT_INIT 1 @@ -804,12 +807,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -840,10 +845,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 #define CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1 1 @@ -907,6 +908,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -1062,8 +1064,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -1101,11 +1101,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -1134,61 +1129,95 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_QIO CONFIG_ESPTOOLPY_FLASHMODE_QIO +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -1201,22 +1230,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -1228,6 +1265,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -1255,5 +1293,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/qio_opi/libbootloader_support.a b/tools/sdk/esp32s3/qio_opi/libbootloader_support.a index 1e22e6881c8..006fb5f3b02 100644 Binary files a/tools/sdk/esp32s3/qio_opi/libbootloader_support.a and b/tools/sdk/esp32s3/qio_opi/libbootloader_support.a differ diff --git a/tools/sdk/esp32s3/qio_opi/libesp_hw_support.a b/tools/sdk/esp32s3/qio_opi/libesp_hw_support.a index 559b13977d8..64d32de9344 100644 Binary files a/tools/sdk/esp32s3/qio_opi/libesp_hw_support.a and b/tools/sdk/esp32s3/qio_opi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/qio_opi/libesp_system.a b/tools/sdk/esp32s3/qio_opi/libesp_system.a index cbf980f33ad..2c132bfba29 100644 Binary files a/tools/sdk/esp32s3/qio_opi/libesp_system.a and b/tools/sdk/esp32s3/qio_opi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/qio_opi/libfreertos.a b/tools/sdk/esp32s3/qio_opi/libfreertos.a index 3f93fbb3433..abce7f31034 100644 Binary files a/tools/sdk/esp32s3/qio_opi/libfreertos.a and b/tools/sdk/esp32s3/qio_opi/libfreertos.a differ diff --git a/tools/sdk/esp32s3/qio_opi/libspi_flash.a b/tools/sdk/esp32s3/qio_opi/libspi_flash.a index 400175bace8..18c8f2ce0c3 100644 Binary files a/tools/sdk/esp32s3/qio_opi/libspi_flash.a and b/tools/sdk/esp32s3/qio_opi/libspi_flash.a differ diff --git a/tools/sdk/esp32s3/qio_opi/sections.ld b/tools/sdk/esp32s3/qio_opi/sections.ld index b7d7e210c62..2e63ebf01c9 100644 --- a/tools/sdk/esp32s3/qio_opi/sections.ld +++ b/tools/sdk/esp32s3/qio_opi/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32s3/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -219,9 +219,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -243,6 +278,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_th.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_winbond.*(.literal .literal.* .text .text.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_timing_tuning.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_timing_config.*(.literal .literal.* .text .text.*) @@ -283,10 +319,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -308,13 +346,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -330,6 +366,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_th.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_winbond.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_rom_patch.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_timing_tuning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_timing_config.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) @@ -360,22 +397,40 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.ext_ram.bss*) - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -401,7 +456,7 @@ SECTIONS _instruction_reserved_start = ABSOLUTE(.); _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) *(.wifi0iram .wifi0iram.*) *(.wifiorslpiram .wifiorslpiram.*) *(.wifirxiram .wifirxiram.*) @@ -414,6 +469,9 @@ SECTIONS *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port.*(.literal.esp_startup_start_app_other_cores .text.esp_startup_start_app_other_cores) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) @@ -477,7 +535,7 @@ SECTIONS _flash_rodata_start = ABSOLUTE(.); *(.rodata_wlog_error .rodata_wlog_error.*) - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:opiram_psram.* *libesp_hw_support.a:rtc_clk.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) diff --git a/tools/sdk/esp32s3/qio_qspi/include/sdkconfig.h b/tools/sdk/esp32s3/qio_qspi/include/sdkconfig.h index ac5bf3a764e..9379610e99e 100644 --- a/tools/sdk/esp32s3/qio_qspi/include/sdkconfig.h +++ b/tools/sdk/esp32s3/qio_qspi/include/sdkconfig.h @@ -561,8 +561,8 @@ #define CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF 0 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0 1 #define CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF 0 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 1 -#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 9 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 1 +#define CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF 11 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM 100 #define CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 @@ -570,6 +570,7 @@ #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE 1 #define CONFIG_BT_CTRL_SCAN_DUPL_TYPE 0 #define CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE 100 +#define CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD 0 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS 1 #define CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF 0 #define CONFIG_BT_CTRL_SLEEP_MODE_EFF 0 @@ -583,9 +584,11 @@ #define CONFIG_BT_BLE_ENABLED 1 #define CONFIG_BT_GATTS_ENABLE 1 #define CONFIG_BT_GATT_MAX_SR_PROFILES 8 +#define CONFIG_BT_GATT_MAX_SR_ATTRIBUTES 100 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_BT_GATTC_ENABLE 1 +#define CONFIG_BT_GATTC_MAX_CACHE_CHAR 40 #define CONFIG_BT_GATTC_CONNECT_RETRY_COUNT 3 #define CONFIG_BT_BLE_SMP_ENABLE 1 #define CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING 1 @@ -696,8 +699,8 @@ #define CONFIG_SPIRAM_MODE_QUAD 1 #define CONFIG_SPIRAM_TYPE_AUTO 1 #define CONFIG_SPIRAM_SIZE -1 -#define CONFIG_DEFAULT_PSRAM_CLK_IO 30 -#define CONFIG_DEFAULT_PSRAM_CS_IO 26 +#define CONFIG_SPIRAM_CLK_IO 30 +#define CONFIG_SPIRAM_CS_IO 26 #define CONFIG_SPIRAM_SPEED_80M 1 #define CONFIG_SPIRAM 1 #define CONFIG_SPIRAM_USE_MALLOC 1 @@ -802,12 +805,14 @@ #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_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7 #define CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH 1 #define CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF 1 #define CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 1 #define CONFIG_ESP_COREDUMP_CHECK_BOOT 1 #define CONFIG_ESP_COREDUMP_ENABLE 1 #define CONFIG_ESP_COREDUMP_MAX_TASKS_NUM 64 +#define CONFIG_ESP_COREDUMP_STACK_SIZE 1024 #define CONFIG_FATFS_CODEPAGE_850 1 #define CONFIG_FATFS_CODEPAGE 850 #define CONFIG_FATFS_LFN_STACK 1 @@ -838,10 +843,6 @@ #define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 #define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 #define CONFIG_FMB_TIMER_PORT_ENABLED 1 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FMB_MASTER_TIMER_GROUP 0 -#define CONFIG_FMB_MASTER_TIMER_INDEX 0 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER 1 #define CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1 1 @@ -905,6 +906,7 @@ #define CONFIG_LWIP_TCP_MSS 1436 #define CONFIG_LWIP_TCP_TMR_INTERVAL 250 #define CONFIG_LWIP_TCP_MSL 60000 +#define CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT 20000 #define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_LWIP_TCP_WND_DEFAULT 5744 #define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 @@ -1060,8 +1062,6 @@ #define CONFIG_WL_SECTOR_SIZE 4096 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30 -#define CONFIG_WIFI_PROV_BLE_BONDING 1 -#define CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION 1 #define CONFIG_WPA_MBEDTLS_CRYPTO 1 #define CONFIG_IO_GLITCH_FILTER_TIME_MS 50 #define CONFIG_ESP_RMAKER_LIB_ESP_MQTT 1 @@ -1099,11 +1099,6 @@ #define CONFIG_RTC_STORE_DATA_SIZE 6144 #define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 4096 #define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80 -#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 -#define CONFIG_DSP_OPTIMIZED 1 -#define CONFIG_DSP_OPTIMIZATION 1 -#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 -#define CONFIG_DSP_MAX_FFT_SIZE 4096 #define CONFIG_OV7670_SUPPORT 1 #define CONFIG_OV7725_SUPPORT 1 #define CONFIG_NT99141_SUPPORT 1 @@ -1132,61 +1127,95 @@ #define CONFIG_LITTLEFS_BLOCK_CYCLES 512 #define CONFIG_LITTLEFS_USE_MTIME 1 #define CONFIG_LITTLEFS_MTIME_USE_SECONDS 1 +#define CONFIG_DSP_OPTIMIZATIONS_SUPPORTED 1 +#define CONFIG_DSP_OPTIMIZED 1 +#define CONFIG_DSP_OPTIMIZATION 1 +#define CONFIG_DSP_MAX_FFT_SIZE_4096 1 +#define CONFIG_DSP_MAX_FFT_SIZE 4096 /* List of deprecated options */ +#define CONFIG_A2D_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_A2D_TRACE_LEVEL #define CONFIG_A2D_TRACE_LEVEL_WARNING CONFIG_BT_LOG_A2D_TRACE_LEVEL_WARNING #define CONFIG_ADC2_DISABLE_DAC CONFIG_ADC_DISABLE_DAC +#define CONFIG_APPL_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_APPL_TRACE_LEVEL #define CONFIG_APPL_TRACE_LEVEL_WARNING CONFIG_BT_LOG_APPL_TRACE_LEVEL_WARNING #define CONFIG_APP_ROLLBACK_ENABLE CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE +#define CONFIG_AVCT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVCT_TRACE_LEVEL #define CONFIG_AVCT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVCT_TRACE_LEVEL_WARNING +#define CONFIG_AVDT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVDT_TRACE_LEVEL #define CONFIG_AVDT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVDT_TRACE_LEVEL_WARNING +#define CONFIG_AVRC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_AVRC_TRACE_LEVEL #define CONFIG_AVRC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_AVRC_TRACE_LEVEL_WARNING #define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT #define CONFIG_BLE_SMP_ENABLE CONFIG_BT_BLE_SMP_ENABLE #define CONFIG_BLUEDROID_ENABLED CONFIG_BT_BLUEDROID_ENABLED +#define CONFIG_BLUEDROID_PINNED_TO_CORE CONFIG_BT_BLUEDROID_PINNED_TO_CORE #define CONFIG_BLUEDROID_PINNED_TO_CORE_0 CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0 +#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BLUFI_TRACE_LEVEL #define CONFIG_BLUFI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BLUFI_TRACE_LEVEL_WARNING +#define CONFIG_BNEP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BNEP_TRACE_LEVEL +#define CONFIG_BTC_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTC_TRACE_LEVEL #define CONFIG_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #define CONFIG_BTC_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTC_TRACE_LEVEL_WARNING +#define CONFIG_BTH_LOG_SDP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SDP_TRACE_LEVEL +#define CONFIG_BTIF_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTIF_TRACE_LEVEL #define CONFIG_BTIF_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTIF_TRACE_LEVEL_WARNING +#define CONFIG_BTM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_BTM_TRACE_LEVEL #define CONFIG_BTM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_BTM_TRACE_LEVEL_WARNING #define CONFIG_BTU_TASK_STACK_SIZE CONFIG_BT_BTU_TASK_STACK_SIZE #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART +#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE #define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT +#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM #define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS #define CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE +#define CONFIG_DEFAULT_PSRAM_CLK_IO CONFIG_SPIRAM_CLK_IO +#define CONFIG_DEFAULT_PSRAM_CS_IO CONFIG_SPIRAM_CS_IO #define CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32S2_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP #define CONFIG_ESP32_APPTRACE_DEST_NONE CONFIG_APPTRACE_DEST_NONE +#define CONFIG_ESP32_APPTRACE_LOCK_ENABLE CONFIG_APPTRACE_LOCK_ENABLE #define CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 #define CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #define CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM +#define CONFIG_ESP32_CORE_DUMP_STACK_SIZE CONFIG_ESP_COREDUMP_STACK_SIZE #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY +#define CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE #define CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define CONFIG_ESP32_PANIC_PRINT_REBOOT CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE +#define CONFIG_ESP32_PHY_MAX_TX_POWER CONFIG_ESP_PHY_MAX_TX_POWER #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER CONFIG_ESP_PHY_MAX_WIFI_TX_POWER #define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN +#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT #define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP #define CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP #define CONFIG_FLASHMODE_QIO CONFIG_ESPTOOLPY_FLASHMODE_QIO +#define CONFIG_GAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GAP_TRACE_LEVEL #define CONFIG_GAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GAP_TRACE_LEVEL_WARNING #define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL #define CONFIG_GATTC_ENABLE CONFIG_BT_GATTC_ENABLE #define CONFIG_GATTS_ENABLE CONFIG_BT_GATTS_ENABLE #define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO +#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE +#define CONFIG_GATT_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_GATT_TRACE_LEVEL #define CONFIG_GATT_TRACE_LEVEL_WARNING CONFIG_BT_LOG_GATT_TRACE_LEVEL_WARNING +#define CONFIG_HCI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HCI_TRACE_LEVEL #define CONFIG_HCI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HCI_TRACE_LEVEL_WARNING +#define CONFIG_HID_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_HID_TRACE_LEVEL #define CONFIG_HID_TRACE_LEVEL_WARNING CONFIG_BT_LOG_HID_TRACE_LEVEL_WARNING #define CONFIG_INT_WDT CONFIG_ESP_INT_WDT #define CONFIG_INT_WDT_CHECK_CPU1 CONFIG_ESP_INT_WDT_CHECK_CPU1 #define CONFIG_INT_WDT_TIMEOUT_MS CONFIG_ESP_INT_WDT_TIMEOUT_MS #define CONFIG_IPC_TASK_STACK_SIZE CONFIG_ESP_IPC_TASK_STACK_SIZE +#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_L2CAP_TRACE_LEVEL #define CONFIG_L2CAP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_L2CAP_TRACE_LEVEL_WARNING +#define CONFIG_LOG_BOOTLOADER_LEVEL CONFIG_BOOTLOADER_LOG_LEVEL #define CONFIG_LOG_BOOTLOADER_LEVEL_NONE CONFIG_BOOTLOADER_LOG_LEVEL_NONE #define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE #define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE @@ -1199,22 +1228,30 @@ #define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE #define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO #define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX #define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED +#define CONFIG_MCA_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_MCA_TRACE_LEVEL #define CONFIG_MCA_TRACE_LEVEL_WARNING CONFIG_BT_LOG_MCA_TRACE_LEVEL_WARNING +#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD #define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B +#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE +#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL #define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_SIZE +#define CONFIG_OSI_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_OSI_TRACE_LEVEL #define CONFIG_OSI_TRACE_LEVEL_WARNING CONFIG_BT_LOG_OSI_TRACE_LEVEL_WARNING +#define CONFIG_PAN_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_PAN_TRACE_LEVEL #define CONFIG_PAN_TRACE_LEVEL_WARNING CONFIG_BT_LOG_PAN_TRACE_LEVEL_WARNING #define CONFIG_POST_EVENTS_FROM_IRAM_ISR CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR #define CONFIG_POST_EVENTS_FROM_ISR CONFIG_ESP_EVENT_POST_FROM_ISR +#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL #define CONFIG_RFCOMM_TRACE_LEVEL_WARNING CONFIG_BT_LOG_RFCOMM_TRACE_LEVEL_WARNING #define CONFIG_SDP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SDP_TRACE_LEVEL_WARNING #define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS +#define CONFIG_SMP_ENABLE CONFIG_BT_SMP_ENABLE +#define CONFIG_SMP_INITIAL_TRACE_LEVEL CONFIG_BT_LOG_SMP_TRACE_LEVEL #define CONFIG_SMP_TRACE_LEVEL_WARNING CONFIG_BT_LOG_SMP_TRACE_LEVEL_WARNING #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS +#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK #define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM #define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT @@ -1226,6 +1263,7 @@ #define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC #define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S #define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE +#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY #define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 #define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE #define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX @@ -1253,5 +1291,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 "6407ecb3f8" -#define CONFIG_ARDUINO_IDF_BRANCH "v4.4.3" +#define CONFIG_ARDUINO_IDF_COMMIT "4c2afac355" +#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4" diff --git a/tools/sdk/esp32s3/qio_qspi/libbootloader_support.a b/tools/sdk/esp32s3/qio_qspi/libbootloader_support.a index 1e22e6881c8..006fb5f3b02 100644 Binary files a/tools/sdk/esp32s3/qio_qspi/libbootloader_support.a and b/tools/sdk/esp32s3/qio_qspi/libbootloader_support.a differ diff --git a/tools/sdk/esp32s3/qio_qspi/libesp_hw_support.a b/tools/sdk/esp32s3/qio_qspi/libesp_hw_support.a index 537d2ff9f80..754a90b9737 100644 Binary files a/tools/sdk/esp32s3/qio_qspi/libesp_hw_support.a and b/tools/sdk/esp32s3/qio_qspi/libesp_hw_support.a differ diff --git a/tools/sdk/esp32s3/qio_qspi/libesp_system.a b/tools/sdk/esp32s3/qio_qspi/libesp_system.a index a059d7f2d31..e8c03242b1d 100644 Binary files a/tools/sdk/esp32s3/qio_qspi/libesp_system.a and b/tools/sdk/esp32s3/qio_qspi/libesp_system.a differ diff --git a/tools/sdk/esp32s3/qio_qspi/libfreertos.a b/tools/sdk/esp32s3/qio_qspi/libfreertos.a index 3f93fbb3433..abce7f31034 100644 Binary files a/tools/sdk/esp32s3/qio_qspi/libfreertos.a and b/tools/sdk/esp32s3/qio_qspi/libfreertos.a differ diff --git a/tools/sdk/esp32s3/qio_qspi/libspi_flash.a b/tools/sdk/esp32s3/qio_qspi/libspi_flash.a index 6b731483fcc..66a50ed9bae 100644 Binary files a/tools/sdk/esp32s3/qio_qspi/libspi_flash.a and b/tools/sdk/esp32s3/qio_qspi/libspi_flash.a differ diff --git a/tools/sdk/esp32s3/qio_qspi/sections.ld b/tools/sdk/esp32s3/qio_qspi/sections.ld index 42f620ccb9a..25b97ac6926 100644 --- a/tools/sdk/esp32s3/qio_qspi/sections.ld +++ b/tools/sdk/esp32s3/qio_qspi/sections.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/ld/esp32s3/sections.ld.in */ +/* Generated from: /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in */ /* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD @@ -219,9 +219,44 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.literal .literal.* .text .text.*) *libhal.a:systimer_hal.*(.literal .literal.* .text .text.*) *libhal.a:wdt_hal_iram.*(.literal .literal.* .text .text.*) - *libheap.a:heap_tlsf.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap.*(.literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*(.literal .literal.* .text .text.*) + *libheap.a:heap_tlsf.*(.literal.tlsf_align_size .text.tlsf_align_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_alloc_overhead .text.tlsf_alloc_overhead) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size .text.tlsf_block_size) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_max .text.tlsf_block_size_max) + *libheap.a:heap_tlsf.*(.literal.tlsf_block_size_min .text.tlsf_block_size_min) + *libheap.a:heap_tlsf.*(.literal.tlsf_free .text.tlsf_free) + *libheap.a:heap_tlsf.*(.literal.tlsf_get_pool .text.tlsf_get_pool) + *libheap.a:heap_tlsf.*(.literal.tlsf_malloc .text.tlsf_malloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign .text.tlsf_memalign) + *libheap.a:heap_tlsf.*(.literal.tlsf_memalign_offs .text.tlsf_memalign_offs) + *libheap.a:heap_tlsf.*(.literal.tlsf_realloc .text.tlsf_realloc) + *libheap.a:heap_tlsf.*(.literal.tlsf_size .text.tlsf_size) + *libheap.a:multi_heap.*(.literal.assert_valid_block .text.assert_valid_block) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl .text.multi_heap_aligned_alloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_aligned_alloc_impl_offs .text.multi_heap_aligned_alloc_impl_offs) + *libheap.a:multi_heap.*(.literal.multi_heap_free_impl .text.multi_heap_free_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_allocated_size_impl .text.multi_heap_get_allocated_size_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_block_address_impl .text.multi_heap_get_block_address_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_get_first_block .text.multi_heap_get_first_block) + *libheap.a:multi_heap.*(.literal.multi_heap_get_next_block .text.multi_heap_get_next_block) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_lock .text.multi_heap_internal_lock) + *libheap.a:multi_heap.*(.literal.multi_heap_internal_unlock .text.multi_heap_internal_unlock) + *libheap.a:multi_heap.*(.literal.multi_heap_is_free .text.multi_heap_is_free) + *libheap.a:multi_heap.*(.literal.multi_heap_malloc_impl .text.multi_heap_malloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_realloc_impl .text.multi_heap_realloc_impl) + *libheap.a:multi_heap.*(.literal.multi_heap_set_lock .text.multi_heap_set_lock) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_alloc .text.multi_heap_aligned_alloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_aligned_free .text.multi_heap_aligned_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free .text.multi_heap_free) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_allocated_size .text.multi_heap_get_allocated_size) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_address .text.multi_heap_get_block_address) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_get_block_owner .text.multi_heap_get_block_owner) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_check_block_poisoning .text.multi_heap_internal_check_block_poisoning) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_internal_poison_fill_region .text.multi_heap_internal_poison_fill_region) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_malloc .text.multi_heap_malloc) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_realloc .text.multi_heap_realloc) + *libheap.a:multi_heap_poisoning.*(.literal.poison_allocated_region .text.poison_allocated_region) + *libheap.a:multi_heap_poisoning.*(.literal.verify_allocated_region .text.verify_allocated_region) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) *liblog.a:log_freertos.*(.literal.esp_log_early_timestamp .text.esp_log_early_timestamp) *liblog.a:log_freertos.*(.literal.esp_log_impl_lock .text.esp_log_impl_lock) @@ -243,6 +278,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_th.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_winbond.*(.literal .literal.* .text .text.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_timing_tuning.*(.literal .literal.* .text .text.*) *libspi_flash.a:spi_timing_config.*(.literal .literal.* .text .text.*) @@ -283,10 +319,12 @@ SECTIONS _coredump_dram_end = ABSOLUTE(.); *libapp_trace.a:app_trace.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libapp_trace.a:app_trace_util.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _bt_data_start = ABSOLUTE(.); *libbt.a:(.data .data.*) . = ALIGN(4); _bt_data_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_data_start = ABSOLUTE(.); *libbtdm_app.a:(.data .data.*) . = ALIGN(4); @@ -308,13 +346,11 @@ SECTIONS *libhal.a:spi_slave_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:systimer_hal.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libhal.a:wdt_hal_iram.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:heap_tlsf.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) - *libheap.a:multi_heap_poisoning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:abort.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:assert.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:heap.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libnewlib.a:stdatomic.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + . = ALIGN(4); _nimble_data_start = ABSOLUTE(.); *libnimble.a:(.data .data.*) . = ALIGN(4); @@ -330,6 +366,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_mxic_opi.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_th.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_chip_winbond.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) + *libspi_flash.a:spi_flash_hpm_enable.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_rom_patch.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_flash_timing_tuning.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) *libspi_flash.a:spi_timing_config.*(.rodata .rodata.* .sdata2 .sdata2.* .srodata .srodata.*) @@ -360,22 +397,40 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.ext_ram.bss*) - *(.bss .bss.*) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) .bss.*) *(.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) + *(EXCLUDE_FILE(*libbt.a *libbtdm_app.a *libnimble.a) COMMON) + . = ALIGN(4); _bt_bss_start = ABSOLUTE(.); - *libbt.a:(.bss .bss.* COMMON) + *libbt.a:(.bss .bss.*) . = ALIGN(4); _bt_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _bt_common_start = ABSOLUTE(.); + *libbt.a:(COMMON) + . = ALIGN(4); + _bt_common_end = ABSOLUTE(.); + . = ALIGN(4); _btdm_bss_start = ABSOLUTE(.); - *libbtdm_app.a:(.bss .bss.* COMMON) + *libbtdm_app.a:(.bss .bss.*) . = ALIGN(4); _btdm_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _btdm_common_start = ABSOLUTE(.); + *libbtdm_app.a:(COMMON) + . = ALIGN(4); + _btdm_common_end = ABSOLUTE(.); + . = ALIGN(4); _nimble_bss_start = ABSOLUTE(.); - *libnimble.a:(.bss .bss.* COMMON) + *libnimble.a:(.bss .bss.*) . = ALIGN(4); _nimble_bss_end = ABSOLUTE(.); + . = ALIGN(4); + _nimble_common_start = ABSOLUTE(.); + *libnimble.a:(COMMON) + . = ALIGN(4); + _nimble_common_end = ABSOLUTE(.); *(.dynsbss) *(.sbss) @@ -401,7 +456,7 @@ SECTIONS _instruction_reserved_start = ABSOLUTE(.); _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text EXCLUDE_FILE(*libesp_ringbuf.a *libfreertos.a *libgcov.a *librtc.a *libxt_hal.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libesp_hw_support.a:cpu_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:rtc_init.* *libesp_hw_support.a:rtc_pm.* *libesp_hw_support.a:rtc_sleep.* *libesp_hw_support.a:rtc_time.* *libesp_hw_support.a:rtc_wdt.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:esp_system.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libgcc.a:lib2funcs.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *liblog.a:log.* *liblog.a:log_freertos.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.* *libxtensa.a:eri.* *libxtensa.a:xtensa_intr_asm.*) .text.*) *(.wifi0iram .wifi0iram.*) *(.wifiorslpiram .wifiorslpiram.*) *(.wifirxiram .wifirxiram.*) @@ -414,6 +469,9 @@ SECTIONS *libfreertos.a:port.*(.literal.esp_startup_start_app .text.esp_startup_start_app) *libfreertos.a:port.*(.literal.esp_startup_start_app_other_cores .text.esp_startup_start_app_other_cores) *libfreertos.a:port_common.*(.literal.main_task .text.main_task) + *libheap.a:heap_tlsf.*(.literal.default_walker .literal.tlsf_add_pool .literal.tlsf_check .literal.tlsf_check_pool .literal.tlsf_create .literal.tlsf_create_with_pool .literal.tlsf_fit_size .literal.tlsf_remove_pool .literal.tlsf_walk_pool .text .text.default_walker .text.integrity_walker .text.tlsf_add_pool .text.tlsf_check .text.tlsf_check_pool .text.tlsf_create .text.tlsf_create_with_pool .text.tlsf_fit_size .text.tlsf_pool_overhead .text.tlsf_remove_pool .text.tlsf_walk_pool) + *libheap.a:multi_heap.*(.literal.multi_heap_check .literal.multi_heap_dump .literal.multi_heap_dump_tlsf .literal.multi_heap_get_info_impl .literal.multi_heap_register_impl .literal.tlsf_check_hook .text .text.multi_heap_check .text.multi_heap_dump .text.multi_heap_dump_tlsf .text.multi_heap_free_size_impl .text.multi_heap_get_info_impl .text.multi_heap_get_info_tlsf .text.multi_heap_minimum_free_size_impl .text.multi_heap_register_impl .text.tlsf_check_hook) + *libheap.a:multi_heap_poisoning.*(.literal.multi_heap_free_size .literal.multi_heap_get_info .literal.multi_heap_minimum_free_size .literal.multi_heap_register .text .text.multi_heap_free_size .text.multi_heap_get_info .text.multi_heap_minimum_free_size .text.multi_heap_register .text.subtract_poison_overhead) *liblog.a:log.*(.literal.esp_log_level_get .literal.esp_log_level_set .literal.esp_log_set_vprintf .literal.esp_log_writev .literal.heap_bubble_down .literal.s_log_level_get_and_unlock .text .text.esp_log_level_get .text.esp_log_level_set .text.esp_log_set_vprintf .text.esp_log_writev .text.heap_bubble_down .text.s_log_level_get_and_unlock) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text .text.esp_log_system_timestamp) @@ -476,7 +534,7 @@ SECTIONS { _flash_rodata_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libheap.a:heap_tlsf.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) + *(EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .rodata.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2 EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .sdata2.* EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata EXCLUDE_FILE(*libgcov.a *libphy.a *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libesp_hw_support.a:rtc_clk.* *libesp_hw_support.a:spiram_psram.* *libesp_system.a:esp_err.* *libesp_system.a:ubsan.* *libgcc.a:_divsf3.* *libhal.a:cpu_hal.* *libhal.a:i2c_hal_iram.* *libhal.a:ledc_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_encrypt_hal_iram.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:spi_flash_hal_iram.* *libhal.a:spi_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libnewlib.a:abort.* *libnewlib.a:assert.* *libnewlib.a:heap.* *libnewlib.a:stdatomic.* *libsoc.a:lldesc.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_boya.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:spi_flash_chip_generic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_mxic_opi.* *libspi_flash.a:spi_flash_chip_th.* *libspi_flash.a:spi_flash_chip_winbond.* *libspi_flash.a:spi_flash_hpm_enable.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_timing_tuning.* *libspi_flash.a:spi_timing_config.*) .srodata.*) *(.rodata_wlog_error .rodata_wlog_error.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ diff --git a/tools/sdk/esp32s3/sdkconfig b/tools/sdk/esp32s3/sdkconfig index 422f9b1caf9..7f75eea0de7 100644 --- a/tools/sdk/esp32s3/sdkconfig +++ b/tools/sdk/esp32s3/sdkconfig @@ -351,6 +351,8 @@ CONFIG_SR_MN_CN_MULTINET4_5_SINGLE_RECOGNITION=y # CONFIG_SR_MN_CN_MULTINET5_RECOGNITION_QUANT8 is not set # CONFIG_SR_MN_EN_NONE is not set CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8=y +# CONFIG_SR_MN_EN_MULTINET6_QUANT is not set +# CONFIG_SR_MN_EN_MULTINET6_CTC_QUANT is not set # # Add Chinese speech commands @@ -849,13 +851,13 @@ CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF=0 # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N6 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N3 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N0 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3=y +# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P6 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 is not set +CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9=y # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P12 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P15 is not set # CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P18 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=9 +CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=11 CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 @@ -865,6 +867,7 @@ CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DEVICE=y # CONFIG_BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE is not set CONFIG_BT_CTRL_SCAN_DUPL_TYPE=0 CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE=100 +CONFIG_BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD=0 # CONFIG_BT_CTRL_BLE_MESH_SCAN_DUPL_EN is not set # CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN is not set CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS=y @@ -880,6 +883,7 @@ CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 CONFIG_BT_CTRL_HCI_TL_EFF=1 # CONFIG_BT_CTRL_AGC_RECORRECT_EN is not set +# CONFIG_BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX is not set # end of Bluetooth controller CONFIG_BT_BLUEDROID_ENABLED=y @@ -900,10 +904,12 @@ CONFIG_BT_GATTS_ENABLE=y # CONFIG_BT_GATTS_PPCP_CHAR_GAP is not set # CONFIG_BT_BLE_BLUFI_ENABLE is not set CONFIG_BT_GATT_MAX_SR_PROFILES=8 +CONFIG_BT_GATT_MAX_SR_ATTRIBUTES=100 # CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL is not set CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0 CONFIG_BT_GATTC_ENABLE=y +CONFIG_BT_GATTC_MAX_CACHE_CHAR=40 # CONFIG_BT_GATTC_CACHE_NVS_FLASH is not set CONFIG_BT_GATTC_CONNECT_RETRY_COUNT=3 CONFIG_BT_BLE_SMP_ENABLE=y @@ -1089,6 +1095,7 @@ CONFIG_BT_MULTI_CONNECTION_ENBALE=y # CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY is not set # CONFIG_BT_BLE_HOST_QUEUE_CONG_CHECK is not set CONFIG_BT_SMP_ENABLE=y +# CONFIG_BT_BLE_ACT_SCAN_REP_ADV_SCAN is not set CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT=30 CONFIG_BT_MAX_DEVICE_NAME_LEN=32 CONFIG_BT_BLE_RPA_SUPPORTED=y @@ -1131,6 +1138,7 @@ CONFIG_BLE_MESH_CRPL=10 CONFIG_BLE_MESH_MSG_CACHE_SIZE=10 CONFIG_BLE_MESH_ADV_BUF_COUNT=60 CONFIG_BLE_MESH_IVU_DIVIDER=4 +# CONFIG_BLE_MESH_IVU_RECOVERY_IVI is not set CONFIG_BLE_MESH_TX_SEG_MSG_COUNT=1 CONFIG_BLE_MESH_RX_SEG_MSG_COUNT=1 CONFIG_BLE_MESH_RX_SDU_MAX=384 @@ -1332,14 +1340,8 @@ CONFIG_SPIRAM_TYPE_AUTO=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=-1 - -# -# PSRAM Clock and CS IO for ESP32S3 -# -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set # CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY is not set @@ -1629,6 +1631,7 @@ CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT=y # CONFIG_ESP_WIFI_GMAC_SUPPORT is not set CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT is not set +CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM=7 # end of Wi-Fi # @@ -1643,6 +1646,7 @@ CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y CONFIG_ESP_COREDUMP_CHECK_BOOT=y CONFIG_ESP_COREDUMP_ENABLE=y CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 +CONFIG_ESP_COREDUMP_STACK_SIZE=1024 # end of Core dump # @@ -1712,11 +1716,7 @@ CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 CONFIG_FMB_TIMER_PORT_ENABLED=y -CONFIG_FMB_TIMER_GROUP=0 -CONFIG_FMB_TIMER_INDEX=0 -CONFIG_FMB_MASTER_TIMER_GROUP=0 -CONFIG_FMB_MASTER_TIMER_INDEX=0 -# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# CONFIG_FMB_TIMER_USE_ISR_DISPATCH_METHOD is not set # end of Modbus configuration # @@ -1878,6 +1878,7 @@ CONFIG_LWIP_TCP_SYNMAXRTX=6 CONFIG_LWIP_TCP_MSS=1436 CONFIG_LWIP_TCP_TMR_INTERVAL=250 CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=20000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 CONFIG_LWIP_TCP_WND_DEFAULT=5744 CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 @@ -2321,8 +2322,8 @@ CONFIG_WL_SECTOR_SIZE=4096 # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 -CONFIG_WIFI_PROV_BLE_BONDING=y -CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y +# CONFIG_WIFI_PROV_BLE_BONDING is not set +# CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION is not set # CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV is not set # end of Wi-Fi Provisioning Manager @@ -2415,23 +2416,6 @@ CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT=80 # CONFIG_RTC_STORE_OVERWRITE_NON_CRITICAL_DATA is not set # end of RTC Store -# -# DSP Library -# -CONFIG_DSP_OPTIMIZATIONS_SUPPORTED=y -# CONFIG_DSP_ANSI is not set -CONFIG_DSP_OPTIMIZED=y -CONFIG_DSP_OPTIMIZATION=1 -# CONFIG_DSP_MAX_FFT_SIZE_512 is not set -# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set -# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set -CONFIG_DSP_MAX_FFT_SIZE_4096=y -# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set -# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set -# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set -CONFIG_DSP_MAX_FFT_SIZE=4096 -# end of DSP Library - # # Camera configuration # @@ -2481,6 +2465,23 @@ CONFIG_LITTLEFS_MTIME_USE_SECONDS=y # CONFIG_LITTLEFS_SPIFFS_COMPAT is not set # CONFIG_LITTLEFS_FLUSH_FILE_EVERY_WRITE is not set # end of LittleFS + +# +# DSP Library +# +CONFIG_DSP_OPTIMIZATIONS_SUPPORTED=y +# CONFIG_DSP_ANSI is not set +CONFIG_DSP_OPTIMIZED=y +CONFIG_DSP_OPTIMIZATION=1 +# CONFIG_DSP_MAX_FFT_SIZE_512 is not set +# CONFIG_DSP_MAX_FFT_SIZE_1024 is not set +# CONFIG_DSP_MAX_FFT_SIZE_2048 is not set +CONFIG_DSP_MAX_FFT_SIZE_4096=y +# CONFIG_DSP_MAX_FFT_SIZE_8192 is not set +# CONFIG_DSP_MAX_FFT_SIZE_16384 is not set +# CONFIG_DSP_MAX_FFT_SIZE_32768 is not set +CONFIG_DSP_MAX_FFT_SIZE=4096 +# end of DSP Library # end of Component config # @@ -2720,9 +2721,12 @@ CONFIG_BLUFI_TRACE_LEVEL_WARNING=y CONFIG_BLUFI_INITIAL_TRACE_LEVEL=2 # CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK is not set CONFIG_SMP_ENABLE=y +# CONFIG_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY is not set CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT=30 # CONFIG_BLE_MESH_ALLOC_FROM_PSRAM_FIRST is not set CONFIG_ADC2_DISABLE_DAC=y +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 # CONFIG_EVENT_LOOP_PROFILING is not set CONFIG_POST_EVENTS_FROM_ISR=y CONFIG_POST_EVENTS_FROM_IRAM_ISR=y @@ -2766,6 +2770,7 @@ CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y CONFIG_ESP32_ENABLE_COREDUMP=y CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 +CONFIG_ESP32_CORE_DUMP_STACK_SIZE=1024 CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 CONFIG_MB_QUEUE_LENGTH=20 @@ -2778,8 +2783,6 @@ CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 CONFIG_MB_CONTROLLER_STACK_SIZE=4096 CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 CONFIG_MB_TIMER_PORT_ENABLED=y -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048 diff --git a/tools/sdk/versions.txt b/tools/sdk/versions.txt index 83cca2c4ee4..09bfaa20a84 100644 --- a/tools/sdk/versions.txt +++ b/tools/sdk/versions.txt @@ -1,10 +1,10 @@ -esp-idf: v4.4.3 6407ecb3f8 -arduino: master 947ee6fd +esp-idf: release/v4.4 4c2afac355 +arduino: idf-release/v4.4 d6a850bd esp-dl: master f3006d7 -esp-dsp: master 8e5e9f6 -esp-insights: main 94f929d -esp-rainmaker: master fe94cc6 -esp-sr: master 7154450 -esp32-camera: master 402b811 -esp_littlefs: master f2a949f -tinyusb: master 97984b420 +esp-insights: main 4781e13 +esp-rainmaker: master b863717 +esp-sr: master e9763db +esp32-camera: master 2478a5f +esp_littlefs: master 8e42765 +espressif__esp-dsp: master 94321ab +tinyusb: master 334263523