diff --git a/package/package_esp32_index.template.json b/package/package_esp32_index.template.json index cf64babb..c46183ca 100644 --- a/package/package_esp32_index.template.json +++ b/package/package_esp32_index.template.json @@ -54,83 +54,83 @@ "tools": [ { "name": "xtensa-esp32-elf-gcc", - "version": "gcc8_2_0-esp-2020r2", + "version": "gcc8_4_0-esp-2020r3", "systems": [ { "host": "i686-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32-elf-gcc8_2_0-esp-2020r2-win32.zip", - "archiveFileName": "xtensa-esp32-elf-gcc8_2_0-esp-2020r2-win32.zip", - "checksum": "SHA-256:f2ba6bdb1c4b2178955e5e7a204552bb754709e02eaf9d8febe770d46629db8f", - "size": "103885422" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-win32.zip", + "archiveFileName": "xtensa-esp32-elf-gcc8_4_0-esp-2020r3-win32.zip", + "checksum": "SHA-256:81cecd5493a3fcf2118977f3fd60bd0a13a4aeac8fe6760d912f96d2c34fab66", + "size": "104226379" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32-elf-gcc8_2_0-esp-2020r2-macos.tar.gz", - "archiveFileName": "xtensa-esp32-elf-gcc8_2_0-esp-2020r2-macos.tar.gz", - "checksum": "SHA-256:48b288e3e5c60623851616bf545b8e4fc5382dc980d6b9682373f11013fe5776", - "size": "92201363" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-macos.tar.gz", + "archiveFileName": "xtensa-esp32-elf-gcc8_4_0-esp-2020r3-macos.tar.gz", + "checksum": "SHA-256:6845f786303b26c4a55ede57487ba65bd25737232fe6104be03f25bb62f4631c", + "size": "92424226" }, { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-amd64.tar.gz", - "archiveFileName": "xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-amd64.tar.gz", - "checksum": "SHA-256:6c73b9e9d252810a63ca5e94b497c6c09fb8c903fe9c477f385bdc2ab4d2187e", - "size": "85520229" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz", + "archiveFileName": "xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz", + "checksum": "SHA-256:674080a12f9c5ebe5a3a5ce51c6deaeffe6dfb06d6416233df86f25b574e9279", + "size": "85731226" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-i686.tar.gz", - "archiveFileName": "xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-i686.tar.gz", - "checksum": "SHA-256:a003c7bc9b9f0dd82170480aadd62c0586fc6e3d69119c637c957125164f40e5", - "size": "87467927" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-i686.tar.gz", + "archiveFileName": "xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-i686.tar.gz", + "checksum": "SHA-256:076b7e05304e26aa6ec105c9e0dc74addca079bc2cae6e42ee7575c5ded29877", + "size": "87715092" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-armel.tar.gz", - "archiveFileName": "xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-armel.tar.gz", - "checksum": "SHA-256:51dd318c4f2ac1fe2b206d029e1d2080c922107cc56e4a3802b1acafd7b436db", - "size": "83672167" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-armel.tar.gz", + "archiveFileName": "xtensa-esp32-elf-gcc8_4_0-esp-2020r3-linux-armel.tar.gz", + "checksum": "SHA-256:6771e011dffa2438ef84ff3474538b4a69df8f9d4cfae3b3707ca31c782ed7db", + "size": "83888892" } ] }, { "name": "xtensa-esp32s2-elf-gcc", - "version": "gcc8_2_0-esp-2020r2", + "version": "gcc8_4_0-esp-2020r3", "systems": [ { "host": "i686-mingw32", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-win32.zip", - "archiveFileName": "xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-win32.zip", - "checksum": "SHA-256:e7fe06fc37f1046765653ec1ed571f06a86a5b5cde7b3a0ab71c44232c5b6a2f", - "size": "104302935" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-win32.zip", + "archiveFileName": "xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-win32.zip", + "checksum": "SHA-256:d078d614ae864ae4a37fcb5b83323af0a5cfdbd8243607664becdd0f977a1e33", + "size": "104659541" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-macos.tar.gz", - "archiveFileName": "xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-macos.tar.gz", - "checksum": "SHA-256:76d17b170e667b73dbb013e8efa8032b18d9e68f6e364745639e851d99ad68a3", - "size": "92562690" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-macos.tar.gz", + "archiveFileName": "xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-macos.tar.gz", + "checksum": "SHA-256:fe19b0c873879d8d89ec040f4db04a3ab27d769d3fd5f55fe59a28b6b111d09c", + "size": "92817351" }, { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-linux-amd64.tar.gz", - "archiveFileName": "xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-linux-amd64.tar.gz", - "checksum": "SHA-256:f5efd18a96f773b73bd6bcdee4476b5e4fbccea6befe0cb62c08675e4c68a65f", - "size": "85796525" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz", + "archiveFileName": "xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz", + "checksum": "SHA-256:40fafa47045167feda0cd07827db5207ebfeb4a3b6b24475957a921bc92805ed", + "size": "86069526" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-linux-i686.tar.gz", - "archiveFileName": "xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-linux-i686.tar.gz", - "checksum": "SHA-256:53e8b9d38c409a207685b615924eada2ee9719ac4fe8c79caa7a89c788a65a7d", - "size": "87773410" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-i686.tar.gz", + "archiveFileName": "xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-i686.tar.gz", + "checksum": "SHA-256:bd3a91166206a1a7ff7c572e15389e1938c3cdce588032a5e915be677a945638", + "size": "88053499" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r2/xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-linux-armel.tar.gz", - "archiveFileName": "xtensa-esp32s2-elf-gcc8_2_0-esp-2020r2-linux-armel.tar.gz", - "checksum": "SHA-256:40ed8c365a3e32643c7fc9cf44908fb166d3acc52754ebf0b03e82122a0ecd2c", - "size": "84041933" + "url": "https://github.com/espressif/crosstool-NG/releases/download/esp-2020r3/xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-armel.tar.gz", + "archiveFileName": "xtensa-esp32s2-elf-gcc8_4_0-esp-2020r3-linux-armel.tar.gz", + "checksum": "SHA-256:6c1efec4c7829202279388ccb388e8a17a34464bc351d677c4f04d95ea4b4ce0", + "size": "84254468" } ] }, @@ -140,45 +140,45 @@ "systems": [ { "host": "i686-mingw32", - "url": "https://dl.espressif.com/dl/esptool-3.0.0.1-windows.zip", - "archiveFileName": "esptool-3.0.0.1-windows.zip", - "checksum": "SHA-256:6d95564d6b2786966b28155d5f066341b04a00f2f168082272c264db5c48f8fe", - "size": "3434601" + "url": "https://dl.espressif.com/dl/esptool-3.0.0.2-windows.zip", + "archiveFileName": "esptool-3.0.0.2-windows.zip", + "checksum": "SHA-256:b192bfc1545a3c92658ce586b4edcc2aca3f0ad4b3fa8417d658bc8a48f1387e", + "size": "3434736" }, { "host": "x86_64-apple-darwin", - "url": "https://dl.espressif.com/dl/esptool-3.0.0.1-macos.tar.gz", - "archiveFileName": "esptool-3.0.0.1-macos.tar.gz", - "checksum": "SHA-256:f382920c176a6143ccdb39efedda514214b9804d1932b1f86a591bd3b5c7ac8f", - "size": "3849476" + "url": "https://dl.espressif.com/dl/esptool-3.0.0.2-macos.tar.gz", + "archiveFileName": "esptool-3.0.0.2-macos.tar.gz", + "checksum": "SHA-256:9213f46d5aa865558da4a2ef4218e87eef4782779128083c15ce2b3e4d07a1ea", + "size": "3849615" }, { "host": "x86_64-pc-linux-gnu", - "url": "https://dl.espressif.com/dl/esptool-3.0.0.1-linux.tar.gz", - "archiveFileName": "esptool-3.0.0.1-linux.tar.gz", - "checksum": "SHA-256:0af60bb12037266a19e086f0873143b1217e9dd508c9b864c2efc2250de812ff", - "size": "57123" + "url": "https://dl.espressif.com/dl/esptool-3.0.0.2-linux.tar.gz", + "archiveFileName": "esptool-3.0.0.2-linux.tar.gz", + "checksum": "SHA-256:d5cb51da1c74ff69f81b820470d2ecccb5c7c3a2dec7776483d4c89588b00020", + "size": "57526" }, { "host": "i686-pc-linux-gnu", - "url": "https://dl.espressif.com/dl/esptool-3.0.0.1-linux.tar.gz", - "archiveFileName": "esptool-3.0.0.1-linux.tar.gz", - "checksum": "SHA-256:0af60bb12037266a19e086f0873143b1217e9dd508c9b864c2efc2250de812ff", - "size": "57123" + "url": "https://dl.espressif.com/dl/esptool-3.0.0.2-linux.tar.gz", + "archiveFileName": "esptool-3.0.0.2-linux.tar.gz", + "checksum": "SHA-256:d5cb51da1c74ff69f81b820470d2ecccb5c7c3a2dec7776483d4c89588b00020", + "size": "57526" }, { "host": "arm-linux-gnueabihf", - "url": "https://dl.espressif.com/dl/esptool-3.0.0.1-linux.tar.gz", - "archiveFileName": "esptool-3.0.0.1-linux.tar.gz", - "checksum": "SHA-256:0af60bb12037266a19e086f0873143b1217e9dd508c9b864c2efc2250de812ff", - "size": "57123" + "url": "https://dl.espressif.com/dl/esptool-3.0.0.2-linux.tar.gz", + "archiveFileName": "esptool-3.0.0.2-linux.tar.gz", + "checksum": "SHA-256:d5cb51da1c74ff69f81b820470d2ecccb5c7c3a2dec7776483d4c89588b00020", + "size": "57526" }, { "host": "aarch64-linux-gnu", - "url": "https://dl.espressif.com/dl/esptool-3.0.0.1-linux.tar.gz", - "archiveFileName": "esptool-3.0.0.1-linux.tar.gz", - "checksum": "SHA-256:0af60bb12037266a19e086f0873143b1217e9dd508c9b864c2efc2250de812ff", - "size": "57123" + "url": "https://dl.espressif.com/dl/esptool-3.0.0.2-linux.tar.gz", + "archiveFileName": "esptool-3.0.0.2-linux.tar.gz", + "checksum": "SHA-256:d5cb51da1c74ff69f81b820470d2ecccb5c7c3a2dec7776483d4c89588b00020", + "size": "57526" } ] }, diff --git a/platform.txt b/platform.txt index f22882d9..88510ff2 100644 --- a/platform.txt +++ b/platform.txt @@ -22,8 +22,8 @@ compiler.prefix=xtensa-{build.mcu}-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.3-dev-907-g6c17e3a64-dirty" -DESP_PLATFORM "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/xtensa/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/src/esp32" "-I{compiler.sdk.path}/include/soc/src/esp32/include" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/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/espcoredump/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/soc/soc/esp32" "-I{compiler.sdk.path}/include/soc/soc/esp32/include" "-I{compiler.sdk.path}/include/soc/soc/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_wifi/esp32/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/app_trace/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/bootloader_support/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include/esp_supplicant" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/port/include/coap" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/coap/libcoap/include/coap2" "-I{compiler.sdk.path}/include/console" "-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_adc_cal/include" "-I{compiler.sdk.path}/include/esp_gdbstub/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/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/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp-face/face_detection/include" "-I{compiler.sdk.path}/include/esp-face/face_recognition/include" "-I{compiler.sdk.path}/include/esp-face/object_detection/include" "-I{compiler.sdk.path}/include/esp-face/image_util/include" "-I{compiler.sdk.path}/include/esp-face/pose_estimation/include" "-I{compiler.sdk.path}/include/esp-face/lib/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.esp32=-lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lcoap -lconsole -lnghttp -lesp-tls -lesp_adc_cal -lesp_gdbstub -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -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 -lulp -lunity -lwifi_provisioning -lesp-face -lesp32-camera -lfb_gfx -lasio -lcbor -lcoap -lesp_gdbstub -lesp_hid -lesp_https_ota -lesp_local_ctrl -lesp_serial_slave_link -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lunity -lwifi_provisioning -lprotocomm -lprotobuf-c -ljson -lesp-face -lpe -lfd -lfr -ldetection_cat_face -ldetection -ldl -lesp32-camera -lfb_gfx -lbt -lbtdm_app -lesp_adc_cal -lmdns -lconsole -lfatfs -lsdmmc -lwear_levelling -lopenssl -lspiffs -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lhal -lm -lnewlib -lgcc -lstdc++ -lpthread -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.3-dev-1197-g8bc19ba89-dirty" -DESP_PLATFORM "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/xtensa/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/src/esp32" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/hal/esp32/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32/include" "-I{compiler.sdk.path}/include/esp32/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32/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/espcoredump/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/soc/soc/esp32" "-I{compiler.sdk.path}/include/soc/soc/esp32/include" "-I{compiler.sdk.path}/include/soc/soc/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_wifi/esp32/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/app_trace/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/bootloader_support/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include/esp_supplicant" "-I{compiler.sdk.path}/include/perfmon/include" "-I{compiler.sdk.path}/include/asio/asio/asio/include" "-I{compiler.sdk.path}/include/asio/port/include" "-I{compiler.sdk.path}/include/bt/include" "-I{compiler.sdk.path}/include/bt/common/osi/include" "-I{compiler.sdk.path}/include/bt/host/bluedroid/api/include/api" "-I{compiler.sdk.path}/include/cbor/port/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/unity/unity/extras/fixture/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/port/include/coap" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/coap/libcoap/include/coap2" "-I{compiler.sdk.path}/include/console" "-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_adc_cal/include" "-I{compiler.sdk.path}/include/esp_gdbstub/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/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/spiffs/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp-face/face_detection/include" "-I{compiler.sdk.path}/include/esp-face/face_recognition/include" "-I{compiler.sdk.path}/include/esp-face/object_detection/include" "-I{compiler.sdk.path}/include/esp-face/image_util/include" "-I{compiler.sdk.path}/include/esp-face/pose_estimation/include" "-I{compiler.sdk.path}/include/esp-face/lib/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.esp32=-lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lbt -lcbor -lunity -lcmock -lcoap -lconsole -lnghttp -lesp-tls -lesp_adc_cal -lesp_gdbstub -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -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 -lulp -lwifi_provisioning -lesp-face -lesp32-camera -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_gdbstub -lesp_hid -lesp_local_ctrl -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lwifi_provisioning -lprotocomm -lprotobuf-c -ljson -lesp-face -lpe -lfd -lfr -ldetection_cat_face -ldetection -ldl -lesp32-camera -lfb_gfx -lbt -lbtdm_app -lesp_adc_cal -lmdns -lconsole -lfatfs -lwear_levelling -lopenssl -lspiffs -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lperfmon -lesp32 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxt_hal -lm -lnewlib -lgcc -lstdc++ -lpthread -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -O2 -fstack-protector -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32=-mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -O2 -fstack-protector -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32=-ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -O2 -fstack-protector -x assembler-with-cpp -MMD -c @@ -37,8 +37,8 @@ build.extra_flags.esp32=-DARDUINO_SERIAL_PORT=0 # # ESP32S2 Support Start # -compiler.cpreprocessor.flags.esp32s2=-DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE -DIDF_VER="v4.3-dev-907-g6c17e3a64-dirty" -DESP_PLATFORM "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/xtensa/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/src/esp32s2" "-I{compiler.sdk.path}/include/soc/src/esp32s2/include" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/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/espcoredump/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/soc/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/soc/esp32s2/include" "-I{compiler.sdk.path}/include/soc/soc/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_wifi/esp32s2/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/app_trace/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/bootloader_support/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include/esp_supplicant" "-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/coap/port/include" "-I{compiler.sdk.path}/include/coap/port/include/coap" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/coap/libcoap/include/coap2" "-I{compiler.sdk.path}/include/console" "-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_adc_cal/include" "-I{compiler.sdk.path}/include/esp_gdbstub/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/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/freertos/include/freertos" "-I{compiler.sdk.path}/include/tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/tinyusb/additions/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/unity/include" "-I{compiler.sdk.path}/include/unity/unity/src" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp-face/face_detection/include" "-I{compiler.sdk.path}/include/esp-face/face_recognition/include" "-I{compiler.sdk.path}/include/esp-face/object_detection/include" "-I{compiler.sdk.path}/include/esp-face/image_util/include" "-I{compiler.sdk.path}/include/esp-face/pose_estimation/include" "-I{compiler.sdk.path}/include/esp-face/lib/include" "-I{compiler.sdk.path}/include/fb_gfx/include" -compiler.c.elf.libs.esp32s2=-lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lcbor -lcoap -lconsole -lnghttp -lesp-tls -lesp_adc_cal -lesp_gdbstub -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -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 -lunity -lwifi_provisioning -lesp-face -lfb_gfx -lasio -lcbor -lcoap -lesp_gdbstub -lesp_hid -lesp_https_ota -lesp_local_ctrl -lesp_https_server -lesp_serial_slave_link -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lperfmon -lunity -lwifi_provisioning -lprotocomm -lprotobuf-c -ljson -lesp-face -lpe -lfd -lfr -ldetection_cat_face -ldetection -ldl -lfb_gfx -lesp_adc_cal -lmdns -lconsole -lfatfs -lsdmmc -lwear_levelling -lopenssl -lspiffs -ltinyusb -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lhal -lm -lnewlib -lgcc -lstdc++ -lpthread -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.3-dev-1197-g8bc19ba89-dirty" -DESP_PLATFORM "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/newlib/platform_include" "-I{compiler.sdk.path}/include/freertos/include" "-I{compiler.sdk.path}/include/freertos/xtensa/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/src/esp32s2" "-I{compiler.sdk.path}/include/soc/src/esp32s2/include" "-I{compiler.sdk.path}/include/soc/include" "-I{compiler.sdk.path}/include/hal/esp32s2/include" "-I{compiler.sdk.path}/include/hal/include" "-I{compiler.sdk.path}/include/esp_rom/include" "-I{compiler.sdk.path}/include/esp_common/include" "-I{compiler.sdk.path}/include/esp_system/include" "-I{compiler.sdk.path}/include/xtensa/include" "-I{compiler.sdk.path}/include/xtensa/esp32s2/include" "-I{compiler.sdk.path}/include/esp32s2/include" "-I{compiler.sdk.path}/include/driver/include" "-I{compiler.sdk.path}/include/driver/esp32s2/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/espcoredump/include" "-I{compiler.sdk.path}/include/esp_timer/include" "-I{compiler.sdk.path}/include/esp_ipc/include" "-I{compiler.sdk.path}/include/soc/soc/esp32s2" "-I{compiler.sdk.path}/include/soc/soc/esp32s2/include" "-I{compiler.sdk.path}/include/soc/soc/include" "-I{compiler.sdk.path}/include/vfs/include" "-I{compiler.sdk.path}/include/esp_wifi/include" "-I{compiler.sdk.path}/include/esp_wifi/esp32s2/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/app_trace/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/bootloader_support/include" "-I{compiler.sdk.path}/include/app_update/include" "-I{compiler.sdk.path}/include/spi_flash/include" "-I{compiler.sdk.path}/include/nvs_flash/include" "-I{compiler.sdk.path}/include/pthread/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include" "-I{compiler.sdk.path}/include/wpa_supplicant/port/include" "-I{compiler.sdk.path}/include/wpa_supplicant/include/esp_supplicant" "-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/unity/unity/extras/fixture/src" "-I{compiler.sdk.path}/include/cmock/CMock/src" "-I{compiler.sdk.path}/include/coap/port/include" "-I{compiler.sdk.path}/include/coap/port/include/coap" "-I{compiler.sdk.path}/include/coap/libcoap/include" "-I{compiler.sdk.path}/include/coap/libcoap/include/coap2" "-I{compiler.sdk.path}/include/console" "-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_adc_cal/include" "-I{compiler.sdk.path}/include/esp_gdbstub/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/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/freertos/include/freertos" "-I{compiler.sdk.path}/include/tinyusb/tinyusb/src" "-I{compiler.sdk.path}/include/tinyusb/additions/include" "-I{compiler.sdk.path}/include/ulp/include" "-I{compiler.sdk.path}/include/wifi_provisioning/include" "-I{compiler.sdk.path}/include/esp-face/face_detection/include" "-I{compiler.sdk.path}/include/esp-face/face_recognition/include" "-I{compiler.sdk.path}/include/esp-face/object_detection/include" "-I{compiler.sdk.path}/include/esp-face/image_util/include" "-I{compiler.sdk.path}/include/esp-face/pose_estimation/include" "-I{compiler.sdk.path}/include/esp-face/lib/include" "-I{compiler.sdk.path}/include/fb_gfx/include" +compiler.c.elf.libs.esp32s2=-lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lasio -lcbor -lunity -lcmock -lcoap -lconsole -lnghttp -lesp-tls -lesp_adc_cal -lesp_gdbstub -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -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 -lesp-face -lfb_gfx -lasio -lcbor -lcmock -lunity -lcoap -lesp_gdbstub -lesp_hid -lesp_local_ctrl -lesp_https_server -lesp_websocket_client -lexpat -lfreemodbus -ljsmn -llibsodium -lmqtt -lperfmon -lwifi_provisioning -lprotocomm -lprotobuf-c -ljson -lesp-face -lpe -lfd -lfr -ldetection_cat_face -ldetection -ldl -lfb_gfx -lesp_adc_cal -lmdns -lconsole -lfatfs -lwear_levelling -lopenssl -lspiffs -ltinyusb -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxtensa -lmbedtls -lefuse -lbootloader_support -lapp_update -lesp_ipc -lspi_flash -lnvs_flash -lpthread -lesp_system -lesp_rom -lhal -lsoc -lvfs -lesp_eth -ltcpip_adapter -lesp_netif -lesp_event -lwpa_supplicant -lesp_wifi -llwip -llog -lheap -lesp_ringbuf -ldriver -lespcoredump -lesp32s2 -lesp_common -lesp_timer -lfreertos -lnewlib -lcxx -lapp_trace -lnghttp -lesp-tls -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lsdmmc -lesp_serial_slave_link -lulp -lmbedtls -lmbedcrypto -lmbedx509 -lsoc_esp32s2 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lrtc -lsmartconfig -lphy -lxt_hal -lm -lnewlib -lgcc -lstdc++ -lpthread -lapp_trace -lgcov -lapp_trace -lgcov -lc compiler.c.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -O2 -fstack-protector -std=gnu99 -Wno-old-style-declaration -MMD -c compiler.cpp.flags.esp32s2=-mlongcalls -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -O2 -fstack-protector -std=gnu++11 -fexceptions -fno-rtti -MMD -c compiler.S.flags.esp32s2=-ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -ggdb -O2 -fstack-protector -x assembler-with-cpp -MMD -c diff --git a/tools/esptool.py b/tools/esptool.py index ec92c03c..2eecc7e8 100755 --- a/tools/esptool.py +++ b/tools/esptool.py @@ -388,7 +388,7 @@ class ESPLoader(object): return val, data if byte(data, 0) != 0 and byte(data, 1) == self.ROM_INVALID_RECV_MSG: self.flush_input() # Unsupported read_reg can result in more than one error response for some reason - raise UnsupportedCommandError(self) + raise UnsupportedCommandError(self, op) finally: if new_timeout != saved_timeout: @@ -624,7 +624,7 @@ class ESPLoader(object): Returns number of blocks (of size self.FLASH_WRITE_SIZE) to write. """ - def flash_begin(self, size, offset): + def flash_begin(self, size, offset, begin_rom_encrypted=False): num_blocks = (size + self.FLASH_WRITE_SIZE - 1) // self.FLASH_WRITE_SIZE erase_size = self.get_erase_size(offset, size) @@ -636,7 +636,7 @@ class ESPLoader(object): params = struct.pack('> 2) & 0x1) << 3 return pkg_version - def get_chip_description(self): + def get_chip_revision(self): word3 = self.read_efuse(3) word5 = self.read_efuse(5) apb_ctl_date = self.read_reg(self.DR_REG_SYSCON_BASE + 0x7C) + rev_bit0 = (word3 >> 15) & 0x1 rev_bit1 = (word5 >> 20) & 0x1 rev_bit2 = (apb_ctl_date >> 31) & 0x1 - pkg_version = self.get_pkg_version() - - chip_name = { - 0: "ESP32D0WDQ6", - 1: "ESP32D0WDQ5", - 2: "ESP32D2WDQ5", - 4: "ESP32-U4WDH", - 5: "ESP32-PICO", - 6: "ESP32-PICO-V3-02", - }.get(pkg_version, "unknown ESP32") - - chip_revision = 0 if rev_bit0: if rev_bit1: if rev_bit2: - chip_revision = 3 + return 3 else: - chip_revision = 2 + return 2 else: - chip_revision = 1 + return 1 + return 0 - if chip_name == "ESP32-PICO": - if chip_revision == 1: - chip_name += "-D4" - elif chip_revision == 3: - chip_name += "-V3" + def get_chip_description(self): + pkg_version = self.get_pkg_version() + chip_revision = self.get_chip_revision() + rev3 = (chip_revision == 3) + single_core = self.read_efuse(3) & (1 << 0) # CHIP_VER DIS_APP_CPU + + chip_name = { + 0: "ESP32-S0WDQ6" if single_core else "ESP32-D0WDQ6", + 1: "ESP32-S0WD" if single_core else "ESP32-D0WD", + 2: "ESP32-D2WD", + 4: "ESP32-U4WDH", + 5: "ESP32-PICO-V3" if rev3 else "ESP32-PICO-D4", + 6: "ESP32-PICO-V3-02", + }.get(pkg_version, "unknown ESP32") + + # ESP32-D0WD-V3, ESP32-D0WDQ6-V3 + if chip_name.startswith("ESP32-D0WD") and rev3: + chip_name += "-V3" return "%s (revision %d)" % (chip_name, chip_revision) @@ -1400,6 +1408,9 @@ class ESP32ROM(ESPLoader): if pkg_version in [2, 4, 5, 6]: features += ["Embedded Flash"] + if pkg_version == 6: + features += ["Embedded PSRAM"] + word4 = self.read_efuse(4) adc_vref = (word4 >> 8) & 0x1F if adc_vref: @@ -1632,6 +1643,8 @@ class ESP32S2ROM(ESP32ROM): and any(p == self.PURPOSE_VAL_XTS_AES256_KEY_2 for p in purposes) def uses_usb(self, _cache=[]): + if self.secure_download_mode: + return False # can't detect native USB in secure download mode if not _cache: buf_no = self.read_reg(self.UARTDEV_BUF_NO) & 0xff _cache.append(buf_no == self.UARTDEV_BUF_NO_USB) @@ -2566,18 +2579,18 @@ class NotSupportedError(FatalError): # argument. -class UnsupportedCommandError(FatalError): +class UnsupportedCommandError(RuntimeError): """ Wrapper class for when ROM loader returns an invalid command response. Usually this indicates the loader is running in Secure Download Mode. """ - def __init__(self, esp): + def __init__(self, esp, op): if esp.secure_download_mode: - msg = "This command is not supported in Secure Download Mode" + msg = "This command (0x%x) is not supported in Secure Download Mode" % op else: - msg = "Invalid (unsupported) command" - FatalError.__init__(self, msg) + msg = "Invalid (unsupported) command 0x%x" % op + RuntimeError.__init__(self, msg) def load_ram(esp, args): @@ -2694,21 +2707,22 @@ def write_flash(esp, args): if args.encrypt: do_write = True - if esp.get_encrypted_download_disabled(): - raise FatalError("This chip has encrypt functionality in UART download mode disabled. " - + "This is the Flash Encryption configuration for Production mode instead of Development mode.") + if not esp.secure_download_mode: + if esp.get_encrypted_download_disabled(): + raise FatalError("This chip has encrypt functionality in UART download mode disabled. " + + "This is the Flash Encryption configuration for Production mode instead of Development mode.") - crypt_cfg_efuse = esp.get_flash_crypt_config() + crypt_cfg_efuse = esp.get_flash_crypt_config() - if crypt_cfg_efuse is not None and crypt_cfg_efuse != 0xF: - print('Unexpected FLASH_CRYPT_CONFIG value: 0x%x' % (crypt_cfg_efuse)) - do_write = False + if crypt_cfg_efuse is not None and crypt_cfg_efuse != 0xF: + print('Unexpected FLASH_CRYPT_CONFIG value: 0x%x' % (crypt_cfg_efuse)) + do_write = False - enc_key_valid = esp.is_flash_encryption_key_valid() + enc_key_valid = esp.is_flash_encryption_key_valid() - if not enc_key_valid: - print('Flash encryption key is not programmed') - do_write = False + if not enc_key_valid: + print('Flash encryption key is not programmed') + do_write = False for address, argfile in args.addr_filename: if address % esp.FLASH_ENCRYPTED_WRITE_ALIGN: @@ -2755,7 +2769,7 @@ def write_flash(esp, args): blocks = esp.flash_defl_begin(uncsize, len(image), address) else: ratio = 1.0 - blocks = esp.flash_begin(uncsize, address) + blocks = esp.flash_begin(uncsize, address, begin_rom_encrypted=args.encrypt) argfile.seek(0) # in case we need it again seq = 0 written = 0 @@ -3323,16 +3337,13 @@ def main(custom_commandline=None): if esp is None: raise FatalError("Could not connect to an Espressif device on any of the %d available serial ports." % len(ser_list)) - print("Chip is %s" % (esp.get_chip_description())) - - print("Features: %s" % ", ".join(esp.get_chip_features())) - - print("Crystal is %dMHz" % esp.get_crystal_freq()) - - try: + if esp.secure_download_mode: + print("Chip is %s in Secure Download Mode" % esp.CHIP_NAME) + else: + print("Chip is %s" % (esp.get_chip_description())) + print("Features: %s" % ", ".join(esp.get_chip_features())) + print("Crystal is %dMHz" % esp.get_crystal_freq()) read_mac(esp, args) - except UnsupportedCommandError: - pass # can't get this data in Secure Download Mode if not args.no_stub: if esp.secure_download_mode: diff --git a/tools/platformio-build-esp32.py b/tools/platformio-build-esp32.py index 10a079a4..9562b145 100644 --- a/tools/platformio-build-esp32.py +++ b/tools/platformio-build-esp32.py @@ -119,8 +119,9 @@ env.Append( join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "lwip", "port", "esp32", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "lwip", "port", "esp32", "include", "arch"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "soc", "src", "esp32"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "soc", "src", "esp32", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "soc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "hal", "esp32", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "hal", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_rom", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_common", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp_system", "include"), @@ -164,6 +165,10 @@ env.Append( join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "bt", "common", "osi", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "bt", "host", "bluedroid", "api", "include", "api"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "cbor", "port", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "unity", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "unity", "unity", "src"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "unity", "unity", "extras", "fixture", "src"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "cmock", "CMock", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "coap", "port", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "coap", "port", "include", "coap"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "coap", "libcoap", "include"), @@ -205,8 +210,6 @@ env.Append( join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "openssl", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "spiffs", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "ulp", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "unity", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "unity", "unity", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "wifi_provisioning", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "face_detection", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32", "include", "esp-face", "face_recognition", "include"), @@ -226,7 +229,7 @@ env.Append( ], LIBS=[ - "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lcoap", "-lconsole", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_gdbstub", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-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", "-lulp", "-lunity", "-lwifi_provisioning", "-lesp-face", "-lesp32-camera", "-lfb_gfx", "-lasio", "-lcbor", "-lcoap", "-lesp_gdbstub", "-lesp_hid", "-lesp_https_ota", "-lesp_local_ctrl", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lmqtt", "-lunity", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-ljson", "-lesp-face", "-lpe", "-lfd", "-lfr", "-ldetection_cat_face", "-ldetection", "-ldl", "-lesp32-camera", "-lfb_gfx", "-lbt", "-lbtdm_app", "-lesp_adc_cal", "-lmdns", "-lconsole", "-lfatfs", "-lsdmmc", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lhal", "-lm", "-lnewlib", "-lgcc", "-lstdc++", "-lpthread", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" + "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lbt", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lconsole", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_gdbstub", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-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", "-lulp", "-lwifi_provisioning", "-lesp-face", "-lesp32-camera", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_gdbstub", "-lesp_hid", "-lesp_local_ctrl", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lmqtt", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-ljson", "-lesp-face", "-lpe", "-lfd", "-lfr", "-ldetection_cat_face", "-ldetection", "-ldl", "-lesp32-camera", "-lfb_gfx", "-lbt", "-lbtdm_app", "-lesp_adc_cal", "-lmdns", "-lconsole", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lperfmon", "-lesp32", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxt_hal", "-lm", "-lnewlib", "-lgcc", "-lstdc++", "-lpthread", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" ], CPPDEFINES=[ @@ -235,7 +238,7 @@ env.Append( "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.3-dev-907-g6c17e3a64-dirty\\"'), + ("IDF_VER", '\\"v4.3-dev-1197-g8bc19ba89-dirty\\"'), "ESP_PLATFORM", "ARDUINO_ARCH_ESP32", "ESP32", diff --git a/tools/platformio-build-esp32s2.py b/tools/platformio-build-esp32s2.py index b572955d..d4879303 100644 --- a/tools/platformio-build-esp32s2.py +++ b/tools/platformio-build-esp32s2.py @@ -115,6 +115,8 @@ env.Append( join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "soc", "src", "esp32s2"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "soc", "src", "esp32s2", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "soc", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "hal", "esp32s2", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "hal", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_rom", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_common", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp_system", "include"), @@ -154,6 +156,10 @@ env.Append( join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "asio", "asio", "asio", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "asio", "port", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "cbor", "port", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "unity", "include"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "unity", "unity", "src"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "unity", "unity", "extras", "fixture", "src"), + join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "cmock", "CMock", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "coap", "port", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "coap", "port", "include", "coap"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "coap", "libcoap", "include"), @@ -200,8 +206,6 @@ env.Append( join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "tinyusb", "tinyusb", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "tinyusb", "additions", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "ulp", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "unity", "include"), - join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "unity", "unity", "src"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "wifi_provisioning", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "face_detection", "include"), join(FRAMEWORK_DIR, "tools", "sdk", "esp32s2", "include", "esp-face", "face_recognition", "include"), @@ -219,7 +223,7 @@ env.Append( ], LIBS=[ - "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lcbor", "-lcoap", "-lconsole", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_gdbstub", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-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", "-lunity", "-lwifi_provisioning", "-lesp-face", "-lfb_gfx", "-lasio", "-lcbor", "-lcoap", "-lesp_gdbstub", "-lesp_hid", "-lesp_https_ota", "-lesp_local_ctrl", "-lesp_https_server", "-lesp_serial_slave_link", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lmqtt", "-lperfmon", "-lunity", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-ljson", "-lesp-face", "-lpe", "-lfd", "-lfr", "-ldetection_cat_face", "-ldetection", "-ldl", "-lfb_gfx", "-lesp_adc_cal", "-lmdns", "-lconsole", "-lfatfs", "-lsdmmc", "-lwear_levelling", "-lopenssl", "-lspiffs", "-ltinyusb", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lhal", "-lm", "-lnewlib", "-lgcc", "-lstdc++", "-lpthread", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" + "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lasio", "-lcbor", "-lunity", "-lcmock", "-lcoap", "-lconsole", "-lnghttp", "-lesp-tls", "-lesp_adc_cal", "-lesp_gdbstub", "-lesp_hid", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lesp_https_server", "-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", "-lesp-face", "-lfb_gfx", "-lasio", "-lcbor", "-lcmock", "-lunity", "-lcoap", "-lesp_gdbstub", "-lesp_hid", "-lesp_local_ctrl", "-lesp_https_server", "-lesp_websocket_client", "-lexpat", "-lfreemodbus", "-ljsmn", "-llibsodium", "-lmqtt", "-lperfmon", "-lwifi_provisioning", "-lprotocomm", "-lprotobuf-c", "-ljson", "-lesp-face", "-lpe", "-lfd", "-lfr", "-ldetection_cat_face", "-ldetection", "-ldl", "-lfb_gfx", "-lesp_adc_cal", "-lmdns", "-lconsole", "-lfatfs", "-lwear_levelling", "-lopenssl", "-lspiffs", "-ltinyusb", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxtensa", "-lmbedtls", "-lefuse", "-lbootloader_support", "-lapp_update", "-lesp_ipc", "-lspi_flash", "-lnvs_flash", "-lpthread", "-lesp_system", "-lesp_rom", "-lhal", "-lsoc", "-lvfs", "-lesp_eth", "-ltcpip_adapter", "-lesp_netif", "-lesp_event", "-lwpa_supplicant", "-lesp_wifi", "-llwip", "-llog", "-lheap", "-lesp_ringbuf", "-ldriver", "-lespcoredump", "-lesp32s2", "-lesp_common", "-lesp_timer", "-lfreertos", "-lnewlib", "-lcxx", "-lapp_trace", "-lnghttp", "-lesp-tls", "-ltcp_transport", "-lesp_http_client", "-lesp_http_server", "-lesp_https_ota", "-lsdmmc", "-lesp_serial_slave_link", "-lulp", "-lmbedtls", "-lmbedcrypto", "-lmbedx509", "-lsoc_esp32s2", "-lcoexist", "-lcore", "-lespnow", "-lmesh", "-lnet80211", "-lpp", "-lrtc", "-lsmartconfig", "-lphy", "-lxt_hal", "-lm", "-lnewlib", "-lgcc", "-lstdc++", "-lpthread", "-lapp_trace", "-lgcov", "-lapp_trace", "-lgcov", "-lc" ], CPPDEFINES=[ @@ -228,7 +232,7 @@ env.Append( "UNITY_INCLUDE_CONFIG_H", "WITH_POSIX", "_GNU_SOURCE", - ("IDF_VER", '\\"v4.3-dev-907-g6c17e3a64-dirty\\"'), + ("IDF_VER", '\\"v4.3-dev-1197-g8bc19ba89-dirty\\"'), "ESP_PLATFORM", "ARDUINO_ARCH_ESP32", "ESP32", diff --git a/tools/sdk/esp32/bin/bootloader_dio_40m.bin b/tools/sdk/esp32/bin/bootloader_dio_40m.bin index b164910a..17f7ebba 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dio_40m.bin and b/tools/sdk/esp32/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dio_80m.bin b/tools/sdk/esp32/bin/bootloader_dio_80m.bin index d298d2a1..35769905 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dio_80m.bin and b/tools/sdk/esp32/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_40m.bin b/tools/sdk/esp32/bin/bootloader_dout_40m.bin index b164910a..17f7ebba 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dout_40m.bin and b/tools/sdk/esp32/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_dout_80m.bin b/tools/sdk/esp32/bin/bootloader_dout_80m.bin index d298d2a1..35769905 100644 Binary files a/tools/sdk/esp32/bin/bootloader_dout_80m.bin and b/tools/sdk/esp32/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_40m.bin b/tools/sdk/esp32/bin/bootloader_qio_40m.bin index b164910a..17f7ebba 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qio_40m.bin and b/tools/sdk/esp32/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qio_80m.bin b/tools/sdk/esp32/bin/bootloader_qio_80m.bin index d298d2a1..35769905 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qio_80m.bin and b/tools/sdk/esp32/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_40m.bin b/tools/sdk/esp32/bin/bootloader_qout_40m.bin index b164910a..17f7ebba 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qout_40m.bin and b/tools/sdk/esp32/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/esp32/bin/bootloader_qout_80m.bin b/tools/sdk/esp32/bin/bootloader_qout_80m.bin index d298d2a1..35769905 100644 Binary files a/tools/sdk/esp32/bin/bootloader_qout_80m.bin and b/tools/sdk/esp32/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/esp32/include/app_update/include/esp_ota_ops.h b/tools/sdk/esp32/include/app_update/include/esp_ota_ops.h index ac0ae656..cf24e75f 100644 --- a/tools/sdk/esp32/include/app_update/include/esp_ota_ops.h +++ b/tools/sdk/esp32/include/app_update/include/esp_ota_ops.h @@ -29,6 +29,7 @@ extern "C" #endif #define OTA_SIZE_UNKNOWN 0xffffffff /*!< Used for esp_ota_begin() if new image size is unknown */ +#define OTA_WITH_SEQUENTIAL_WRITES 0xfffffffe /*!< Used for esp_ota_begin() if new image size is unknown and erase can be done in incremental manner (assuming write operation is in continuous sequence) */ #define ESP_ERR_OTA_BASE 0x1500 /*!< Base error code for ota_ops api */ #define ESP_ERR_OTA_PARTITION_CONFLICT (ESP_ERR_OTA_BASE + 0x01) /*!< Error if request was to write or erase the current running partition */ diff --git a/tools/sdk/esp32/include/bootloader_support/include/bootloader_flash_config.h b/tools/sdk/esp32/include/bootloader_support/include/bootloader_flash_config.h index 45367730..6074faca 100644 --- a/tools/sdk/esp32/include/bootloader_support/include/bootloader_flash_config.h +++ b/tools/sdk/esp32/include/bootloader_support/include/bootloader_flash_config.h @@ -28,6 +28,14 @@ extern "C" { */ void bootloader_flash_update_id(void); +/** + * @brief Update the flash size in g_rom_flashchip (global esp_rom_spiflash_chip_t structure). + * + * @param size The size to store, in bytes. + * @return None + */ +void bootloader_flash_update_size(uint32_t size); + /** * @brief Set the flash CS setup and hold time. * 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 928a29ad..f495933a 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 @@ -169,6 +169,14 @@ esp_err_t esp_image_verify_bootloader(uint32_t *length); */ esp_err_t esp_image_verify_bootloader_data(esp_image_metadata_t *data); +/** + * @brief Get the flash size of the image + * + * @param app_flash_size The value configured in the image header + * @return Actual size, in bytes. + */ +int esp_image_get_flash_size(esp_image_flash_size_t app_flash_size); + typedef struct { uint32_t drom_addr; diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gattc_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gattc_api.h index d8f8bf7e..a65a1539 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gattc_api.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gattc_api.h @@ -209,6 +209,7 @@ typedef union { */ struct gattc_connect_evt_param { uint16_t conn_id; /*!< Connection id */ + uint8_t link_role; /*!< Link role : master role = 0 ; slave role = 1*/ esp_bd_addr_t remote_bda; /*!< Remote bluetooth device address */ esp_gatt_conn_params_t conn_params; /*!< current connection parameters */ } connect; /*!< Gatt client callback param of ESP_GATTC_CONNECT_EVT */ 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 42dfeb26..5da14eb1 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 @@ -196,6 +196,7 @@ typedef union { */ struct gatts_connect_evt_param { uint16_t conn_id; /*!< Connection id */ + uint8_t link_role; /*!< Link role : master role = 0 ; slave role = 1*/ esp_bd_addr_t remote_bda; /*!< Remote bluetooth device address */ esp_gatt_conn_params_t conn_params; /*!< current Connection parameters */ } connect; /*!< Gatt server callback param of ESP_GATTS_CONNECT_EVT */ diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hf_ag_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hf_ag_api.h index f8d6011d..80b25d3c 100644 --- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hf_ag_api.h +++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_hf_ag_api.h @@ -301,8 +301,8 @@ esp_err_t esp_bt_hf_disconnect_audio(esp_bd_addr_t remote_bda); * @brief Response of Volume Recognition Command(AT+VRA) from HFP client. As a precondition to use this API, * Service Level Connection shall exist with HFP client. * - * @param[in] remote_bda: volume control target, speaker or microphone - * @param[in] value: gain of the speaker of microphone, ranges 0 to 15 + * @param[in] remote_bda: the device address of voice recognization initiator + * @param[in] value: 0 - voice recognition disabled, 1- voice recognition enabled * * @return * - ESP_OK: disconnect request is sent to lower layer diff --git a/tools/sdk/esp32/include/cmock/CMock/src/cmock.h b/tools/sdk/esp32/include/cmock/CMock/src/cmock.h new file mode 100644 index 00000000..21123e92 --- /dev/null +++ b/tools/sdk/esp32/include/cmock/CMock/src/cmock.h @@ -0,0 +1,41 @@ +/* ========================================== + CMock Project - Automatic Mock Generation for C + Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + [Released under MIT License. Please refer to license.txt for details] +========================================== */ + +#ifndef CMOCK_FRAMEWORK_H +#define CMOCK_FRAMEWORK_H + +#include "cmock_internals.h" + +#define CMOCK_VERSION_MAJOR 2 +#define CMOCK_VERSION_MINOR 5 +#define CMOCK_VERSION_BUILD 2 +#define CMOCK_VERSION ((CMOCK_VERSION_MAJOR << 16) | (CMOCK_VERSION_MINOR << 8) | CMOCK_VERSION_BUILD) + +/* should be big enough to index full range of CMOCK_MEM_MAX */ +#ifndef CMOCK_MEM_INDEX_TYPE +#include +#define CMOCK_MEM_INDEX_TYPE size_t +#endif + +#define CMOCK_GUTS_NONE (0) + +/*------------------------------------------------------- + * Memory API + *-------------------------------------------------------*/ +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNew(CMOCK_MEM_INDEX_TYPE size); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemChain(CMOCK_MEM_INDEX_TYPE root_index, CMOCK_MEM_INDEX_TYPE obj_index); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNext(CMOCK_MEM_INDEX_TYPE previous_item_index); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemEndOfChain(CMOCK_MEM_INDEX_TYPE root_index); + +void* CMock_Guts_GetAddressFor(CMOCK_MEM_INDEX_TYPE index); + +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesCapacity(void); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesFree(void); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesUsed(void); +void CMock_Guts_MemFreeAll(void); +void CMock_Guts_MemFreeFinal(void); + +#endif /* end of CMOCK_FRAMEWORK_H */ diff --git a/tools/sdk/esp32/include/cmock/CMock/src/cmock_internals.h b/tools/sdk/esp32/include/cmock/CMock/src/cmock_internals.h new file mode 100644 index 00000000..56fb33b1 --- /dev/null +++ b/tools/sdk/esp32/include/cmock/CMock/src/cmock_internals.h @@ -0,0 +1,91 @@ +/* ========================================== + CMock Project - Automatic Mock Generation for C + Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + [Released under MIT License. Please refer to license.txt for details] +========================================== */ + +#ifndef CMOCK_FRAMEWORK_INTERNALS_H +#define CMOCK_FRAMEWORK_INTERNALS_H + +#include "unity.h" + +/* These are constants that the generated mocks have access to */ +extern const char* CMockStringOutOfMemory; +extern const char* CMockStringCalledMore; +extern const char* CMockStringCalledLess; +extern const char* CMockStringCalledEarly; +extern const char* CMockStringCalledLate; +extern const char* CMockStringCallOrder; +extern const char* CMockStringIgnPreExp; +extern const char* CMockStringPtrPreExp; +extern const char* CMockStringPtrIsNULL; +extern const char* CMockStringExpNULL; +extern const char* CMockStringMismatch; + +/* define CMOCK_MEM_DYNAMIC to grab memory as needed with malloc + * when you do that, CMOCK_MEM_SIZE is used for incremental size instead of total */ +#ifdef CMOCK_MEM_STATIC +#undef CMOCK_MEM_DYNAMIC +#endif + +#ifdef CMOCK_MEM_DYNAMIC +#include +#endif + +/* this is used internally during pointer arithmetic. make sure this type is the same size as the target's pointer type */ +#ifndef CMOCK_MEM_PTR_AS_INT +#ifdef UNITY_POINTER_WIDTH +#ifdef UNITY_INT_WIDTH +#if UNITY_POINTER_WIDTH == UNITY_INT_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned int +#endif +#endif +#endif +#endif + +#ifndef CMOCK_MEM_PTR_AS_INT +#ifdef UNITY_POINTER_WIDTH +#ifdef UNITY_LONG_WIDTH +#if UNITY_POINTER_WIDTH == UNITY_LONG_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned long +#endif +#if UNITY_POINTER_WIDTH > UNITY_LONG_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned long long +#endif +#endif +#endif +#endif + +#ifndef CMOCK_MEM_PTR_AS_INT +#define CMOCK_MEM_PTR_AS_INT unsigned long +#endif + +/* 0 for no alignment, 1 for 16-bit, 2 for 32-bit, 3 for 64-bit */ +#ifndef CMOCK_MEM_ALIGN + #ifdef UNITY_LONG_WIDTH + #if (UNITY_LONG_WIDTH == 16) + #define CMOCK_MEM_ALIGN (1) + #elif (UNITY_LONG_WIDTH == 32) + #define CMOCK_MEM_ALIGN (2) + #elif (UNITY_LONG_WIDTH == 64) + #define CMOCK_MEM_ALIGN (3) + #else + #define CMOCK_MEM_ALIGN (2) + #endif + #else + #define CMOCK_MEM_ALIGN (2) + #endif +#endif + +/* amount of memory to allow cmock to use in its internal heap */ +#ifndef CMOCK_MEM_SIZE +#define CMOCK_MEM_SIZE (32768) +#endif + +/* automatically calculated defs for easier reading */ +#define CMOCK_MEM_ALIGN_SIZE (CMOCK_MEM_INDEX_TYPE)(1u << CMOCK_MEM_ALIGN) +#define CMOCK_MEM_ALIGN_MASK (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_ALIGN_SIZE - 1) +#define CMOCK_MEM_INDEX_SIZE (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_PTR_AS_INT)((sizeof(CMOCK_MEM_INDEX_TYPE) > CMOCK_MEM_ALIGN_SIZE) ? sizeof(CMOCK_MEM_INDEX_TYPE) : CMOCK_MEM_ALIGN_SIZE) + + +#endif /* end of CMOCK_FRAMEWORK_INTERNALS_H */ diff --git a/tools/sdk/esp32/include/config/sdkconfig.h b/tools/sdk/esp32/include/config/sdkconfig.h index 005b7f9c..858300ae 100644 --- a/tools/sdk/esp32/include/config/sdkconfig.h +++ b/tools/sdk/esp32/include/config/sdkconfig.h @@ -23,6 +23,7 @@ #define CONFIG_BOOTLOADER_WDT_TIME_MS 9000 #define CONFIG_BOOTLOADER_RESERVE_RTC_SIZE 0x0 #define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200 +#define CONFIG_ESPTOOLPY_WITH_STUB 1 #define CONFIG_ESPTOOLPY_FLASHMODE_DIO 1 #define CONFIG_ESPTOOLPY_FLASHMODE "dio" #define CONFIG_ESPTOOLPY_FLASHFREQ_40M 1 @@ -578,5 +579,5 @@ #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 "6c17e3a64" +#define CONFIG_ARDUINO_IDF_COMMIT "8bc19ba89" #define CONFIG_ARDUINO_IDF_BRANCH "master" diff --git a/tools/sdk/esp32/include/driver/esp32/include/driver/dac.h b/tools/sdk/esp32/include/driver/esp32/include/driver/dac.h new file mode 100644 index 00000000..c0a418c1 --- /dev/null +++ b/tools/sdk/esp32/include/driver/esp32/include/driver/dac.h @@ -0,0 +1,44 @@ +// Copyright 2019-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. + +#pragma once + +#include "driver/dac_common.h" + +#ifdef __cplusplus +extern "C" { +#endif +/*--------------------------------------------------------------- + Digital controller setting +---------------------------------------------------------------*/ + +/** + * @brief Enable DAC output data from I2S + * + * @return + * - ESP_OK success + */ +esp_err_t dac_i2s_enable(void); + +/** + * @brief Disable DAC output data from I2S + * + * @return + * - ESP_OK success + */ +esp_err_t dac_i2s_disable(void); + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/tools/sdk/esp32/include/driver/include/driver/adc_common.h b/tools/sdk/esp32/include/driver/include/driver/adc_common.h index 2c426b71..719f60a4 100644 --- a/tools/sdk/esp32/include/driver/include/driver/adc_common.h +++ b/tools/sdk/esp32/include/driver/include/driver/adc_common.h @@ -76,7 +76,7 @@ typedef enum { /** * @brief ADC digital controller encode option. * - * @deprecated The ESP32S2 don't use I2S DMA. Call ``adc_digi_output_format_t`` instead. + * @deprecated The ESP32-S2 doesn't use I2S DMA. Call ``adc_digi_output_format_t`` instead. */ typedef enum { ADC_ENCODE_12BIT, /*!< ADC to DMA data format, , [15:12]-channel [11:0]-12 bits ADC data */ @@ -84,6 +84,35 @@ typedef enum { ADC_ENCODE_MAX, } adc_i2s_encode_t; +/*--------------------------------------------------------------- + Common setting +---------------------------------------------------------------*/ + +/** + * @brief Enable ADC power + */ +void adc_power_on(void); + +/** + * @brief Power off SAR ADC + * This function will force power down for ADC + */ +void adc_power_off(void); + +/** + * @brief Initialize ADC pad + * @param adc_unit ADC unit index + * @param channel ADC channel index + * @return + * - ESP_OK success + * - ESP_ERR_INVALID_ARG Parameter error + */ +esp_err_t adc_gpio_init(adc_unit_t adc_unit, adc_channel_t channel); + +/*--------------------------------------------------------------- + RTC controller setting +---------------------------------------------------------------*/ + /** * @brief Get the GPIO number of a specific ADC1 channel. * @@ -97,45 +126,58 @@ typedef enum { esp_err_t adc1_pad_get_io_num(adc1_channel_t channel, gpio_num_t *gpio_num); /** - * @brief Set the attenuation of a particular channel on ADC1, and configure its associated GPIO pin mux. - * - * The default ADC full-scale voltage is 1.1 V. To read higher voltages (up to the pin maximum voltage, - * usually 3.3 V) requires setting >0 dB signal attenuation for that ADC channel. - * - * When VDD_A is 3.3 V: - * - * - 0 dB attenuation (ADC_ATTEN_DB_0) gives full-scale voltage 1.1 V - * - 2.5 dB attenuation (ADC_ATTEN_DB_2_5) gives full-scale voltage 1.5 V - * - 6 dB attenuation (ADC_ATTEN_DB_6) gives full-scale voltage 2.2 V - * - 11 dB attenuation (ADC_ATTEN_DB_11) gives full-scale voltage 3.9 V (see note below) - * - * @note The full-scale voltage is the voltage corresponding to a maximum reading (depending on ADC1 configured bit width, - * this value in ESP32 is: 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. - * this value in ESP32S2 is: 8191 for 13-bits.) - * - * @note At 11 dB attenuation the maximum voltage is limited by VDD_A, not the full scale voltage. - * - * @note For ESP32: - * Due to ADC characteristics, most accurate results are obtained within the following approximate voltage ranges: - * - * - 0 dB attenuation (ADC_ATTEN_DB_0) between 100 and 950 mV - * - 2.5 dB attenuation (ADC_ATTEN_DB_2_5) between 100 and 1250 mV - * - 6 dB attenuation (ADC_ATTEN_DB_6) between 150 to 1750 mV - * - 11 dB attenuation (ADC_ATTEN_DB_11) between 150 to 2450 mV - * - * For maximum accuracy, use the ADC calibration APIs and measure voltages within these recommended ranges. - * - * @note For any given channel, this function must be called before the first time ``adc1_get_raw()`` is called for that channel. - * - * @note This function can be called multiple times to configure multiple - * ADC channels simultaneously. ``adc1_get_raw()`` can then be called for any configured channel. - * - * @param channel ADC1 channel to configure - * @param atten Attenuation level - * - * @return - * - ESP_OK success - * - ESP_ERR_INVALID_ARG Parameter error + * @brief Set the attenuation of a particular channel on ADC1, and configure its associated GPIO pin mux. + * + * The default ADC full-scale voltage is 1.1 V. To read higher voltages (up to the pin maximum voltage, + * usually 3.3 V) requires setting >0 dB signal attenuation for that ADC channel. + * + * When the analog voltage supply (VDDA) is 3.3 V: + * + * - 0 dB attenuation (ADC_ATTEN_DB_0) gives full-scale voltage 1.1 V + * - 2.5 dB attenuation (ADC_ATTEN_DB_2_5) gives full-scale voltage 1.5 V + * - 6 dB attenuation (ADC_ATTEN_DB_6) gives full-scale voltage 2.2 V + * - 11 dB attenuation (ADC_ATTEN_DB_11) gives full-scale voltage 3.9 V (see note below) + * + * Due to ADC characteristics, most accurate results are obtained within the following approximate voltage ranges: + * + * +----------+------------+--------------------------+ + * | SoC | attenuation| suggested range (mV) | + * +==========+============+==========================+ + * | | 0 | 100 ~ 950 | + * | +------------+--------------------------+ + * | | 2.5 | 100 ~ 1250 | + * | ESP32 +------------+--------------------------+ + * | | 6 | 150 ~ 1750 | + * | +------------+--------------------------+ + * | | 11 | 150 ~ 2450 | + * +----------+------------+--------------------------+ + * | | 0 | 100 ~ 800 | + * | +------------+--------------------------+ + * | | 2.5 | 100 ~ 1100 | + * | ESP32-S2 +------------+--------------------------+ + * | | 6 | 150 ~ 1350 | + * | +------------+--------------------------+ + * | | 11 | 150 ~ 2600 | + * +----------+------------+--------------------------+ + * + * For maximum accuracy, use the ADC calibration APIs and measure voltages within these recommended ranges. + * @note The full-scale voltage is the voltage corresponding to a maximum reading (depending on ADC1 configured bit width, + * this value in ESP32 is 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. + * this value in ESP32-S2 is 8191 for 13-bits.) + * + * @note At 11 dB attenuation the maximum voltage is limited by VDDA, not the full scale voltage. + * + * @note For any given channel, this function must be called before the first time ``adc1_get_raw()`` is called for that channel. + * + * @note This function can be called multiple times to configure multiple + * ADC channels simultaneously. You may call ``adc1_get_raw()`` only after configuring a channel. + * + * @param channel ADC1 channel to configure + * @param atten Attenuation level + * + * @return + * - ESP_OK success + * - ESP_ERR_INVALID_ARG Parameter error */ esp_err_t adc1_config_channel_atten(adc1_channel_t channel, adc_atten_t atten); @@ -173,27 +215,6 @@ esp_err_t adc1_config_width(adc_bits_width_t width_bit); */ int adc1_get_raw(adc1_channel_t channel); -/** - * @brief Enable ADC power - */ -void adc_power_on(void); - -/** - * @brief Power off SAR ADC - * This function will force power down for ADC - */ -void adc_power_off(void); - -/** - * @brief Initialize ADC pad - * @param adc_unit ADC unit index - * @param channel ADC channel index - * @return - * - ESP_OK success - * - ESP_ERR_INVALID_ARG Parameter error - */ -esp_err_t adc_gpio_init(adc_unit_t adc_unit, adc_channel_t channel); - /** * @brief Set ADC data invert * @param adc_unit ADC unit index @@ -215,10 +236,10 @@ esp_err_t adc_set_clk_div(uint8_t clk_div); /** * @brief Configure ADC capture width. * - * @note For ESP32S2, only support ``ADC_WIDTH_BIT_13``. + * @note ESP32-S2 only supports ``ADC_WIDTH_BIT_13``. * * @param adc_unit ADC unit index - * @param width_bit Bit capture width for ADC unit. For ESP32S2, only support ``ADC_WIDTH_BIT_13``. + * @param width_bit Bit capture width for ADC unit. ESP32-S2 only supports ``ADC_WIDTH_BIT_13``. * * @return * - ESP_OK success @@ -256,7 +277,7 @@ esp_err_t adc2_pad_get_io_num(adc2_channel_t channel, gpio_num_t *gpio_num); * The default ADC full-scale voltage is 1.1 V. To read higher voltages (up to the pin maximum voltage, * usually 3.3 V) requires setting >0 dB signal attenuation for that ADC channel. * - * When VDD_A is 3.3 V: + * When the analog voltage supply (VDDA) is 3.3 V: * * - 0 dB attenuation (ADC_ATTEN_0db) gives full-scale voltage 1.1 V * - 2.5 dB attenuation (ADC_ATTEN_2_5db) gives full-scale voltage 1.5 V @@ -269,10 +290,10 @@ esp_err_t adc2_pad_get_io_num(adc2_channel_t channel, gpio_num_t *gpio_num); * * @note The full-scale voltage is the voltage corresponding to a maximum reading * (depending on ADC2 configured bit width, - * this value of ESP32 is: 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. - * this value of ESP32S2 is: 8191 for 13-bits.) + * this value for ESP32 is: 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. + * this value for ESP32-S2 is: 8191 for 13-bits.) * - * @note At 11 dB attenuation the maximum voltage is limited by VDD_A, not the full scale voltage. + * @note At 11 dB attenuation the maximum voltage is limited by VDDA, not the full scale voltage. * * @param channel ADC2 channel to configure * @param atten Attenuation level @@ -297,12 +318,12 @@ esp_err_t adc2_config_channel_atten(adc2_channel_t channel, adc_atten_t atten); * must be called before the first time this function is called. If Wi-Fi is started via ``esp_wifi_start()``, this * function will always fail with ``ESP_ERR_TIMEOUT``. * - * @note ESP32S2: + * @note ESP32-S2: * ADC2 support hardware arbiter. The arbiter is to improve the use efficiency of ADC2. After the control right is robbed by the high priority, * the low priority controller will read the invalid ADC2 data. Default priority: Wi-Fi > RTC > Digital; * * @param channel ADC2 channel to read - * @param width_bit Bit capture width for ADC2. For ESP32S2, only support ``ADC_WIDTH_BIT_13``. + * @param width_bit Bit capture width for ADC2. ESP32-S2 only supports ``ADC_WIDTH_BIT_13``. * @param raw_out the variable to hold the output data. * * @return @@ -345,6 +366,33 @@ esp_err_t adc_vref_to_gpio(adc_unit_t adc_unit, gpio_num_t gpio); * - ESP_ERR_INVALID_ARG: Unsupported GPIO */ esp_err_t adc2_vref_to_gpio(gpio_num_t gpio) __attribute__((deprecated)); +/*--------------------------------------------------------------- + Digital controller setting +---------------------------------------------------------------*/ + +/** + * @brief ADC digital controller initialization. + * @return + * - ESP_OK Success + */ +esp_err_t adc_digi_init(void); + +/** + * @brief ADC digital controller deinitialization. + * @return + * - ESP_OK Success + */ +esp_err_t adc_digi_deinit(void); + +/** + * @brief Setting the digital controller. + * + * @param config Pointer to digital controller paramter. Refer to `adc_digi_config_t`. + * + * @return + * - ESP_OK Success + */ +esp_err_t adc_digi_controller_config(const adc_digi_config_t *config); #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/driver/include/driver/dac.h b/tools/sdk/esp32/include/driver/include/driver/dac_common.h similarity index 91% rename from tools/sdk/esp32/include/driver/include/driver/dac.h rename to tools/sdk/esp32/include/driver/include/driver/dac_common.h index 86699dd0..478841fc 100644 --- a/tools/sdk/esp32/include/driver/include/driver/dac.h +++ b/tools/sdk/esp32/include/driver/include/driver/dac_common.h @@ -67,22 +67,6 @@ esp_err_t dac_output_enable(dac_channel_t channel); */ esp_err_t dac_output_disable(dac_channel_t channel); -/** - * @brief Enable DAC output data from I2S - * - * @return - * - ESP_OK success - */ -esp_err_t dac_i2s_enable(void); - -/** - * @brief Disable DAC output data from I2S - * - * @return - * - ESP_OK success - */ -esp_err_t dac_i2s_disable(void); - /** * @brief Enable cosine wave generator output. * @@ -105,6 +89,7 @@ esp_err_t dac_cw_generator_disable(void); * @param cw Configuration. * @return * - ESP_OK success + * - ESP_ERR_INVALID_ARG The parameter is NULL. */ esp_err_t dac_cw_generator_config(dac_cw_config_t *cw); diff --git a/tools/sdk/esp32/include/driver/include/driver/twai.h b/tools/sdk/esp32/include/driver/include/driver/twai.h index 5313d953..383a9956 100644 --- a/tools/sdk/esp32/include/driver/include/driver/twai.h +++ b/tools/sdk/esp32/include/driver/include/driver/twai.h @@ -166,9 +166,9 @@ esp_err_t twai_driver_uninstall(void); * * This function starts the TWAI driver, putting the TWAI driver into the running * state. This allows the TWAI driver to participate in TWAI bus activities such - * as transmitting/receiving messages. The RX queue is reset in this function, - * clearing any unread messages. This function can only be called when the TWAI - * driver is in the stopped state. + * as transmitting/receiving messages. The TX and RX queue are reset in this function, + * clearing any messages that are unread or pending transmission. This function + * can only be called when the TWAI driver is in the stopped state. * * @return * - ESP_OK: TWAI driver is now running 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 e8180839..3afd9a48 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 @@ -17,7 +17,7 @@ extern "C" { #endif -// md5_digest_table 11b691b6fa8546a3862a7a876be5f758 +// md5_digest_table 8c9f6537b47cc5b26a1a5896158c612a // 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. @@ -31,6 +31,7 @@ extern const esp_efuse_desc_t* ESP_EFUSE_MAC_CUSTOM[]; extern const esp_efuse_desc_t* ESP_EFUSE_MAC_CUSTOM_VER[]; extern const esp_efuse_desc_t* ESP_EFUSE_SECURE_BOOT_KEY[]; extern const esp_efuse_desc_t* ESP_EFUSE_ABS_DONE_0[]; +extern const esp_efuse_desc_t* ESP_EFUSE_ABS_DONE_1[]; extern const esp_efuse_desc_t* ESP_EFUSE_ENCRYPT_FLASH_KEY[]; extern const esp_efuse_desc_t* ESP_EFUSE_ENCRYPT_CONFIG[]; extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_DL_ENCRYPT[]; @@ -40,6 +41,7 @@ extern const esp_efuse_desc_t* ESP_EFUSE_FLASH_CRYPT_CNT[]; extern const esp_efuse_desc_t* ESP_EFUSE_DISABLE_JTAG[]; extern const esp_efuse_desc_t* ESP_EFUSE_CONSOLE_DEBUG_DISABLE[]; extern const esp_efuse_desc_t* ESP_EFUSE_UART_DOWNLOAD_DIS[]; +extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_EFUSE_RD_DISABLE[]; extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_FLASH_CRYPT_CNT[]; extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLK1[]; extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLK2[]; diff --git a/tools/sdk/esp32/include/esp_eth/include/esp_eth.h b/tools/sdk/esp32/include/esp_eth/include/esp_eth.h index 34ee9159..deb6a412 100644 --- a/tools/sdk/esp32/include/esp_eth/include/esp_eth.h +++ b/tools/sdk/esp32/include/esp_eth/include/esp_eth.h @@ -13,14 +13,14 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include "esp_eth_com.h" #include "esp_eth_mac.h" #include "esp_eth_phy.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Handle of Ethernet driver * diff --git a/tools/sdk/esp32/include/esp_eth/include/esp_eth_com.h b/tools/sdk/esp32/include/esp_eth/include/esp_eth_com.h index ad7aa185..fcfa7dcd 100644 --- a/tools/sdk/esp32/include/esp_eth/include/esp_eth_com.h +++ b/tools/sdk/esp32/include/esp_eth/include/esp_eth_com.h @@ -13,13 +13,13 @@ // limitations under the License. #pragma once +#include "esp_err.h" +#include "esp_event_base.h" + #ifdef __cplusplus extern "C" { #endif -#include "esp_err.h" -#include "esp_event_base.h" - /** * @brief Maximum Ethernet payload size * @@ -78,6 +78,7 @@ typedef enum { ETH_STATE_LINK, /*!< Link status changed */ ETH_STATE_SPEED, /*!< Speed updated */ ETH_STATE_DUPLEX, /*!< Duplex updated */ + ETH_STATE_PAUSE, /*!< Pause ability updated */ } esp_eth_state_t; /** @@ -91,6 +92,7 @@ typedef enum { ETH_CMD_S_PHY_ADDR, /*!< Set PHY address */ ETH_CMD_G_SPEED, /*!< Get Speed */ ETH_CMD_S_PROMISCUOUS, /*!< Set promiscuous mode */ + ETH_CMD_S_FLOW_CTRL, /*!< Set flow control */ } esp_eth_io_cmd_t; /** diff --git a/tools/sdk/esp32/include/esp_eth/include/esp_eth_mac.h b/tools/sdk/esp32/include/esp_eth/include/esp_eth_mac.h index 7262bb0b..f12c66ae 100644 --- a/tools/sdk/esp32/include/esp_eth/include/esp_eth_mac.h +++ b/tools/sdk/esp32/include/esp_eth/include/esp_eth_mac.h @@ -13,10 +13,6 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include #include "esp_eth_com.h" #include "sdkconfig.h" @@ -24,6 +20,10 @@ extern "C" { #include "driver/spi_master.h" #endif +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Ethernet MAC * @@ -252,6 +252,31 @@ struct esp_eth_mac_s { */ esp_err_t (*set_promiscuous)(esp_eth_mac_t *mac, bool enable); + /** + * @brief Enable flow control on MAC layer or not + * + * @param[in] mac: Ethernet MAC instance + * @param[in] enable: set true to enable flow control; set false to disable flow control + * + * @return + * - ESP_OK: set flow control successfully + * - ESP_FAIL: set flow control failed because some error occurred + * + */ + esp_err_t (*enable_flow_ctrl)(esp_eth_mac_t *mac, bool enable); + + /** + * @brief Set the PAUSE ability of peer node + * + * @param[in] mac: Ethernet MAC instance + * @param[in] ability: zero indicates that pause function is supported by link partner; non-zero indicates that pause function is not supported by link partner + * + * @return + * - ESP_OK: set peer pause ability successfully + * - ESP_FAIL: set peer pause ability failed because some error occurred + */ + esp_err_t (*set_peer_pause_ability)(esp_eth_mac_t *mac, uint32_t ability); + /** * @brief Free memory of Ethernet MAC * diff --git a/tools/sdk/esp32/include/esp_eth/include/esp_eth_netif_glue.h b/tools/sdk/esp32/include/esp_eth/include/esp_eth_netif_glue.h index 25bc1cff..5e88b5ba 100644 --- a/tools/sdk/esp32/include/esp_eth/include/esp_eth_netif_glue.h +++ b/tools/sdk/esp32/include/esp_eth/include/esp_eth_netif_glue.h @@ -13,12 +13,12 @@ // limitations under the License. #pragma once +#include "esp_eth.h" + #ifdef __cplusplus extern "C" { #endif -#include "esp_eth.h" - /** * @brief Create a netif glue for Ethernet driver * @note netif glue is used to attach io driver to TCP/IP netif diff --git a/tools/sdk/esp32/include/esp_eth/include/esp_eth_phy.h b/tools/sdk/esp32/include/esp_eth/include/esp_eth_phy.h index b3aa39b4..cda3e777 100644 --- a/tools/sdk/esp32/include/esp_eth/include/esp_eth_phy.h +++ b/tools/sdk/esp32/include/esp_eth/include/esp_eth_phy.h @@ -13,14 +13,14 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include #include "esp_eth_com.h" #include "sdkconfig.h" +#ifdef __cplusplus +extern "C" { +#endif + #define ESP_ETH_PHY_ADDR_AUTO (-1) /** @@ -160,6 +160,19 @@ struct esp_eth_phy_s { */ esp_err_t (*get_addr)(esp_eth_phy_t *phy, uint32_t *addr); + /** + * @brief Advertise pause function supported by MAC layer + * + * @param[in] phy: Ethernet PHY instance + * @param[out] addr: Pause ability + * + * @return + * - ESP_OK: Advertise pause ability successfully + * - ESP_ERR_INVALID_ARG: Advertise pause ability failed because of invalid argument + * + */ + esp_err_t (*advertise_pause_ability)(esp_eth_phy_t *phy, uint32_t ability); + /** * @brief Free memory of Ethernet PHY instance * diff --git a/tools/sdk/esp32/include/esp_eth/include/eth_phy_regs_struct.h b/tools/sdk/esp32/include/esp_eth/include/eth_phy_regs_struct.h index 023ccf2a..e725333e 100644 --- a/tools/sdk/esp32/include/esp_eth/include/eth_phy_regs_struct.h +++ b/tools/sdk/esp32/include/esp_eth/include/eth_phy_regs_struct.h @@ -13,12 +13,12 @@ // limitations under the License. #pragma once +#include + #ifdef __cplusplus extern "C" { #endif -#include - /******************Basic PHY Registers*******************/ /** diff --git a/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h b/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h index 3ad04b49..a942426a 100644 --- a/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h +++ b/tools/sdk/esp32/include/esp_http_client/include/esp_http_client.h @@ -524,6 +524,21 @@ bool esp_http_client_is_complete_data_received(esp_http_client_handle_t client); int esp_http_client_read_response(esp_http_client_handle_t client, char *buffer, int len); +/** + * @brief Process all remaining response data + * This uses an internal buffer to repeatedly receive, parse, and discard response data until complete data is processed. + * As no additional user-supplied buffer is required, this may be preferrable to `esp_http_client_read_response` in situations where the content of the response may be ignored. + * + * @param[in] client The esp_http_client handle + * @param len Length of data discarded + * + * @return + * - ESP_OK If successful, len will have discarded length + * - ESP_FAIL If failed to read response + * - ESP_ERR_INVALID_ARG If the client is NULL + */ +int esp_http_client_flush_response(esp_http_client_handle_t client, int *len); + /** * @brief Get URL from client * diff --git a/tools/sdk/esp32/include/esp_http_server/include/esp_http_server.h b/tools/sdk/esp32/include/esp_http_server/include/esp_http_server.h index 0d936de8..7372003d 100644 --- a/tools/sdk/esp32/include/esp_http_server/include/esp_http_server.h +++ b/tools/sdk/esp32/include/esp_http_server/include/esp_http_server.h @@ -406,6 +406,12 @@ typedef struct httpd_uri { * If this flag is true, then method must be HTTP_GET. Otherwise the handshake will not be handled. */ bool is_websocket; + + /** + * Flag indicating that control frames (PING, PONG, CLOSE) are also passed to the handler + * This is used if a custom processing of the control frames is needed + */ + bool handle_ws_control_frames; #endif } httpd_uri_t; @@ -1466,6 +1472,20 @@ esp_err_t httpd_sess_trigger_close(httpd_handle_t handle, int sockfd); */ esp_err_t httpd_sess_update_lru_counter(httpd_handle_t handle, int sockfd); +/** + * @brief Returns list of current socket descriptors of active sessions + * + * @param[in] handle Handle to server returned by httpd_start + * @param[in,out] fds In: Number of fds allocated in the supplied structure client_fds + * Out: Number of valid client fds returned in client_fds, + * @param[out] client_fds Array of client fds + * + * @return + * - ESP_OK : Successfully retrieved session list + * - ESP_ERR_INVALID_ARG : Wrong arguments or list is longer than allocated + */ +esp_err_t httpd_get_client_list(httpd_handle_t handle, size_t *fds, int *client_fds); + /** End of Session * @} */ @@ -1526,6 +1546,15 @@ typedef enum { HTTPD_WS_TYPE_PONG = 0xA } httpd_ws_type_t; +/** + * @brief Enum for client info description + */ +typedef enum { + HTTPD_WS_CLIENT_INVALID = 0x0, + HTTPD_WS_CLIENT_HTTP = 0x1, + HTTPD_WS_CLIENT_WEBSOCKET = 0x2, +} httpd_ws_client_info_t; + /** * @brief WebSocket frame format */ @@ -1586,6 +1615,19 @@ esp_err_t httpd_ws_send_frame(httpd_req_t *req, httpd_ws_frame_t *pkt); */ esp_err_t httpd_ws_send_frame_async(httpd_handle_t hd, int fd, httpd_ws_frame_t *frame); +/** + * @brief Checks the supplied socket descriptor if it belongs to any active client + * of this server instance and if the websoket protocol is active + * + * @param[in] hd Server instance data + * @param[in] fd Socket descriptor + * @return + * - HTTPD_WS_CLIENT_INVALID : This fd is not a client of this httpd + * - HTTPD_WS_CLIENT_HTTP : This fd is an active client, protocol is not WS + * - HTTPD_WS_CLIENT_WEBSOCKET : This fd is an active client, protocol is WS + */ +httpd_ws_client_info_t httpd_ws_get_fd_info(httpd_handle_t hd, int fd); + #endif /* CONFIG_HTTPD_WS_SUPPORT */ /** End of WebSocket related stuff * @} diff --git a/tools/sdk/esp32/include/esp_https_ota/include/esp_https_ota.h b/tools/sdk/esp32/include/esp_https_ota/include/esp_https_ota.h index 71183c19..b88fdfaa 100644 --- a/tools/sdk/esp32/include/esp_https_ota/include/esp_https_ota.h +++ b/tools/sdk/esp32/include/esp_https_ota/include/esp_https_ota.h @@ -22,12 +22,15 @@ extern "C" { #endif typedef void *esp_https_ota_handle_t; +typedef esp_err_t(*http_client_init_cb_t)(esp_http_client_handle_t); /** * @brief ESP HTTPS OTA configuration */ typedef struct { const esp_http_client_config_t *http_config; /*!< ESP HTTP client configuration */ + http_client_init_cb_t http_client_init_cb; /*!< Callback after ESP HTTP client is initialised */ + bool bulk_flash_erase; /*!< Erase entire flash partition during initialization. By default flash partition is erased during write operation and in chunk of 4K sector size */ } esp_https_ota_config_t; #define ESP_ERR_HTTPS_OTA_BASE (0x9000) diff --git a/tools/sdk/esp32/include/esp_websocket_client/include/esp_websocket_client.h b/tools/sdk/esp32/include/esp_websocket_client/include/esp_websocket_client.h index 5a0e52e0..8bfb2ce2 100644 --- a/tools/sdk/esp32/include/esp_websocket_client/include/esp_websocket_client.h +++ b/tools/sdk/esp32/include/esp_websocket_client/include/esp_websocket_client.h @@ -40,6 +40,7 @@ typedef enum { WEBSOCKET_EVENT_CONNECTED, /*!< Once the Websocket has been connected to the server, no data exchange has been performed */ WEBSOCKET_EVENT_DISCONNECTED, /*!< The connection has been disconnected */ WEBSOCKET_EVENT_DATA, /*!< When receiving data from the server, possibly multiple portions of the packet */ + WEBSOCKET_EVENT_CLOSED, /*!< The connection has been closed cleanly */ WEBSOCKET_EVENT_MAX } esp_websocket_event_id_t; @@ -125,7 +126,14 @@ esp_err_t esp_websocket_client_set_uri(esp_websocket_client_handle_t client, con esp_err_t esp_websocket_client_start(esp_websocket_client_handle_t client); /** - * @brief Close the WebSocket connection + * @brief Stops the WebSocket connection without websocket closing handshake + * + * This API stops ws client and closes TCP connection directly without sending + * close frames. It is a good practice to close the connection in a clean way + * using esp_websocket_client_close(). + * + * Notes: + * - Cannot be called from the websocket event handler * * @param[in] client The client * @@ -139,6 +147,9 @@ esp_err_t esp_websocket_client_stop(esp_websocket_client_handle_t client); * It is the opposite of the esp_websocket_client_init function and must be called with the same handle as input that a esp_websocket_client_init call returned. * This might close all connections this handle has used. * + * Notes: + * - Cannot be called from the websocket event handler + * * @param[in] client The client * * @return esp_err_t @@ -187,6 +198,42 @@ int esp_websocket_client_send_bin(esp_websocket_client_handle_t client, const ch */ int esp_websocket_client_send_text(esp_websocket_client_handle_t client, const char *data, int len, TickType_t timeout); +/** + * @brief Close the WebSocket connection in a clean way + * + * Sequence of clean close initiated by client: + * * Client sends CLOSE frame + * * Client waits until server echos the CLOSE frame + * * Client waits until server closes the connection + * * Client is stopped the same way as by the `esp_websocket_client_stop()` + * + * Notes: + * - Cannot be called from the websocket event handler + * + * @param[in] client The client + * @param[in] timeout Timeout in RTOS ticks for waiting + * + * @return esp_err_t + */ +esp_err_t esp_websocket_client_close(esp_websocket_client_handle_t client, TickType_t timeout); + +/** + * @brief Close the WebSocket connection in a clean way with custom code/data + * Closing sequence is the same as for esp_websocket_client_close() + * + * Notes: + * - Cannot be called from the websocket event handler + * + * @param[in] client The client + * @param[in] code Close status code as defined in RFC6455 section-7.4 + * @param[in] data Additional data to closing message + * @param[in] len The length of the additional data + * @param[in] timeout Timeout in RTOS ticks for waiting + * + * @return esp_err_t + */ +esp_err_t esp_websocket_client_close_with_code(esp_websocket_client_handle_t client, int code, const char *data, int len, TickType_t timeout); + /** * @brief Check the WebSocket client connection state * diff --git a/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi.h b/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi.h index 04a306fb..b85d60ee 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_private/wifi.h @@ -53,7 +53,8 @@ typedef struct { * */ typedef enum { - WIFI_LOG_ERROR = 0, /*enabled by default*/ + WIFI_LOG_NONE = 0, + WIFI_LOG_ERROR , /*enabled by default*/ WIFI_LOG_WARNING, /*enabled by default*/ WIFI_LOG_INFO, /*enabled by default*/ WIFI_LOG_DEBUG, /*can be set in menuconfig*/ diff --git a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_crypto_types.h b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_crypto_types.h index 47620802..cda53946 100644 --- a/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_crypto_types.h +++ b/tools/sdk/esp32/include/esp_wifi/include/esp_wifi_crypto_types.h @@ -336,10 +336,12 @@ typedef int (*esp_omac1_aes_128_t)(const uint8_t *key, const uint8_t *data, size * @data: Pointer to encrypted data buffer * @data_len: Encrypted data length in bytes * @decrypted_len: Length of decrypted data + * @espnow_pkt: Indicates if it's an ESPNOW packet * Returns: Pointer to decrypted data on success, NULL on failure */ typedef uint8_t * (*esp_ccmp_decrypt_t)(const uint8_t *tk, const uint8_t *ieee80211_hdr, - const uint8_t *data, size_t data_len, size_t *decrypted_len); + const uint8_t *data, size_t data_len, + size_t *decrypted_len, bool espnow_pkt); /** * @brief Encrypt data using CCMP (Counter Mode CBC-MAC Protocol OR diff --git a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_master.h b/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_master.h index bb7dc7a0..621348e1 100644 --- a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_master.h +++ b/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_master.h @@ -136,7 +136,6 @@ esp_err_t mbc_master_init(mb_port_type_t port_type, void** handler); * @brief Initialize Modbus Master controller interface handle * * @param[in] handler - pointer to master data structure - * @return None */ void mbc_master_init_iface(void* handler); diff --git a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_slave.h b/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_slave.h index ed6a12ed..fa6a53bc 100644 --- a/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_slave.h +++ b/tools/sdk/esp32/include/freemodbus/common/include/esp_modbus_slave.h @@ -78,7 +78,6 @@ esp_err_t mbc_slave_init(mb_port_type_t port_type, void** handler); * @brief Initialize Modbus Slave controller interface handle * * @param[in] handler - pointer to slave interface data structure - * @return None */ void mbc_slave_init_iface(void* handler); diff --git a/tools/sdk/esp32/include/freertos/xtensa/include/freertos/portmacro.h b/tools/sdk/esp32/include/freertos/xtensa/include/freertos/portmacro.h index 9c00fa16..e4d2c057 100644 --- a/tools/sdk/esp32/include/freertos/xtensa/include/freertos/portmacro.h +++ b/tools/sdk/esp32/include/freertos/xtensa/include/freertos/portmacro.h @@ -75,7 +75,7 @@ extern "C" { #include #include #include - +#include #include #include #include /* required for XSHAL_CLIB */ @@ -321,13 +321,27 @@ static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint #define portALT_GET_RUN_TIME_COUNTER_VALUE(x) x = (uint32_t)esp_timer_get_time() #endif - -/* Kernel utilities. */ void vPortYield( void ); +void vPortEvaluateYieldFromISR(int argc, ...); void _frxt_setup_switch( void ); -#define portYIELD() vPortYield() -#define portYIELD_FROM_ISR() {traceISR_EXIT_TO_SCHEDULER(); _frxt_setup_switch();} +/** + * Macro to count number of arguments of a __VA_ARGS__ used to support portYIELD_FROM_ISR with, + * or without arguments. + */ +#define portGET_ARGUMENT_COUNT(...) portGET_ARGUMENT_COUNT_INNER(0, ##__VA_ARGS__,1,0) +#define portGET_ARGUMENT_COUNT_INNER(zero, one, count, ...) count +_Static_assert(portGET_ARGUMENT_COUNT() == 0, "portGET_ARGUMENT_COUNT() result does not match for 0 arguments"); +_Static_assert(portGET_ARGUMENT_COUNT(1) == 1, "portGET_ARGUMENT_COUNT() result does not match for 1 argument"); + +#define portYIELD() vPortYield() + +/** + * @note The macro below could be used when passing a single argument, or without any argument, + * it was developed to support both usages of portYIELD inside of an ISR. Any other usage form + * might result in undesired behaviour + */ +#define portYIELD_FROM_ISR(...) vPortEvaluateYieldFromISR(portGET_ARGUMENT_COUNT(__VA_ARGS__), ##__VA_ARGS__) /* Yielding within an API call (when interrupts are off), means the yield should be delayed until interrupts are re-enabled. diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/adc_hal.h b/tools/sdk/esp32/include/hal/esp32/include/hal/adc_hal.h similarity index 50% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/adc_hal.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/adc_hal.h index 1bd84bd2..37200a19 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/adc_hal.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/adc_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for ADC (esp32 specific part) @@ -31,22 +31,6 @@ extern "C" { #endif -typedef struct { - bool conv_limit_en; /*!0dB signal attenuation for that ADC channel. - * - * When VDD_A is 3.3V: - * - * - 0dB attenuation (ADC_ATTEN_DB_0) gives full-scale voltage 1.1V - * - 2.5dB attenuation (ADC_ATTEN_DB_2_5) gives full-scale voltage 1.5V - * - 6dB attenuation (ADC_ATTEN_DB_6) gives full-scale voltage 2.2V - * - 11dB attenuation (ADC_ATTEN_DB_11) gives full-scale voltage 3.9V (see note below) - * - * @note The full-scale voltage is the voltage corresponding to a maximum reading (depending on ADC1 configured - * bit width, this value is: 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits.) - * - * @note At 11dB attenuation the maximum voltage is limited by VDD_A, not the full scale voltage. - * - * Due to ADC characteristics, most accurate results are obtained within the following approximate voltage ranges: - * - * - 0dB attenuation (ADC_ATTEN_DB_0) between 100 and 950mV - * - 2.5dB attenuation (ADC_ATTEN_DB_2_5) between 100 and 1250mV - * - 6dB attenuation (ADC_ATTEN_DB_6) between 150 to 1750mV - * - 11dB attenuation (ADC_ATTEN_DB_11) between 150 to 2450mV - * - * For maximum accuracy, use the ADC calibration APIs and measure voltages within these recommended ranges. - * - * @param adc_n ADC unit. - * @param channel ADCn channel number. - * @param atten The attenuation option. */ static inline void adc_ll_set_atten(adc_ll_num_t adc_n, adc_channel_t channel, adc_atten_t atten) { diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/can_hal.h b/tools/sdk/esp32/include/hal/esp32/include/hal/can_hal.h similarity index 79% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/can_hal.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/can_hal.h index 9a1c1246..4a83d8d3 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/can_hal.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/can_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once @@ -66,19 +66,19 @@ static inline void can_hal_configure(can_hal_context_t *hal_ctx, const can_timin /* -------------------------------- Actions --------------------------------- */ -static inline bool can_hal_start(can_hal_context_t *hal_ctx, can_mode_t mode) +static inline void can_hal_start(can_hal_context_t *hal_ctx, can_mode_t mode) { - return twai_hal_start(hal_ctx, mode); + twai_hal_start(hal_ctx, mode); } -static inline bool can_hal_stop(can_hal_context_t *hal_ctx) +static inline void can_hal_stop(can_hal_context_t *hal_ctx) { - return twai_hal_stop(hal_ctx); + twai_hal_stop(hal_ctx); } -static inline bool can_hal_start_bus_recovery(can_hal_context_t *hal_ctx) +static inline void can_hal_start_bus_recovery(can_hal_context_t *hal_ctx) { - return twai_hal_start_bus_recovery(hal_ctx); + twai_hal_start_bus_recovery(hal_ctx); } static inline uint32_t can_hal_get_tec(can_hal_context_t *hal_ctx) @@ -101,37 +101,22 @@ static inline bool can_hal_check_last_tx_successful(can_hal_context_t *hal_ctx) return twai_hal_check_last_tx_successful(hal_ctx); } +static inline bool can_hal_check_state_flags(can_hal_context_t *hal_ctx, uint32_t check_flags) +{ + return twai_hal_check_state_flags(hal_ctx, check_flags); +} + /* ----------------------------- Event Handling ----------------------------- */ -static inline uint32_t can_hal_decode_interrupt_events(can_hal_context_t *hal_ctx, bool bus_recovering) { - return twai_hal_decode_interrupt_events(hal_ctx, bus_recovering); -} - -static inline bool can_hal_handle_bus_recov_cplt(can_hal_context_t *hal_ctx) -{ - return twai_hal_handle_bus_recov_cplt(hal_ctx); -} - -static inline void can_hal_handle_arb_lost(can_hal_context_t *hal_ctx) -{ - twai_hal_handle_arb_lost(hal_ctx); -} - -static inline void can_hal_handle_bus_error(can_hal_context_t *hal_ctx) -{ - twai_hal_handle_bus_error(hal_ctx); -} - -static inline void can_hal_handle_bus_off(can_hal_context_t *hal_ctx) -{ - twai_hal_handle_bus_off(hal_ctx); +static inline uint32_t can_hal_decode_interrupt_events(can_hal_context_t *hal_ctx) { + return twai_hal_decode_interrupt_events(hal_ctx); } /* ------------------------------- TX and RX -------------------------------- */ static inline void can_hal_format_frame(const can_message_t *message, can_hal_frame_t *frame) { - twai_hal_format_frame(message, frame); + twai_hal_format_frame(message, frame); } static inline void can_hal_parse_frame(can_hal_frame_t *frame, can_message_t *message) diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/can_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/can_ll.h similarity index 96% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/can_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/can_ll.h index 9fa48179..0d0c8b29 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/can_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/can_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for CAN @@ -54,14 +54,14 @@ typedef twai_ll_frame_buffer_t can_ll_frame_buffer_t; /* ---------------------------- Mode Register ------------------------------- */ -static inline bool can_ll_enter_reset_mode(can_dev_t *hw) +static inline void can_ll_enter_reset_mode(can_dev_t *hw) { - return twai_ll_enter_reset_mode(hw); + twai_ll_enter_reset_mode(hw); } -static inline bool can_ll_exit_reset_mode(can_dev_t *hw) +static inline void can_ll_exit_reset_mode(can_dev_t *hw) { - return twai_ll_exit_reset_mode(hw); + twai_ll_exit_reset_mode(hw); } static inline bool can_ll_is_in_reset_mode(can_dev_t *hw) diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/can_types.h b/tools/sdk/esp32/include/hal/esp32/include/hal/can_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/can_types.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/can_types.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/clk_gate_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/clk_gate_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/clk_gate_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/clk_gate_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/cpu_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/cpu_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/cpu_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/cpu_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/dac_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/dac_ll.h similarity index 93% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/dac_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/dac_ll.h index e8b279e8..5ea4da89 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/dac_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/dac_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once @@ -184,25 +184,15 @@ static inline void dac_ll_cw_set_dc_offset(dac_channel_t channel, int8_t offset) /* DAC DMA API's */ /************************************/ /** - * Enable DAC output data from I2S DMA. + * Enable/disable DAC output data from I2S DMA. * I2S_CLK connect to DAC_CLK, I2S_DATA_OUT connect to DAC_DATA. */ -static inline void dac_ll_dma_enable(void) +static inline void dac_ll_digi_enable_dma(bool enable) { - SENS.sar_dac_ctrl1.dac_dig_force = 1; - SENS.sar_dac_ctrl1.dac_clk_inv = 1; + SENS.sar_dac_ctrl1.dac_dig_force = enable; + SENS.sar_dac_ctrl1.dac_clk_inv = enable; } -/** - * Disable DAC output data from I2S DMA. - */ -static inline void dac_ll_dma_disable(void) -{ - SENS.sar_dac_ctrl1.dac_dig_force = 0; - SENS.sar_dac_ctrl1.dac_clk_inv = 0; -} - - #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/emac.h b/tools/sdk/esp32/include/hal/esp32/include/hal/emac.h similarity index 98% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/emac.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/emac.h index b55d8830..ec0c1ab3 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/emac.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/emac.h @@ -366,6 +366,11 @@ void emac_hal_set_duplex(emac_hal_context_t *hal, uint32_t duplex); void emac_hal_set_promiscuous(emac_hal_context_t *hal, bool enable); +/** + * @brief Send MAC-CTRL frames to peer (EtherType=0x8808, opcode=0x0001, dest_addr=MAC-specific-ctrl-proto-01 (01:80:c2:00:00:01)) + */ +void emac_hal_send_pause_frame(emac_hal_context_t *hal, bool enable); + bool emac_hal_is_mii_busy(emac_hal_context_t *hal); void emac_hal_set_phy_cmd(emac_hal_context_t *hal, uint32_t phy_addr, uint32_t phy_reg, bool write); @@ -384,7 +389,9 @@ uint32_t emac_hal_get_tx_desc_owner(emac_hal_context_t *hal); uint32_t emac_hal_transmit_frame(emac_hal_context_t *hal, uint8_t *buf, uint32_t length); -uint32_t emac_hal_receive_frame(emac_hal_context_t *hal, uint8_t *buf, uint32_t size, uint32_t *frames_remain); +uint32_t emac_hal_receive_frame(emac_hal_context_t *hal, uint8_t *buf, uint32_t size, uint32_t *frames_remain, uint32_t *free_desc); + +void emac_hal_enable_flow_ctrl(emac_hal_context_t *hal, bool enable); void emac_hal_isr(void *arg); diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/gpio_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/gpio_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/gpio_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/gpio_ll.h index 5fa8f5e6..d428fb3e 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/gpio_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/gpio_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 GPIO register operations diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/i2c_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/i2c_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/i2c_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/i2c_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/i2s_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/i2s_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/i2s_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/i2s_ll.h index 703b92c7..5b7d93be 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/i2s_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/i2s_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 I2S register operations diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/ledc_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/ledc_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/ledc_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/ledc_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/mcpwm_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/mcpwm_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h index ef4afa9c..6be08f26 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/mcpwm_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 MCPWM register operations diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/mpu_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/mpu_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/mpu_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/mpu_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/mwdt_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/mwdt_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/mwdt_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/mwdt_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/pcnt_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/pcnt_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/pcnt_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/pcnt_ll.h index c1a2e55c..d0a5c126 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/pcnt_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/pcnt_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 PCNT register operations diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/rmt_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/rmt_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/rmt_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/rmt_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/rtc_cntl_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/rtc_cntl_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/rtc_cntl_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/rtc_cntl_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/rtc_io_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/rtc_io_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/rtc_io_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/rtc_io_ll.h index 3a404299..9162464a 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/rtc_io_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/rtc_io_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/rwdt_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/rwdt_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/rwdt_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/rwdt_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/sigmadelta_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/sigmadelta_ll.h similarity index 98% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/sigmadelta_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/sigmadelta_ll.h index 922cbc85..2e605ee5 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/sigmadelta_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/sigmadelta_ll.h @@ -14,7 +14,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 SIGMADELTA register operations diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/soc_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/soc_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/soc_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/soc_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/spi_flash_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/spi_flash_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/spi_flash_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/spi_flash_ll.h index 50a3d0d6..0b4db159 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/spi_flash_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/spi_flash_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for SPI Flash diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/spi_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/spi_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/spi_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/spi_ll.h index bfcc9e73..73b8b01a 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/spi_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/spi_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 SPI register operations diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/timer_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/timer_ll.h similarity index 100% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/timer_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/timer_ll.h diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/touch_sensor_hal.h b/tools/sdk/esp32/include/hal/esp32/include/hal/touch_sensor_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/touch_sensor_hal.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/touch_sensor_hal.h index 09a25daf..27615302 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/touch_sensor_hal.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/touch_sensor_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for touch sensor (esp32 specific part) diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/touch_sensor_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/touch_sensor_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/touch_sensor_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/touch_sensor_ll.h index a2a6711b..4016d4f5 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/touch_sensor_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/touch_sensor_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for Touch Sensor diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/twai_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/twai_ll.h similarity index 94% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/twai_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/twai_ll.h index c82692af..c02d2388 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/twai_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/twai_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for TWAI @@ -34,22 +34,22 @@ extern "C" { /* ------------------------- Defines and Typedefs --------------------------- */ -#define TWAI_LL_STATUS_RBS (0x1 << 0) -#define TWAI_LL_STATUS_DOS (0x1 << 1) -#define TWAI_LL_STATUS_TBS (0x1 << 2) -#define TWAI_LL_STATUS_TCS (0x1 << 3) -#define TWAI_LL_STATUS_RS (0x1 << 4) -#define TWAI_LL_STATUS_TS (0x1 << 5) -#define TWAI_LL_STATUS_ES (0x1 << 6) -#define TWAI_LL_STATUS_BS (0x1 << 7) +#define TWAI_LL_STATUS_RBS (0x1 << 0) //Receive Buffer Status +#define TWAI_LL_STATUS_DOS (0x1 << 1) //Data Overrun Status +#define TWAI_LL_STATUS_TBS (0x1 << 2) //Transmit Buffer Status +#define TWAI_LL_STATUS_TCS (0x1 << 3) //Transmission Complete Status +#define TWAI_LL_STATUS_RS (0x1 << 4) //Receive Status +#define TWAI_LL_STATUS_TS (0x1 << 5) //Transmit Status +#define TWAI_LL_STATUS_ES (0x1 << 6) //Error Status +#define TWAI_LL_STATUS_BS (0x1 << 7) //Bus Status -#define TWAI_LL_INTR_RI (0x1 << 0) -#define TWAI_LL_INTR_TI (0x1 << 1) -#define TWAI_LL_INTR_EI (0x1 << 2) +#define TWAI_LL_INTR_RI (0x1 << 0) //Receive Interrupt +#define TWAI_LL_INTR_TI (0x1 << 1) //Transmit Interrupt +#define TWAI_LL_INTR_EI (0x1 << 2) //Error Interrupt //Data overrun interrupt not supported in SW due to HW peculiarities -#define TWAI_LL_INTR_EPI (0x1 << 5) -#define TWAI_LL_INTR_ALI (0x1 << 6) -#define TWAI_LL_INTR_BEI (0x1 << 7) +#define TWAI_LL_INTR_EPI (0x1 << 5) //Error Passive Interrupt +#define TWAI_LL_INTR_ALI (0x1 << 6) //Arbitration Lost Interrupt +#define TWAI_LL_INTR_BEI (0x1 << 7) //Bus Error Interrupt /* * The following frame structure has an NEARLY identical bit field layout to @@ -95,14 +95,12 @@ _Static_assert(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should b * in order to write the majority of configuration registers. * * @param hw Start address of the TWAI registers - * @return true if reset mode was entered successfully * * @note Reset mode is automatically entered on BUS OFF condition */ -static inline bool twai_ll_enter_reset_mode(twai_dev_t *hw) +static inline void twai_ll_enter_reset_mode(twai_dev_t *hw) { hw->mode_reg.rm = 1; - return hw->mode_reg.rm; } /** @@ -113,14 +111,12 @@ static inline bool twai_ll_enter_reset_mode(twai_dev_t *hw) * operating mode. * * @param hw Start address of the TWAI registers - * @return true if reset mode was exit successfully * * @note Reset mode must be exit to initiate BUS OFF recovery */ -static inline bool twai_ll_exit_reset_mode(twai_dev_t *hw) +static inline void twai_ll_exit_reset_mode(twai_dev_t *hw) { hw->mode_reg.rm = 0; - return !(hw->mode_reg.rm); } /** @@ -135,10 +131,10 @@ static inline bool twai_ll_is_in_reset_mode(twai_dev_t *hw) /** * @brief Set operating mode of TWAI controller - * + * * @param hw Start address of the TWAI registers * @param mode Operating mode - * + * * @note Must be called in reset mode */ static inline void twai_ll_set_mode(twai_dev_t *hw, twai_mode_t mode) @@ -307,8 +303,6 @@ static inline bool twai_ll_is_last_tx_successful(twai_dev_t *hw) return hw->status_reg.tcs; } -//Todo: Add stand alone status bit check functions when necessary - /* -------------------------- Interrupt Register ---------------------------- */ /** @@ -391,7 +385,6 @@ static inline void twai_ll_set_bus_timing(twai_dev_t *hw, uint32_t brp, uint32_t static inline void twai_ll_clear_arb_lost_cap(twai_dev_t *hw) { (void)hw->arbitration_lost_captue_reg.val; - //Todo: Decode ALC register } /* ----------------------------- ECC Register ------------------------------- */ @@ -406,7 +399,6 @@ static inline void twai_ll_clear_arb_lost_cap(twai_dev_t *hw) static inline void twai_ll_clear_err_code_cap(twai_dev_t *hw) { (void)hw->error_code_capture_reg.val; - //Todo: Decode error code capture } /* ----------------------------- EWL Register ------------------------------- */ @@ -554,7 +546,7 @@ static inline void twai_ll_get_rx_buffer(twai_dev_t *hw, twai_ll_frame_buffer_t * This function encodes a message into a frame structure. The frame structure * has an identical layout to the TX buffer, allowing the frame structure to be * directly copied into TX buffer. - * + * * @param[in] 11bit or 29bit ID * @param[in] dlc Data length code * @param[in] data Pointer to an 8 byte array containing data. NULL if no data @@ -663,9 +655,9 @@ static inline uint32_t twai_ll_get_rx_msg_count(twai_dev_t *hw) /** * @brief Set CLKOUT Divider and enable/disable - * + * * Configure CLKOUT. CLKOUT is a pre-scaled version of APB CLK. Divider can be - * 1, or any even number from 2 to 14. Set the divider to 0 to disable CLKOUT. + * 1, or any even number from 2 to 14. Set the divider to 0 to disable CLKOUT. * * @param hw Start address of the TWAI registers * @param divider Divider for CLKOUT. Set to 0 to disable CLKOUT diff --git a/tools/sdk/esp32/include/soc/src/esp32/include/hal/uart_ll.h b/tools/sdk/esp32/include/hal/esp32/include/hal/uart_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/src/esp32/include/hal/uart_ll.h rename to tools/sdk/esp32/include/hal/esp32/include/hal/uart_ll.h index 30d50797..a6997d9f 100644 --- a/tools/sdk/esp32/include/soc/src/esp32/include/hal/uart_ll.h +++ b/tools/sdk/esp32/include/hal/esp32/include/hal/uart_ll.h @@ -170,6 +170,9 @@ static inline void uart_ll_read_rxfifo(uart_dev_t *hw, uint8_t *buf, uint32_t rd uint32_t fifo_addr = (hw == &UART0) ? UART_FIFO_REG(0) : (hw == &UART1) ? UART_FIFO_REG(1) : UART_FIFO_REG(2); for(int i = 0; i < rd_len; i++) { buf[i] = READ_PERI_REG(fifo_addr); +#ifdef CONFIG_COMPILER_OPTIMIZATION_PERF + __asm__ __volatile__("nop"); +#endif } } diff --git a/tools/sdk/esp32/include/soc/include/hal/adc_hal.h b/tools/sdk/esp32/include/hal/include/hal/adc_hal.h similarity index 95% rename from tools/sdk/esp32/include/soc/include/hal/adc_hal.h rename to tools/sdk/esp32/include/hal/include/hal/adc_hal.h index e497149e..3a0a5a5c 100644 --- a/tools/sdk/esp32/include/soc/include/hal/adc_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/adc_hal.h @@ -185,6 +185,22 @@ int adc_hal_convert(adc_ll_num_t adc_n, int channel, int *value); /*--------------------------------------------------------------- Digital controller setting ---------------------------------------------------------------*/ +/** + * Digital controller initialization. + */ +void adc_hal_digi_init(void); + +/** + * Digital controller deinitialization. + */ +void adc_hal_digi_deinit(void); + +/** + * Setting the digital controller. + * + * @param cfg Pointer to digital controller paramter. + */ +void adc_hal_digi_controller_config(const adc_digi_config_t *cfg); /** * Reset the pattern table pointer, then take the measurement rule from table header in next measurement. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/adc_types.h b/tools/sdk/esp32/include/hal/include/hal/adc_types.h similarity index 69% rename from tools/sdk/esp32s2/include/soc/include/hal/adc_types.h rename to tools/sdk/esp32/include/hal/include/hal/adc_types.h index 5f3d5a13..6606cf9d 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/adc_types.h +++ b/tools/sdk/esp32/include/hal/include/hal/adc_types.h @@ -19,9 +19,9 @@ #include "soc/adc_caps.h" /** - * @brief ADC units selected handle. + * @brief ADC unit enumeration. * - * @note For ADC digital controller(DMA mode), ESP32 don't support `ADC_UNIT_2`, `ADC_UNIT_BOTH`, `ADC_UNIT_ALTER`. + * @note For ADC digital controller (DMA mode), ESP32 doesn't support `ADC_UNIT_2`, `ADC_UNIT_BOTH`, `ADC_UNIT_ALTER`. */ typedef enum { ADC_UNIT_1 = 1, /*!< SAR ADC 1. */ @@ -34,7 +34,7 @@ typedef enum { /** * @brief ADC channels handle. See ``adc1_channel_t``, ``adc2_channel_t``. * - * @note For ESP32 ADC1, don't support `ADC_CHANNEL_8`, `ADC_CHANNEL_9`. See ``adc1_channel_t``. + * @note For ESP32 ADC1, don't use `ADC_CHANNEL_8`, `ADC_CHANNEL_9`. See ``adc1_channel_t``. */ typedef enum { ADC_CHANNEL_0 = 0, /*!< ADC channel */ @@ -54,18 +54,24 @@ typedef enum { * @brief ADC attenuation parameter. Different parameters determine the range of the ADC. See ``adc1_config_channel_atten``. */ typedef enum { - ADC_ATTEN_DB_0 = 0, /*! ADC_CHANNEL_MAX), The data is invalid. */ - } type1; /*! ADC_CHANNEL_MAX), The data is invalid. */ - uint16_t unit: 1; /*! ADC_CHANNEL_MAX), The data is invalid. */ + } type1; /*! ADC_CHANNEL_MAX), The data is invalid. */ + uint16_t unit: 1; /*!dev) /** - * @brief Force unhold digital and rtc gpio pad. - * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. - * + * @brief Force unhold digital and rtc gpio pad. + * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. + * * @param hal Context of the HAL layer * */ #define gpio_hal_force_unhold_all(hal) gpio_ll_force_unhold_all((hal)->dev) diff --git a/tools/sdk/esp32/include/soc/include/hal/gpio_types.h b/tools/sdk/esp32/include/hal/include/hal/gpio_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/gpio_types.h rename to tools/sdk/esp32/include/hal/include/hal/gpio_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/hal_defs.h b/tools/sdk/esp32/include/hal/include/hal/hal_defs.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/hal_defs.h rename to tools/sdk/esp32/include/hal/include/hal/hal_defs.h diff --git a/tools/sdk/esp32/include/soc/include/hal/i2c_hal.h b/tools/sdk/esp32/include/hal/include/hal/i2c_hal.h similarity index 96% rename from tools/sdk/esp32/include/soc/include/hal/i2c_hal.h rename to tools/sdk/esp32/include/hal/include/hal/i2c_hal.h index 5b148e02..9e38d358 100644 --- a/tools/sdk/esp32/include/soc/include/hal/i2c_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/i2c_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for I2C @@ -75,7 +75,7 @@ typedef struct { #define i2c_hal_trans_start(hal) i2c_ll_trans_start((hal)->dev) /** - * @brief Enable I2C master RX interrupt + * @brief Enable I2C master RX interrupt * * @param hal Context of the HAL layer * @@ -84,7 +84,7 @@ typedef struct { #define i2c_hal_enable_master_rx_it(hal) i2c_ll_master_enable_rx_it((hal)->dev) /** - * @brief Enable I2C master TX interrupt + * @brief Enable I2C master TX interrupt * * @param hal Context of the HAL layer * @@ -458,7 +458,7 @@ void i2c_hal_master_fsm_rst(i2c_hal_context_t *hal); void i2c_hal_master_clr_bus(i2c_hal_context_t *hal); /** - * @brief Enable I2C slave TX interrupt + * @brief Enable I2C slave TX interrupt * * @param hal Context of the HAL layer * @@ -467,7 +467,7 @@ void i2c_hal_master_clr_bus(i2c_hal_context_t *hal); void i2c_hal_enable_slave_tx_it(i2c_hal_context_t *hal); /** - * @brief Disable I2C slave TX interrupt + * @brief Disable I2C slave TX interrupt * * @param hal Context of the HAL layer * @@ -476,7 +476,7 @@ void i2c_hal_enable_slave_tx_it(i2c_hal_context_t *hal); void i2c_hal_disable_slave_tx_it(i2c_hal_context_t *hal); /** - * @brief Enable I2C slave RX interrupt + * @brief Enable I2C slave RX interrupt * * @param hal Context of the HAL layer * @@ -485,7 +485,7 @@ void i2c_hal_disable_slave_tx_it(i2c_hal_context_t *hal); void i2c_hal_enable_slave_rx_it(i2c_hal_context_t *hal); /** - * @brief Disable I2C slave RX interrupt + * @brief Disable I2C slave RX interrupt * * @param hal Context of the HAL layer * @@ -494,7 +494,7 @@ void i2c_hal_enable_slave_rx_it(i2c_hal_context_t *hal); void i2c_hal_disable_slave_rx_it(i2c_hal_context_t *hal); /** - * @brief I2C master handle tx interrupt event + * @brief I2C master handle tx interrupt event * * @param hal Context of the HAL layer * @param event Pointer to accept the interrupt event @@ -504,7 +504,7 @@ void i2c_hal_disable_slave_rx_it(i2c_hal_context_t *hal); void i2c_hal_master_handle_tx_event(i2c_hal_context_t *hal, i2c_intr_event_t *event); /** - * @brief I2C master handle rx interrupt event + * @brief I2C master handle rx interrupt event * * @param hal Context of the HAL layer * @param event Pointer to accept the interrupt event @@ -514,7 +514,7 @@ void i2c_hal_master_handle_tx_event(i2c_hal_context_t *hal, i2c_intr_event_t *ev void i2c_hal_master_handle_rx_event(i2c_hal_context_t *hal, i2c_intr_event_t *event); /** - * @brief I2C slave handle interrupt event + * @brief I2C slave handle interrupt event * * @param hal Context of the HAL layer * @param event Pointer to accept the interrupt event diff --git a/tools/sdk/esp32/include/soc/include/hal/i2c_types.h b/tools/sdk/esp32/include/hal/include/hal/i2c_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/i2c_types.h rename to tools/sdk/esp32/include/hal/include/hal/i2c_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/i2s_hal.h b/tools/sdk/esp32/include/hal/include/hal/i2s_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/i2s_hal.h rename to tools/sdk/esp32/include/hal/include/hal/i2s_hal.h index b3118fe8..cff02d98 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/i2s_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/i2s_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for I2S. diff --git a/tools/sdk/esp32/include/soc/include/hal/i2s_types.h b/tools/sdk/esp32/include/hal/include/hal/i2s_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/i2s_types.h rename to tools/sdk/esp32/include/hal/include/hal/i2s_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/ledc_hal.h b/tools/sdk/esp32/include/hal/include/hal/ledc_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/ledc_hal.h rename to tools/sdk/esp32/include/hal/include/hal/ledc_hal.h index 967e8267..2afa5477 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/ledc_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/ledc_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for LEDC. diff --git a/tools/sdk/esp32/include/soc/include/hal/ledc_types.h b/tools/sdk/esp32/include/hal/include/hal/ledc_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/ledc_types.h rename to tools/sdk/esp32/include/hal/include/hal/ledc_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/mcpwm_hal.h b/tools/sdk/esp32/include/hal/include/hal/mcpwm_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/mcpwm_hal.h rename to tools/sdk/esp32/include/hal/include/hal/mcpwm_hal.h index 3b3f051d..1d45b9da 100644 --- a/tools/sdk/esp32/include/soc/include/hal/mcpwm_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/mcpwm_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for MCPWM (common part) diff --git a/tools/sdk/esp32/include/soc/include/hal/mcpwm_types.h b/tools/sdk/esp32/include/hal/include/hal/mcpwm_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/mcpwm_types.h rename to tools/sdk/esp32/include/hal/include/hal/mcpwm_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/mpu_hal.h b/tools/sdk/esp32/include/hal/include/hal/mpu_hal.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/mpu_hal.h rename to tools/sdk/esp32/include/hal/include/hal/mpu_hal.h diff --git a/tools/sdk/esp32/include/soc/include/hal/mpu_types.h b/tools/sdk/esp32/include/hal/include/hal/mpu_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/mpu_types.h rename to tools/sdk/esp32/include/hal/include/hal/mpu_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/pcnt_hal.h b/tools/sdk/esp32/include/hal/include/hal/pcnt_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/pcnt_hal.h rename to tools/sdk/esp32/include/hal/include/hal/pcnt_hal.h index 2a14a0ae..2a5972d8 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/pcnt_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/pcnt_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for PCNT. diff --git a/tools/sdk/esp32/include/soc/include/hal/pcnt_types.h b/tools/sdk/esp32/include/hal/include/hal/pcnt_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/pcnt_types.h rename to tools/sdk/esp32/include/hal/include/hal/pcnt_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/rmt_hal.h b/tools/sdk/esp32/include/hal/include/hal/rmt_hal.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/rmt_hal.h rename to tools/sdk/esp32/include/hal/include/hal/rmt_hal.h diff --git a/tools/sdk/esp32/include/soc/include/hal/rmt_types.h b/tools/sdk/esp32/include/hal/include/hal/rmt_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/rmt_types.h rename to tools/sdk/esp32/include/hal/include/hal/rmt_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/rtc_io_hal.h b/tools/sdk/esp32/include/hal/include/hal/rtc_io_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/rtc_io_hal.h rename to tools/sdk/esp32/include/hal/include/hal/rtc_io_hal.h index 8bf0d64c..81e29721 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/rtc_io_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/rtc_io_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for RTC IO master (common part) diff --git a/tools/sdk/esp32/include/soc/include/hal/rtc_io_types.h b/tools/sdk/esp32/include/hal/include/hal/rtc_io_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/rtc_io_types.h rename to tools/sdk/esp32/include/hal/include/hal/rtc_io_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/sdio_slave_hal.h b/tools/sdk/esp32/include/hal/include/hal/sdio_slave_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/sdio_slave_hal.h rename to tools/sdk/esp32/include/hal/include/hal/sdio_slave_hal.h index e95bf045..52975c5e 100644 --- a/tools/sdk/esp32/include/soc/include/hal/sdio_slave_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/sdio_slave_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SDIO slave (common part) diff --git a/tools/sdk/esp32/include/soc/include/hal/sdio_slave_ll.h b/tools/sdk/esp32/include/hal/include/hal/sdio_slave_ll.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/sdio_slave_ll.h rename to tools/sdk/esp32/include/hal/include/hal/sdio_slave_ll.h index 129f288c..e013f5f1 100644 --- a/tools/sdk/esp32/include/soc/include/hal/sdio_slave_ll.h +++ b/tools/sdk/esp32/include/hal/include/hal/sdio_slave_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 SDIO slave register operations diff --git a/tools/sdk/esp32/include/soc/include/hal/sdio_slave_types.h b/tools/sdk/esp32/include/hal/include/hal/sdio_slave_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/sdio_slave_types.h rename to tools/sdk/esp32/include/hal/include/hal/sdio_slave_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/sigmadelta_hal.h b/tools/sdk/esp32/include/hal/include/hal/sigmadelta_hal.h similarity index 98% rename from tools/sdk/esp32s2/include/soc/include/hal/sigmadelta_hal.h rename to tools/sdk/esp32/include/hal/include/hal/sigmadelta_hal.h index 55363fdc..58cb4c21 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/sigmadelta_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/sigmadelta_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SIGMADELTA. diff --git a/tools/sdk/esp32/include/soc/include/hal/sigmadelta_types.h b/tools/sdk/esp32/include/hal/include/hal/sigmadelta_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/sigmadelta_types.h rename to tools/sdk/esp32/include/hal/include/hal/sigmadelta_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/soc_hal.h b/tools/sdk/esp32/include/hal/include/hal/soc_hal.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/soc_hal.h rename to tools/sdk/esp32/include/hal/include/hal/soc_hal.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/spi_flash_hal.h b/tools/sdk/esp32/include/hal/include/hal/spi_flash_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/spi_flash_hal.h rename to tools/sdk/esp32/include/hal/include/hal/spi_flash_hal.h index ffc1a22f..63062947 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/spi_flash_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/spi_flash_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The HAL is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SPI Flash (common part) diff --git a/tools/sdk/esp32/include/soc/include/hal/spi_flash_types.h b/tools/sdk/esp32/include/hal/include/hal/spi_flash_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/spi_flash_types.h rename to tools/sdk/esp32/include/hal/include/hal/spi_flash_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/spi_hal.h b/tools/sdk/esp32/include/hal/include/hal/spi_hal.h similarity index 97% rename from tools/sdk/esp32/include/soc/include/hal/spi_hal.h rename to tools/sdk/esp32/include/hal/include/hal/spi_hal.h index 2012433a..6f0aa024 100644 --- a/tools/sdk/esp32/include/soc/include/hal/spi_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/spi_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SPI master (common part) @@ -169,7 +169,7 @@ void spi_hal_fetch_result(const spi_hal_context_t *hal); * Utils * ---------------------------------------------------------*/ /** - * Get the configuration of clock and timing. The configuration will be used when ``spi_hal_setup_device``. + * Calculate the configuration of clock and timing. The configuration will be used when ``spi_hal_setup_device``. * * It is highly suggested to do this at initialization, since it takes long time. * @@ -185,7 +185,7 @@ void spi_hal_fetch_result(const spi_hal_context_t *hal); * * @return ESP_OK if desired is available, otherwise fail. */ -esp_err_t spi_hal_get_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf); +esp_err_t spi_hal_cal_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf); /** * Get the frequency actual used. diff --git a/tools/sdk/esp32/include/soc/include/hal/spi_slave_hal.h b/tools/sdk/esp32/include/hal/include/hal/spi_slave_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/spi_slave_hal.h rename to tools/sdk/esp32/include/hal/include/hal/spi_slave_hal.h index 80e11137..f8acf2d9 100644 --- a/tools/sdk/esp32/include/soc/include/hal/spi_slave_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/spi_slave_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SPI slave (common part) diff --git a/tools/sdk/esp32/include/soc/include/hal/spi_slave_hd_hal.h b/tools/sdk/esp32/include/hal/include/hal/spi_slave_hd_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/spi_slave_hd_hal.h rename to tools/sdk/esp32/include/hal/include/hal/spi_slave_hd_hal.h index c9e3684d..6e13e2c2 100644 --- a/tools/sdk/esp32/include/soc/include/hal/spi_slave_hd_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/spi_slave_hd_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ /* diff --git a/tools/sdk/esp32/include/soc/include/hal/spi_types.h b/tools/sdk/esp32/include/hal/include/hal/spi_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/spi_types.h rename to tools/sdk/esp32/include/hal/include/hal/spi_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/systimer_hal.h b/tools/sdk/esp32/include/hal/include/hal/systimer_hal.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/systimer_hal.h rename to tools/sdk/esp32/include/hal/include/hal/systimer_hal.h diff --git a/tools/sdk/esp32/include/soc/include/hal/systimer_types.h b/tools/sdk/esp32/include/hal/include/hal/systimer_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/systimer_types.h rename to tools/sdk/esp32/include/hal/include/hal/systimer_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/timer_hal.h b/tools/sdk/esp32/include/hal/include/hal/timer_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/timer_hal.h rename to tools/sdk/esp32/include/hal/include/hal/timer_hal.h index bf9ebffc..f9188fe3 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/timer_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/timer_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for Timer Group. diff --git a/tools/sdk/esp32/include/soc/include/hal/timer_types.h b/tools/sdk/esp32/include/hal/include/hal/timer_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/timer_types.h rename to tools/sdk/esp32/include/hal/include/hal/timer_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/touch_sensor_hal.h b/tools/sdk/esp32/include/hal/include/hal/touch_sensor_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/touch_sensor_hal.h rename to tools/sdk/esp32/include/hal/include/hal/touch_sensor_hal.h index a2ad3694..98cdfc79 100644 --- a/tools/sdk/esp32/include/soc/include/hal/touch_sensor_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/touch_sensor_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for touch sensor (common part) diff --git a/tools/sdk/esp32/include/soc/include/hal/touch_sensor_types.h b/tools/sdk/esp32/include/hal/include/hal/touch_sensor_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/touch_sensor_types.h rename to tools/sdk/esp32/include/hal/include/hal/touch_sensor_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/twai_hal.h b/tools/sdk/esp32/include/hal/include/hal/twai_hal.h similarity index 71% rename from tools/sdk/esp32/include/soc/include/hal/twai_hal.h rename to tools/sdk/esp32/include/hal/include/hal/twai_hal.h index 592c0168..6ba44555 100644 --- a/tools/sdk/esp32/include/soc/include/hal/twai_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/twai_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once @@ -31,21 +31,33 @@ extern "C" { /* ------------------------- Defines and Typedefs --------------------------- */ +#define TWAI_HAL_SET_FLAG(var, flag) ((var) |= (flag)) +#define TWAI_HAL_RESET_FLAG(var, flag) ((var) &= ~(flag)) + +//HAL state flags +#define TWAI_HAL_STATE_FLAG_RUNNING (1 << 0) //Controller is active (not in reset mode) +#define TWAI_HAL_STATE_FLAG_RECOVERING (1 << 1) //Bus is undergoing bus recovery +#define TWAI_HAL_STATE_FLAG_ERR_WARN (1 << 2) //TEC or REC is >= error warning limit +#define TWAI_HAL_STATE_FLAG_ERR_PASSIVE (1 << 3) //TEC or REC is >= 128 +#define TWAI_HAL_STATE_FLAG_BUS_OFF (1 << 4) //Bus-off due to TEC >= 256 +#define TWAI_HAL_STATE_FLAG_TX_BUFF_OCCUPIED (1 << 5) //Transmit buffer is occupied + //Error active interrupt related -#define TWAI_HAL_EVENT_BUS_OFF (1 << 0) -#define TWAI_HAL_EVENT_BUS_RECOV_CPLT (1 << 1) -#define TWAI_HAL_EVENT_BUS_RECOV_PROGRESS (1 << 2) -#define TWAI_HAL_EVENT_ABOVE_EWL (1 << 3) -#define TWAI_HAL_EVENT_BELOW_EWL (1 << 4) -#define TWAI_HAL_EVENT_ERROR_PASSIVE (1 << 5) -#define TWAI_HAL_EVENT_ERROR_ACTIVE (1 << 6) -#define TWAI_HAL_EVENT_BUS_ERR (1 << 7) -#define TWAI_HAL_EVENT_ARB_LOST (1 << 8) -#define TWAI_HAL_EVENT_RX_BUFF_FRAME (1 << 9) -#define TWAI_HAL_EVENT_TX_BUFF_FREE (1 << 10) +#define TWAI_HAL_EVENT_BUS_OFF (1 << 0) +#define TWAI_HAL_EVENT_BUS_RECOV_CPLT (1 << 1) +#define TWAI_HAL_EVENT_BUS_RECOV_PROGRESS (1 << 2) +#define TWAI_HAL_EVENT_ABOVE_EWL (1 << 3) +#define TWAI_HAL_EVENT_BELOW_EWL (1 << 4) +#define TWAI_HAL_EVENT_ERROR_PASSIVE (1 << 5) +#define TWAI_HAL_EVENT_ERROR_ACTIVE (1 << 6) +#define TWAI_HAL_EVENT_BUS_ERR (1 << 7) +#define TWAI_HAL_EVENT_ARB_LOST (1 << 8) +#define TWAI_HAL_EVENT_RX_BUFF_FRAME (1 << 9) +#define TWAI_HAL_EVENT_TX_BUFF_FREE (1 << 10) typedef struct { twai_dev_t *dev; + uint32_t state_flags; } twai_hal_context_t; typedef twai_ll_frame_buffer_t twai_hal_frame_t; @@ -93,9 +105,8 @@ void twai_hal_configure(twai_hal_context_t *hal_ctx, const twai_timing_config_t * * @param hal_ctx Context of the HAL layer * @param mode Operating mode - * @return True if successfully started, false otherwise. */ -bool twai_hal_start(twai_hal_context_t *hal_ctx, twai_mode_t mode); +void twai_hal_start(twai_hal_context_t *hal_ctx, twai_mode_t mode); /** * @brief Stop the TWAI peripheral @@ -104,19 +115,18 @@ bool twai_hal_start(twai_hal_context_t *hal_ctx, twai_mode_t mode); * setting the operating mode to Listen Only so that REC is frozen. * * @param hal_ctx Context of the HAL layer - * @return True if successfully stopped, false otherwise. */ -bool twai_hal_stop(twai_hal_context_t *hal_ctx); +void twai_hal_stop(twai_hal_context_t *hal_ctx); /** * @brief Start bus recovery * * @param hal_ctx Context of the HAL layer - * @return True if successfully started bus recovery, false otherwise. */ -static inline bool twai_hal_start_bus_recovery(twai_hal_context_t *hal_ctx) +static inline void twai_hal_start_bus_recovery(twai_hal_context_t *hal_ctx) { - return twai_ll_exit_reset_mode(hal_ctx->dev); + TWAI_HAL_SET_FLAG(hal_ctx->state_flags, TWAI_HAL_STATE_FLAG_RECOVERING); + twai_ll_exit_reset_mode(hal_ctx->dev); } /** @@ -163,73 +173,42 @@ static inline bool twai_hal_check_last_tx_successful(twai_hal_context_t *hal_ctx return twai_ll_is_last_tx_successful((hal_ctx)->dev); } +/** + * @brief Check if certain HAL state flags are set + * + * The HAL will maintain a record of the controller's state via a set of flags. + * These flags are automatically maintained (i.e., set and reset) inside various + * HAL function calls. This function checks if certain flags are currently set. + * + * @param hal_ctx Context of the HAL layer + * @param check_flags Bit mask of flags to check + * @return True if one or more of the flags in check_flags are set + */ + +static inline bool twai_hal_check_state_flags(twai_hal_context_t *hal_ctx, uint32_t check_flags) +{ + return hal_ctx->state_flags & check_flags; +} + /* ----------------------------- Event Handling ----------------------------- */ /** * @brief Decode current events that triggered an interrupt * - * This function should be called on every TWAI interrupt. It will read (and - * thereby clear) the interrupt register, then determine what events have - * occurred to trigger the interrupt. + * This function should be the called at the beginning of an ISR. This + * function will do the following: + * - Read and clear interrupts + * - Decode current events that triggered an interrupt + * - Respond to low latency interrupt events + * - Bus off: Change to LOM to free TEC/REC + * - Recovery complete: Enter reset mode + * - Clear ECC and ALC + * - Update state flags based on events that have occurred. * * @param hal_ctx Context of the HAL layer - * @param bus_recovering Whether the TWAI peripheral was previous undergoing bus recovery * @return Bit mask of events that have occurred */ -uint32_t twai_hal_decode_interrupt_events(twai_hal_context_t *hal_ctx, bool bus_recovering); - -/** - * @brief Handle bus recovery complete - * - * This function should be called on an bus recovery complete event. It simply - * enters reset mode to stop bus activity. - * - * @param hal_ctx Context of the HAL layer - * @return True if successfully handled bus recovery completion, false otherwise. - */ -static inline bool twai_hal_handle_bus_recov_cplt(twai_hal_context_t *hal_ctx) -{ - return twai_ll_enter_reset_mode((hal_ctx)->dev); -} - -/** - * @brief Handle arbitration lost - * - * This function should be called on an arbitration lost event. It simply clears - * the clears the ALC register. - * - * @param hal_ctx Context of the HAL layer - */ -static inline void twai_hal_handle_arb_lost(twai_hal_context_t *hal_ctx) -{ - twai_ll_clear_arb_lost_cap((hal_ctx)->dev); -} - -/** - * @brief Handle bus error - * - * This function should be called on an bus error event. It simply clears - * the clears the ECC register. - * - * @param hal_ctx Context of the HAL layer - */ -static inline void twai_hal_handle_bus_error(twai_hal_context_t *hal_ctx) -{ - twai_ll_clear_err_code_cap((hal_ctx)->dev); -} - -/** - * @brief Handle BUS OFF - * - * This function should be called on a BUS OFF event. It simply changes the - * mode to LOM to freeze REC - * - * @param hal_ctx Context of the HAL layer - */ -static inline void twai_hal_handle_bus_off(twai_hal_context_t *hal_ctx) -{ - twai_ll_set_mode((hal_ctx)->dev, TWAI_MODE_LISTEN_ONLY); -} +uint32_t twai_hal_decode_interrupt_events(twai_hal_context_t *hal_ctx); /* ------------------------------- TX and RX -------------------------------- */ diff --git a/tools/sdk/esp32/include/soc/include/hal/twai_types.h b/tools/sdk/esp32/include/hal/include/hal/twai_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/twai_types.h rename to tools/sdk/esp32/include/hal/include/hal/twai_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/uart_hal.h b/tools/sdk/esp32/include/hal/include/hal/uart_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/uart_hal.h rename to tools/sdk/esp32/include/hal/include/hal/uart_hal.h index ceec6a34..7cc52405 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/uart_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/uart_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for UART. diff --git a/tools/sdk/esp32/include/soc/include/hal/uart_types.h b/tools/sdk/esp32/include/hal/include/hal/uart_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/uart_types.h rename to tools/sdk/esp32/include/hal/include/hal/uart_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/usb_hal.h b/tools/sdk/esp32/include/hal/include/hal/usb_hal.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/usb_hal.h rename to tools/sdk/esp32/include/hal/include/hal/usb_hal.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/wdt_hal.h b/tools/sdk/esp32/include/hal/include/hal/wdt_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/wdt_hal.h rename to tools/sdk/esp32/include/hal/include/hal/wdt_hal.h index 0d0f650d..2347fb59 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/wdt_hal.h +++ b/tools/sdk/esp32/include/hal/include/hal/wdt_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once diff --git a/tools/sdk/esp32/include/soc/include/hal/wdt_types.h b/tools/sdk/esp32/include/hal/include/hal/wdt_types.h similarity index 100% rename from tools/sdk/esp32/include/soc/include/hal/wdt_types.h rename to tools/sdk/esp32/include/hal/include/hal/wdt_types.h diff --git a/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h b/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h index ba29e146..3c805b02 100644 --- a/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h +++ b/tools/sdk/esp32/include/idf_test/include/esp32s2/idf_performance_target.h @@ -26,5 +26,5 @@ #endif #ifndef IDF_PERFORMANCE_MIN_FLASH_SPEED_BYTE_PER_SEC_EXT_ERASE -#define IDF_PERFORMANCE_MIN_FLASH_SPEED_BYTE_PER_SEC_EXT_ERASE 52200 +#define IDF_PERFORMANCE_MIN_FLASH_SPEED_BYTE_PER_SEC_EXT_ERASE 40300 #endif diff --git a/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_client.h b/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_client.h index 1b645c77..e365cb84 100644 --- a/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_client.h +++ b/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_client.h @@ -14,6 +14,9 @@ #include "mqtt_config.h" #include "esp_event.h" +#if CONFIG_ESP_TLS_USE_DS_PERIPHERAL +#include "rsa_sign_alt.h" +#endif #ifdef __cplusplus extern "C" { @@ -182,6 +185,9 @@ typedef struct { int clientkey_password_len; /*!< String length of the password pointed to by clientkey_password */ esp_mqtt_protocol_ver_t protocol_ver; /*!< MQTT protocol version used for connection, defaults to value from menuconfig*/ int out_buffer_size; /*!< size of MQTT output buffer. If not defined, both output and input buffers have the same size defined as ``buffer_size`` */ + bool skip_cert_common_name_check; /*!< Skip any validation of server certificate CN field, this reduces the security of TLS and makes the mqtt client susceptible to MITM attacks */ + bool use_secure_element; /*!< enable secure element for enabling SSL connection */ + void *ds_data; /*!< carrier of handle for digital signature parameters */ } esp_mqtt_client_config_t; /** @@ -237,6 +243,9 @@ esp_err_t esp_mqtt_client_disconnect(esp_mqtt_client_handle_t client); /** * @brief Stops mqtt client tasks * + * * Notes: + * - Cannot be called from the mqtt event handler + * * @param client mqtt client handle * * @return ESP_OK on success @@ -304,6 +313,9 @@ int esp_mqtt_client_publish(esp_mqtt_client_handle_t client, const char *topic, /** * @brief Destroys the client handle * + * Notes: + * - Cannot be called from the mqtt event handler + * * @param client mqtt client handle * * @return ESP_OK diff --git a/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_config.h b/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_config.h index 2c9d4039..e259a2a1 100644 --- a/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_config.h +++ b/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_config.h @@ -84,11 +84,16 @@ #endif #endif +#ifdef CONFIG_OUTBOX_EXPIRED_TIMEOUT_MS +#define OUTBOX_EXPIRED_TIMEOUT_MS CONFIG_OUTBOX_EXPIRED_TIMEOUT_MS +#else +#define OUTBOX_EXPIRED_TIMEOUT_MS (30*1000) +#endif #define MQTT_ENABLE_SSL CONFIG_MQTT_TRANSPORT_SSL #define MQTT_ENABLE_WS CONFIG_MQTT_TRANSPORT_WEBSOCKET #define MQTT_ENABLE_WSS CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE -#define OUTBOX_EXPIRED_TIMEOUT_MS (30*1000) + #define OUTBOX_MAX_SIZE (4*1024) #endif diff --git a/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_supported_features.h b/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_supported_features.h index c7a8a795..9f1acf2f 100644 --- a/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_supported_features.h +++ b/tools/sdk/esp32/include/mqtt/esp-mqtt/include/mqtt_supported_features.h @@ -31,6 +31,7 @@ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(3, 3, 0) // Features supported from 3.3 #define MQTT_SUPPORTED_FEATURE_EVENT_LOOP +#define MQTT_SUPPORTED_FEATURE_SKIP_CRT_CMN_NAME_CHECK #endif #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0) @@ -46,6 +47,16 @@ #define MQTT_SUPPORTED_FEATURE_ALPN #define MQTT_SUPPORTED_FEATURE_CLIENT_KEY_PASSWORD #endif + +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0) +// Features supported in 4.2 +#define MQTT_SUPPORTED_FEATURE_SECURE_ELEMENT #endif -#endif // _MQTT_SUPPORTED_FEATURES_H_ \ No newline at end of file +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0) +// Features supported in 4.3 +#define MQTT_SUPPORTED_FEATURE_DIGITAL_SIGNATURE +#endif + +#endif /* ESP_IDF_VERSION */ +#endif // _MQTT_SUPPORTED_FEATURES_H_ diff --git a/tools/sdk/esp32/include/soc/soc/esp32/include/soc/adc_caps.h b/tools/sdk/esp32/include/soc/soc/esp32/include/soc/adc_caps.h index dbcb6483..e7af39c4 100644 --- a/tools/sdk/esp32/include/soc/soc/esp32/include/soc/adc_caps.h +++ b/tools/sdk/esp32/include/soc/soc/esp32/include/soc/adc_caps.h @@ -26,4 +26,6 @@ #define SOC_ADC_PWDET_CCT_DEFAULT (4) -#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (2) \ No newline at end of file +#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (2) + +#define SOC_ADC_DIGI_SAR_CLK_DIV_DEFAULT (2) \ No newline at end of file diff --git a/tools/sdk/esp32/include/soc/soc/esp32/include/soc/emac_ext_struct.h b/tools/sdk/esp32/include/soc/soc/esp32/include/soc/emac_ext_struct.h index 6c0b8921..9b65c8d9 100644 --- a/tools/sdk/esp32/include/soc/soc/esp32/include/soc/emac_ext_struct.h +++ b/tools/sdk/esp32/include/soc/soc/esp32/include/soc/emac_ext_struct.h @@ -24,7 +24,8 @@ typedef volatile struct { struct { uint32_t div_num : 4; uint32_t h_div_num : 4; - uint32_t reserved8 : 24; + uint32_t dly_num : 2; + uint32_t reserved10 : 22; }; uint32_t val; } ex_clkout_conf; @@ -43,18 +44,28 @@ typedef volatile struct { struct { uint32_t ext_en : 1; uint32_t int_en : 1; - uint32_t reserved2 : 1; + uint32_t rx_125_clk_en : 1; uint32_t mii_clk_tx_en : 1; uint32_t mii_clk_rx_en : 1; - uint32_t reserved5 : 27; + uint32_t clk_en : 1; + uint32_t reserved6 : 26; }; uint32_t val; } ex_clk_ctrl; union { struct { - uint32_t reserved0 : 13; + uint32_t int_revmii_rx_clk_sel : 1; + uint32_t ext_revmii_rx_clk_sel : 1; + uint32_t sbd_flowctrl : 1; + uint32_t core_phy_addr : 5; + uint32_t revmii_phy_addr : 5; uint32_t phy_intf_sel : 3; - uint32_t reserved16 : 16; + uint32_t ss_mode : 1; + uint32_t sbd_clk_gating_en : 1; + uint32_t pmt_ctrl_en : 1; + uint32_t scr_smi_dly_rx_sync : 1; + uint32_t tx_err_out_en : 1; + uint32_t reserved21 : 11; }; uint32_t val; } ex_phyinf_conf; @@ -65,6 +76,65 @@ typedef volatile struct { }; uint32_t val; } pd_sel; + uint32_t reserved_14; + uint32_t reserved_18; + uint32_t reserved_1c; + uint32_t reserved_20; + uint32_t reserved_24; + uint32_t reserved_28; + uint32_t reserved_2c; + uint32_t reserved_30; + uint32_t reserved_34; + uint32_t reserved_38; + uint32_t reserved_3c; + uint32_t reserved_40; + uint32_t reserved_44; + uint32_t reserved_48; + uint32_t reserved_4c; + uint32_t reserved_50; + uint32_t reserved_54; + uint32_t reserved_58; + uint32_t reserved_5c; + uint32_t reserved_60; + uint32_t reserved_64; + uint32_t reserved_68; + uint32_t reserved_6c; + uint32_t reserved_70; + uint32_t reserved_74; + uint32_t reserved_78; + uint32_t reserved_7c; + uint32_t reserved_80; + uint32_t reserved_84; + uint32_t reserved_88; + uint32_t reserved_8c; + uint32_t reserved_90; + uint32_t reserved_94; + uint32_t reserved_98; + uint32_t reserved_9c; + uint32_t reserved_a0; + uint32_t reserved_a4; + uint32_t reserved_a8; + uint32_t reserved_ac; + uint32_t reserved_b0; + uint32_t reserved_b4; + uint32_t reserved_b8; + uint32_t reserved_bc; + uint32_t reserved_c0; + uint32_t reserved_c4; + uint32_t reserved_c8; + uint32_t reserved_cc; + uint32_t reserved_d0; + uint32_t reserved_d4; + uint32_t reserved_d8; + uint32_t reserved_dc; + uint32_t reserved_e0; + uint32_t reserved_e4; + uint32_t reserved_e8; + uint32_t reserved_ec; + uint32_t reserved_f0; + uint32_t reserved_f4; + uint32_t reserved_f8; + uint32_t ex_date; } emac_ext_dev_t; extern emac_ext_dev_t EMAC_EXT; 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 d100c57f..1f64347c 100644 --- a/tools/sdk/esp32/include/spi_flash/include/esp_flash.h +++ b/tools/sdk/esp32/include/spi_flash/include/esp_flash.h @@ -57,7 +57,7 @@ typedef struct { esp_err_t (*region_protected)(void* arg, size_t start_addr, size_t size); /** Delay for at least 'us' microseconds. Called in between 'start' and 'end'. */ - esp_err_t (*delay_us)(void *arg, unsigned us); + esp_err_t (*delay_us)(void *arg, uint32_t us); /** Called for get temp buffer when buffer from application cannot be directly read into/write from. */ void *(*get_temp_buffer)(void* arg, size_t reqest_size, size_t* out_size); diff --git a/tools/sdk/esp32/include/spi_flash/include/memspi_host_driver.h b/tools/sdk/esp32/include/spi_flash/include/memspi_host_driver.h index a94260b2..46336f67 100644 --- a/tools/sdk/esp32/include/spi_flash/include/memspi_host_driver.h +++ b/tools/sdk/esp32/include/spi_flash/include/memspi_host_driver.h @@ -56,7 +56,7 @@ esp_err_t memspi_host_init_pointers(memspi_host_inst_t *host, const memspi_host_ * NOTICE * Rest part of this file are part of the HAL layer * The HAL is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ /** diff --git a/tools/sdk/esp32/include/spi_flash/include/spi_flash_chip_driver.h b/tools/sdk/esp32/include/spi_flash/include/spi_flash_chip_driver.h index c0b19bad..7d875b4c 100644 --- a/tools/sdk/esp32/include/spi_flash/include/spi_flash_chip_driver.h +++ b/tools/sdk/esp32/include/spi_flash/include/spi_flash_chip_driver.h @@ -152,7 +152,7 @@ struct spi_flash_chip_t { timeout_ms should be a timeout (in milliseconds) before the function returns ESP_ERR_TIMEOUT. This is useful to avoid hanging if the chip is otherwise unresponsive (ie returns all 0xFF or similar.) */ - esp_err_t (*wait_idle)(esp_flash_t *chip, unsigned timeout_ms); + esp_err_t (*wait_idle)(esp_flash_t *chip, uint32_t timeout_us); /* Configure both the SPI host and the chip for the read mode specified in chip->read_mode. * diff --git a/tools/sdk/esp32/include/tcp_transport/include/esp_transport.h b/tools/sdk/esp32/include/tcp_transport/include/esp_transport.h index 4841725d..b1306369 100644 --- a/tools/sdk/esp32/include/tcp_transport/include/esp_transport.h +++ b/tools/sdk/esp32/include/tcp_transport/include/esp_transport.h @@ -310,7 +310,7 @@ esp_err_t esp_transport_set_parent_transport_func(esp_transport_handle_t t, payl * @return * - valid pointer of esp_error_handle_t * - NULL if invalid transport handle - */ + */ esp_tls_error_handle_t esp_transport_get_error_handle(esp_transport_handle_t t); diff --git a/tools/sdk/esp32/include/tcp_transport/include/esp_transport_ws.h b/tools/sdk/esp32/include/tcp_transport/include/esp_transport_ws.h index 08ed2ef2..febe1d0b 100644 --- a/tools/sdk/esp32/include/tcp_transport/include/esp_transport_ws.h +++ b/tools/sdk/esp32/include/tcp_transport/include/esp_transport_ws.h @@ -117,6 +117,21 @@ ws_transport_opcodes_t esp_transport_ws_get_read_opcode(esp_transport_handle_t t */ int esp_transport_ws_get_read_payload_len(esp_transport_handle_t t); +/** + * @brief Polls the active connection for termination + * + * This API is typically used by the client to wait for clean connection closure + * by websocket server + * + * @param t Websocket transport handle + * @param[in] timeout_ms The timeout milliseconds + * + * @return + * 0 - no activity on read and error socket descriptor within timeout + * 1 - Success: either connection terminated by FIN or the most common RST err codes + * -1 - Failure: Unexpected error code or socket is normally readable + */ +int esp_transport_ws_poll_connection_closed(esp_transport_handle_t t, int timeout_ms); #ifdef __cplusplus } diff --git a/tools/sdk/esp32/include/ulp/include/esp32/ulp.h b/tools/sdk/esp32/include/ulp/include/esp32/ulp.h index 2f22937e..309f09b8 100644 --- a/tools/sdk/esp32/include/ulp/include/esp32/ulp.h +++ b/tools/sdk/esp32/include/ulp/include/esp32/ulp.h @@ -232,7 +232,7 @@ union ulp_insn { uint32_t unused : 8; /*!< Unused */ uint32_t low : 5; /*!< Low bit */ uint32_t high : 5; /*!< High bit */ - uint32_t opcode : 4; /*!< Opcode (OPCODE_WR_REG) */ + uint32_t opcode : 4; /*!< Opcode (OPCODE_RD_REG) */ } rd_reg; /*!< Format of RD_REG instruction */ struct { diff --git a/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h b/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h index 58331cf5..07ae895e 100644 --- a/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h +++ b/tools/sdk/esp32/include/ulp/include/esp32s2/ulp.h @@ -201,7 +201,7 @@ union ulp_insn { uint32_t unused : 8; /*!< Unused */ uint32_t low : 5; /*!< Low bit */ uint32_t high : 5; /*!< High bit */ - uint32_t opcode : 4; /*!< Opcode (OPCODE_WR_REG) */ + uint32_t opcode : 4; /*!< Opcode (OPCODE_RD_REG) */ } rd_reg; /*!< Format of RD_REG instruction */ struct { diff --git a/tools/sdk/esp32/include/unity/include/unity_config.h b/tools/sdk/esp32/include/unity/include/unity_config.h index 5d6fdfae..8ebd88f2 100644 --- a/tools/sdk/esp32/include/unity/include/unity_config.h +++ b/tools/sdk/esp32/include/unity/include/unity_config.h @@ -47,6 +47,10 @@ uint32_t unity_exec_time_get_ms(void); #endif //CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER +#ifdef CONFIG_UNITY_ENABLE_FIXTURE +#include "unity_fixture_extras.h" +#endif // CONFIG_UNITY_ENABLE_FIXTURE + // shorthand to check esp_err_t return code #define TEST_ESP_OK(rc) TEST_ASSERT_EQUAL_HEX32(ESP_OK, rc) #define TEST_ESP_ERR(err, rc) TEST_ASSERT_EQUAL_HEX32(err, rc) diff --git a/tools/sdk/esp32/include/unity/include/unity_fixture_extras.h b/tools/sdk/esp32/include/unity/include/unity_fixture_extras.h new file mode 100644 index 00000000..2eeaec2e --- /dev/null +++ b/tools/sdk/esp32/include/unity/include/unity_fixture_extras.h @@ -0,0 +1,25 @@ +/* IDF-specific additions to "Unity Fixture" */ +#pragma once + +#ifndef CONFIG_IDF_TARGET + +/* A shorthand for running one test group from the main function */ +#define UNITY_MAIN(group_) do { \ + const char* argv[] = { "test", "-v" }; \ + const int argc = sizeof(argv)/sizeof(argv[0]); \ + int rc = UnityMain(argc, argv, TEST_ ## group_ ## _GROUP_RUNNER); \ + printf("\nTests finished, rc=%d\n", rc); \ + exit(rc); \ +} while(0) + +#else // CONFIG_IDF_TARGET + +/* A shorthand for running one test group from the main function */ +#define UNITY_MAIN(group_) do { \ + const char* argv[] = { "test", "-v" }; \ + const int argc = sizeof(argv)/sizeof(argv[0]); \ + int rc = UnityMain(argc, argv, TEST_ ## group_ ## _GROUP_RUNNER); \ + printf("\nTests finished, rc=%d\n", rc); \ +} while(0) + +#endif // CONFIG_IDF_TARGET diff --git a/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture.h b/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture.h new file mode 100644 index 00000000..2dcf473c --- /dev/null +++ b/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture.h @@ -0,0 +1,83 @@ +/* Copyright (c) 2010 James Grenning and Contributed to Unity Project + * ========================================== + * Unity Project - A Test Framework for C + * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + * [Released under MIT License. Please refer to license.txt for details] + * ========================================== */ + +#ifndef UNITY_FIXTURE_H_ +#define UNITY_FIXTURE_H_ + +#include "unity.h" +#include "unity_internals.h" +#include "unity_fixture_malloc_overrides.h" +#include "unity_fixture_internals.h" + +int UnityMain(int argc, const char* argv[], void (*runAllTests)(void)); + + +#define TEST_GROUP(group)\ + static const char* TEST_GROUP_##group = #group + +#define TEST_SETUP(group) void TEST_##group##_SETUP(void);\ + void TEST_##group##_SETUP(void) + +#define TEST_TEAR_DOWN(group) void TEST_##group##_TEAR_DOWN(void);\ + void TEST_##group##_TEAR_DOWN(void) + + +#define TEST(group, name) \ + void TEST_##group##_##name##_(void);\ + void TEST_##group##_##name##_run(void);\ + void TEST_##group##_##name##_run(void)\ + {\ + UnityTestRunner(TEST_##group##_SETUP,\ + TEST_##group##_##name##_,\ + TEST_##group##_TEAR_DOWN,\ + "TEST(" #group ", " #name ")",\ + TEST_GROUP_##group, #name,\ + __FILE__, __LINE__);\ + }\ + void TEST_##group##_##name##_(void) + +#define IGNORE_TEST(group, name) \ + void TEST_##group##_##name##_(void);\ + void TEST_##group##_##name##_run(void);\ + void TEST_##group##_##name##_run(void)\ + {\ + UnityIgnoreTest("IGNORE_TEST(" #group ", " #name ")", TEST_GROUP_##group, #name);\ + }\ + void TEST_##group##_##name##_(void) + +/* Call this for each test, insider the group runner */ +#define RUN_TEST_CASE(group, name) \ + { void TEST_##group##_##name##_run(void);\ + TEST_##group##_##name##_run(); } + +/* This goes at the bottom of each test file or in a separate c file */ +#define TEST_GROUP_RUNNER(group)\ + void TEST_##group##_GROUP_RUNNER(void);\ + void TEST_##group##_GROUP_RUNNER(void) + +/* Call this from main */ +#define RUN_TEST_GROUP(group)\ + { void TEST_##group##_GROUP_RUNNER(void);\ + TEST_##group##_GROUP_RUNNER(); } + +/* CppUTest Compatibility Macros */ +#ifndef UNITY_EXCLUDE_CPPUTEST_ASSERTS +/* Sets a pointer and automatically restores it to its old value after teardown */ +#define UT_PTR_SET(ptr, newPointerValue) UnityPointer_Set((void**)&(ptr), (void*)(newPointerValue), __LINE__) +#define TEST_ASSERT_POINTERS_EQUAL(expected, actual) TEST_ASSERT_EQUAL_PTR((expected), (actual)) +#define TEST_ASSERT_BYTES_EQUAL(expected, actual) TEST_ASSERT_EQUAL_HEX8(0xff & (expected), 0xff & (actual)) +#define FAIL(message) TEST_FAIL_MESSAGE((message)) +#define CHECK(condition) TEST_ASSERT_TRUE((condition)) +#define LONGS_EQUAL(expected, actual) TEST_ASSERT_EQUAL_INT((expected), (actual)) +#define STRCMP_EQUAL(expected, actual) TEST_ASSERT_EQUAL_STRING((expected), (actual)) +#define DOUBLES_EQUAL(expected, actual, delta) TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual)) +#endif + +/* You must compile with malloc replacement, as defined in unity_fixture_malloc_overrides.h */ +void UnityMalloc_MakeMallocFailAfterCount(int countdown); + +#endif /* UNITY_FIXTURE_H_ */ diff --git a/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture_internals.h b/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture_internals.h new file mode 100644 index 00000000..00cee883 --- /dev/null +++ b/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture_internals.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2010 James Grenning and Contributed to Unity Project + * ========================================== + * Unity Project - A Test Framework for C + * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + * [Released under MIT License. Please refer to license.txt for details] + * ========================================== */ + +#ifndef UNITY_FIXTURE_INTERNALS_H_ +#define UNITY_FIXTURE_INTERNALS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct UNITY_FIXTURE_T +{ + int Verbose; + unsigned int RepeatCount; + const char* NameFilter; + const char* GroupFilter; +}; +extern struct UNITY_FIXTURE_T UnityFixture; + +typedef void unityfunction(void); +void UnityTestRunner(unityfunction* setup, + unityfunction* testBody, + unityfunction* teardown, + const char* printableName, + const char* group, + const char* name, + const char* file, unsigned int line); + +void UnityIgnoreTest(const char* printableName, const char* group, const char* name); +void UnityMalloc_StartTest(void); +void UnityMalloc_EndTest(void); +int UnityGetCommandLineOptions(int argc, const char* argv[]); +void UnityConcludeFixtureTest(void); + +void UnityPointer_Set(void** pointer, void* newValue, UNITY_LINE_TYPE line); +void UnityPointer_UndoAllSets(void); +void UnityPointer_Init(void); +#ifndef UNITY_MAX_POINTERS +#define UNITY_MAX_POINTERS 5 +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* UNITY_FIXTURE_INTERNALS_H_ */ diff --git a/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture_malloc_overrides.h b/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture_malloc_overrides.h new file mode 100644 index 00000000..7daba50a --- /dev/null +++ b/tools/sdk/esp32/include/unity/unity/extras/fixture/src/unity_fixture_malloc_overrides.h @@ -0,0 +1,47 @@ +/* Copyright (c) 2010 James Grenning and Contributed to Unity Project + * ========================================== + * Unity Project - A Test Framework for C + * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + * [Released under MIT License. Please refer to license.txt for details] + * ========================================== */ + +#ifndef UNITY_FIXTURE_MALLOC_OVERRIDES_H_ +#define UNITY_FIXTURE_MALLOC_OVERRIDES_H_ + +#include + +#ifdef UNITY_EXCLUDE_STDLIB_MALLOC +/* Define this macro to remove the use of stdlib.h, malloc, and free. + * Many embedded systems do not have a heap or malloc/free by default. + * This internal unity_malloc() provides allocated memory deterministically from + * the end of an array only, unity_free() only releases from end-of-array, + * blocks are not coalesced, and memory not freed in LIFO order is stranded. */ + #ifndef UNITY_INTERNAL_HEAP_SIZE_BYTES + #define UNITY_INTERNAL_HEAP_SIZE_BYTES 256 + #endif +#endif + +/* These functions are used by the Unity Fixture to allocate and release memory + * on the heap and can be overridden with platform-specific implementations. + * For example, when using FreeRTOS UNITY_FIXTURE_MALLOC becomes pvPortMalloc() + * and UNITY_FIXTURE_FREE becomes vPortFree(). */ +#if !defined(UNITY_FIXTURE_MALLOC) || !defined(UNITY_FIXTURE_FREE) + #include + #define UNITY_FIXTURE_MALLOC(size) malloc(size) + #define UNITY_FIXTURE_FREE(ptr) free(ptr) +#else + extern void* UNITY_FIXTURE_MALLOC(size_t size); + extern void UNITY_FIXTURE_FREE(void* ptr); +#endif + +#define malloc unity_malloc +#define calloc unity_calloc +#define realloc unity_realloc +#define free unity_free + +void* unity_malloc(size_t size); +void* unity_calloc(size_t num, size_t size); +void* unity_realloc(void * oldMem, size_t size); +void unity_free(void * mem); + +#endif /* UNITY_FIXTURE_MALLOC_OVERRIDES_H_ */ diff --git a/tools/sdk/esp32/ld/esp32.project.ld b/tools/sdk/esp32/ld/esp32.project.ld index cb6cbdf2..eba9a876 100644 --- a/tools/sdk/esp32/ld/esp32.project.ld +++ b/tools/sdk/esp32/ld/esp32.project.ld @@ -14,10 +14,10 @@ SECTIONS { . = ALIGN(4); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.literal EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.text EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.text.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.literal EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.text EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.text.*) *libfreertos.a:queue.*( .rtc.text.*) *libfreertos.a:queue.*(.rtc.text.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.literal .rtc.text .rtc.text.*) + *libhal.a:uart_hal_iram.*( .rtc.literal .rtc.text .rtc.text.*) *rtc_wake_stub*.*(.literal .text .literal.* .text.*) _rtc_text_end = ABSOLUTE(.); @@ -45,10 +45,10 @@ SECTIONS _rtc_force_fast_start = ABSOLUTE(.); _coredump_rtc_fast_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.fast.coredump EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.fast.coredump.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.fast.coredump EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.fast.coredump.*) *libfreertos.a:queue.*( .rtc.fast.coredump.*) *libfreertos.a:queue.*(.rtc.fast.coredump.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.fast.coredump .rtc.fast.coredump.*) + *libhal.a:uart_hal_iram.*( .rtc.fast.coredump .rtc.fast.coredump.*) _coredump_rtc_fast_end = ABSOLUTE(.); *(.rtc.force_fast .rtc.force_fast.*) @@ -70,17 +70,17 @@ SECTIONS /* coredump mapping */ _coredump_rtc_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.coredump EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.coredump.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.coredump EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.coredump.*) *libfreertos.a:queue.*( .rtc.coredump.*) *libfreertos.a:queue.*(.rtc.coredump.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.coredump .rtc.coredump.*) + *libhal.a:uart_hal_iram.*( .rtc.coredump .rtc.coredump.*) _coredump_rtc_end = ABSOLUTE(.); /* should be placed after coredump mapping */ - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.data EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.data.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.rodata EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.rodata.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.data EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.data.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.rodata EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.rodata.*) *libfreertos.a:queue.*( .rtc.data.* .rtc.rodata.*) *libfreertos.a:queue.*(.rtc.data.xQueueGenericCreateStatic .rtc.rodata.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.data .rtc.data.* .rtc.rodata .rtc.rodata.*) + *libhal.a:uart_hal_iram.*( .rtc.data .rtc.data.* .rtc.rodata .rtc.rodata.*) *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*) _rtc_data_end = ABSOLUTE(.); @@ -94,8 +94,8 @@ SECTIONS *rtc_wake_stub*.*(.bss .bss.*) *rtc_wake_stub*.*(COMMON) - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.bss) - *libsoc.a:uart_hal_iram.*( .rtc.bss) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.bss) + *libhal.a:uart_hal_iram.*( .rtc.bss) _rtc_bss_end = ABSOLUTE(.); } > rtc_data_location @@ -190,7 +190,7 @@ SECTIONS /* Code marked as runnning out of IRAM */ _iram_text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .iram1 EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram1.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .iram1 EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram1.*) *libapp_trace.a:SEGGER_RTT_esp32.*( .literal .literal.* .text .text.*) *libapp_trace.a:SEGGER_SYSVIEW.*( .literal .literal.* .text .text.*) *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.*( .literal .literal.* .text .text.*) @@ -336,7 +336,17 @@ SECTIONS *libgcc.a:_divsf3.*( .literal .literal.* .text .text.*) *libgcc.a:lib2funcs.*( .literal .literal.* .text .text.*) *libgcov.a:( .literal .literal.* .text .text.*) - *libhal.a:( .literal .literal.* .text .text.*) + *libhal.a:cpu_hal.*( .literal .literal.* .text .text.*) + *libhal.a:i2c_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:ledc_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:soc_hal.*( .literal .literal.* .text .text.*) + *libhal.a:spi_flash_hal_gpspi.*( .literal .literal.* .text .text.*) + *libhal.a:spi_flash_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:spi_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:spi_slave_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:systimer_hal.*( .literal .literal.* .text .text.*) + *libhal.a:uart_hal_iram.*( .iram1 .iram1.*) + *libhal.a:wdt_hal_iram.*( .literal .literal.* .text .text.*) *libheap.a:multi_heap.*( .literal .literal.* .text .text.*) *libheap.a:multi_heap_poisoning.*( .literal .literal.* .text .text.*) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) @@ -350,10 +360,7 @@ SECTIONS *libnewlib.a:heap.*( .literal .literal.* .text .text.*) *libpp.a:( .wifi0iram .wifi0iram.*) *librtc.a:( .literal .literal.* .text .text.*) - *libsoc.a:cpu_hal.*( .literal .literal.* .text .text.*) *libsoc.a:cpu_util.*( .literal .literal.* .text .text.*) - *libsoc.a:i2c_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:ledc_hal_iram.*( .literal .literal.* .text .text.*) *libsoc.a:lldesc.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_clk.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_periph.*( .literal .literal.* .text .text.*) @@ -361,14 +368,6 @@ SECTIONS *libsoc.a:rtc_sleep.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_time.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_wdt.*( .literal .literal.* .text .text.*) - *libsoc.a:soc_hal.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_flash_hal_gpspi.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_flash_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_slave_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:systimer_hal.*( .literal .literal.* .text .text.*) - *libsoc.a:uart_hal_iram.*( .iram1 .iram1.*) - *libsoc.a:wdt_hal_iram.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_init.*(.literal.rtc_vddsdio_set_config .text.rtc_vddsdio_set_config) *libspi_flash.a:memspi_host_driver.*( .literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_gd.*( .literal .literal.* .text .text.*) @@ -376,6 +375,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_issi.*( .literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_mxic.*( .literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*( .literal .literal.* .text .text.*) + *libxt_hal.a:( .literal .literal.* .text .text.*) *libxtensa.a:eri.*( .literal .literal.* .text .text.*) *libxtensa.a:stdatomic.*( .literal .literal.* .text .text.*) @@ -408,10 +408,10 @@ SECTIONS /* coredump mapping */ _coredump_dram_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .dram1.coredump EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.coredump.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .dram1.coredump EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.coredump.*) *libfreertos.a:queue.*( .dram1.coredump.*) *libfreertos.a:queue.*(.dram1.coredump.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .dram1.coredump .dram1.coredump.*) + *libhal.a:uart_hal_iram.*( .dram1.coredump .dram1.coredump.*) _coredump_dram_end = ABSOLUTE(.); /* should be placed after coredump mapping */ @@ -419,7 +419,7 @@ SECTIONS KEEP (*(SORT(.esp_system_init_fn) SORT(.esp_system_init_fn.*))) _esp_system_init_fn_array_end = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .data EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .data.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .dram1 EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .data EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .data.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .dram1 EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.*) *libapp_trace.a:SEGGER_RTT_esp32.*( .rodata .rodata.*) *libapp_trace.a:SEGGER_SYSVIEW.*( .rodata .rodata.*) *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.*( .rodata .rodata.*) @@ -562,6 +562,17 @@ SECTIONS *libfreertos.a:queue.*(.data.xQueueGenericCreateStatic .dram1.xQueueGenericCreateStatic) *libgcc.a:_divsf3.*( .rodata .rodata.*) *libgcov.a:( .rodata .rodata.*) + *libhal.a:cpu_hal.*( .rodata .rodata.*) + *libhal.a:i2c_hal_iram.*( .rodata .rodata.*) + *libhal.a:ledc_hal_iram.*( .rodata .rodata.*) + *libhal.a:soc_hal.*( .rodata .rodata.*) + *libhal.a:spi_flash_hal_gpspi.*( .rodata .rodata.*) + *libhal.a:spi_flash_hal_iram.*( .rodata .rodata.*) + *libhal.a:spi_hal_iram.*( .rodata .rodata.*) + *libhal.a:spi_slave_hal_iram.*( .rodata .rodata.*) + *libhal.a:systimer_hal.*( .rodata .rodata.*) + *libhal.a:uart_hal_iram.*( .data .data.* .dram1 .dram1.*) + *libhal.a:wdt_hal_iram.*( .rodata .rodata.*) *libheap.a:multi_heap.*( .rodata .rodata.*) *libheap.a:multi_heap_poisoning.*( .rodata .rodata.*) *liblog.a:log.*(.rodata.esp_log_write) @@ -573,19 +584,8 @@ SECTIONS *libnewlib.a:abort.*( .rodata .rodata.*) *libnewlib.a:heap.*( .rodata .rodata.*) *libphy.a:( .rodata .rodata.*) - *libsoc.a:cpu_hal.*( .rodata .rodata.*) - *libsoc.a:i2c_hal_iram.*( .rodata .rodata.*) - *libsoc.a:ledc_hal_iram.*( .rodata .rodata.*) *libsoc.a:lldesc.*( .rodata .rodata.*) *libsoc.a:rtc_clk.*( .rodata .rodata.*) - *libsoc.a:soc_hal.*( .rodata .rodata.*) - *libsoc.a:spi_flash_hal_gpspi.*( .rodata .rodata.*) - *libsoc.a:spi_flash_hal_iram.*( .rodata .rodata.*) - *libsoc.a:spi_hal_iram.*( .rodata .rodata.*) - *libsoc.a:spi_slave_hal_iram.*( .rodata .rodata.*) - *libsoc.a:systimer_hal.*( .rodata .rodata.*) - *libsoc.a:uart_hal_iram.*( .data .data.* .dram1 .dram1.*) - *libsoc.a:wdt_hal_iram.*( .rodata .rodata.*) *libsoc.a:rtc_init.*(.rodata.rtc_vddsdio_set_config) *libspi_flash.a:memspi_host_driver.*( .rodata .rodata.*) *libspi_flash.a:spi_flash_chip_gd.*( .rodata .rodata.*) @@ -632,10 +632,10 @@ SECTIONS . = ALIGN (4); _nimble_bss_end = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .bss EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .bss.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) COMMON) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .bss EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .bss.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) COMMON) *libfreertos.a:queue.*( .bss.*) *libfreertos.a:queue.*(.bss.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .bss .bss.* COMMON) + *libhal.a:uart_hal_iram.*( .bss .bss.* COMMON) *(.dynsbss) *(.sbss) @@ -664,16 +664,16 @@ SECTIONS *(.rodata_desc .rodata_desc.*) /* Should be the first. App version info. DO NOT PUT ANYTHING BEFORE IT! */ *(.rodata_custom_desc .rodata_custom_desc.*) /* Should be the second. Custom app version info. DO NOT PUT ANYTHING BEFORE IT! */ - *(EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:_divsf3.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:spi_hal_iram.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libphy.a) .rodata EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log_freertos.* *liblog.a:log.* *libgcc.a:_divsf3.* *libesp_event.a:esp_event.* *libesp_event.a:default_event_loop.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:spi_hal_iram.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libfreertos.a:queue.* *libphy.a) .rodata.*) + *(EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:_divsf3.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libphy.a) .rodata EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log_freertos.* *liblog.a:log.* *libgcc.a:_divsf3.* *libesp_event.a:esp_event.* *libesp_event.a:default_event_loop.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a:queue.* *libphy.a) .rodata.*) *libesp_event.a:default_event_loop.*(.rodata.esp_event_loop_create_default.str1.4 .rodata.esp_event_send_to_default_loop) - *libesp_event.a:esp_event.*(.rodata.base_node_add_handler.str1.4 .rodata.loop_node_add_handler.str1.4 .rodata.esp_event_loop_create.str1.4 .rodata.esp_event_loop_run.str1.4 .rodata.esp_event_loop_run_task.str1.4 .rodata.esp_event_handler_register_with_internal.str1.4 .rodata.esp_event_handler_unregister_with_internal.str1.4 .rodata.__func__$8990 .rodata.__func__$8977 .rodata.__func__$8944 .rodata.__func__$8912 .rodata.__func__$8887 .rodata.__func__$8846 .rodata.__func__$8837) + *libesp_event.a:esp_event.*(.rodata.base_node_add_handler.str1.4 .rodata.loop_node_add_handler.str1.4 .rodata.esp_event_loop_create.str1.4 .rodata.esp_event_loop_run.str1.4 .rodata.esp_event_loop_run_task.str1.4 .rodata.esp_event_handler_register_with_internal.str1.4 .rodata.esp_event_handler_unregister_with_internal.str1.4 .rodata.__func__$9003 .rodata.__func__$8990 .rodata.__func__$8957 .rodata.__func__$8925 .rodata.__func__$8900 .rodata.__func__$8859 .rodata.__func__$8850) *libesp_system.a:system_api.*(.rodata.esp_get_idf_version.str1.4) - *libfreertos.a:queue.*(.rodata.prvNotifyQueueSetContainer.str1.4 .rodata.__FUNCTION__$5327 .rodata.__FUNCTION__$5317 .rodata.__FUNCTION__$5297 .rodata.__FUNCTION__$5292 .rodata.__FUNCTION__$5286 .rodata.__FUNCTION__$5280 .rodata.__FUNCTION__$5274 .rodata.__FUNCTION__$5265 .rodata.__FUNCTION__$5255 .rodata.__FUNCTION__$5244 .rodata.__FUNCTION__$5236 .rodata.__FUNCTION__$5363 .rodata.__FUNCTION__$5225 .rodata.__FUNCTION__$5214 .rodata.__FUNCTION__$5208 .rodata.__FUNCTION__$5201 .rodata.__FUNCTION__$5194 .rodata.__FUNCTION__$5160 .rodata.__FUNCTION__$5150 .rodata.__FUNCTION__$5141) + *libfreertos.a:queue.*(.rodata.prvNotifyQueueSetContainer.str1.4 .rodata.__FUNCTION__$5329 .rodata.__FUNCTION__$5319 .rodata.__FUNCTION__$5299 .rodata.__FUNCTION__$5294 .rodata.__FUNCTION__$5288 .rodata.__FUNCTION__$5282 .rodata.__FUNCTION__$5276 .rodata.__FUNCTION__$5267 .rodata.__FUNCTION__$5257 .rodata.__FUNCTION__$5246 .rodata.__FUNCTION__$5238 .rodata.__FUNCTION__$5365 .rodata.__FUNCTION__$5227 .rodata.__FUNCTION__$5216 .rodata.__FUNCTION__$5210 .rodata.__FUNCTION__$5203 .rodata.__FUNCTION__$5196 .rodata.__FUNCTION__$5162 .rodata.__FUNCTION__$5152 .rodata.__FUNCTION__$5143) *libfreertos.a:queue.*(.rodata.xQueueGenericCreateStatic) + *libhal.a:uart_hal_iram.*( .rodata .rodata.*) *liblog.a:log.*(.rodata.esp_log_level_set.str1.4 .rodata.__func__$3544 .rodata.__func__$3515) *liblog.a:log_freertos.*(.rodata.esp_log_system_timestamp.str1.4) *libsoc.a:rtc_init.*( .rodata.*) - *libsoc.a:uart_hal_iram.*( .rodata .rodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ @@ -735,16 +735,16 @@ SECTIONS _stext = .; _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:rtc_init.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .text EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:rtc_init.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .text.* EXCLUDE_FILE(*libpp.a *libnet80211.a *libsoc.a:uart_hal_iram.*) .wifi0iram EXCLUDE_FILE(*libpp.a *libnet80211.a *libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifi0iram.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .wifirxiram EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifirxiram.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:rtc_init.* *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .text EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libgcc.a:_divsf3.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *libc.a:lib_a-tzvars.* *libc.a:lib_a-isblank.* *libc.a:lib_a-sysopen.* *libc.a:lib_a-time.* *libc.a:lib_a-rand_r.* *libc.a:lib_a-tzset.* *libc.a:lib_a-raise.* *libc.a:lib_a-sysread.* *libc.a:lib_a-systimes.* *libc.a:lib_a-strlwr.* *libc.a:lib_a-gmtime.* *libc.a:lib_a-sf_nan.* *libc.a:lib_a-strcasecmp.* *libc.a:lib_a-strftime.* *libc.a:lib_a-wbuf.* *libc.a:lib_a-strnlen.* *libc.a:lib_a-close.* *libc.a:lib_a-strupr.* *libc.a:lib_a-bzero.* *libc.a:lib_a-gmtime_r.* *libc.a:lib_a-memchr.* *libc.a:lib_a-isdigit.* *libc.a:lib_a-isupper.* *libc.a:lock.* *libc.a:lib_a-itoa.* *libc.a:lib_a-asctime_r.* *libc.a:lib_a-wctomb_r.* *libc.a:lib_a-fclose.* *libc.a:lib_a-strncpy.* *libc.a:lib_a-open.* *libc.a:lib_a-lcltime_r.* *libc.a:lib_a-syswrite.* *libc.a:creat.* *libc.a:lib_a-tolower.* *libc.a:lib_a-strlcpy.* *libc.a:lib_a-abs.* *libc.a:lib_a-system.* *libc.a:lib_a-strcspn.* *libc.a:isatty.* *libc.a:lib_a-gettzinfo.* *libc.a:lib_a-s_fpclassify.* *libc.a:lib_a-tzset_r.* *libc.a:lib_a-strncmp.* *libc.a:lib_a-strcat.* *libc.a:lib_a-strndup_r.* *libc.a:lib_a-strcmp.* *libc.a:lib_a-memccpy.* *libc.a:lib_a-fwalk.* *libc.a:lib_a-tzlock.* *libc.a:lib_a-strncasecmp.* *libc.a:lib_a-refill.* *libc.a:lib_a-longjmp.* *libc.a:lib_a-memrchr.* *libc.a:lib_a-toascii.* *libc.a:lib_a-ctime.* *libc.a:lib_a-strspn.* *libc.a:lib_a-ungetc.* *libc.a:lib_a-strndup.* *libc.a:lib_a-strtoul.* *libc.a:lib_a-strtol.* *libc.a:lib_a-memcpy.* *libc.a:lib_a-isprint.* *libc.a:lib_a-sbrk.* *libc.a:lib_a-strchr.* *libc.a:lib_a-strdup.* *libc.a:lib_a-isspace.* *libc.a:lib_a-isalpha.* *libc.a:lib_a-isascii.* *libc.a:lib_a-rand.* *libc.a:lib_a-strncat.* *libc.a:lib_a-creat.* *libc.a:lib_a-read.* *libc.a:lib_a-memcmp.* *libc.a:lib_a-fflush.* *libc.a:lib_a-fputwc.* *libc.a:lib_a-toupper.* *libc.a:lib_a-quorem.* *libc.a:lib_a-div.* *libc.a:lib_a-tzcalc_limits.* *libc.a:lib_a-labs.* *libc.a:lib_a-strtok_r.* *libc.a:lib_a-strcpy.* *libc.a:lib_a-iscntrl.* *libc.a:lib_a-mktime.* *libc.a:lib_a-strdup_r.* *libc.a:lib_a-strstr.* *libc.a:lib_a-strsep.* *libc.a:lib_a-stdio.* *libc.a:lib_a-isgraph.* *libc.a:lib_a-wsetup.* *libc.a:lib_a-timelocal.* *libc.a:lib_a-strlcat.* *libc.a:lib_a-islower.* *libc.a:lib_a-ldiv.* *libc.a:lib_a-lcltime.* *libc.a:lib_a-environ.* *libc.a:lib_a-sccl.* *libc.a:lib_a-getenv_r.* *libc.a:lib_a-sysclose.* *libc.a:lib_a-strcasestr.* *libc.a:lib_a-ctime_r.* *libc.a:lib_a-syssbrk.* *libc.a:lib_a-setjmp.* *libc.a:lib_a-isalnum.* *libc.a:lib_a-strcoll.* *libc.a:lib_a-memmove.* *libc.a:lib_a-rshift.* *libc.a:lib_a-envlock.* *libc.a:lib_a-strlen.* *libc.a:lib_a-wcrtomb.* *libc.a:lib_a-strptime.* *libc.a:lib_a-findfp.* *libc.a:lib_a-impure.* *libc.a:lib_a-fvwrite.* *libc.a:lib_a-ispunct.* *libc.a:lib_a-utoa.* *libc.a:lib_a-srand.* *libc.a:lib_a-month_lengths.* *libc.a:lib_a-asctime.* *libc.a:lib_a-strrchr.* *libc.a:lib_a-makebuf.* *libc.a:lib_a-atoi.* *libc.a:lib_a-ctype_.* *libc.a:lib_a-memset.* *libc.a:lib_a-atol.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *librtc.a *libsoc.a:rtc_init.* *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .text.* EXCLUDE_FILE(*libpp.a *libnet80211.a *libhal.a:uart_hal_iram.*) .wifi0iram EXCLUDE_FILE(*libpp.a *libnet80211.a *libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifi0iram.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .wifirxiram EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifirxiram.*) *libesp_event.a:default_event_loop.*(.literal.esp_event_handler_register .literal.esp_event_handler_instance_register .literal.esp_event_handler_unregister .literal.esp_event_handler_instance_unregister .literal.esp_event_post .literal.esp_event_loop_create_default .literal.esp_event_loop_delete_default .literal.esp_event_send_to_default_loop .text.esp_event_handler_register .text.esp_event_handler_instance_register .text.esp_event_handler_unregister .text.esp_event_handler_instance_unregister .text.esp_event_post .text.esp_event_loop_create_default .text.esp_event_loop_delete_default .text.esp_event_send_to_default_loop) *libesp_event.a:esp_event.*(.literal.handler_instances_add .literal.base_node_add_handler .literal.loop_node_add_handler .literal.handler_instances_remove .literal.handler_instances_remove_all$isra$1 .literal.esp_event_loop_create .literal.esp_event_loop_run .literal.esp_event_loop_run_task .literal.esp_event_loop_delete .literal.esp_event_handler_register_with_internal .literal.esp_event_handler_register_with .literal.esp_event_handler_instance_register_with .literal.esp_event_handler_unregister_with_internal .literal.esp_event_handler_unregister_with .literal.esp_event_handler_instance_unregister_with .literal.esp_event_post_to .text.handler_instances_add .text.base_node_add_handler .text.loop_node_add_handler .text.handler_instances_remove .text.handler_instances_remove_all$isra$1 .text.esp_event_loop_create .text.esp_event_loop_run .text.esp_event_loop_run_task .text.esp_event_loop_delete .text.esp_event_handler_register_with_internal .text.esp_event_handler_register_with .text.esp_event_handler_instance_register_with .text.esp_event_handler_unregister_with_internal .text.esp_event_handler_unregister_with .text.esp_event_handler_instance_unregister_with .text.esp_event_post_to .text.esp_event_dump) *libesp_system.a:system_api.*(.literal.esp_register_shutdown_handler .literal.esp_unregister_shutdown_handler .literal.esp_get_free_heap_size .literal.esp_get_free_internal_heap_size .literal.esp_get_minimum_free_heap_size .literal.esp_get_idf_version .text.esp_register_shutdown_handler .text.esp_unregister_shutdown_handler .text.esp_get_free_heap_size .text.esp_get_free_internal_heap_size .text.esp_get_minimum_free_heap_size .text.esp_get_idf_version) *libfreertos.a:queue.*( .wifi0iram.* .wifirxiram.*) *libfreertos.a:queue.*(.literal.xQueueGenericCreateStatic .text.xQueueGenericCreateStatic .wifi0iram.xQueueGenericCreateStatic .wifirxiram.xQueueGenericCreateStatic) + *libhal.a:uart_hal_iram.*( .literal .literal.* .text .text.* .wifi0iram .wifi0iram.* .wifirxiram .wifirxiram.*) *liblog.a:log.*(.literal.heap_bubble_down .literal.esp_log_set_vprintf .literal.esp_log_level_set .literal.esp_log_writev .text.heap_bubble_down .text.esp_log_set_vprintf .text.esp_log_level_set .text.esp_log_writev) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text.esp_log_system_timestamp) *libsoc.a:rtc_init.*(.literal.rtc_init .literal.rtc_vddsdio_get_config .text.rtc_init .text.rtc_vddsdio_get_config) - *libsoc.a:uart_hal_iram.*( .literal .literal.* .text .text.* .wifi0iram .wifi0iram.* .wifirxiram .wifirxiram.*) *(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) *(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */ @@ -775,17 +775,17 @@ SECTIONS /* coredump mapping */ _coredump_iram_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .iram.data.coredump EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram.data.coredump.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .iram.data.coredump EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram.data.coredump.*) *libfreertos.a:queue.*( .iram.data.coredump.*) *libfreertos.a:queue.*(.iram.data.coredump.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .iram.data.coredump .iram.data.coredump.*) + *libhal.a:uart_hal_iram.*( .iram.data.coredump .iram.data.coredump.*) _coredump_iram_end = ABSOLUTE(.); /* should be placed after coredump mapping */ - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .iram.data EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram.data.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .iram.data EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram.data.*) *libfreertos.a:queue.*( .iram.data.*) *libfreertos.a:queue.*(.iram.data.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .iram.data .iram.data.*) + *libhal.a:uart_hal_iram.*( .iram.data .iram.data.*) _iram_data_end = ABSOLUTE(.); } > iram0_0_seg @@ -795,10 +795,10 @@ SECTIONS . = ALIGN(4); _iram_bss_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .iram.bss EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram.bss.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .iram.bss EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram.bss.*) *libfreertos.a:queue.*( .iram.bss.*) *libfreertos.a:queue.*(.iram.bss.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .iram.bss .iram.bss.*) + *libhal.a:uart_hal_iram.*( .iram.bss .iram.bss.*) _iram_bss_end = ABSOLUTE(.); . = ALIGN(4); diff --git a/tools/sdk/esp32/ld/libbtdm_app.a b/tools/sdk/esp32/ld/libbtdm_app.a index 68310c6f..d019f045 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/lib/libapp_trace.a b/tools/sdk/esp32/lib/libapp_trace.a index 60a35722..7a019de2 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 0a905ecd..17b9e5af 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 b4094045..e7e46da4 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 51b41cfa..01410da9 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 16c22dee..b4b31233 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 edbbb48b..10680507 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 new file mode 100644 index 00000000..ed14e0e9 Binary files /dev/null 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 2b271308..1ff4d06c 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 ad2b5e06..c927bf3d 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 bfdff742..3e7cb548 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 b12917b1..9aad55f2 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 b179b0f2..c2607c47 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 4595b03d..783d96fd 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 9203b56e..7a25ea17 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-face.a b/tools/sdk/esp32/lib/libesp-face.a index 3990afbb..6eb56d12 100644 Binary files a/tools/sdk/esp32/lib/libesp-face.a and b/tools/sdk/esp32/lib/libesp-face.a differ diff --git a/tools/sdk/esp32/lib/libesp-tls.a b/tools/sdk/esp32/lib/libesp-tls.a index bd6c31f8..7be3fd26 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 1f0c8f01..04e25a20 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/libesp32.a b/tools/sdk/esp32/lib/libesp32.a index 08fca7ed..5ec1c7b3 100644 Binary files a/tools/sdk/esp32/lib/libesp32.a and b/tools/sdk/esp32/lib/libesp32.a differ diff --git a/tools/sdk/esp32/lib/libesp_adc_cal.a b/tools/sdk/esp32/lib/libesp_adc_cal.a index ab9a7263..53dad5ed 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 3efdb0ae..baa66fbe 100644 Binary files a/tools/sdk/esp32/lib/libesp_common.a and b/tools/sdk/esp32/lib/libesp_common.a differ diff --git a/tools/sdk/esp32/lib/libesp_eth.a b/tools/sdk/esp32/lib/libesp_eth.a index 2f3166ad..c3f55f97 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 1088338a..fd615f08 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 0c508ba0..dbf68cf5 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 4f8930a0..ab56bc96 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 4787ad47..ba71a057 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 3692af60..d6f86d4e 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 1298a10f..58f515a0 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_ipc.a b/tools/sdk/esp32/lib/libesp_ipc.a index 1fd9beea..7ad73c4e 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_local_ctrl.a b/tools/sdk/esp32/lib/libesp_local_ctrl.a index 944b4434..34b9bbe2 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 0829dfb8..2511a054 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_ringbuf.a b/tools/sdk/esp32/lib/libesp_ringbuf.a index 8015ddae..dbf71364 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 1a253bd3..78b95520 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_serial_slave_link.a b/tools/sdk/esp32/lib/libesp_serial_slave_link.a index e282a7bd..09485fe4 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 17ffbea3..b6a1e9be 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 7eb6a415..75b8258e 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 10be44df..77ae5362 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 133ec03e..4a3cfebc 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 920b2f18..06e80d9f 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 aedf9a02..ff9003db 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/libexpat.a b/tools/sdk/esp32/lib/libexpat.a index 3ba18131..2772a3fc 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 5d6c2a52..44b555df 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 3cd53110..2dd37c15 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 879c32c6..d1f5cdc1 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 7c01f821..16030953 100644 Binary files a/tools/sdk/esp32/lib/libfreertos.a and b/tools/sdk/esp32/lib/libfreertos.a differ diff --git a/tools/sdk/esp32/lib/libhal.a b/tools/sdk/esp32/lib/libhal.a index 382f4e0a..12d1b3ab 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 144d92ca..f2a6c449 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 6317dc40..14a5b7b3 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 cf2656b2..71c57112 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/liblibsodium.a b/tools/sdk/esp32/lib/liblibsodium.a index 6040f796..1bf361a5 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 0714492d..29524376 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 5aad7448..5779ce25 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 80b11ae4..5177b784 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 812fcb22..2f9264d5 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/libmbedx509.a b/tools/sdk/esp32/lib/libmbedx509.a index d99035bf..5ca0c95b 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 f9311890..ddd374c3 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 122e6290..aeca9c67 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 6ceeaa7a..719d579b 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 26217e9f..24edb719 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 54da9f16..22233627 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 f1348754..2a51822c 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 67ccb39c..272842bb 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 4978e7aa..87b341af 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 5e0c161a..92ef9411 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 a81053e0..9a60ae8b 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 52f640bc..540483b7 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 1262b8ab..a558639b 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 9b699319..5fc680ca 100644 Binary files a/tools/sdk/esp32/lib/libpthread.a and b/tools/sdk/esp32/lib/libpthread.a differ diff --git a/tools/sdk/esp32/lib/libsdmmc.a b/tools/sdk/esp32/lib/libsdmmc.a index e455d2c5..fa2be2e9 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 78054047..a090af56 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 8c2039eb..e1343609 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/libsoc_esp32.a b/tools/sdk/esp32/lib/libsoc_esp32.a index 494bb5ee..fa08c55f 100644 Binary files a/tools/sdk/esp32/lib/libsoc_esp32.a and b/tools/sdk/esp32/lib/libsoc_esp32.a differ diff --git a/tools/sdk/esp32/lib/libspi_flash.a b/tools/sdk/esp32/lib/libspi_flash.a index b36f7899..91c6c63d 100644 Binary files a/tools/sdk/esp32/lib/libspi_flash.a and b/tools/sdk/esp32/lib/libspi_flash.a differ diff --git a/tools/sdk/esp32/lib/libspiffs.a b/tools/sdk/esp32/lib/libspiffs.a index 3cb90fc0..209a87e8 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 277bf15c..1c858170 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 c379d489..4dad72bc 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 23725199..e0e330b9 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 9f663943..0a3aa4a7 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 b0ea9754..87f05836 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/libwear_levelling.a b/tools/sdk/esp32/lib/libwear_levelling.a index bf910434..16884a30 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 d99b619d..96d20401 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 dbc308d4..e00cbb63 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/libxt_hal.a b/tools/sdk/esp32/lib/libxt_hal.a new file mode 100644 index 00000000..382f4e0a Binary files /dev/null and b/tools/sdk/esp32/lib/libxt_hal.a differ diff --git a/tools/sdk/esp32/lib/libxtensa.a b/tools/sdk/esp32/lib/libxtensa.a index f6a5c5dc..a5d4351e 100644 Binary files a/tools/sdk/esp32/lib/libxtensa.a and b/tools/sdk/esp32/lib/libxtensa.a differ diff --git a/tools/sdk/esp32/sdkconfig b/tools/sdk/esp32/sdkconfig index bf789162..b6ee91bd 100644 --- a/tools/sdk/esp32/sdkconfig +++ b/tools/sdk/esp32/sdkconfig @@ -74,7 +74,7 @@ CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 # Serial flasher config # CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set +CONFIG_ESPTOOLPY_WITH_STUB=y # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set CONFIG_ESPTOOLPY_FLASHMODE_DIO=y @@ -186,6 +186,7 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NORM=y CONFIG_COMPILER_STACK_CHECK=y CONFIG_COMPILER_WARN_WRITE_STRINGS=y # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set # end of Compiler options # @@ -764,6 +765,7 @@ CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set CONFIG_FREERTOS_DEBUG_OCDAWARE=y # CONFIG_FREERTOS_FPU_IN_ISR is not set # end of FreeRTOS @@ -1131,6 +1133,7 @@ CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set # # Auto-detect flash chips diff --git a/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin b/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin index 150e7d9f..0280b459 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_dio_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin b/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin index 1bddbfa4..2cf297cc 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_dio_80m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin b/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin index 150e7d9f..0280b459 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_dout_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin b/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin index 1bddbfa4..2cf297cc 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_dout_80m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin b/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin index 150e7d9f..0280b459 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_qio_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin b/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin index 1bddbfa4..2cf297cc 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_qio_80m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin b/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin index 150e7d9f..0280b459 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin and b/tools/sdk/esp32s2/bin/bootloader_qout_40m.bin differ diff --git a/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin b/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin index 1bddbfa4..2cf297cc 100644 Binary files a/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin and b/tools/sdk/esp32s2/bin/bootloader_qout_80m.bin differ diff --git a/tools/sdk/esp32s2/include/app_update/include/esp_ota_ops.h b/tools/sdk/esp32s2/include/app_update/include/esp_ota_ops.h index ac0ae656..cf24e75f 100644 --- a/tools/sdk/esp32s2/include/app_update/include/esp_ota_ops.h +++ b/tools/sdk/esp32s2/include/app_update/include/esp_ota_ops.h @@ -29,6 +29,7 @@ extern "C" #endif #define OTA_SIZE_UNKNOWN 0xffffffff /*!< Used for esp_ota_begin() if new image size is unknown */ +#define OTA_WITH_SEQUENTIAL_WRITES 0xfffffffe /*!< Used for esp_ota_begin() if new image size is unknown and erase can be done in incremental manner (assuming write operation is in continuous sequence) */ #define ESP_ERR_OTA_BASE 0x1500 /*!< Base error code for ota_ops api */ #define ESP_ERR_OTA_PARTITION_CONFLICT (ESP_ERR_OTA_BASE + 0x01) /*!< Error if request was to write or erase the current running partition */ diff --git a/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_flash_config.h b/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_flash_config.h index 45367730..6074faca 100644 --- a/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_flash_config.h +++ b/tools/sdk/esp32s2/include/bootloader_support/include/bootloader_flash_config.h @@ -28,6 +28,14 @@ extern "C" { */ void bootloader_flash_update_id(void); +/** + * @brief Update the flash size in g_rom_flashchip (global esp_rom_spiflash_chip_t structure). + * + * @param size The size to store, in bytes. + * @return None + */ +void bootloader_flash_update_size(uint32_t size); + /** * @brief Set the flash CS setup and hold time. * 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 928a29ad..f495933a 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 @@ -169,6 +169,14 @@ esp_err_t esp_image_verify_bootloader(uint32_t *length); */ esp_err_t esp_image_verify_bootloader_data(esp_image_metadata_t *data); +/** + * @brief Get the flash size of the image + * + * @param app_flash_size The value configured in the image header + * @return Actual size, in bytes. + */ +int esp_image_get_flash_size(esp_image_flash_size_t app_flash_size); + typedef struct { uint32_t drom_addr; diff --git a/tools/sdk/esp32s2/include/cmock/CMock/src/cmock.h b/tools/sdk/esp32s2/include/cmock/CMock/src/cmock.h new file mode 100644 index 00000000..21123e92 --- /dev/null +++ b/tools/sdk/esp32s2/include/cmock/CMock/src/cmock.h @@ -0,0 +1,41 @@ +/* ========================================== + CMock Project - Automatic Mock Generation for C + Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + [Released under MIT License. Please refer to license.txt for details] +========================================== */ + +#ifndef CMOCK_FRAMEWORK_H +#define CMOCK_FRAMEWORK_H + +#include "cmock_internals.h" + +#define CMOCK_VERSION_MAJOR 2 +#define CMOCK_VERSION_MINOR 5 +#define CMOCK_VERSION_BUILD 2 +#define CMOCK_VERSION ((CMOCK_VERSION_MAJOR << 16) | (CMOCK_VERSION_MINOR << 8) | CMOCK_VERSION_BUILD) + +/* should be big enough to index full range of CMOCK_MEM_MAX */ +#ifndef CMOCK_MEM_INDEX_TYPE +#include +#define CMOCK_MEM_INDEX_TYPE size_t +#endif + +#define CMOCK_GUTS_NONE (0) + +/*------------------------------------------------------- + * Memory API + *-------------------------------------------------------*/ +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNew(CMOCK_MEM_INDEX_TYPE size); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemChain(CMOCK_MEM_INDEX_TYPE root_index, CMOCK_MEM_INDEX_TYPE obj_index); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNext(CMOCK_MEM_INDEX_TYPE previous_item_index); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemEndOfChain(CMOCK_MEM_INDEX_TYPE root_index); + +void* CMock_Guts_GetAddressFor(CMOCK_MEM_INDEX_TYPE index); + +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesCapacity(void); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesFree(void); +CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesUsed(void); +void CMock_Guts_MemFreeAll(void); +void CMock_Guts_MemFreeFinal(void); + +#endif /* end of CMOCK_FRAMEWORK_H */ diff --git a/tools/sdk/esp32s2/include/cmock/CMock/src/cmock_internals.h b/tools/sdk/esp32s2/include/cmock/CMock/src/cmock_internals.h new file mode 100644 index 00000000..56fb33b1 --- /dev/null +++ b/tools/sdk/esp32s2/include/cmock/CMock/src/cmock_internals.h @@ -0,0 +1,91 @@ +/* ========================================== + CMock Project - Automatic Mock Generation for C + Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + [Released under MIT License. Please refer to license.txt for details] +========================================== */ + +#ifndef CMOCK_FRAMEWORK_INTERNALS_H +#define CMOCK_FRAMEWORK_INTERNALS_H + +#include "unity.h" + +/* These are constants that the generated mocks have access to */ +extern const char* CMockStringOutOfMemory; +extern const char* CMockStringCalledMore; +extern const char* CMockStringCalledLess; +extern const char* CMockStringCalledEarly; +extern const char* CMockStringCalledLate; +extern const char* CMockStringCallOrder; +extern const char* CMockStringIgnPreExp; +extern const char* CMockStringPtrPreExp; +extern const char* CMockStringPtrIsNULL; +extern const char* CMockStringExpNULL; +extern const char* CMockStringMismatch; + +/* define CMOCK_MEM_DYNAMIC to grab memory as needed with malloc + * when you do that, CMOCK_MEM_SIZE is used for incremental size instead of total */ +#ifdef CMOCK_MEM_STATIC +#undef CMOCK_MEM_DYNAMIC +#endif + +#ifdef CMOCK_MEM_DYNAMIC +#include +#endif + +/* this is used internally during pointer arithmetic. make sure this type is the same size as the target's pointer type */ +#ifndef CMOCK_MEM_PTR_AS_INT +#ifdef UNITY_POINTER_WIDTH +#ifdef UNITY_INT_WIDTH +#if UNITY_POINTER_WIDTH == UNITY_INT_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned int +#endif +#endif +#endif +#endif + +#ifndef CMOCK_MEM_PTR_AS_INT +#ifdef UNITY_POINTER_WIDTH +#ifdef UNITY_LONG_WIDTH +#if UNITY_POINTER_WIDTH == UNITY_LONG_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned long +#endif +#if UNITY_POINTER_WIDTH > UNITY_LONG_WIDTH +#define CMOCK_MEM_PTR_AS_INT unsigned long long +#endif +#endif +#endif +#endif + +#ifndef CMOCK_MEM_PTR_AS_INT +#define CMOCK_MEM_PTR_AS_INT unsigned long +#endif + +/* 0 for no alignment, 1 for 16-bit, 2 for 32-bit, 3 for 64-bit */ +#ifndef CMOCK_MEM_ALIGN + #ifdef UNITY_LONG_WIDTH + #if (UNITY_LONG_WIDTH == 16) + #define CMOCK_MEM_ALIGN (1) + #elif (UNITY_LONG_WIDTH == 32) + #define CMOCK_MEM_ALIGN (2) + #elif (UNITY_LONG_WIDTH == 64) + #define CMOCK_MEM_ALIGN (3) + #else + #define CMOCK_MEM_ALIGN (2) + #endif + #else + #define CMOCK_MEM_ALIGN (2) + #endif +#endif + +/* amount of memory to allow cmock to use in its internal heap */ +#ifndef CMOCK_MEM_SIZE +#define CMOCK_MEM_SIZE (32768) +#endif + +/* automatically calculated defs for easier reading */ +#define CMOCK_MEM_ALIGN_SIZE (CMOCK_MEM_INDEX_TYPE)(1u << CMOCK_MEM_ALIGN) +#define CMOCK_MEM_ALIGN_MASK (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_ALIGN_SIZE - 1) +#define CMOCK_MEM_INDEX_SIZE (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_PTR_AS_INT)((sizeof(CMOCK_MEM_INDEX_TYPE) > CMOCK_MEM_ALIGN_SIZE) ? sizeof(CMOCK_MEM_INDEX_TYPE) : CMOCK_MEM_ALIGN_SIZE) + + +#endif /* end of CMOCK_FRAMEWORK_INTERNALS_H */ diff --git a/tools/sdk/esp32s2/include/config/sdkconfig.h b/tools/sdk/esp32s2/include/config/sdkconfig.h index 8474bcf5..690879ca 100644 --- a/tools/sdk/esp32s2/include/config/sdkconfig.h +++ b/tools/sdk/esp32s2/include/config/sdkconfig.h @@ -25,6 +25,7 @@ #define CONFIG_BOOTLOADER_RESERVE_RTC_SIZE 0x10 #define CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE 1 #define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200 +#define CONFIG_ESPTOOLPY_WITH_STUB 1 #define CONFIG_ESPTOOLPY_FLASHMODE_QIO 1 #define CONFIG_ESPTOOLPY_FLASHMODE "dio" #define CONFIG_ESPTOOLPY_FLASHFREQ_80M 1 @@ -487,5 +488,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 "6c17e3a64" +#define CONFIG_ARDUINO_IDF_COMMIT "8bc19ba89" #define CONFIG_ARDUINO_IDF_BRANCH "master" diff --git a/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/adc.h b/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/adc.h index 65bda25c..10c201e6 100644 --- a/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/adc.h +++ b/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/adc.h @@ -44,29 +44,6 @@ esp_err_t adc_arbiter_config(adc_unit_t adc_unit, adc_arbiter_t *config); /*--------------------------------------------------------------- Digital controller setting ---------------------------------------------------------------*/ -/** - * @brief ADC digital controller initialization. - * @return - * - ESP_OK Success - */ -esp_err_t adc_digi_init(void); - -/** - * @brief ADC digital controller deinitialization. - * @return - * - ESP_OK Success - */ -esp_err_t adc_digi_deinit(void); - -/** - * @brief Setting the digital controller. - * - * @param config Pointer to digital controller paramter. Refer to `adc_digi_config_t`. - * - * @return - * - ESP_OK Success - */ -esp_err_t adc_digi_controller_config(const adc_digi_config_t *config); /** * @brief Enable digital controller to trigger the measurement. diff --git a/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/dac.h b/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/dac.h new file mode 100644 index 00000000..42ead8a7 --- /dev/null +++ b/tools/sdk/esp32s2/include/driver/esp32s2/include/driver/dac.h @@ -0,0 +1,80 @@ +// Copyright 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. + +#pragma once + +#include "driver/dac_common.h" + +#ifdef __cplusplus +extern "C" { +#endif +/*--------------------------------------------------------------- + Digital controller setting +---------------------------------------------------------------*/ + +/** + * @brief DAC digital controller initialization. + * @return + * - ESP_OK success + */ +esp_err_t dac_digi_init(void); + +/** + * @brief DAC digital controller deinitialization. + * @return + * - ESP_OK success + */ +esp_err_t dac_digi_deinit(void); + +/** + * @brief Setting the DAC digital controller. + * + * @param cfg Pointer to digital controller paramter. See ``dac_digi_config_t``. + * + * @return + * - ESP_OK success + * - ESP_ERR_INVALID_ARG Parameter error + */ +esp_err_t dac_digi_controller_config(const dac_digi_config_t *cfg); + +/** + * @brief DAC digital controller start output voltage. + * @return + * - ESP_OK success + */ +esp_err_t dac_digi_start(void); + +/** + * @brief DAC digital controller stop output voltage. + * @return + * - ESP_OK success + */ +esp_err_t dac_digi_stop(void); + +/** + * @brief Reset DAC digital controller FIFO. + * @return + * - ESP_OK success + */ +esp_err_t dac_digi_fifo_reset(void); + +/** + * @brief Reset DAC digital controller. + * @return + * - ESP_OK success + */ +esp_err_t dac_digi_reset(void); + +#ifdef __cplusplus +} +#endif diff --git a/tools/sdk/esp32s2/include/driver/include/driver/adc_common.h b/tools/sdk/esp32s2/include/driver/include/driver/adc_common.h index 2c426b71..719f60a4 100644 --- a/tools/sdk/esp32s2/include/driver/include/driver/adc_common.h +++ b/tools/sdk/esp32s2/include/driver/include/driver/adc_common.h @@ -76,7 +76,7 @@ typedef enum { /** * @brief ADC digital controller encode option. * - * @deprecated The ESP32S2 don't use I2S DMA. Call ``adc_digi_output_format_t`` instead. + * @deprecated The ESP32-S2 doesn't use I2S DMA. Call ``adc_digi_output_format_t`` instead. */ typedef enum { ADC_ENCODE_12BIT, /*!< ADC to DMA data format, , [15:12]-channel [11:0]-12 bits ADC data */ @@ -84,6 +84,35 @@ typedef enum { ADC_ENCODE_MAX, } adc_i2s_encode_t; +/*--------------------------------------------------------------- + Common setting +---------------------------------------------------------------*/ + +/** + * @brief Enable ADC power + */ +void adc_power_on(void); + +/** + * @brief Power off SAR ADC + * This function will force power down for ADC + */ +void adc_power_off(void); + +/** + * @brief Initialize ADC pad + * @param adc_unit ADC unit index + * @param channel ADC channel index + * @return + * - ESP_OK success + * - ESP_ERR_INVALID_ARG Parameter error + */ +esp_err_t adc_gpio_init(adc_unit_t adc_unit, adc_channel_t channel); + +/*--------------------------------------------------------------- + RTC controller setting +---------------------------------------------------------------*/ + /** * @brief Get the GPIO number of a specific ADC1 channel. * @@ -97,45 +126,58 @@ typedef enum { esp_err_t adc1_pad_get_io_num(adc1_channel_t channel, gpio_num_t *gpio_num); /** - * @brief Set the attenuation of a particular channel on ADC1, and configure its associated GPIO pin mux. - * - * The default ADC full-scale voltage is 1.1 V. To read higher voltages (up to the pin maximum voltage, - * usually 3.3 V) requires setting >0 dB signal attenuation for that ADC channel. - * - * When VDD_A is 3.3 V: - * - * - 0 dB attenuation (ADC_ATTEN_DB_0) gives full-scale voltage 1.1 V - * - 2.5 dB attenuation (ADC_ATTEN_DB_2_5) gives full-scale voltage 1.5 V - * - 6 dB attenuation (ADC_ATTEN_DB_6) gives full-scale voltage 2.2 V - * - 11 dB attenuation (ADC_ATTEN_DB_11) gives full-scale voltage 3.9 V (see note below) - * - * @note The full-scale voltage is the voltage corresponding to a maximum reading (depending on ADC1 configured bit width, - * this value in ESP32 is: 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. - * this value in ESP32S2 is: 8191 for 13-bits.) - * - * @note At 11 dB attenuation the maximum voltage is limited by VDD_A, not the full scale voltage. - * - * @note For ESP32: - * Due to ADC characteristics, most accurate results are obtained within the following approximate voltage ranges: - * - * - 0 dB attenuation (ADC_ATTEN_DB_0) between 100 and 950 mV - * - 2.5 dB attenuation (ADC_ATTEN_DB_2_5) between 100 and 1250 mV - * - 6 dB attenuation (ADC_ATTEN_DB_6) between 150 to 1750 mV - * - 11 dB attenuation (ADC_ATTEN_DB_11) between 150 to 2450 mV - * - * For maximum accuracy, use the ADC calibration APIs and measure voltages within these recommended ranges. - * - * @note For any given channel, this function must be called before the first time ``adc1_get_raw()`` is called for that channel. - * - * @note This function can be called multiple times to configure multiple - * ADC channels simultaneously. ``adc1_get_raw()`` can then be called for any configured channel. - * - * @param channel ADC1 channel to configure - * @param atten Attenuation level - * - * @return - * - ESP_OK success - * - ESP_ERR_INVALID_ARG Parameter error + * @brief Set the attenuation of a particular channel on ADC1, and configure its associated GPIO pin mux. + * + * The default ADC full-scale voltage is 1.1 V. To read higher voltages (up to the pin maximum voltage, + * usually 3.3 V) requires setting >0 dB signal attenuation for that ADC channel. + * + * When the analog voltage supply (VDDA) is 3.3 V: + * + * - 0 dB attenuation (ADC_ATTEN_DB_0) gives full-scale voltage 1.1 V + * - 2.5 dB attenuation (ADC_ATTEN_DB_2_5) gives full-scale voltage 1.5 V + * - 6 dB attenuation (ADC_ATTEN_DB_6) gives full-scale voltage 2.2 V + * - 11 dB attenuation (ADC_ATTEN_DB_11) gives full-scale voltage 3.9 V (see note below) + * + * Due to ADC characteristics, most accurate results are obtained within the following approximate voltage ranges: + * + * +----------+------------+--------------------------+ + * | SoC | attenuation| suggested range (mV) | + * +==========+============+==========================+ + * | | 0 | 100 ~ 950 | + * | +------------+--------------------------+ + * | | 2.5 | 100 ~ 1250 | + * | ESP32 +------------+--------------------------+ + * | | 6 | 150 ~ 1750 | + * | +------------+--------------------------+ + * | | 11 | 150 ~ 2450 | + * +----------+------------+--------------------------+ + * | | 0 | 100 ~ 800 | + * | +------------+--------------------------+ + * | | 2.5 | 100 ~ 1100 | + * | ESP32-S2 +------------+--------------------------+ + * | | 6 | 150 ~ 1350 | + * | +------------+--------------------------+ + * | | 11 | 150 ~ 2600 | + * +----------+------------+--------------------------+ + * + * For maximum accuracy, use the ADC calibration APIs and measure voltages within these recommended ranges. + * @note The full-scale voltage is the voltage corresponding to a maximum reading (depending on ADC1 configured bit width, + * this value in ESP32 is 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. + * this value in ESP32-S2 is 8191 for 13-bits.) + * + * @note At 11 dB attenuation the maximum voltage is limited by VDDA, not the full scale voltage. + * + * @note For any given channel, this function must be called before the first time ``adc1_get_raw()`` is called for that channel. + * + * @note This function can be called multiple times to configure multiple + * ADC channels simultaneously. You may call ``adc1_get_raw()`` only after configuring a channel. + * + * @param channel ADC1 channel to configure + * @param atten Attenuation level + * + * @return + * - ESP_OK success + * - ESP_ERR_INVALID_ARG Parameter error */ esp_err_t adc1_config_channel_atten(adc1_channel_t channel, adc_atten_t atten); @@ -173,27 +215,6 @@ esp_err_t adc1_config_width(adc_bits_width_t width_bit); */ int adc1_get_raw(adc1_channel_t channel); -/** - * @brief Enable ADC power - */ -void adc_power_on(void); - -/** - * @brief Power off SAR ADC - * This function will force power down for ADC - */ -void adc_power_off(void); - -/** - * @brief Initialize ADC pad - * @param adc_unit ADC unit index - * @param channel ADC channel index - * @return - * - ESP_OK success - * - ESP_ERR_INVALID_ARG Parameter error - */ -esp_err_t adc_gpio_init(adc_unit_t adc_unit, adc_channel_t channel); - /** * @brief Set ADC data invert * @param adc_unit ADC unit index @@ -215,10 +236,10 @@ esp_err_t adc_set_clk_div(uint8_t clk_div); /** * @brief Configure ADC capture width. * - * @note For ESP32S2, only support ``ADC_WIDTH_BIT_13``. + * @note ESP32-S2 only supports ``ADC_WIDTH_BIT_13``. * * @param adc_unit ADC unit index - * @param width_bit Bit capture width for ADC unit. For ESP32S2, only support ``ADC_WIDTH_BIT_13``. + * @param width_bit Bit capture width for ADC unit. ESP32-S2 only supports ``ADC_WIDTH_BIT_13``. * * @return * - ESP_OK success @@ -256,7 +277,7 @@ esp_err_t adc2_pad_get_io_num(adc2_channel_t channel, gpio_num_t *gpio_num); * The default ADC full-scale voltage is 1.1 V. To read higher voltages (up to the pin maximum voltage, * usually 3.3 V) requires setting >0 dB signal attenuation for that ADC channel. * - * When VDD_A is 3.3 V: + * When the analog voltage supply (VDDA) is 3.3 V: * * - 0 dB attenuation (ADC_ATTEN_0db) gives full-scale voltage 1.1 V * - 2.5 dB attenuation (ADC_ATTEN_2_5db) gives full-scale voltage 1.5 V @@ -269,10 +290,10 @@ esp_err_t adc2_pad_get_io_num(adc2_channel_t channel, gpio_num_t *gpio_num); * * @note The full-scale voltage is the voltage corresponding to a maximum reading * (depending on ADC2 configured bit width, - * this value of ESP32 is: 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. - * this value of ESP32S2 is: 8191 for 13-bits.) + * this value for ESP32 is: 4095 for 12-bits, 2047 for 11-bits, 1023 for 10-bits, 511 for 9 bits. + * this value for ESP32-S2 is: 8191 for 13-bits.) * - * @note At 11 dB attenuation the maximum voltage is limited by VDD_A, not the full scale voltage. + * @note At 11 dB attenuation the maximum voltage is limited by VDDA, not the full scale voltage. * * @param channel ADC2 channel to configure * @param atten Attenuation level @@ -297,12 +318,12 @@ esp_err_t adc2_config_channel_atten(adc2_channel_t channel, adc_atten_t atten); * must be called before the first time this function is called. If Wi-Fi is started via ``esp_wifi_start()``, this * function will always fail with ``ESP_ERR_TIMEOUT``. * - * @note ESP32S2: + * @note ESP32-S2: * ADC2 support hardware arbiter. The arbiter is to improve the use efficiency of ADC2. After the control right is robbed by the high priority, * the low priority controller will read the invalid ADC2 data. Default priority: Wi-Fi > RTC > Digital; * * @param channel ADC2 channel to read - * @param width_bit Bit capture width for ADC2. For ESP32S2, only support ``ADC_WIDTH_BIT_13``. + * @param width_bit Bit capture width for ADC2. ESP32-S2 only supports ``ADC_WIDTH_BIT_13``. * @param raw_out the variable to hold the output data. * * @return @@ -345,6 +366,33 @@ esp_err_t adc_vref_to_gpio(adc_unit_t adc_unit, gpio_num_t gpio); * - ESP_ERR_INVALID_ARG: Unsupported GPIO */ esp_err_t adc2_vref_to_gpio(gpio_num_t gpio) __attribute__((deprecated)); +/*--------------------------------------------------------------- + Digital controller setting +---------------------------------------------------------------*/ + +/** + * @brief ADC digital controller initialization. + * @return + * - ESP_OK Success + */ +esp_err_t adc_digi_init(void); + +/** + * @brief ADC digital controller deinitialization. + * @return + * - ESP_OK Success + */ +esp_err_t adc_digi_deinit(void); + +/** + * @brief Setting the digital controller. + * + * @param config Pointer to digital controller paramter. Refer to `adc_digi_config_t`. + * + * @return + * - ESP_OK Success + */ +esp_err_t adc_digi_controller_config(const adc_digi_config_t *config); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/driver/include/driver/dac.h b/tools/sdk/esp32s2/include/driver/include/driver/dac_common.h similarity index 91% rename from tools/sdk/esp32s2/include/driver/include/driver/dac.h rename to tools/sdk/esp32s2/include/driver/include/driver/dac_common.h index 86699dd0..478841fc 100644 --- a/tools/sdk/esp32s2/include/driver/include/driver/dac.h +++ b/tools/sdk/esp32s2/include/driver/include/driver/dac_common.h @@ -67,22 +67,6 @@ esp_err_t dac_output_enable(dac_channel_t channel); */ esp_err_t dac_output_disable(dac_channel_t channel); -/** - * @brief Enable DAC output data from I2S - * - * @return - * - ESP_OK success - */ -esp_err_t dac_i2s_enable(void); - -/** - * @brief Disable DAC output data from I2S - * - * @return - * - ESP_OK success - */ -esp_err_t dac_i2s_disable(void); - /** * @brief Enable cosine wave generator output. * @@ -105,6 +89,7 @@ esp_err_t dac_cw_generator_disable(void); * @param cw Configuration. * @return * - ESP_OK success + * - ESP_ERR_INVALID_ARG The parameter is NULL. */ esp_err_t dac_cw_generator_config(dac_cw_config_t *cw); diff --git a/tools/sdk/esp32s2/include/driver/include/driver/twai.h b/tools/sdk/esp32s2/include/driver/include/driver/twai.h index 5313d953..383a9956 100644 --- a/tools/sdk/esp32s2/include/driver/include/driver/twai.h +++ b/tools/sdk/esp32s2/include/driver/include/driver/twai.h @@ -166,9 +166,9 @@ esp_err_t twai_driver_uninstall(void); * * This function starts the TWAI driver, putting the TWAI driver into the running * state. This allows the TWAI driver to participate in TWAI bus activities such - * as transmitting/receiving messages. The RX queue is reset in this function, - * clearing any unread messages. This function can only be called when the TWAI - * driver is in the stopped state. + * as transmitting/receiving messages. The TX and RX queue are reset in this function, + * clearing any messages that are unread or pending transmission. This function + * can only be called when the TWAI driver is in the stopped state. * * @return * - ESP_OK: TWAI driver is now running diff --git a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth.h b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth.h index 34ee9159..deb6a412 100644 --- a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth.h +++ b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth.h @@ -13,14 +13,14 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include "esp_eth_com.h" #include "esp_eth_mac.h" #include "esp_eth_phy.h" +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Handle of Ethernet driver * diff --git a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_com.h b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_com.h index ad7aa185..fcfa7dcd 100644 --- a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_com.h +++ b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_com.h @@ -13,13 +13,13 @@ // limitations under the License. #pragma once +#include "esp_err.h" +#include "esp_event_base.h" + #ifdef __cplusplus extern "C" { #endif -#include "esp_err.h" -#include "esp_event_base.h" - /** * @brief Maximum Ethernet payload size * @@ -78,6 +78,7 @@ typedef enum { ETH_STATE_LINK, /*!< Link status changed */ ETH_STATE_SPEED, /*!< Speed updated */ ETH_STATE_DUPLEX, /*!< Duplex updated */ + ETH_STATE_PAUSE, /*!< Pause ability updated */ } esp_eth_state_t; /** @@ -91,6 +92,7 @@ typedef enum { ETH_CMD_S_PHY_ADDR, /*!< Set PHY address */ ETH_CMD_G_SPEED, /*!< Get Speed */ ETH_CMD_S_PROMISCUOUS, /*!< Set promiscuous mode */ + ETH_CMD_S_FLOW_CTRL, /*!< Set flow control */ } esp_eth_io_cmd_t; /** diff --git a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_mac.h b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_mac.h index 7262bb0b..f12c66ae 100644 --- a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_mac.h +++ b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_mac.h @@ -13,10 +13,6 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include #include "esp_eth_com.h" #include "sdkconfig.h" @@ -24,6 +20,10 @@ extern "C" { #include "driver/spi_master.h" #endif +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Ethernet MAC * @@ -252,6 +252,31 @@ struct esp_eth_mac_s { */ esp_err_t (*set_promiscuous)(esp_eth_mac_t *mac, bool enable); + /** + * @brief Enable flow control on MAC layer or not + * + * @param[in] mac: Ethernet MAC instance + * @param[in] enable: set true to enable flow control; set false to disable flow control + * + * @return + * - ESP_OK: set flow control successfully + * - ESP_FAIL: set flow control failed because some error occurred + * + */ + esp_err_t (*enable_flow_ctrl)(esp_eth_mac_t *mac, bool enable); + + /** + * @brief Set the PAUSE ability of peer node + * + * @param[in] mac: Ethernet MAC instance + * @param[in] ability: zero indicates that pause function is supported by link partner; non-zero indicates that pause function is not supported by link partner + * + * @return + * - ESP_OK: set peer pause ability successfully + * - ESP_FAIL: set peer pause ability failed because some error occurred + */ + esp_err_t (*set_peer_pause_ability)(esp_eth_mac_t *mac, uint32_t ability); + /** * @brief Free memory of Ethernet MAC * diff --git a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_netif_glue.h b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_netif_glue.h index 25bc1cff..5e88b5ba 100644 --- a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_netif_glue.h +++ b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_netif_glue.h @@ -13,12 +13,12 @@ // limitations under the License. #pragma once +#include "esp_eth.h" + #ifdef __cplusplus extern "C" { #endif -#include "esp_eth.h" - /** * @brief Create a netif glue for Ethernet driver * @note netif glue is used to attach io driver to TCP/IP netif diff --git a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_phy.h b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_phy.h index b3aa39b4..cda3e777 100644 --- a/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_phy.h +++ b/tools/sdk/esp32s2/include/esp_eth/include/esp_eth_phy.h @@ -13,14 +13,14 @@ // limitations under the License. #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include #include "esp_eth_com.h" #include "sdkconfig.h" +#ifdef __cplusplus +extern "C" { +#endif + #define ESP_ETH_PHY_ADDR_AUTO (-1) /** @@ -160,6 +160,19 @@ struct esp_eth_phy_s { */ esp_err_t (*get_addr)(esp_eth_phy_t *phy, uint32_t *addr); + /** + * @brief Advertise pause function supported by MAC layer + * + * @param[in] phy: Ethernet PHY instance + * @param[out] addr: Pause ability + * + * @return + * - ESP_OK: Advertise pause ability successfully + * - ESP_ERR_INVALID_ARG: Advertise pause ability failed because of invalid argument + * + */ + esp_err_t (*advertise_pause_ability)(esp_eth_phy_t *phy, uint32_t ability); + /** * @brief Free memory of Ethernet PHY instance * diff --git a/tools/sdk/esp32s2/include/esp_eth/include/eth_phy_regs_struct.h b/tools/sdk/esp32s2/include/esp_eth/include/eth_phy_regs_struct.h index 023ccf2a..e725333e 100644 --- a/tools/sdk/esp32s2/include/esp_eth/include/eth_phy_regs_struct.h +++ b/tools/sdk/esp32s2/include/esp_eth/include/eth_phy_regs_struct.h @@ -13,12 +13,12 @@ // limitations under the License. #pragma once +#include + #ifdef __cplusplus extern "C" { #endif -#include - /******************Basic PHY Registers*******************/ /** diff --git a/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h b/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h index 3ad04b49..a942426a 100644 --- a/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h +++ b/tools/sdk/esp32s2/include/esp_http_client/include/esp_http_client.h @@ -524,6 +524,21 @@ bool esp_http_client_is_complete_data_received(esp_http_client_handle_t client); int esp_http_client_read_response(esp_http_client_handle_t client, char *buffer, int len); +/** + * @brief Process all remaining response data + * This uses an internal buffer to repeatedly receive, parse, and discard response data until complete data is processed. + * As no additional user-supplied buffer is required, this may be preferrable to `esp_http_client_read_response` in situations where the content of the response may be ignored. + * + * @param[in] client The esp_http_client handle + * @param len Length of data discarded + * + * @return + * - ESP_OK If successful, len will have discarded length + * - ESP_FAIL If failed to read response + * - ESP_ERR_INVALID_ARG If the client is NULL + */ +int esp_http_client_flush_response(esp_http_client_handle_t client, int *len); + /** * @brief Get URL from client * diff --git a/tools/sdk/esp32s2/include/esp_http_server/include/esp_http_server.h b/tools/sdk/esp32s2/include/esp_http_server/include/esp_http_server.h index 0d936de8..7372003d 100644 --- a/tools/sdk/esp32s2/include/esp_http_server/include/esp_http_server.h +++ b/tools/sdk/esp32s2/include/esp_http_server/include/esp_http_server.h @@ -406,6 +406,12 @@ typedef struct httpd_uri { * If this flag is true, then method must be HTTP_GET. Otherwise the handshake will not be handled. */ bool is_websocket; + + /** + * Flag indicating that control frames (PING, PONG, CLOSE) are also passed to the handler + * This is used if a custom processing of the control frames is needed + */ + bool handle_ws_control_frames; #endif } httpd_uri_t; @@ -1466,6 +1472,20 @@ esp_err_t httpd_sess_trigger_close(httpd_handle_t handle, int sockfd); */ esp_err_t httpd_sess_update_lru_counter(httpd_handle_t handle, int sockfd); +/** + * @brief Returns list of current socket descriptors of active sessions + * + * @param[in] handle Handle to server returned by httpd_start + * @param[in,out] fds In: Number of fds allocated in the supplied structure client_fds + * Out: Number of valid client fds returned in client_fds, + * @param[out] client_fds Array of client fds + * + * @return + * - ESP_OK : Successfully retrieved session list + * - ESP_ERR_INVALID_ARG : Wrong arguments or list is longer than allocated + */ +esp_err_t httpd_get_client_list(httpd_handle_t handle, size_t *fds, int *client_fds); + /** End of Session * @} */ @@ -1526,6 +1546,15 @@ typedef enum { HTTPD_WS_TYPE_PONG = 0xA } httpd_ws_type_t; +/** + * @brief Enum for client info description + */ +typedef enum { + HTTPD_WS_CLIENT_INVALID = 0x0, + HTTPD_WS_CLIENT_HTTP = 0x1, + HTTPD_WS_CLIENT_WEBSOCKET = 0x2, +} httpd_ws_client_info_t; + /** * @brief WebSocket frame format */ @@ -1586,6 +1615,19 @@ esp_err_t httpd_ws_send_frame(httpd_req_t *req, httpd_ws_frame_t *pkt); */ esp_err_t httpd_ws_send_frame_async(httpd_handle_t hd, int fd, httpd_ws_frame_t *frame); +/** + * @brief Checks the supplied socket descriptor if it belongs to any active client + * of this server instance and if the websoket protocol is active + * + * @param[in] hd Server instance data + * @param[in] fd Socket descriptor + * @return + * - HTTPD_WS_CLIENT_INVALID : This fd is not a client of this httpd + * - HTTPD_WS_CLIENT_HTTP : This fd is an active client, protocol is not WS + * - HTTPD_WS_CLIENT_WEBSOCKET : This fd is an active client, protocol is WS + */ +httpd_ws_client_info_t httpd_ws_get_fd_info(httpd_handle_t hd, int fd); + #endif /* CONFIG_HTTPD_WS_SUPPORT */ /** End of WebSocket related stuff * @} diff --git a/tools/sdk/esp32s2/include/esp_https_ota/include/esp_https_ota.h b/tools/sdk/esp32s2/include/esp_https_ota/include/esp_https_ota.h index 71183c19..b88fdfaa 100644 --- a/tools/sdk/esp32s2/include/esp_https_ota/include/esp_https_ota.h +++ b/tools/sdk/esp32s2/include/esp_https_ota/include/esp_https_ota.h @@ -22,12 +22,15 @@ extern "C" { #endif typedef void *esp_https_ota_handle_t; +typedef esp_err_t(*http_client_init_cb_t)(esp_http_client_handle_t); /** * @brief ESP HTTPS OTA configuration */ typedef struct { const esp_http_client_config_t *http_config; /*!< ESP HTTP client configuration */ + http_client_init_cb_t http_client_init_cb; /*!< Callback after ESP HTTP client is initialised */ + bool bulk_flash_erase; /*!< Erase entire flash partition during initialization. By default flash partition is erased during write operation and in chunk of 4K sector size */ } esp_https_ota_config_t; #define ESP_ERR_HTTPS_OTA_BASE (0x9000) diff --git a/tools/sdk/esp32s2/include/esp_websocket_client/include/esp_websocket_client.h b/tools/sdk/esp32s2/include/esp_websocket_client/include/esp_websocket_client.h index 5a0e52e0..8bfb2ce2 100644 --- a/tools/sdk/esp32s2/include/esp_websocket_client/include/esp_websocket_client.h +++ b/tools/sdk/esp32s2/include/esp_websocket_client/include/esp_websocket_client.h @@ -40,6 +40,7 @@ typedef enum { WEBSOCKET_EVENT_CONNECTED, /*!< Once the Websocket has been connected to the server, no data exchange has been performed */ WEBSOCKET_EVENT_DISCONNECTED, /*!< The connection has been disconnected */ WEBSOCKET_EVENT_DATA, /*!< When receiving data from the server, possibly multiple portions of the packet */ + WEBSOCKET_EVENT_CLOSED, /*!< The connection has been closed cleanly */ WEBSOCKET_EVENT_MAX } esp_websocket_event_id_t; @@ -125,7 +126,14 @@ esp_err_t esp_websocket_client_set_uri(esp_websocket_client_handle_t client, con esp_err_t esp_websocket_client_start(esp_websocket_client_handle_t client); /** - * @brief Close the WebSocket connection + * @brief Stops the WebSocket connection without websocket closing handshake + * + * This API stops ws client and closes TCP connection directly without sending + * close frames. It is a good practice to close the connection in a clean way + * using esp_websocket_client_close(). + * + * Notes: + * - Cannot be called from the websocket event handler * * @param[in] client The client * @@ -139,6 +147,9 @@ esp_err_t esp_websocket_client_stop(esp_websocket_client_handle_t client); * It is the opposite of the esp_websocket_client_init function and must be called with the same handle as input that a esp_websocket_client_init call returned. * This might close all connections this handle has used. * + * Notes: + * - Cannot be called from the websocket event handler + * * @param[in] client The client * * @return esp_err_t @@ -187,6 +198,42 @@ int esp_websocket_client_send_bin(esp_websocket_client_handle_t client, const ch */ int esp_websocket_client_send_text(esp_websocket_client_handle_t client, const char *data, int len, TickType_t timeout); +/** + * @brief Close the WebSocket connection in a clean way + * + * Sequence of clean close initiated by client: + * * Client sends CLOSE frame + * * Client waits until server echos the CLOSE frame + * * Client waits until server closes the connection + * * Client is stopped the same way as by the `esp_websocket_client_stop()` + * + * Notes: + * - Cannot be called from the websocket event handler + * + * @param[in] client The client + * @param[in] timeout Timeout in RTOS ticks for waiting + * + * @return esp_err_t + */ +esp_err_t esp_websocket_client_close(esp_websocket_client_handle_t client, TickType_t timeout); + +/** + * @brief Close the WebSocket connection in a clean way with custom code/data + * Closing sequence is the same as for esp_websocket_client_close() + * + * Notes: + * - Cannot be called from the websocket event handler + * + * @param[in] client The client + * @param[in] code Close status code as defined in RFC6455 section-7.4 + * @param[in] data Additional data to closing message + * @param[in] len The length of the additional data + * @param[in] timeout Timeout in RTOS ticks for waiting + * + * @return esp_err_t + */ +esp_err_t esp_websocket_client_close_with_code(esp_websocket_client_handle_t client, int code, const char *data, int len, TickType_t timeout); + /** * @brief Check the WebSocket client connection state * diff --git a/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi.h b/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi.h index 04a306fb..b85d60ee 100644 --- a/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi.h +++ b/tools/sdk/esp32s2/include/esp_wifi/include/esp_private/wifi.h @@ -53,7 +53,8 @@ typedef struct { * */ typedef enum { - WIFI_LOG_ERROR = 0, /*enabled by default*/ + WIFI_LOG_NONE = 0, + WIFI_LOG_ERROR , /*enabled by default*/ WIFI_LOG_WARNING, /*enabled by default*/ WIFI_LOG_INFO, /*enabled by default*/ WIFI_LOG_DEBUG, /*can be set in menuconfig*/ diff --git a/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_crypto_types.h b/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_crypto_types.h index 47620802..cda53946 100644 --- a/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_crypto_types.h +++ b/tools/sdk/esp32s2/include/esp_wifi/include/esp_wifi_crypto_types.h @@ -336,10 +336,12 @@ typedef int (*esp_omac1_aes_128_t)(const uint8_t *key, const uint8_t *data, size * @data: Pointer to encrypted data buffer * @data_len: Encrypted data length in bytes * @decrypted_len: Length of decrypted data + * @espnow_pkt: Indicates if it's an ESPNOW packet * Returns: Pointer to decrypted data on success, NULL on failure */ typedef uint8_t * (*esp_ccmp_decrypt_t)(const uint8_t *tk, const uint8_t *ieee80211_hdr, - const uint8_t *data, size_t data_len, size_t *decrypted_len); + const uint8_t *data, size_t data_len, + size_t *decrypted_len, bool espnow_pkt); /** * @brief Encrypt data using CCMP (Counter Mode CBC-MAC Protocol OR diff --git a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_master.h b/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_master.h index bb7dc7a0..621348e1 100644 --- a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_master.h +++ b/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_master.h @@ -136,7 +136,6 @@ esp_err_t mbc_master_init(mb_port_type_t port_type, void** handler); * @brief Initialize Modbus Master controller interface handle * * @param[in] handler - pointer to master data structure - * @return None */ void mbc_master_init_iface(void* handler); diff --git a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_slave.h b/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_slave.h index ed6a12ed..fa6a53bc 100644 --- a/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_slave.h +++ b/tools/sdk/esp32s2/include/freemodbus/common/include/esp_modbus_slave.h @@ -78,7 +78,6 @@ esp_err_t mbc_slave_init(mb_port_type_t port_type, void** handler); * @brief Initialize Modbus Slave controller interface handle * * @param[in] handler - pointer to slave interface data structure - * @return None */ void mbc_slave_init_iface(void* handler); diff --git a/tools/sdk/esp32s2/include/freertos/xtensa/include/freertos/portmacro.h b/tools/sdk/esp32s2/include/freertos/xtensa/include/freertos/portmacro.h index 9c00fa16..e4d2c057 100644 --- a/tools/sdk/esp32s2/include/freertos/xtensa/include/freertos/portmacro.h +++ b/tools/sdk/esp32s2/include/freertos/xtensa/include/freertos/portmacro.h @@ -75,7 +75,7 @@ extern "C" { #include #include #include - +#include #include #include #include /* required for XSHAL_CLIB */ @@ -321,13 +321,27 @@ static inline void __attribute__((always_inline)) uxPortCompareSet(volatile uint #define portALT_GET_RUN_TIME_COUNTER_VALUE(x) x = (uint32_t)esp_timer_get_time() #endif - -/* Kernel utilities. */ void vPortYield( void ); +void vPortEvaluateYieldFromISR(int argc, ...); void _frxt_setup_switch( void ); -#define portYIELD() vPortYield() -#define portYIELD_FROM_ISR() {traceISR_EXIT_TO_SCHEDULER(); _frxt_setup_switch();} +/** + * Macro to count number of arguments of a __VA_ARGS__ used to support portYIELD_FROM_ISR with, + * or without arguments. + */ +#define portGET_ARGUMENT_COUNT(...) portGET_ARGUMENT_COUNT_INNER(0, ##__VA_ARGS__,1,0) +#define portGET_ARGUMENT_COUNT_INNER(zero, one, count, ...) count +_Static_assert(portGET_ARGUMENT_COUNT() == 0, "portGET_ARGUMENT_COUNT() result does not match for 0 arguments"); +_Static_assert(portGET_ARGUMENT_COUNT(1) == 1, "portGET_ARGUMENT_COUNT() result does not match for 1 argument"); + +#define portYIELD() vPortYield() + +/** + * @note The macro below could be used when passing a single argument, or without any argument, + * it was developed to support both usages of portYIELD inside of an ISR. Any other usage form + * might result in undesired behaviour + */ +#define portYIELD_FROM_ISR(...) vPortEvaluateYieldFromISR(portGET_ARGUMENT_COUNT(__VA_ARGS__), ##__VA_ARGS__) /* Yielding within an API call (when interrupts are off), means the yield should be delayed until interrupts are re-enabled. diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/adc_hal.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/adc_hal.h similarity index 95% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/adc_hal.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/adc_hal.h index a533ec18..376c4fab 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/adc_hal.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/adc_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for ADC (esp32s2 specific part) @@ -34,23 +34,6 @@ extern "C" { /*--------------------------------------------------------------- Digital controller setting ---------------------------------------------------------------*/ -/** - * Digital controller initialization. - */ -void adc_hal_digi_init(void); - -/** - * Digital controller deinitialization. - */ -void adc_hal_digi_deinit(void); - -/** - * Setting the digital controller. - * - * @param cfg Pointer to digital controller paramter. - */ -void adc_hal_digi_controller_config(const adc_digi_config_t *cfg); - /** * ADC Digital controller output data invert or not. * @@ -83,6 +66,9 @@ void adc_hal_digi_disable(void); * Enable clock and select clock source for ADC digital controller. * Expression: controller_clk = (`APLL` or `APB`) / (div_num + div_a / div_b + 1). * + * @note ADC and DAC digital controller share the same frequency divider. + * Please set a reasonable frequency division factor to meet the sampling frequency of the ADC and the output frequency of the DAC. + * * @param clk Refer to ``adc_digi_clk_t``. */ void adc_hal_digi_clk_config(const adc_digi_clk_t *clk); diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/adc_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/adc_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/adc_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/adc_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/clk_gate_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/clk_gate_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/clk_gate_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/clk_gate_ll.h index 868be82b..97241711 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/clk_gate_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/clk_gate_ll.h @@ -274,7 +274,7 @@ static inline void periph_ll_reset(periph_module_t periph) static inline bool IRAM_ATTR periph_ll_periph_enabled(periph_module_t periph) { - return DPORT_REG_GET_BIT(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false)) != 0 && + return DPORT_REG_GET_BIT(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false)) == 0 && DPORT_REG_GET_BIT(periph_ll_get_clk_en_reg(periph), periph_ll_get_clk_en_mask(periph)) != 0; } diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/cp_dma_hal.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/cp_dma_hal.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/cp_dma_hal.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/cp_dma_hal.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/cp_dma_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/cp_dma_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/cp_dma_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/cp_dma_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/cpu_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/cpu_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/cpu_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/cpu_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/dac_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/dac_ll.h similarity index 74% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/dac_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/dac_ll.h index 469c8ee2..c84ff709 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/dac_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/dac_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once @@ -23,15 +23,16 @@ #include #include "soc/dac_periph.h" #include "hal/dac_types.h" +#include "soc/apb_saradc_struct.h" +#include "soc/apb_saradc_reg.h" #ifdef __cplusplus extern "C" { #endif /*--------------------------------------------------------------- - RTC controller setting + DAC common setting ---------------------------------------------------------------*/ - /** * Power on dac module and start output voltage. * @@ -59,6 +60,9 @@ static inline void dac_ll_power_down(dac_channel_t channel) } } +/*--------------------------------------------------------------- + RTC controller setting +---------------------------------------------------------------*/ /** * Output voltage with value (8 bit). * @@ -204,23 +208,79 @@ static inline void dac_ll_cw_set_dc_offset(dac_channel_t channel, int8_t offset) /************************************/ /* DAC DMA API's */ /************************************/ + /** - * Enable DAC output data from I2S DMA. - * I2S_CLK connect to DAC_CLK, I2S_DATA_OUT connect to DAC_DATA. + * Enable/disable invert the DAC digital controller clock signal. + * + * @param enable true or false. */ -static inline void dac_ll_dma_enable(void) +static inline void dac_ll_digi_clk_inv(bool enable) { - SENS.sar_dac_ctrl1.dac_dig_force = 1; - SENS.sar_dac_ctrl1.dac_clk_inv = 1; + SENS.sar_dac_ctrl1.dac_clk_inv = enable; } /** - * Disable DAC output data from I2S DMA. + * Enable/disable DAC-DMA mode for dac digital controller. */ -static inline void dac_ll_dma_disable(void) +static inline void dac_ll_digi_enable_dma(bool enable) { - SENS.sar_dac_ctrl1.dac_dig_force = 0; - SENS.sar_dac_ctrl1.dac_clk_inv = 0; + SENS.sar_dac_ctrl1.dac_dig_force = enable; + APB_SARADC.apb_dac_ctrl.apb_dac_trans = enable; +} + +/** + * Sets the number of interval clock cycles for the digital controller to trigger the DAC output. + * Expression: `dac_output_freq` = `controller_clk` / interval. + * + * @note The clocks of the DAC digital controller use the ADC digital controller clock divider. + * + * @param cycle The number of clock cycles for the trigger output interval. The unit is the divided clock. + */ +static inline void dac_ll_digi_set_trigger_interval(uint32_t cycle) +{ + APB_SARADC.apb_dac_ctrl.dac_timer_target = cycle; +} + +/** + * Enable/disable DAC digital controller to trigger the DAC output. + * + * @param enable true or false. + */ +static inline void dac_ll_digi_trigger_output(bool enable) +{ + APB_SARADC.apb_dac_ctrl.dac_timer_en = enable; +} + +/** + * Set DAC conversion mode for digital controller. + * + * @param mode Conversion mode select. See ``dac_digi_convert_mode_t``. + */ +static inline void dac_ll_digi_set_convert_mode(dac_digi_convert_mode_t mode) +{ + if (mode == DAC_CONV_NORMAL) { + APB_SARADC.apb_dac_ctrl.apb_dac_alter_mode = 0; + } else { + APB_SARADC.apb_dac_ctrl.apb_dac_alter_mode = 1; + } +} + +/** + * Reset FIFO of DAC digital controller. + */ +static inline void dac_ll_digi_fifo_reset(void) +{ + APB_SARADC.apb_dac_ctrl.dac_reset_fifo = 1; + APB_SARADC.apb_dac_ctrl.dac_reset_fifo = 0; +} + +/** + * Reset DAC digital controller. + */ +static inline void dac_ll_digi_reset(void) +{ + APB_SARADC.apb_dac_ctrl.apb_dac_rst = 1; + APB_SARADC.apb_dac_ctrl.apb_dac_rst = 0; } #ifdef __cplusplus diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/gpio_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpio_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/gpio_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpio_ll.h index 3f83f77b..9fa745d8 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/gpio_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpio_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32-S2 GPIO register operations diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/gpspi_flash_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpspi_flash_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/gpspi_flash_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpspi_flash_ll.h index 2db7e6fc..f9cf4e26 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/gpspi_flash_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/gpspi_flash_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for SPI Flash diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/i2c_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2c_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/i2c_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2c_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/i2s_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2s_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/i2s_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2s_ll.h index 4fe18da2..3e0a7eeb 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/i2s_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/i2s_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32-S2 I2S register operations diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/ledc_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/ledc_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/ledc_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/ledc_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/memprot_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/memprot_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/memprot_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/memprot_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/mpu_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mpu_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/mpu_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mpu_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/mwdt_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mwdt_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/mwdt_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/mwdt_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/pcnt_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/pcnt_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/pcnt_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/pcnt_ll.h index 41fad9be..73cecac8 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/pcnt_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/pcnt_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32-S2 PCNT register operations diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rmt_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rmt_ll.h similarity index 97% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rmt_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rmt_ll.h index 322f2a9a..bda304f5 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rmt_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rmt_ll.h @@ -334,8 +334,12 @@ static inline uint32_t rmt_ll_get_rx_thres_interrupt_status(rmt_dev_t *dev) static inline void rmt_ll_set_tx_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) { - dev->carrier_duty_ch[channel].high = high_ticks; - dev->carrier_duty_ch[channel].low = 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) + // We take care of the "read-modify-write" procedure by ourselves. + typeof(dev->carrier_duty_ch[0]) reg; + reg.high = high_ticks; + reg.low = low_ticks; + dev->carrier_duty_ch[channel].val = reg.val; } static inline void rmt_ll_set_rx_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t channel, uint32_t high_ticks, uint32_t low_ticks) diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rtc_cntl_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rtc_cntl_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rtc_cntl_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rtc_cntl_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rtc_io_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rtc_io_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rtc_io_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rtc_io_ll.h index c687915e..82b67ea8 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rtc_io_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rtc_io_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rwdt_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rwdt_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/rwdt_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/rwdt_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/sigmadelta_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/sigmadelta_ll.h similarity index 98% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/sigmadelta_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/sigmadelta_ll.h index 71a1190e..1ecbf441 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/sigmadelta_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/sigmadelta_ll.h @@ -14,7 +14,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32-S2 SIGMADELTA register operations diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/soc_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/soc_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/soc_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/soc_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spi_flash_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spi_flash_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spi_flash_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spi_flash_ll.h index d31bf2a5..8cb6cf7f 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spi_flash_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spi_flash_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for SPI Flash diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spi_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spi_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spi_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spi_ll.h index cc3a3ded..ca8f685c 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spi_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spi_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32-S2 SPI register operations diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spimem_flash_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spimem_flash_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spimem_flash_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spimem_flash_ll.h index d5a0e26a..ced88ab2 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/spimem_flash_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/spimem_flash_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for SPI Flash diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/systimer_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/systimer_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/systimer_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/systimer_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/timer_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/timer_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/timer_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/timer_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/touch_sensor_hal.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/touch_sensor_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/touch_sensor_hal.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/touch_sensor_hal.h index 4c984a35..f755924d 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/touch_sensor_hal.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/touch_sensor_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for touch sensor (esp32s2 specific part) diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/touch_sensor_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/touch_sensor_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/touch_sensor_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/touch_sensor_ll.h index 76a64dcf..a287a07c 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/touch_sensor_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/touch_sensor_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for Touch Sensor diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/twai_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/twai_ll.h similarity index 94% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/twai_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/twai_ll.h index 2c05b4f5..f3c03d98 100644 --- a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/twai_ll.h +++ b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/twai_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The ll is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The Lowlevel layer for TWAI @@ -33,23 +33,22 @@ extern "C" { /* ------------------------- Defines and Typedefs --------------------------- */ -#define TWAI_LL_STATUS_RBS (0x1 << 0) -#define TWAI_LL_STATUS_DOS (0x1 << 1) -#define TWAI_LL_STATUS_TBS (0x1 << 2) -#define TWAI_LL_STATUS_TCS (0x1 << 3) -#define TWAI_LL_STATUS_RS (0x1 << 4) -#define TWAI_LL_STATUS_TS (0x1 << 5) -#define TWAI_LL_STATUS_ES (0x1 << 6) -#define TWAI_LL_STATUS_BS (0x1 << 7) -//Todo: Add Miss status support +#define TWAI_LL_STATUS_RBS (0x1 << 0) //Receive Buffer Status +#define TWAI_LL_STATUS_DOS (0x1 << 1) //Data Overrun Status +#define TWAI_LL_STATUS_TBS (0x1 << 2) //Transmit Buffer Status +#define TWAI_LL_STATUS_TCS (0x1 << 3) //Transmission Complete Status +#define TWAI_LL_STATUS_RS (0x1 << 4) //Receive Status +#define TWAI_LL_STATUS_TS (0x1 << 5) //Transmit Status +#define TWAI_LL_STATUS_ES (0x1 << 6) //Error Status +#define TWAI_LL_STATUS_BS (0x1 << 7) //Bus Status -#define TWAI_LL_INTR_RI (0x1 << 0) -#define TWAI_LL_INTR_TI (0x1 << 1) -#define TWAI_LL_INTR_EI (0x1 << 2) +#define TWAI_LL_INTR_RI (0x1 << 0) //Receive Interrupt +#define TWAI_LL_INTR_TI (0x1 << 1) //Transmit Interrupt +#define TWAI_LL_INTR_EI (0x1 << 2) //Error Interrupt //Data overrun interrupt not supported in SW due to HW peculiarities -#define TWAI_LL_INTR_EPI (0x1 << 5) -#define TWAI_LL_INTR_ALI (0x1 << 6) -#define TWAI_LL_INTR_BEI (0x1 << 7) +#define TWAI_LL_INTR_EPI (0x1 << 5) //Error Passive Interrupt +#define TWAI_LL_INTR_ALI (0x1 << 6) //Arbitration Lost Interrupt +#define TWAI_LL_INTR_BEI (0x1 << 7) //Bus Error Interrupt /* * The following frame structure has an NEARLY identical bit field layout to @@ -95,14 +94,12 @@ _Static_assert(sizeof(twai_ll_frame_buffer_t) == 13, "TX/RX buffer type should b * in order to write the majority of configuration registers. * * @param hw Start address of the TWAI registers - * @return true if reset mode was entered successfully * * @note Reset mode is automatically entered on BUS OFF condition */ -static inline bool twai_ll_enter_reset_mode(twai_dev_t *hw) +static inline void twai_ll_enter_reset_mode(twai_dev_t *hw) { hw->mode_reg.rm = 1; - return hw->mode_reg.rm; } /** @@ -113,14 +110,12 @@ static inline bool twai_ll_enter_reset_mode(twai_dev_t *hw) * operating mode. * * @param hw Start address of the TWAI registers - * @return true if reset mode was exit successfully * * @note Reset mode must be exit to initiate BUS OFF recovery */ -static inline bool twai_ll_exit_reset_mode(twai_dev_t *hw) +static inline void twai_ll_exit_reset_mode(twai_dev_t *hw) { hw->mode_reg.rm = 0; - return !(hw->mode_reg.rm); } /** @@ -135,10 +130,10 @@ static inline bool twai_ll_is_in_reset_mode(twai_dev_t *hw) /** * @brief Set operating mode of TWAI controller - * + * * @param hw Start address of the TWAI registers * @param mode Operating mode - * + * * @note Must be called in reset mode */ static inline void twai_ll_set_mode(twai_dev_t *hw, twai_mode_t mode) @@ -307,8 +302,6 @@ static inline bool twai_ll_is_last_tx_successful(twai_dev_t *hw) return hw->status_reg.tcs; } -//Todo: Add stand alone status bit check functions when necessary - /* -------------------------- Interrupt Register ---------------------------- */ /** @@ -376,7 +369,6 @@ static inline void twai_ll_set_bus_timing(twai_dev_t *hw, uint32_t brp, uint32_t static inline void twai_ll_clear_arb_lost_cap(twai_dev_t *hw) { (void)hw->arbitration_lost_captue_reg.val; - //Todo: Decode ALC register } /* ----------------------------- ECC Register ------------------------------- */ @@ -391,7 +383,6 @@ static inline void twai_ll_clear_arb_lost_cap(twai_dev_t *hw) static inline void twai_ll_clear_err_code_cap(twai_dev_t *hw) { (void)hw->error_code_capture_reg.val; - //Todo: Decode error code capture } /* ----------------------------- EWL Register ------------------------------- */ @@ -539,7 +530,7 @@ static inline void twai_ll_get_rx_buffer(twai_dev_t *hw, twai_ll_frame_buffer_t * This function encodes a message into a frame structure. The frame structure * has an identical layout to the TX buffer, allowing the frame structure to be * directly copied into TX buffer. - * + * * @param[in] 11bit or 29bit ID * @param[in] dlc Data length code * @param[in] data Pointer to an 8 byte array containing data. NULL if no data @@ -650,8 +641,8 @@ static inline uint32_t twai_ll_get_rx_msg_count(twai_dev_t *hw) * @brief Set CLKOUT Divider and enable/disable * * Configure CLKOUT. CLKOUT is a pre-scaled version of APB CLK. Divider can be - * 1, or any even number from 2 to 490. Set the divider to 0 to disable CLKOUT. - * + * 1, or any even number from 2 to 490. Set the divider to 0 to disable CLKOUT. + * * @param hw Start address of the TWAI registers * @param divider Divider for CLKOUT (any even number from 2 to 490). Set to 0 to disable CLKOUT */ diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/uart_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/uart_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/uart_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/uart_ll.h diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/usb_ll.h b/tools/sdk/esp32s2/include/hal/esp32s2/include/hal/usb_ll.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/usb_ll.h rename to tools/sdk/esp32s2/include/hal/esp32s2/include/hal/usb_ll.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/adc_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/adc_hal.h similarity index 95% rename from tools/sdk/esp32s2/include/soc/include/hal/adc_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/adc_hal.h index e497149e..3a0a5a5c 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/adc_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/adc_hal.h @@ -185,6 +185,22 @@ int adc_hal_convert(adc_ll_num_t adc_n, int channel, int *value); /*--------------------------------------------------------------- Digital controller setting ---------------------------------------------------------------*/ +/** + * Digital controller initialization. + */ +void adc_hal_digi_init(void); + +/** + * Digital controller deinitialization. + */ +void adc_hal_digi_deinit(void); + +/** + * Setting the digital controller. + * + * @param cfg Pointer to digital controller paramter. + */ +void adc_hal_digi_controller_config(const adc_digi_config_t *cfg); /** * Reset the pattern table pointer, then take the measurement rule from table header in next measurement. diff --git a/tools/sdk/esp32/include/soc/include/hal/adc_types.h b/tools/sdk/esp32s2/include/hal/include/hal/adc_types.h similarity index 69% rename from tools/sdk/esp32/include/soc/include/hal/adc_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/adc_types.h index 5f3d5a13..6606cf9d 100644 --- a/tools/sdk/esp32/include/soc/include/hal/adc_types.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/adc_types.h @@ -19,9 +19,9 @@ #include "soc/adc_caps.h" /** - * @brief ADC units selected handle. + * @brief ADC unit enumeration. * - * @note For ADC digital controller(DMA mode), ESP32 don't support `ADC_UNIT_2`, `ADC_UNIT_BOTH`, `ADC_UNIT_ALTER`. + * @note For ADC digital controller (DMA mode), ESP32 doesn't support `ADC_UNIT_2`, `ADC_UNIT_BOTH`, `ADC_UNIT_ALTER`. */ typedef enum { ADC_UNIT_1 = 1, /*!< SAR ADC 1. */ @@ -34,7 +34,7 @@ typedef enum { /** * @brief ADC channels handle. See ``adc1_channel_t``, ``adc2_channel_t``. * - * @note For ESP32 ADC1, don't support `ADC_CHANNEL_8`, `ADC_CHANNEL_9`. See ``adc1_channel_t``. + * @note For ESP32 ADC1, don't use `ADC_CHANNEL_8`, `ADC_CHANNEL_9`. See ``adc1_channel_t``. */ typedef enum { ADC_CHANNEL_0 = 0, /*!< ADC channel */ @@ -54,18 +54,24 @@ typedef enum { * @brief ADC attenuation parameter. Different parameters determine the range of the ADC. See ``adc1_config_channel_atten``. */ typedef enum { - ADC_ATTEN_DB_0 = 0, /*! ADC_CHANNEL_MAX), The data is invalid. */ - } type1; /*! ADC_CHANNEL_MAX), The data is invalid. */ - uint16_t unit: 1; /*! ADC_CHANNEL_MAX), The data is invalid. */ + } type1; /*! ADC_CHANNEL_MAX), The data is invalid. */ + uint16_t unit: 1; /*!dev) /** - * @brief Force unhold digital and rtc gpio pad. - * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. - * + * @brief Force unhold digital and rtc gpio pad. + * @note GPIO force unhold, whether the chip in sleep mode or wakeup mode. + * * @param hal Context of the HAL layer * */ #define gpio_hal_force_unhold_all(hal) gpio_ll_force_unhold_all((hal)->dev) diff --git a/tools/sdk/esp32s2/include/soc/include/hal/gpio_types.h b/tools/sdk/esp32s2/include/hal/include/hal/gpio_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/gpio_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/gpio_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/hal_defs.h b/tools/sdk/esp32s2/include/hal/include/hal/hal_defs.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/hal_defs.h rename to tools/sdk/esp32s2/include/hal/include/hal/hal_defs.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/i2c_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/i2c_hal.h similarity index 96% rename from tools/sdk/esp32s2/include/soc/include/hal/i2c_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/i2c_hal.h index 5b148e02..9e38d358 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/i2c_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/i2c_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for I2C @@ -75,7 +75,7 @@ typedef struct { #define i2c_hal_trans_start(hal) i2c_ll_trans_start((hal)->dev) /** - * @brief Enable I2C master RX interrupt + * @brief Enable I2C master RX interrupt * * @param hal Context of the HAL layer * @@ -84,7 +84,7 @@ typedef struct { #define i2c_hal_enable_master_rx_it(hal) i2c_ll_master_enable_rx_it((hal)->dev) /** - * @brief Enable I2C master TX interrupt + * @brief Enable I2C master TX interrupt * * @param hal Context of the HAL layer * @@ -458,7 +458,7 @@ void i2c_hal_master_fsm_rst(i2c_hal_context_t *hal); void i2c_hal_master_clr_bus(i2c_hal_context_t *hal); /** - * @brief Enable I2C slave TX interrupt + * @brief Enable I2C slave TX interrupt * * @param hal Context of the HAL layer * @@ -467,7 +467,7 @@ void i2c_hal_master_clr_bus(i2c_hal_context_t *hal); void i2c_hal_enable_slave_tx_it(i2c_hal_context_t *hal); /** - * @brief Disable I2C slave TX interrupt + * @brief Disable I2C slave TX interrupt * * @param hal Context of the HAL layer * @@ -476,7 +476,7 @@ void i2c_hal_enable_slave_tx_it(i2c_hal_context_t *hal); void i2c_hal_disable_slave_tx_it(i2c_hal_context_t *hal); /** - * @brief Enable I2C slave RX interrupt + * @brief Enable I2C slave RX interrupt * * @param hal Context of the HAL layer * @@ -485,7 +485,7 @@ void i2c_hal_disable_slave_tx_it(i2c_hal_context_t *hal); void i2c_hal_enable_slave_rx_it(i2c_hal_context_t *hal); /** - * @brief Disable I2C slave RX interrupt + * @brief Disable I2C slave RX interrupt * * @param hal Context of the HAL layer * @@ -494,7 +494,7 @@ void i2c_hal_enable_slave_rx_it(i2c_hal_context_t *hal); void i2c_hal_disable_slave_rx_it(i2c_hal_context_t *hal); /** - * @brief I2C master handle tx interrupt event + * @brief I2C master handle tx interrupt event * * @param hal Context of the HAL layer * @param event Pointer to accept the interrupt event @@ -504,7 +504,7 @@ void i2c_hal_disable_slave_rx_it(i2c_hal_context_t *hal); void i2c_hal_master_handle_tx_event(i2c_hal_context_t *hal, i2c_intr_event_t *event); /** - * @brief I2C master handle rx interrupt event + * @brief I2C master handle rx interrupt event * * @param hal Context of the HAL layer * @param event Pointer to accept the interrupt event @@ -514,7 +514,7 @@ void i2c_hal_master_handle_tx_event(i2c_hal_context_t *hal, i2c_intr_event_t *ev void i2c_hal_master_handle_rx_event(i2c_hal_context_t *hal, i2c_intr_event_t *event); /** - * @brief I2C slave handle interrupt event + * @brief I2C slave handle interrupt event * * @param hal Context of the HAL layer * @param event Pointer to accept the interrupt event diff --git a/tools/sdk/esp32s2/include/soc/include/hal/i2c_types.h b/tools/sdk/esp32s2/include/hal/include/hal/i2c_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/i2c_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/i2c_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/i2s_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/i2s_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/i2s_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/i2s_hal.h index b3118fe8..cff02d98 100644 --- a/tools/sdk/esp32/include/soc/include/hal/i2s_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/i2s_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for I2S. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/i2s_types.h b/tools/sdk/esp32s2/include/hal/include/hal/i2s_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/i2s_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/i2s_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/ledc_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/ledc_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/ledc_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/ledc_hal.h index 967e8267..2afa5477 100644 --- a/tools/sdk/esp32/include/soc/include/hal/ledc_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/ledc_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for LEDC. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/ledc_types.h b/tools/sdk/esp32s2/include/hal/include/hal/ledc_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/ledc_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/ledc_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/mcpwm_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/mcpwm_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/mcpwm_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/mcpwm_hal.h index 3b3f051d..1d45b9da 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/mcpwm_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/mcpwm_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for MCPWM (common part) diff --git a/tools/sdk/esp32s2/include/soc/include/hal/mcpwm_types.h b/tools/sdk/esp32s2/include/hal/include/hal/mcpwm_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/mcpwm_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/mcpwm_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/mpu_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/mpu_hal.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/mpu_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/mpu_hal.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/mpu_types.h b/tools/sdk/esp32s2/include/hal/include/hal/mpu_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/mpu_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/mpu_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/pcnt_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/pcnt_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/pcnt_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/pcnt_hal.h index 2a14a0ae..2a5972d8 100644 --- a/tools/sdk/esp32/include/soc/include/hal/pcnt_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/pcnt_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for PCNT. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/pcnt_types.h b/tools/sdk/esp32s2/include/hal/include/hal/pcnt_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/pcnt_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/pcnt_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/rmt_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/rmt_hal.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/rmt_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/rmt_hal.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/rmt_types.h b/tools/sdk/esp32s2/include/hal/include/hal/rmt_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/rmt_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/rmt_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/rtc_io_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/rtc_io_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/rtc_io_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/rtc_io_hal.h index 8bf0d64c..81e29721 100644 --- a/tools/sdk/esp32/include/soc/include/hal/rtc_io_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/rtc_io_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for RTC IO master (common part) diff --git a/tools/sdk/esp32s2/include/soc/include/hal/rtc_io_types.h b/tools/sdk/esp32s2/include/hal/include/hal/rtc_io_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/rtc_io_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/rtc_io_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_hal.h index e95bf045..52975c5e 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SDIO slave (common part) diff --git a/tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_ll.h b/tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_ll.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_ll.h rename to tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_ll.h index 129f288c..e013f5f1 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_ll.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_ll.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The LL layer for ESP32 SDIO slave register operations diff --git a/tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_types.h b/tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/sdio_slave_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/sdio_slave_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/sigmadelta_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/sigmadelta_hal.h similarity index 98% rename from tools/sdk/esp32/include/soc/include/hal/sigmadelta_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/sigmadelta_hal.h index 55363fdc..58cb4c21 100644 --- a/tools/sdk/esp32/include/soc/include/hal/sigmadelta_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/sigmadelta_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SIGMADELTA. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/sigmadelta_types.h b/tools/sdk/esp32s2/include/hal/include/hal/sigmadelta_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/sigmadelta_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/sigmadelta_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/soc_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/soc_hal.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/soc_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/soc_hal.h diff --git a/tools/sdk/esp32/include/soc/include/hal/spi_flash_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_flash_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/spi_flash_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/spi_flash_hal.h index ffc1a22f..63062947 100644 --- a/tools/sdk/esp32/include/soc/include/hal/spi_flash_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/spi_flash_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The HAL is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SPI Flash (common part) diff --git a/tools/sdk/esp32s2/include/soc/include/hal/spi_flash_types.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_flash_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/spi_flash_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/spi_flash_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/spi_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_hal.h similarity index 97% rename from tools/sdk/esp32s2/include/soc/include/hal/spi_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/spi_hal.h index 2012433a..6f0aa024 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/spi_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/spi_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SPI master (common part) @@ -169,7 +169,7 @@ void spi_hal_fetch_result(const spi_hal_context_t *hal); * Utils * ---------------------------------------------------------*/ /** - * Get the configuration of clock and timing. The configuration will be used when ``spi_hal_setup_device``. + * Calculate the configuration of clock and timing. The configuration will be used when ``spi_hal_setup_device``. * * It is highly suggested to do this at initialization, since it takes long time. * @@ -185,7 +185,7 @@ void spi_hal_fetch_result(const spi_hal_context_t *hal); * * @return ESP_OK if desired is available, otherwise fail. */ -esp_err_t spi_hal_get_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf); +esp_err_t spi_hal_cal_clock_conf(const spi_hal_context_t *hal, int speed_hz, int duty_cycle, bool use_gpio, int input_delay_ns, int *out_freq, spi_hal_timing_conf_t *timing_conf); /** * Get the frequency actual used. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/spi_slave_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/spi_slave_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hal.h index 80e11137..f8acf2d9 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/spi_slave_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for SPI slave (common part) diff --git a/tools/sdk/esp32s2/include/soc/include/hal/spi_slave_hd_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hd_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/spi_slave_hd_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hd_hal.h index c9e3684d..6e13e2c2 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/spi_slave_hd_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/spi_slave_hd_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ /* diff --git a/tools/sdk/esp32s2/include/soc/include/hal/spi_types.h b/tools/sdk/esp32s2/include/hal/include/hal/spi_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/spi_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/spi_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/systimer_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/systimer_hal.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/systimer_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/systimer_hal.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/systimer_types.h b/tools/sdk/esp32s2/include/hal/include/hal/systimer_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/systimer_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/systimer_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/timer_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/timer_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/timer_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/timer_hal.h index bf9ebffc..f9188fe3 100644 --- a/tools/sdk/esp32/include/soc/include/hal/timer_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/timer_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for Timer Group. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/timer_types.h b/tools/sdk/esp32s2/include/hal/include/hal/timer_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/timer_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/timer_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/touch_sensor_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/touch_sensor_hal.h similarity index 99% rename from tools/sdk/esp32s2/include/soc/include/hal/touch_sensor_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/touch_sensor_hal.h index a2ad3694..98cdfc79 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/touch_sensor_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/touch_sensor_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for touch sensor (common part) diff --git a/tools/sdk/esp32s2/include/soc/include/hal/touch_sensor_types.h b/tools/sdk/esp32s2/include/hal/include/hal/touch_sensor_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/touch_sensor_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/touch_sensor_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/twai_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/twai_hal.h similarity index 71% rename from tools/sdk/esp32s2/include/soc/include/hal/twai_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/twai_hal.h index 592c0168..6ba44555 100644 --- a/tools/sdk/esp32s2/include/soc/include/hal/twai_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/twai_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once @@ -31,21 +31,33 @@ extern "C" { /* ------------------------- Defines and Typedefs --------------------------- */ +#define TWAI_HAL_SET_FLAG(var, flag) ((var) |= (flag)) +#define TWAI_HAL_RESET_FLAG(var, flag) ((var) &= ~(flag)) + +//HAL state flags +#define TWAI_HAL_STATE_FLAG_RUNNING (1 << 0) //Controller is active (not in reset mode) +#define TWAI_HAL_STATE_FLAG_RECOVERING (1 << 1) //Bus is undergoing bus recovery +#define TWAI_HAL_STATE_FLAG_ERR_WARN (1 << 2) //TEC or REC is >= error warning limit +#define TWAI_HAL_STATE_FLAG_ERR_PASSIVE (1 << 3) //TEC or REC is >= 128 +#define TWAI_HAL_STATE_FLAG_BUS_OFF (1 << 4) //Bus-off due to TEC >= 256 +#define TWAI_HAL_STATE_FLAG_TX_BUFF_OCCUPIED (1 << 5) //Transmit buffer is occupied + //Error active interrupt related -#define TWAI_HAL_EVENT_BUS_OFF (1 << 0) -#define TWAI_HAL_EVENT_BUS_RECOV_CPLT (1 << 1) -#define TWAI_HAL_EVENT_BUS_RECOV_PROGRESS (1 << 2) -#define TWAI_HAL_EVENT_ABOVE_EWL (1 << 3) -#define TWAI_HAL_EVENT_BELOW_EWL (1 << 4) -#define TWAI_HAL_EVENT_ERROR_PASSIVE (1 << 5) -#define TWAI_HAL_EVENT_ERROR_ACTIVE (1 << 6) -#define TWAI_HAL_EVENT_BUS_ERR (1 << 7) -#define TWAI_HAL_EVENT_ARB_LOST (1 << 8) -#define TWAI_HAL_EVENT_RX_BUFF_FRAME (1 << 9) -#define TWAI_HAL_EVENT_TX_BUFF_FREE (1 << 10) +#define TWAI_HAL_EVENT_BUS_OFF (1 << 0) +#define TWAI_HAL_EVENT_BUS_RECOV_CPLT (1 << 1) +#define TWAI_HAL_EVENT_BUS_RECOV_PROGRESS (1 << 2) +#define TWAI_HAL_EVENT_ABOVE_EWL (1 << 3) +#define TWAI_HAL_EVENT_BELOW_EWL (1 << 4) +#define TWAI_HAL_EVENT_ERROR_PASSIVE (1 << 5) +#define TWAI_HAL_EVENT_ERROR_ACTIVE (1 << 6) +#define TWAI_HAL_EVENT_BUS_ERR (1 << 7) +#define TWAI_HAL_EVENT_ARB_LOST (1 << 8) +#define TWAI_HAL_EVENT_RX_BUFF_FRAME (1 << 9) +#define TWAI_HAL_EVENT_TX_BUFF_FREE (1 << 10) typedef struct { twai_dev_t *dev; + uint32_t state_flags; } twai_hal_context_t; typedef twai_ll_frame_buffer_t twai_hal_frame_t; @@ -93,9 +105,8 @@ void twai_hal_configure(twai_hal_context_t *hal_ctx, const twai_timing_config_t * * @param hal_ctx Context of the HAL layer * @param mode Operating mode - * @return True if successfully started, false otherwise. */ -bool twai_hal_start(twai_hal_context_t *hal_ctx, twai_mode_t mode); +void twai_hal_start(twai_hal_context_t *hal_ctx, twai_mode_t mode); /** * @brief Stop the TWAI peripheral @@ -104,19 +115,18 @@ bool twai_hal_start(twai_hal_context_t *hal_ctx, twai_mode_t mode); * setting the operating mode to Listen Only so that REC is frozen. * * @param hal_ctx Context of the HAL layer - * @return True if successfully stopped, false otherwise. */ -bool twai_hal_stop(twai_hal_context_t *hal_ctx); +void twai_hal_stop(twai_hal_context_t *hal_ctx); /** * @brief Start bus recovery * * @param hal_ctx Context of the HAL layer - * @return True if successfully started bus recovery, false otherwise. */ -static inline bool twai_hal_start_bus_recovery(twai_hal_context_t *hal_ctx) +static inline void twai_hal_start_bus_recovery(twai_hal_context_t *hal_ctx) { - return twai_ll_exit_reset_mode(hal_ctx->dev); + TWAI_HAL_SET_FLAG(hal_ctx->state_flags, TWAI_HAL_STATE_FLAG_RECOVERING); + twai_ll_exit_reset_mode(hal_ctx->dev); } /** @@ -163,73 +173,42 @@ static inline bool twai_hal_check_last_tx_successful(twai_hal_context_t *hal_ctx return twai_ll_is_last_tx_successful((hal_ctx)->dev); } +/** + * @brief Check if certain HAL state flags are set + * + * The HAL will maintain a record of the controller's state via a set of flags. + * These flags are automatically maintained (i.e., set and reset) inside various + * HAL function calls. This function checks if certain flags are currently set. + * + * @param hal_ctx Context of the HAL layer + * @param check_flags Bit mask of flags to check + * @return True if one or more of the flags in check_flags are set + */ + +static inline bool twai_hal_check_state_flags(twai_hal_context_t *hal_ctx, uint32_t check_flags) +{ + return hal_ctx->state_flags & check_flags; +} + /* ----------------------------- Event Handling ----------------------------- */ /** * @brief Decode current events that triggered an interrupt * - * This function should be called on every TWAI interrupt. It will read (and - * thereby clear) the interrupt register, then determine what events have - * occurred to trigger the interrupt. + * This function should be the called at the beginning of an ISR. This + * function will do the following: + * - Read and clear interrupts + * - Decode current events that triggered an interrupt + * - Respond to low latency interrupt events + * - Bus off: Change to LOM to free TEC/REC + * - Recovery complete: Enter reset mode + * - Clear ECC and ALC + * - Update state flags based on events that have occurred. * * @param hal_ctx Context of the HAL layer - * @param bus_recovering Whether the TWAI peripheral was previous undergoing bus recovery * @return Bit mask of events that have occurred */ -uint32_t twai_hal_decode_interrupt_events(twai_hal_context_t *hal_ctx, bool bus_recovering); - -/** - * @brief Handle bus recovery complete - * - * This function should be called on an bus recovery complete event. It simply - * enters reset mode to stop bus activity. - * - * @param hal_ctx Context of the HAL layer - * @return True if successfully handled bus recovery completion, false otherwise. - */ -static inline bool twai_hal_handle_bus_recov_cplt(twai_hal_context_t *hal_ctx) -{ - return twai_ll_enter_reset_mode((hal_ctx)->dev); -} - -/** - * @brief Handle arbitration lost - * - * This function should be called on an arbitration lost event. It simply clears - * the clears the ALC register. - * - * @param hal_ctx Context of the HAL layer - */ -static inline void twai_hal_handle_arb_lost(twai_hal_context_t *hal_ctx) -{ - twai_ll_clear_arb_lost_cap((hal_ctx)->dev); -} - -/** - * @brief Handle bus error - * - * This function should be called on an bus error event. It simply clears - * the clears the ECC register. - * - * @param hal_ctx Context of the HAL layer - */ -static inline void twai_hal_handle_bus_error(twai_hal_context_t *hal_ctx) -{ - twai_ll_clear_err_code_cap((hal_ctx)->dev); -} - -/** - * @brief Handle BUS OFF - * - * This function should be called on a BUS OFF event. It simply changes the - * mode to LOM to freeze REC - * - * @param hal_ctx Context of the HAL layer - */ -static inline void twai_hal_handle_bus_off(twai_hal_context_t *hal_ctx) -{ - twai_ll_set_mode((hal_ctx)->dev, TWAI_MODE_LISTEN_ONLY); -} +uint32_t twai_hal_decode_interrupt_events(twai_hal_context_t *hal_ctx); /* ------------------------------- TX and RX -------------------------------- */ diff --git a/tools/sdk/esp32s2/include/soc/include/hal/twai_types.h b/tools/sdk/esp32s2/include/hal/include/hal/twai_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/twai_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/twai_types.h diff --git a/tools/sdk/esp32/include/soc/include/hal/uart_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/uart_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/uart_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/uart_hal.h index ceec6a34..7cc52405 100644 --- a/tools/sdk/esp32/include/soc/include/hal/uart_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/uart_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ // The HAL layer for UART. diff --git a/tools/sdk/esp32s2/include/soc/include/hal/uart_types.h b/tools/sdk/esp32s2/include/hal/include/hal/uart_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/uart_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/uart_types.h diff --git a/tools/sdk/esp32s2/include/soc/include/hal/usb_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/usb_hal.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/usb_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/usb_hal.h diff --git a/tools/sdk/esp32/include/soc/include/hal/wdt_hal.h b/tools/sdk/esp32s2/include/hal/include/hal/wdt_hal.h similarity index 99% rename from tools/sdk/esp32/include/soc/include/hal/wdt_hal.h rename to tools/sdk/esp32s2/include/hal/include/hal/wdt_hal.h index 0d0f650d..2347fb59 100644 --- a/tools/sdk/esp32/include/soc/include/hal/wdt_hal.h +++ b/tools/sdk/esp32s2/include/hal/include/hal/wdt_hal.h @@ -15,7 +15,7 @@ /******************************************************************************* * NOTICE * The hal is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ #pragma once diff --git a/tools/sdk/esp32s2/include/soc/include/hal/wdt_types.h b/tools/sdk/esp32s2/include/hal/include/hal/wdt_types.h similarity index 100% rename from tools/sdk/esp32s2/include/soc/include/hal/wdt_types.h rename to tools/sdk/esp32s2/include/hal/include/hal/wdt_types.h diff --git a/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h b/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h index ba29e146..3c805b02 100644 --- a/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h +++ b/tools/sdk/esp32s2/include/idf_test/include/esp32s2/idf_performance_target.h @@ -26,5 +26,5 @@ #endif #ifndef IDF_PERFORMANCE_MIN_FLASH_SPEED_BYTE_PER_SEC_EXT_ERASE -#define IDF_PERFORMANCE_MIN_FLASH_SPEED_BYTE_PER_SEC_EXT_ERASE 52200 +#define IDF_PERFORMANCE_MIN_FLASH_SPEED_BYTE_PER_SEC_EXT_ERASE 40300 #endif diff --git a/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_client.h b/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_client.h index 1b645c77..e365cb84 100644 --- a/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_client.h +++ b/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_client.h @@ -14,6 +14,9 @@ #include "mqtt_config.h" #include "esp_event.h" +#if CONFIG_ESP_TLS_USE_DS_PERIPHERAL +#include "rsa_sign_alt.h" +#endif #ifdef __cplusplus extern "C" { @@ -182,6 +185,9 @@ typedef struct { int clientkey_password_len; /*!< String length of the password pointed to by clientkey_password */ esp_mqtt_protocol_ver_t protocol_ver; /*!< MQTT protocol version used for connection, defaults to value from menuconfig*/ int out_buffer_size; /*!< size of MQTT output buffer. If not defined, both output and input buffers have the same size defined as ``buffer_size`` */ + bool skip_cert_common_name_check; /*!< Skip any validation of server certificate CN field, this reduces the security of TLS and makes the mqtt client susceptible to MITM attacks */ + bool use_secure_element; /*!< enable secure element for enabling SSL connection */ + void *ds_data; /*!< carrier of handle for digital signature parameters */ } esp_mqtt_client_config_t; /** @@ -237,6 +243,9 @@ esp_err_t esp_mqtt_client_disconnect(esp_mqtt_client_handle_t client); /** * @brief Stops mqtt client tasks * + * * Notes: + * - Cannot be called from the mqtt event handler + * * @param client mqtt client handle * * @return ESP_OK on success @@ -304,6 +313,9 @@ int esp_mqtt_client_publish(esp_mqtt_client_handle_t client, const char *topic, /** * @brief Destroys the client handle * + * Notes: + * - Cannot be called from the mqtt event handler + * * @param client mqtt client handle * * @return ESP_OK diff --git a/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_config.h b/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_config.h index 2c9d4039..e259a2a1 100644 --- a/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_config.h +++ b/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_config.h @@ -84,11 +84,16 @@ #endif #endif +#ifdef CONFIG_OUTBOX_EXPIRED_TIMEOUT_MS +#define OUTBOX_EXPIRED_TIMEOUT_MS CONFIG_OUTBOX_EXPIRED_TIMEOUT_MS +#else +#define OUTBOX_EXPIRED_TIMEOUT_MS (30*1000) +#endif #define MQTT_ENABLE_SSL CONFIG_MQTT_TRANSPORT_SSL #define MQTT_ENABLE_WS CONFIG_MQTT_TRANSPORT_WEBSOCKET #define MQTT_ENABLE_WSS CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE -#define OUTBOX_EXPIRED_TIMEOUT_MS (30*1000) + #define OUTBOX_MAX_SIZE (4*1024) #endif diff --git a/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_supported_features.h b/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_supported_features.h index c7a8a795..9f1acf2f 100644 --- a/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_supported_features.h +++ b/tools/sdk/esp32s2/include/mqtt/esp-mqtt/include/mqtt_supported_features.h @@ -31,6 +31,7 @@ #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(3, 3, 0) // Features supported from 3.3 #define MQTT_SUPPORTED_FEATURE_EVENT_LOOP +#define MQTT_SUPPORTED_FEATURE_SKIP_CRT_CMN_NAME_CHECK #endif #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0) @@ -46,6 +47,16 @@ #define MQTT_SUPPORTED_FEATURE_ALPN #define MQTT_SUPPORTED_FEATURE_CLIENT_KEY_PASSWORD #endif + +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0) +// Features supported in 4.2 +#define MQTT_SUPPORTED_FEATURE_SECURE_ELEMENT #endif -#endif // _MQTT_SUPPORTED_FEATURES_H_ \ No newline at end of file +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0) +// Features supported in 4.3 +#define MQTT_SUPPORTED_FEATURE_DIGITAL_SIGNATURE +#endif + +#endif /* ESP_IDF_VERSION */ +#endif // _MQTT_SUPPORTED_FEATURES_H_ diff --git a/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/soc_caps.h b/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/soc_caps.h index 6efffea1..4d0b9fc4 100644 --- a/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/soc_caps.h +++ b/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/soc_caps.h @@ -9,3 +9,4 @@ #define SOC_CPU_CORES_NUM 1 #define SOC_SUPPORTS_SECURE_DL_MODE 1 #define SOC_RISCV_COPROC_SUPPORTED 1 +#define SOC_USB_SUPPORTED 1 diff --git a/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/system_reg.h b/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/system_reg.h index cc7183c8..4e335cc7 100644 --- a/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/system_reg.h +++ b/tools/sdk/esp32s2/include/soc/soc/esp32s2/include/soc/system_reg.h @@ -190,12 +190,6 @@ extern "C" { #define DPORT_PERIP_CLK_EN_REG DPORT_PERIP_CLK_EN0_REG #define DPORT_PERIP_CLK_EN0_REG (DR_REG_SYSTEM_BASE + 0x040) -/* DPORT_SPI4_CLK_EN : R/W ;bitpos:[31] ;default: 1'h1 ; */ -/*description: */ -#define DPORT_SPI4_CLK_EN (BIT(31)) -#define DPORT_SPI4_CLK_EN_M (BIT(31)) -#define DPORT_SPI4_CLK_EN_V 0x1 -#define DPORT_SPI4_CLK_EN_S 31 /* DPORT_ADC2_ARB_CLK_EN : R/W ;bitpos:[30] ;default: 1'b1 ; */ /*description: */ #define DPORT_ADC2_ARB_CLK_EN (BIT(30)) @@ -424,12 +418,6 @@ extern "C" { #define DPORT_PERIP_RST_EN_REG DPORT_PERIP_RST_EN0_REG #define DPORT_PERIP_RST_EN0_REG (DR_REG_SYSTEM_BASE + 0x048) -/* DPORT_SPI4_RST : R/W ;bitpos:[31] ;default: 1'h0 ; */ -/*description: */ -#define DPORT_SPI4_RST (BIT(31)) -#define DPORT_SPI4_RST_M (BIT(31)) -#define DPORT_SPI4_RST_V 0x1 -#define DPORT_SPI4_RST_S 31 /* DPORT_ADC2_ARB_RST : R/W ;bitpos:[30] ;default: 1'b0 ; */ /*description: */ #define DPORT_ADC2_ARB_RST (BIT(30)) diff --git a/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/dac_hal.h b/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/dac_hal.h new file mode 100644 index 00000000..f7198246 --- /dev/null +++ b/tools/sdk/esp32s2/include/soc/src/esp32s2/include/hal/dac_hal.h @@ -0,0 +1,76 @@ +// Copyright 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. + +/******************************************************************************* + * NOTICE + * The hal is not public api, don't use in application code. + * See readme.md in hal/include/hal/readme.md + ******************************************************************************/ + +// The HAL layer for DAC (esp32s2 specific part) + +#pragma once + +#include "hal/dac_ll.h" +#include "hal/dac_types.h" + +#include_next "hal/dac_hal.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*--------------------------------------------------------------- + Digital controller setting +---------------------------------------------------------------*/ +/** + * Digital controller initialization. + */ +void dac_hal_digi_init(void); + +/** + * Digital controller deinitialization. + */ +void dac_hal_digi_deinit(void); + +/** + * Setting the DAC digital controller. + * + * @param cfg Pointer to digital controller paramter. + */ +void dac_hal_digi_controller_config(const dac_digi_config_t *cfg); + +/** + * DAC digital controller start output voltage. + */ +void dac_hal_digi_start(void); + +/** + * DAC digital controller stop output voltage. + */ +void dac_hal_digi_stop(void); + +/** + * Reset DAC digital controller FIFO. + */ +#define dac_hal_digi_fifo_reset() dac_ll_digi_fifo_reset() + +/** + * Reset DAC digital controller. + */ +#define dac_hal_digi_reset() dac_ll_digi_reset() + +#ifdef __cplusplus +} +#endif \ No newline at end of file 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 d100c57f..1f64347c 100644 --- a/tools/sdk/esp32s2/include/spi_flash/include/esp_flash.h +++ b/tools/sdk/esp32s2/include/spi_flash/include/esp_flash.h @@ -57,7 +57,7 @@ typedef struct { esp_err_t (*region_protected)(void* arg, size_t start_addr, size_t size); /** Delay for at least 'us' microseconds. Called in between 'start' and 'end'. */ - esp_err_t (*delay_us)(void *arg, unsigned us); + esp_err_t (*delay_us)(void *arg, uint32_t us); /** Called for get temp buffer when buffer from application cannot be directly read into/write from. */ void *(*get_temp_buffer)(void* arg, size_t reqest_size, size_t* out_size); diff --git a/tools/sdk/esp32s2/include/spi_flash/include/memspi_host_driver.h b/tools/sdk/esp32s2/include/spi_flash/include/memspi_host_driver.h index a94260b2..46336f67 100644 --- a/tools/sdk/esp32s2/include/spi_flash/include/memspi_host_driver.h +++ b/tools/sdk/esp32s2/include/spi_flash/include/memspi_host_driver.h @@ -56,7 +56,7 @@ esp_err_t memspi_host_init_pointers(memspi_host_inst_t *host, const memspi_host_ * NOTICE * Rest part of this file are part of the HAL layer * The HAL is not public api, don't use in application code. - * See readme.md in soc/include/hal/readme.md + * See readme.md in hal/include/hal/readme.md ******************************************************************************/ /** diff --git a/tools/sdk/esp32s2/include/spi_flash/include/spi_flash_chip_driver.h b/tools/sdk/esp32s2/include/spi_flash/include/spi_flash_chip_driver.h index c0b19bad..7d875b4c 100644 --- a/tools/sdk/esp32s2/include/spi_flash/include/spi_flash_chip_driver.h +++ b/tools/sdk/esp32s2/include/spi_flash/include/spi_flash_chip_driver.h @@ -152,7 +152,7 @@ struct spi_flash_chip_t { timeout_ms should be a timeout (in milliseconds) before the function returns ESP_ERR_TIMEOUT. This is useful to avoid hanging if the chip is otherwise unresponsive (ie returns all 0xFF or similar.) */ - esp_err_t (*wait_idle)(esp_flash_t *chip, unsigned timeout_ms); + esp_err_t (*wait_idle)(esp_flash_t *chip, uint32_t timeout_us); /* Configure both the SPI host and the chip for the read mode specified in chip->read_mode. * diff --git a/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport.h b/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport.h index 4841725d..b1306369 100644 --- a/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport.h +++ b/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport.h @@ -310,7 +310,7 @@ esp_err_t esp_transport_set_parent_transport_func(esp_transport_handle_t t, payl * @return * - valid pointer of esp_error_handle_t * - NULL if invalid transport handle - */ + */ esp_tls_error_handle_t esp_transport_get_error_handle(esp_transport_handle_t t); diff --git a/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport_ws.h b/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport_ws.h index 08ed2ef2..febe1d0b 100644 --- a/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport_ws.h +++ b/tools/sdk/esp32s2/include/tcp_transport/include/esp_transport_ws.h @@ -117,6 +117,21 @@ ws_transport_opcodes_t esp_transport_ws_get_read_opcode(esp_transport_handle_t t */ int esp_transport_ws_get_read_payload_len(esp_transport_handle_t t); +/** + * @brief Polls the active connection for termination + * + * This API is typically used by the client to wait for clean connection closure + * by websocket server + * + * @param t Websocket transport handle + * @param[in] timeout_ms The timeout milliseconds + * + * @return + * 0 - no activity on read and error socket descriptor within timeout + * 1 - Success: either connection terminated by FIN or the most common RST err codes + * -1 - Failure: Unexpected error code or socket is normally readable + */ +int esp_transport_ws_poll_connection_closed(esp_transport_handle_t t, int timeout_ms); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_cdc_acm.h b/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_cdc_acm.h index f17f375d..4e4001f1 100644 --- a/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_cdc_acm.h +++ b/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_cdc_acm.h @@ -40,22 +40,22 @@ typedef enum{ * @brief Data provided to the input of the `callback_rx_wanted_char` callback */ typedef struct { - char wanted_char; + char wanted_char; /*!< Wanted character */ } cdcacm_event_rx_wanted_char_data_t; /** * @brief Data provided to the input of the `callback_line_state_changed` callback */ typedef struct { - bool dtr; - bool rts; + bool dtr; /*!< Data Terminal Ready (DTR) line state */ + bool rts; /*!< Request To Send (RTS) line state */ } cdcacm_event_line_state_changed_data_t; /** * @brief Data provided to the input of the `line_coding_changed` callback */ typedef struct { - cdc_line_coding_t const *p_line_coding; + cdc_line_coding_t const *p_line_coding; /*!< New line coding value */ } cdcacm_event_line_coding_changed_data_t; /** @@ -72,7 +72,7 @@ typedef enum { * @brief Describes an event passing to the input of a callbacks */ typedef struct { - cdcacm_event_type_t type; + cdcacm_event_type_t type; /*!< Event type */ union { cdcacm_event_rx_wanted_char_data_t rx_wanted_char_data; cdcacm_event_line_state_changed_data_t line_state_changed_data; diff --git a/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_tasks.h b/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_tasks.h index f1a47991..94ed4eaf 100644 --- a/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_tasks.h +++ b/tools/sdk/esp32s2/include/tinyusb/additions/include/tusb_tasks.h @@ -33,7 +33,7 @@ extern "C" { esp_err_t tusb_run_task(void); /** - * @brief Stops a FreeRTOS task with @ref tusb_device_task + * @brief Stops a FreeRTOS task * * @return ESP_OK or ESP_FAIL */ diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/audio/audio.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/audio/audio.h index 5bec14d8..05e61f8d 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/audio/audio.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/audio/audio.h @@ -2,6 +2,7 @@ * The MIT License (MIT) * * Copyright (c) 2019 Ha Thach (tinyusb.org) + * Copyright (c) 2020 Reinhard Panhuber * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,28 +36,44 @@ #include "common/tusb_common.h" #ifdef __cplusplus - extern "C" { +extern "C" { #endif -/// Audio Interface Subclass Codes +/// Audio Device Class Codes + +/// A.2 - Audio Function Subclass Codes typedef enum { - AUDIO_SUBCLASS_CONTROL = 0x01 , ///< Audio Control + AUDIO_FUNCTION_SUBCLASS_UNDEFINED = 0x00, +} audio_function_subclass_type_t; + +/// A.3 - Audio Function Protocol Codes +typedef enum +{ + AUDIO_FUNC_PROTOCOL_CODE_UNDEF = 0x00, + AUDIO_FUNC_PROTOCOL_CODE_V2 = 0x20, ///< Version 2.0 +} audio_function_protocol_code_t; + +/// A.5 - Audio Interface Subclass Codes +typedef enum +{ + AUDIO_SUBCLASS_UNDEFINED = 0x00, + AUDIO_SUBCLASS_CONTROL , ///< Audio Control AUDIO_SUBCLASS_STREAMING , ///< Audio Streaming AUDIO_SUBCLASS_MIDI_STREAMING , ///< MIDI Streaming } audio_subclass_type_t; -/// Audio Protocol Codes +/// A.6 - Audio Interface Protocol Codes typedef enum { - AUDIO_PROTOCOL_V1 = 0x00, ///< Version 1.0 - AUDIO_PROTOCOL_V2 = 0x20, ///< Version 2.0 - AUDIO_PROTOCOL_V3 = 0x30, ///< Version 3.0 -} audio_protocol_type_t; + AUDIO_INT_PROTOCOL_CODE_UNDEF = 0x00, + AUDIO_INT_PROTOCOL_CODE_V2 = 0x20, ///< Version 2.0 +} audio_interface_protocol_code_t; -/// Audio Function Category Codes +/// A.7 - Audio Function Category Codes typedef enum { + AUDIO_FUNC_UNDEF = 0x00, AUDIO_FUNC_DESKTOP_SPEAKER = 0x01, AUDIO_FUNC_HOME_THEATER = 0x02, AUDIO_FUNC_MICROPHONE = 0x03, @@ -68,33 +85,850 @@ typedef enum AUDIO_FUNC_MUSICAL_INSTRUMENT = 0x09, AUDIO_FUNC_PRO_AUDIO = 0x0A, AUDIO_FUNC_AUDIO_VIDEO = 0x0B, - AUDIO_FUNC_CONTROL_PANEL = 0x0C -} audio_function_t; + AUDIO_FUNC_CONTROL_PANEL = 0x0C, + AUDIO_FUNC_OTHER = 0xFF, +} audio_function_code_t; -/// Audio Class-Specific AC Interface Descriptor Subtypes +/// A.9 - Audio Class-Specific AC Interface Descriptor Subtypes UAC2 typedef enum { - AUDIO_CS_INTERFACE_HEADER = 0x01, - AUDIO_CS_INTERFACE_INPUT_TERMINAL = 0x02, - AUDIO_CS_INTERFACE_OUTPUT_TERMINAL = 0x03, - AUDIO_CS_INTERFACE_MIXER_UNIT = 0x04, - AUDIO_CS_INTERFACE_SELECTOR_UNIT = 0x05, - AUDIO_CS_INTERFACE_FEATURE_UNIT = 0x06, - AUDIO_CS_INTERFACE_EFFECT_UNIT = 0x07, - AUDIO_CS_INTERFACE_PROCESSING_UNIT = 0x08, - AUDIO_CS_INTERFACE_EXTENSION_UNIT = 0x09, - AUDIO_CS_INTERFACE_CLOCK_SOURCE = 0x0A, - AUDIO_CS_INTERFACE_CLOCK_SELECTOR = 0x0B, - AUDIO_CS_INTERFACE_CLOCK_MULTIPLIER = 0x0C, - AUDIO_CS_INTERFACE_SAMPLE_RATE_CONVERTER = 0x0D, -} audio_cs_interface_subtype_t; + AUDIO_CS_AC_INTERFACE_AC_DESCRIPTOR_UNDEF = 0x00, + AUDIO_CS_AC_INTERFACE_HEADER = 0x01, + AUDIO_CS_AC_INTERFACE_INPUT_TERMINAL = 0x02, + AUDIO_CS_AC_INTERFACE_OUTPUT_TERMINAL = 0x03, + AUDIO_CS_AC_INTERFACE_MIXER_UNIT = 0x04, + AUDIO_CS_AC_INTERFACE_SELECTOR_UNIT = 0x05, + AUDIO_CS_AC_INTERFACE_FEATURE_UNIT = 0x06, + AUDIO_CS_AC_INTERFACE_EFFECT_UNIT = 0x07, + AUDIO_CS_AC_INTERFACE_PROCESSING_UNIT = 0x08, + AUDIO_CS_AC_INTERFACE_EXTENSION_UNIT = 0x09, + AUDIO_CS_AC_INTERFACE_CLOCK_SOURCE = 0x0A, + AUDIO_CS_AC_INTERFACE_CLOCK_SELECTOR = 0x0B, + AUDIO_CS_AC_INTERFACE_CLOCK_MULTIPLIER = 0x0C, + AUDIO_CS_AC_INTERFACE_SAMPLE_RATE_CONVERTER = 0x0D, +} audio_cs_ac_interface_subtype_t; -/** @} */ +/// A.10 - Audio Class-Specific AS Interface Descriptor Subtypes UAC2 +typedef enum +{ + AUDIO_CS_AS_INTERFACE_AS_DESCRIPTOR_UNDEF = 0x00, + AUDIO_CS_AS_INTERFACE_AS_GENERAL = 0x01, + AUDIO_CS_AS_INTERFACE_FORMAT_TYPE = 0x02, + AUDIO_CS_AS_INTERFACE_ENCODER = 0x03, + AUDIO_CS_AS_INTERFACE_DECODER = 0x04, +} audio_cs_as_interface_subtype_t; + +/// A.11 - Effect Unit Effect Types +typedef enum +{ + AUDIO_EFFECT_TYPE_UNDEF = 0x00, + AUDIO_EFFECT_TYPE_PARAM_EQ_SECTION = 0x01, + AUDIO_EFFECT_TYPE_REVERBERATION = 0x02, + AUDIO_EFFECT_TYPE_MOD_DELAY = 0x03, + AUDIO_EFFECT_TYPE_DYN_RANGE_COMP = 0x04, +} audio_effect_unit_effect_type_t; + +/// A.12 - Processing Unit Process Types +typedef enum +{ + AUDIO_PROCESS_TYPE_UNDEF = 0x00, + AUDIO_PROCESS_TYPE_UP_DOWN_MIX = 0x01, + AUDIO_PROCESS_TYPE_DOLBY_PROLOGIC = 0x02, + AUDIO_PROCESS_TYPE_STEREO_EXTENDER = 0x03, +} audio_processing_unit_process_type_t; + +/// A.13 - Audio Class-Specific EP Descriptor Subtypes UAC2 +typedef enum +{ + AUDIO_CS_EP_SUBTYPE_UNDEF = 0x00, + AUDIO_CS_EP_SUBTYPE_GENERAL = 0x01, +} audio_cs_ep_subtype_t; + +/// A.14 - Audio Class-Specific Request Codes +typedef enum +{ + AUDIO_CS_REQ_UNDEF = 0x00, + AUDIO_CS_REQ_CUR = 0x01, + AUDIO_CS_REQ_RANGE = 0x02, + AUDIO_CS_REQ_MEM = 0x03, +} audio_cs_req_t; + +/// A.17 - Control Selector Codes + +/// A.17.1 - Clock Source Control Selectors +typedef enum +{ + AUDIO_CS_CTRL_UNDEF = 0x00, + AUDIO_CS_CTRL_SAM_FREQ = 0x01, + AUDIO_CS_CTRL_CLK_VALID = 0x02, +} audio_clock_src_control_selector_t; + +/// A.17.2 - Clock Selector Control Selectors +typedef enum +{ + AUDIO_CX_CTRL_UNDEF = 0x00, + AUDIO_CX_CTRL_CONTROL = 0x01, +} audio_clock_sel_control_selector_t; + +/// A.17.3 - Clock Multiplier Control Selectors +typedef enum +{ + AUDIO_CM_CTRL_UNDEF = 0x00, + AUDIO_CM_CTRL_NUMERATOR_CONTROL = 0x01, + AUDIO_CM_CTRL_DENOMINATOR_CONTROL = 0x02, +} audio_clock_mul_control_selector_t; + +/// A.17.4 - Terminal Control Selectors +typedef enum +{ + AUDIO_TE_CTRL_UNDEF = 0x00, + AUDIO_TE_CTRL_COPY_PROTECT = 0x01, + AUDIO_TE_CTRL_CONNECTOR = 0x02, + AUDIO_TE_CTRL_OVERLOAD = 0x03, + AUDIO_TE_CTRL_CLUSTER = 0x04, + AUDIO_TE_CTRL_UNDERFLOW = 0x05, + AUDIO_TE_CTRL_OVERFLOW = 0x06, + AUDIO_TE_CTRL_LATENCY = 0x07, +} audio_terminal_control_selector_t; + +/// A.17.5 - Mixer Control Selectors +typedef enum +{ + AUDIO_MU_CTRL_UNDEF = 0x00, + AUDIO_MU_CTRL_MIXER = 0x01, + AUDIO_MU_CTRL_CLUSTER = 0x02, + AUDIO_MU_CTRL_UNDERFLOW = 0x03, + AUDIO_MU_CTRL_OVERFLOW = 0x04, + AUDIO_MU_CTRL_LATENCY = 0x05, +} audio_mixer_control_selector_t; + +/// A.17.6 - Selector Control Selectors +typedef enum +{ + AUDIO_SU_CTRL_UNDEF = 0x00, + AUDIO_SU_CTRL_SELECTOR = 0x01, + AUDIO_SU_CTRL_LATENCY = 0x02, +} audio_sel_control_selector_t; + +/// A.17.7 - Feature Unit Control Selectors +typedef enum +{ + AUDIO_FU_CTRL_UNDEF = 0x00, + AUDIO_FU_CTRL_MUTE = 0x01, + AUDIO_FU_CTRL_VOLUME = 0x02, + AUDIO_FU_CTRL_BASS = 0x03, + AUDIO_FU_CTRL_MID = 0x04, + AUDIO_FU_CTRL_TREBLE = 0x05, + AUDIO_FU_CTRL_GRAPHIC_EQUALIZER = 0x06, + AUDIO_FU_CTRL_AGC = 0x07, + AUDIO_FU_CTRL_DELAY = 0x08, + AUDIO_FU_CTRL_BASS_BOOST = 0x09, + AUDIO_FU_CTRL_LOUDNESS = 0x0A, + AUDIO_FU_CTRL_INPUT_GAIN = 0x0B, + AUDIO_FU_CTRL_GAIN_PAD = 0x0C, + AUDIO_FU_CTRL_INVERTER = 0x0D, + AUDIO_FU_CTRL_UNDERFLOW = 0x0E, + AUDIO_FU_CTRL_OVERVLOW = 0x0F, + AUDIO_FU_CTRL_LATENCY = 0x10, +} audio_feature_unit_control_selector_t; + +/// A.17.8 Effect Unit Control Selectors + +/// A.17.8.1 Parametric Equalizer Section Effect Unit Control Selectors +typedef enum +{ + AUDIO_PE_CTRL_UNDEF = 0x00, + AUDIO_PE_CTRL_ENABLE = 0x01, + AUDIO_PE_CTRL_CENTERFREQ = 0x02, + AUDIO_PE_CTRL_QFACTOR = 0x03, + AUDIO_PE_CTRL_GAIN = 0x04, + AUDIO_PE_CTRL_UNDERFLOW = 0x05, + AUDIO_PE_CTRL_OVERFLOW = 0x06, + AUDIO_PE_CTRL_LATENCY = 0x07, +} audio_parametric_equalizer_control_selector_t; + +/// A.17.8.2 Reverberation Effect Unit Control Selectors +typedef enum +{ + AUDIO_RV_CTRL_UNDEF = 0x00, + AUDIO_RV_CTRL_ENABLE = 0x01, + AUDIO_RV_CTRL_TYPE = 0x02, + AUDIO_RV_CTRL_LEVEL = 0x03, + AUDIO_RV_CTRL_TIME = 0x04, + AUDIO_RV_CTRL_FEEDBACK = 0x05, + AUDIO_RV_CTRL_PREDELAY = 0x06, + AUDIO_RV_CTRL_DENSITY = 0x07, + AUDIO_RV_CTRL_HIFREQ_ROLLOFF = 0x08, + AUDIO_RV_CTRL_UNDERFLOW = 0x09, + AUDIO_RV_CTRL_OVERFLOW = 0x0A, + AUDIO_RV_CTRL_LATENCY = 0x0B, +} audio_reverberation_effect_control_selector_t; + +/// A.17.8.3 Modulation Delay Effect Unit Control Selectors +typedef enum +{ + AUDIO_MD_CTRL_UNDEF = 0x00, + AUDIO_MD_CTRL_ENABLE = 0x01, + AUDIO_MD_CTRL_BALANCE = 0x02, + AUDIO_MD_CTRL_RATE = 0x03, + AUDIO_MD_CTRL_DEPTH = 0x04, + AUDIO_MD_CTRL_TIME = 0x05, + AUDIO_MD_CTRL_FEEDBACK = 0x06, + AUDIO_MD_CTRL_UNDERFLOW = 0x07, + AUDIO_MD_CTRL_OVERFLOW = 0x08, + AUDIO_MD_CTRL_LATENCY = 0x09, +} audio_modulation_delay_control_selector_t; + +/// A.17.8.4 Dynamic Range Compressor Effect Unit Control Selectors +typedef enum +{ + AUDIO_DR_CTRL_UNDEF = 0x00, + AUDIO_DR_CTRL_ENABLE = 0x01, + AUDIO_DR_CTRL_COMPRESSION_RATE = 0x02, + AUDIO_DR_CTRL_MAXAMPL = 0x03, + AUDIO_DR_CTRL_THRESHOLD = 0x04, + AUDIO_DR_CTRL_ATTACK_TIME = 0x05, + AUDIO_DR_CTRL_RELEASE_TIME = 0x06, + AUDIO_DR_CTRL_UNDERFLOW = 0x07, + AUDIO_DR_CTRL_OVERFLOW = 0x08, + AUDIO_DR_CTRL_LATENCY = 0x09, +} audio_dynamic_range_compression_control_selector_t; + +/// A.17.9 Processing Unit Control Selectors + +/// A.17.9.1 Up/Down-mix Processing Unit Control Selectors +typedef enum +{ + AUDIO_UD_CTRL_UNDEF = 0x00, + AUDIO_UD_CTRL_ENABLE = 0x01, + AUDIO_UD_CTRL_MODE_SELECT = 0x02, + AUDIO_UD_CTRL_CLUSTER = 0x03, + AUDIO_UD_CTRL_UNDERFLOW = 0x04, + AUDIO_UD_CTRL_OVERFLOW = 0x05, + AUDIO_UD_CTRL_LATENCY = 0x06, +} audio_up_down_mix_control_selector_t; + +/// A.17.9.2 Dolby Prologic ™ Processing Unit Control Selectors +typedef enum +{ + AUDIO_DP_CTRL_UNDEF = 0x00, + AUDIO_DP_CTRL_ENABLE = 0x01, + AUDIO_DP_CTRL_MODE_SELECT = 0x02, + AUDIO_DP_CTRL_CLUSTER = 0x03, + AUDIO_DP_CTRL_UNDERFLOW = 0x04, + AUDIO_DP_CTRL_OVERFLOW = 0x05, + AUDIO_DP_CTRL_LATENCY = 0x06, +} audio_dolby_prologic_control_selector_t; + +/// A.17.9.3 Stereo Extender Processing Unit Control Selectors +typedef enum +{ + AUDIO_ST_EXT_CTRL_UNDEF = 0x00, + AUDIO_ST_EXT_CTRL_ENABLE = 0x01, + AUDIO_ST_EXT_CTRL_WIDTH = 0x02, + AUDIO_ST_EXT_CTRL_UNDERFLOW = 0x03, + AUDIO_ST_EXT_CTRL_OVERFLOW = 0x04, + AUDIO_ST_EXT_CTRL_LATENCY = 0x05, +} audio_stereo_extender_control_selector_t; + +/// A.17.10 Extension Unit Control Selectors +typedef enum +{ + AUDIO_XU_CTRL_UNDEF = 0x00, + AUDIO_XU_CTRL_ENABLE = 0x01, + AUDIO_XU_CTRL_CLUSTER = 0x02, + AUDIO_XU_CTRL_UNDERFLOW = 0x03, + AUDIO_XU_CTRL_OVERFLOW = 0x04, + AUDIO_XU_CTRL_LATENCY = 0x05, +} audio_extension_unit_control_selector_t; + +/// A.17.11 AudioStreaming Interface Control Selectors +typedef enum +{ + AUDIO_AS_CTRL_UNDEF = 0x00, + AUDIO_AS_CTRL_ACT_ALT_SETTING = 0x01, + AUDIO_AS_CTRL_VAL_ALT_SETTINGS = 0x02, + AUDIO_AS_CTRL_AUDIO_DATA_FORMAT = 0x03, +} audio_audiostreaming_interface_control_selector_t; + +/// A.17.12 Encoder Control Selectors +typedef enum +{ + AUDIO_EN_CTRL_UNDEF = 0x00, + AUDIO_EN_CTRL_BIT_RATE = 0x01, + AUDIO_EN_CTRL_QUALITY = 0x02, + AUDIO_EN_CTRL_VBR = 0x03, + AUDIO_EN_CTRL_TYPE = 0x04, + AUDIO_EN_CTRL_UNDERFLOW = 0x05, + AUDIO_EN_CTRL_OVERFLOW = 0x06, + AUDIO_EN_CTRL_ENCODER_ERROR = 0x07, + AUDIO_EN_CTRL_PARAM1 = 0x08, + AUDIO_EN_CTRL_PARAM2 = 0x09, + AUDIO_EN_CTRL_PARAM3 = 0x0A, + AUDIO_EN_CTRL_PARAM4 = 0x0B, + AUDIO_EN_CTRL_PARAM5 = 0x0C, + AUDIO_EN_CTRL_PARAM6 = 0x0D, + AUDIO_EN_CTRL_PARAM7 = 0x0E, + AUDIO_EN_CTRL_PARAM8 = 0x0F, +} audio_encoder_control_selector_t; + +/// A.17.13 Decoder Control Selectors + +/// A.17.13.1 MPEG Decoder Control Selectors +typedef enum +{ + AUDIO_MPD_CTRL_UNDEF = 0x00, + AUDIO_MPD_CTRL_DUAL_CHANNEL = 0x01, + AUDIO_MPD_CTRL_SECOND_STEREO = 0x02, + AUDIO_MPD_CTRL_MULTILINGUAL = 0x03, + AUDIO_MPD_CTRL_DYN_RANGE = 0x04, + AUDIO_MPD_CTRL_SCALING = 0x05, + AUDIO_MPD_CTRL_HILO_SCALING = 0x06, + AUDIO_MPD_CTRL_UNDERFLOW = 0x07, + AUDIO_MPD_CTRL_OVERFLOW = 0x08, + AUDIO_MPD_CTRL_DECODER_ERROR = 0x09, +} audio_MPEG_decoder_control_selector_t; + +/// A.17.13.2 AC-3 Decoder Control Selectors +typedef enum +{ + AUDIO_AD_CTRL_UNDEF = 0x00, + AUDIO_AD_CTRL_MODE = 0x01, + AUDIO_AD_CTRL_DYN_RANGE = 0x02, + AUDIO_AD_CTRL_SCALING = 0x03, + AUDIO_AD_CTRL_HILO_SCALING = 0x04, + AUDIO_AD_CTRL_UNDERFLOW = 0x05, + AUDIO_AD_CTRL_OVERFLOW = 0x06, + AUDIO_AD_CTRL_DECODER_ERROR = 0x07, +} audio_AC3_decoder_control_selector_t; + +/// A.17.13.3 WMA Decoder Control Selectors +typedef enum +{ + AUDIO_WD_CTRL_UNDEF = 0x00, + AUDIO_WD_CTRL_UNDERFLOW = 0x01, + AUDIO_WD_CTRL_OVERFLOW = 0x02, + AUDIO_WD_CTRL_DECODER_ERROR = 0x03, +} audio_WMA_decoder_control_selector_t; + +/// A.17.13.4 DTS Decoder Control Selectors +typedef enum +{ + AUDIO_DD_CTRL_UNDEF = 0x00, + AUDIO_DD_CTRL_UNDERFLOW = 0x01, + AUDIO_DD_CTRL_OVERFLOW = 0x02, + AUDIO_DD_CTRL_DECODER_ERROR = 0x03, +} audio_DTS_decoder_control_selector_t; + +/// A.17.14 Endpoint Control Selectors +typedef enum +{ + AUDIO_EP_CTRL_UNDEF = 0x00, + AUDIO_EP_CTRL_PITCH = 0x01, + AUDIO_EP_CTRL_DATA_OVERRUN = 0x02, + AUDIO_EP_CTRL_DATA_UNDERRUN = 0x03, +} audio_EP_control_selector_t; + +/// Terminal Types + +/// 2.1 - Audio Class-Terminal Types UAC2 +typedef enum +{ + AUDIO_TERM_TYPE_USB_UNDEFINED = 0x0100, + AUDIO_TERM_TYPE_USB_STREAMING = 0x0101, + AUDIO_TERM_TYPE_USB_VENDOR_SPEC = 0x01FF, +} audio_terminal_type_t; + +/// 2.2 - Audio Class-Input Terminal Types UAC2 +typedef enum +{ + AUDIO_TERM_TYPE_IN_UNDEFINED = 0x0200, + AUDIO_TERM_TYPE_IN_GENERIC_MIC = 0x0201, + AUDIO_TERM_TYPE_IN_DESKTOP_MIC = 0x0202, + AUDIO_TERM_TYPE_IN_PERSONAL_MIC = 0x0203, + AUDIO_TERM_TYPE_IN_OMNI_MIC = 0x0204, + AUDIO_TERM_TYPE_IN_ARRAY_MIC = 0x0205, + AUDIO_TERM_TYPE_IN_PROC_ARRAY_MIC = 0x0206, +} audio_terminal_input_type_t; + +/// 2.3 - Audio Class-Output Terminal Types UAC2 +typedef enum +{ + AUDIO_TERM_TYPE_OUT_UNDEFINED = 0x0300, + AUDIO_TERM_TYPE_OUT_GENERIC_SPEAKER = 0x0301, + AUDIO_TERM_TYPE_OUT_HEADPHONES = 0x0302, + AUDIO_TERM_TYPE_OUT_HEAD_MNT_DISP_AUIDO = 0x0303, + AUDIO_TERM_TYPE_OUT_DESKTOP_SPEAKER = 0x0304, + AUDIO_TERM_TYPE_OUT_ROOM_SPEAKER = 0x0305, + AUDIO_TERM_TYPE_OUT_COMMUNICATION_SPEAKER = 0x0306, + AUDIO_TERM_TYPE_OUT_LOW_FRQ_EFFECTS_SPEAKER = 0x0307, +} audio_terminal_output_type_t; + +/// Rest is yet to be implemented + +/// Additional Audio Device Class Codes - Source: Audio Data Formats + +/// A.1 - Audio Class-Format Type Codes UAC2 +//typedef enum +//{ +// AUDIO_FORMAT_TYPE_UNDEFINED = 0x00, +// AUDIO_FORMAT_TYPE_I = 0x01, +// AUDIO_FORMAT_TYPE_II = 0x02, +// AUDIO_FORMAT_TYPE_III = 0x03, +// AUDIO_FORMAT_TYPE_IV = 0x04, +// AUDIO_EXT_FORMAT_TYPE_I = 0x81, +// AUDIO_EXT_FORMAT_TYPE_II = 0x82, +// AUDIO_EXT_FORMAT_TYPE_III = 0x83, +//} audio_format_type_t; + +#define AUDIO_FORMAT_TYPE_UNDEFINED 0x00 +#define AUDIO_FORMAT_TYPE_I 0x01 +#define AUDIO_FORMAT_TYPE_II 0x02 +#define AUDIO_FORMAT_TYPE_III 0x03 +#define AUDIO_FORMAT_TYPE_IV 0x04 +#define AUDIO_EXT_FORMAT_TYPE_I 0x81 +#define AUDIO_EXT_FORMAT_TYPE_II 0x82 +#define AUDIO_EXT_FORMAT_TYPE_III 0x83 + +/// A.2.1 - Audio Class-Audio Data Format Type I UAC2 +//typedef enum +//{ +// AUDIO_DATA_FORMAT_TYPE_I_PCM = (uint32_t) (1 << 0), +// AUDIO_DATA_FORMAT_TYPE_I_PCM8 = (uint32_t) (1 << 1), +// AUDIO_DATA_FORMAT_TYPE_I_IEEE_FLOAT = (uint32_t) (1 << 2), +// AUDIO_DATA_FORMAT_TYPE_I_ALAW = (uint32_t) (1 << 3), +// AUDIO_DATA_FORMAT_TYPE_I_MULAW = (uint32_t) (1 << 4), +// AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA = 0x100000000, +//} audio_data_format_type_I_t; + +#define AUDIO_DATA_FORMAT_TYPE_I_PCM ((uint32_t) (1 << 0)) +#define AUDIO_DATA_FORMAT_TYPE_I_PCM8 ((uint32_t) (1 << 1)) +#define AUDIO_DATA_FORMAT_TYPE_I_IEEE_FLOAT ((uint32_t) (1 << 2)) +#define AUDIO_DATA_FORMAT_TYPE_I_ALAW ((uint32_t) (1 << 3)) +#define AUDIO_DATA_FORMAT_TYPE_I_MULAW ((uint32_t) (1 << 4)) +#define AUDIO_DATA_FORMAT_TYPE_I_RAW_DATA 0x100000000 + +/// All remaining definitions are taken from the descriptor descriptions in the UAC2 main specification + +/// Isochronous End Point Attributes +typedef enum +{ + TUSB_ISO_EP_ATT_NO_SYNC = 0x00, + TUSB_ISO_EP_ATT_ASYNCHRONOUS = 0x04, + TUSB_ISO_EP_ATT_ADAPTIVE = 0x08, + TUSB_ISO_EP_ATT_SYNCHRONOUS = 0x0C, + TUSB_ISO_EP_ATT_DATA = 0x00, ///< Data End Point + TUSB_ISO_EP_ATT_EXPLICIT_FB = 0x10, ///< Feedback End Point + TUSB_ISO_EP_ATT_IMPLICIT_FB = 0x20, ///< Data endpoint that also serves as an implicit feedback +} tusb_iso_ep_attribute_t; + +/// Audio Class-Control Values UAC2 +typedef enum +{ + AUDIO_CTRL_NONE = 0x00, ///< No Host access + AUDIO_CTRL_R = 0x01, ///< Host read access only + AUDIO_CTRL_RW = 0x03, ///< Host read write access +} audio_control_t; + +/// Audio Class-Specific AC Interface Descriptor Controls UAC2 +typedef enum +{ + AUDIO_CS_AS_INTERFACE_CTRL_LATENCY_POS = 0, +} audio_cs_ac_interface_control_pos_t; + +/// Audio Class-Specific AS Interface Descriptor Controls UAC2 +typedef enum +{ + AUDIO_CS_AS_INTERFACE_CTRL_ACTIVE_ALT_SET_POS = 0, + AUDIO_CS_AS_INTERFACE_CTRL_VALID_ALT_SET_POS = 2, +} audio_cs_as_interface_control_pos_t; + +/// Audio Class-Specific AS Isochronous Data EP Attributes UAC2 +typedef enum +{ + AUDIO_CS_AS_ISO_DATA_EP_ATT_MAX_PACKETS_ONLY = 0x80, + AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK = 0x00, +} audio_cs_as_iso_data_ep_attribute_t; + +/// Audio Class-Specific AS Isochronous Data EP Controls UAC2 +typedef enum +{ + AUDIO_CS_AS_ISO_DATA_EP_CTRL_PITCH_POS = 0, + AUDIO_CS_AS_ISO_DATA_EP_CTRL_DATA_OVERRUN_POS = 2, + AUDIO_CS_AS_ISO_DATA_EP_CTRL_DATA_UNDERRUN_POS = 4, +} audio_cs_as_iso_data_ep_control_pos_t; + +/// Audio Class-Specific AS Isochronous Data EP Lock Delay Units UAC2 +typedef enum +{ + AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_UNDEFINED = 0x00, + AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_MILLISEC = 0x01, + AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_PCM_SAMPLES = 0x02, +} audio_cs_as_iso_data_ep_lock_delay_unit_t; + +/// Audio Class-Clock Source Attributes UAC2 +typedef enum +{ + AUDIO_CLOCK_SOURCE_ATT_EXT_CLK = 0x00, + AUDIO_CLOCK_SOURCE_ATT_INT_FIX_CLK = 0x01, + AUDIO_CLOCK_SOURCE_ATT_INT_VAR_CLK = 0x02, + AUDIO_CLOCK_SOURCE_ATT_INT_PRO_CLK = 0x03, + AUDIO_CLOCK_SOURCE_ATT_CLK_SYC_SOF = 0x04, +} audio_clock_source_attribute_t; + +/// Audio Class-Clock Source Controls UAC2 +typedef enum +{ + AUDIO_CLOCK_SOURCE_CTRL_CLK_FRQ_POS = 0, + AUDIO_CLOCK_SOURCE_CTRL_CLK_VAL_POS = 2, +} audio_clock_source_control_pos_t; + +/// Audio Class-Clock Selector Controls UAC2 +typedef enum +{ + AUDIO_CLOCK_SELECTOR_CTRL_POS = 0, +} audio_clock_selector_control_pos_t; + +/// Audio Class-Clock Multiplier Controls UAC2 +typedef enum +{ + AUDIO_CLOCK_MULTIPLIER_CTRL_NUMERATOR_POS = 0, + AUDIO_CLOCK_MULTIPLIER_CTRL_DENOMINATOR_POS = 2, +} audio_clock_multiplier_control_pos_t; + +/// Audio Class-Input Terminal Controls UAC2 +typedef enum +{ + AUDIO_IN_TERM_CTRL_CPY_PROT_POS = 0, + AUDIO_IN_TERM_CTRL_CONNECTOR_POS = 2, + AUDIO_IN_TERM_CTRL_OVERLOAD_POS = 4, + AUDIO_IN_TERM_CTRL_CLUSTER_POS = 6, + AUDIO_IN_TERM_CTRL_UNDERFLOW_POS = 8, + AUDIO_IN_TERM_CTRL_OVERFLOW_POS = 10, +} audio_terminal_input_control_pos_t; + +/// Audio Class-Output Terminal Controls UAC2 +typedef enum +{ + AUDIO_OUT_TERM_CTRL_CPY_PROT_POS = 0, + AUDIO_OUT_TERM_CTRL_CONNECTOR_POS = 2, + AUDIO_OUT_TERM_CTRL_OVERLOAD_POS = 4, + AUDIO_OUT_TERM_CTRL_UNDERFLOW_POS = 6, + AUDIO_OUT_TERM_CTRL_OVERFLOW_POS = 8, +} audio_terminal_output_control_pos_t; + +/// Audio Class-Feature Unit Controls UAC2 +typedef enum +{ + AUDIO_FEATURE_UNIT_CTRL_MUTE_POS = 0, + AUDIO_FEATURE_UNIT_CTRL_VOLUME_POS = 2, + AUDIO_FEATURE_UNIT_CTRL_BASS_POS = 4, + AUDIO_FEATURE_UNIT_CTRL_MID_POS = 6, + AUDIO_FEATURE_UNIT_CTRL_TREBLE_POS = 8, + AUDIO_FEATURE_UNIT_CTRL_GRAPHIC_EQU_POS = 10, + AUDIO_FEATURE_UNIT_CTRL_AGC_POS = 12, + AUDIO_FEATURE_UNIT_CTRL_DELAY_POS = 14, + AUDIO_FEATURE_UNIT_CTRL_BASS_BOOST_POS = 16, + AUDIO_FEATURE_UNIT_CTRL_LOUDNESS_POS = 18, + AUDIO_FEATURE_UNIT_CTRL_INPUT_GAIN_POS = 20, + AUDIO_FEATURE_UNIT_CTRL_INPUT_GAIN_PAD_POS = 22, + AUDIO_FEATURE_UNIT_CTRL_PHASE_INV_POS = 24, + AUDIO_FEATURE_UNIT_CTRL_UNDERFLOW_POS = 26, + AUDIO_FEATURE_UNIT_CTRL_OVERFLOW_POS = 28, +} audio_feature_unit_control_pos_t; + +/// Audio Class-Audio Channel Configuration UAC2 +typedef enum +{ + AUDIO_CHANNEL_CONFIG_NON_PREDEFINED = 0x00000000, + AUDIO_CHANNEL_CONFIG_FRONT_LEFT = 0x00000001, + AUDIO_CHANNEL_CONFIG_FRONT_RIGHT = 0x00000002, + AUDIO_CHANNEL_CONFIG_FRONT_CENTER = 0x00000004, + AUDIO_CHANNEL_CONFIG_LOW_FRQ_EFFECTS = 0x00000008, + AUDIO_CHANNEL_CONFIG_BACK_LEFT = 0x00000010, + AUDIO_CHANNEL_CONFIG_BACK_RIGHT = 0x00000020, + AUDIO_CHANNEL_CONFIG_FRONT_LEFT_OF_CENTER = 0x00000040, + AUDIO_CHANNEL_CONFIG_FRONT_RIGHT_OF_CENTER = 0x00000080, + AUDIO_CHANNEL_CONFIG_BACK_CENTER = 0x00000100, + AUDIO_CHANNEL_CONFIG_SIDE_LEFT = 0x00000200, + AUDIO_CHANNEL_CONFIG_SIDE_RIGHT = 0x00000400, + AUDIO_CHANNEL_CONFIG_TOP_CENTER = 0x00000800, + AUDIO_CHANNEL_CONFIG_TOP_FRONT_LEFT = 0x00001000, + AUDIO_CHANNEL_CONFIG_TOP_FRONT_CENTER = 0x00002000, + AUDIO_CHANNEL_CONFIG_TOP_FRONT_RIGHT = 0x00004000, + AUDIO_CHANNEL_CONFIG_TOP_BACK_LEFT = 0x00008000, + AUDIO_CHANNEL_CONFIG_TOP_BACK_CENTER = 0x00010000, + AUDIO_CHANNEL_CONFIG_TOP_BACK_RIGHT = 0x00020000, + AUDIO_CHANNEL_CONFIG_TOP_FRONT_LEFT_OF_CENTER = 0x00040000, + AUDIO_CHANNEL_CONFIG_TOP_FRONT_RIGHT_OF_CENTER = 0x00080000, + AUDIO_CHANNEL_CONFIG_LEFT_LOW_FRQ_EFFECTS = 0x00100000, + AUDIO_CHANNEL_CONFIG_RIGHT_LOW_FRQ_EFFECTS = 0x00200000, + AUDIO_CHANNEL_CONFIG_TOP_SIDE_LEFT = 0x00400000, + AUDIO_CHANNEL_CONFIG_TOP_SIDE_RIGHT = 0x00800000, + AUDIO_CHANNEL_CONFIG_BOTTOM_CENTER = 0x01000000, + AUDIO_CHANNEL_CONFIG_BACK_LEFT_OF_CENTER = 0x02000000, + AUDIO_CHANNEL_CONFIG_BACK_RIGHT_OF_CENTER = 0x04000000, + AUDIO_CHANNEL_CONFIG_RAW_DATA = 0x80000000, +} audio_channel_config_t; + +/// AUDIO Channel Cluster Descriptor (4.1) +typedef struct TU_ATTR_PACKED { + uint8_t bNrChannels; ///< Number of channels currently connected. + audio_channel_config_t bmChannelConfig; ///< Bitmap according to 'audio_channel_config_t' with a 1 set if channel is connected and 0 else. In case channels are non-predefined ignore them here (see UAC2 specification 4.1 Audio Channel Cluster Descriptor. + uint8_t iChannelNames; ///< Index of a string descriptor, describing the name of the first inserted channel with a non-predefined spatial location. +} audio_desc_channel_cluster_t; + +/// AUDIO Class-Specific AC Interface Header Descriptor (4.7.2) +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor in bytes: 9. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_HEADER. + uint16_t bcdADC ; ///< Audio Device Class Specification Release Number in Binary-Coded Decimal. Value: U16_TO_U8S_LE(0x0200). + uint8_t bCategory ; ///< Constant, indicating the primary use of this audio function, as intended by the manufacturer. See: audio_function_t. + uint16_t wTotalLength ; ///< Total number of bytes returned for the class-specific AudioControl interface descriptor. Includes the combined length of this descriptor header and all Clock Source, Unit and Terminal descriptors. + uint8_t bmControls ; ///< See: audio_cs_ac_interface_control_pos_t. +} audio_desc_cs_ac_interface_t; + +/// AUDIO Clock Source Descriptor (4.7.2.1) +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor in bytes: 8. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_CLOCK_SOURCE. + uint8_t bClockID ; ///< Constant uniquely identifying the Clock Source Entity within the audio function. This value is used in all requests to address this Entity. + uint8_t bmAttributes ; ///< See: audio_clock_source_attribute_t. + uint8_t bmControls ; ///< See: audio_clock_source_control_pos_t. + uint8_t bAssocTerminal ; ///< Terminal ID of the Terminal that is associated with this Clock Source. + uint8_t iClockSource ; ///< Index of a string descriptor, describing the Clock Source Entity. +} audio_desc_clock_source_t; + +/// AUDIO Clock Selector Descriptor (4.7.2.2) for ONE pin +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor, in bytes: 7+p. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_CLOCK_SELECTOR. + uint8_t bClockID ; ///< Constant uniquely identifying the Clock Selector Entity within the audio function. This value is used in all requests to address this Entity. + uint8_t bNrInPins ; ///< Number of Input Pins of this Unit: p = 1 thus bNrInPins = 1. + uint8_t baCSourceID ; ///< ID of the Clock Entity to which the first Clock Input Pin of this Clock Selector Entity is connected.. + uint8_t bmControls ; ///< See: audio_clock_selector_control_pos_t. + uint8_t iClockSource ; ///< Index of a string descriptor, describing the Clock Selector Entity. +} audio_desc_clock_selector_t; + +/// AUDIO Clock Selector Descriptor (4.7.2.2) for multiple pins +#define audio_desc_clock_selector_n_t(source_num) \ + struct TU_ATTR_PACKED { \ + uint8_t bLength ; \ + uint8_t bDescriptorType ; \ + uint8_t bDescriptorSubType ; \ + uint8_t bClockID ; \ + uint8_t bNrInPins ; \ + struct TU_ATTR_PACKED { \ + uint8_t baSourceID ; \ + } sourceID[source_num] ; \ + uint8_t bmControls ; \ + uint8_t iClockSource ; \ +} + +/// AUDIO Clock Multiplier Descriptor (4.7.2.3) +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor, in bytes: 7. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_CLOCK_MULTIPLIER. + uint8_t bClockID ; ///< Constant uniquely identifying the Clock Multiplier Entity within the audio function. This value is used in all requests to address this Entity. + uint8_t bCSourceID ; ///< ID of the Clock Entity to which the last Clock Input Pin of this Clock Selector Entity is connected. + uint8_t bmControls ; ///< See: audio_clock_multiplier_control_pos_t. + uint8_t iClockSource ; ///< Index of a string descriptor, describing the Clock Multiplier Entity. +} audio_desc_clock_multiplier_t; + +/// AUDIO Input Terminal Descriptor(4.7.2.4) +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. + 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. + 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; + +/// AUDIO Output Terminal Descriptor(4.7.2.5) +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor, in bytes: 12. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_OUTPUT_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_output_type_t for other output types. + uint8_t bAssocTerminal ; ///< Constant, identifying the Input Terminal to which this Output Terminal is associated. + uint8_t bSourceID ; ///< ID of the Unit or Terminal to which this Terminal is connected. + uint8_t bCSourceID ; ///< ID of the Clock Entity to which this Output Terminal is connected. + uint16_t bmControls ; ///< See: audio_terminal_output_type_t. + uint8_t iTerminal ; ///< Index of a string descriptor, describing the Output Terminal. +} audio_desc_output_terminal_t; + +/// AUDIO Feature Unit Descriptor(4.7.2.8) for ONE channel +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor, in bytes: 14. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AC_INTERFACE_FEATURE_UNIT. + uint8_t bUnitID ; ///< Constant uniquely identifying the Unit within the audio function. This value is used in all requests to address this Unit. + uint8_t bSourceID ; ///< ID of the Unit or Terminal to which this Feature Unit is connected. + struct TU_ATTR_PACKED { + uint32_t bmaControls ; ///< See: audio_feature_unit_control_pos_t. Controls0 is master channel 0 (always present) and Controls1 is logical channel 1. + } controls[2] ; + uint8_t iTerminal ; ///< Index of a string descriptor, describing this Feature Unit. +} audio_desc_feature_unit_t; + +/// AUDIO Feature Unit Descriptor(4.7.2.8) for multiple channels +#define audio_desc_feature_unit_n_t(ch_num)\ + struct TU_ATTR_PACKED { \ + uint8_t bLength ; /* 6+(ch_num+1)*4 */\ + uint8_t bDescriptorType ; \ + uint8_t bDescriptorSubType ; \ + uint8_t bUnitID ; \ + uint8_t bSourceID ; \ + struct TU_ATTR_PACKED { \ + uint32_t bmaControls ; \ + } controls[ch_num+1] ; \ + uint8_t iTerminal ; \ +} + +/// AUDIO Class-Specific AS Interface Descriptor(4.9.2) +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor, in bytes: 16. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AS_INTERFACE_AS_GENERAL. + uint8_t bTerminalLink ; ///< The Terminal ID of the Terminal to which this interface is connected. + uint8_t bmControls ; ///< See: audio_cs_as_interface_control_pos_t. + uint8_t bFormatType ; ///< Constant identifying the Format Type the AudioStreaming interface is using. See: audio_format_type_t. + uint32_t bmFormats ; ///< The Audio Data Format(s) that can be used to communicate with this interface.See: audio_data_format_type_I_t. + uint8_t bNrChannels ; ///< Number of physical channels in the AS Interface audio channel cluster. + uint32_t bmChannelConfig ; ///< Describes the spatial location of the physical channels. See: audio_channel_config_t. + uint8_t iChannelNames ; ///< Index of a string descriptor, describing the name of the first physical channel. +} audio_desc_cs_as_interface_t; + +/// AUDIO Type I Format Type Descriptor(2.3.1.6 - Audio Formats) +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor, in bytes: 6. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_INTERFACE. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_AS_INTERFACE_FORMAT_TYPE. + uint8_t bFormatType ; ///< Constant identifying the Format Type the AudioStreaming interface is using. Value: AUDIO_FORMAT_TYPE_I. + uint8_t bSubslotSize ; ///< The number of bytes occupied by one audio subslot. Can be 1, 2, 3 or 4. + uint8_t bBitResolution ; ///< The number of effectively used bits from the available bits in an audio subslot. +} audio_desc_type_I_format_t; + +/// AUDIO Class-Specific AS Isochronous Audio Data Endpoint Descriptor(4.10.1.2) +typedef struct TU_ATTR_PACKED +{ + uint8_t bLength ; ///< Size of this descriptor, in bytes: 8. + uint8_t bDescriptorType ; ///< Descriptor Type. Value: TUSB_DESC_CS_ENDPOINT. + uint8_t bDescriptorSubType ; ///< Descriptor SubType. Value: AUDIO_CS_EP_SUBTYPE_GENERAL. + uint8_t bmAttributes ; ///< See: audio_cs_as_iso_data_ep_attribute_t. + uint8_t bmControls ; ///< See: audio_cs_as_iso_data_ep_control_pos_t. + uint8_t bLockDelayUnits ; ///< Indicates the units used for the wLockDelay field. See: audio_cs_as_iso_data_ep_lock_delay_unit_t. + uint16_t wLockDelay ; ///< Indicates the time it takes this endpoint to reliably lock its internal clock recovery circuitry. Units used depend on the value of the bLockDelayUnits field. +} audio_desc_cs_as_iso_data_ep_t; + +//// 5.2.3 Control Request Parameter Block Layout + +// 5.2.3.1 1-byte Control CUR Parameter Block +typedef struct TU_ATTR_PACKED +{ + int8_t bCur ; ///< The setting for the CUR attribute of the addressed Control +} audio_control_cur_1_t; + +// 5.2.3.2 2-byte Control CUR Parameter Block +typedef struct TU_ATTR_PACKED +{ + int16_t bCur ; ///< The setting for the CUR attribute of the addressed Control +} audio_control_cur_2_t; + +// 5.2.3.3 4-byte Control CUR Parameter Block +typedef struct TU_ATTR_PACKED +{ + int32_t bCur ; ///< The setting for the CUR attribute of the addressed Control +} audio_control_cur_4_t; + +// Use the following ONLY for RECEIVED data - compiler does not know how many subranges are defined! Use the one below for predefined lengths - or if you know what you are doing do what you like +// 5.2.3.1 1-byte Control RANGE Parameter Block +typedef struct TU_ATTR_PACKED { + uint16_t wNumSubRanges; + struct TU_ATTR_PACKED { + int8_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/ + int8_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/ + uint8_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/ + } subrange[] ; +} audio_control_range_1_t; + +// 5.2.3.2 2-byte Control RANGE Parameter Block +typedef struct TU_ATTR_PACKED { + uint16_t wNumSubRanges; + struct TU_ATTR_PACKED { + int16_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/ + int16_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/ + uint16_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/ + } subrange[] ; +} audio_control_range_2_t; + +// 5.2.3.3 4-byte Control RANGE Parameter Block +typedef struct TU_ATTR_PACKED { + uint16_t wNumSubRanges; + struct TU_ATTR_PACKED { + int32_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/ + int32_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/ + uint32_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/ + } subrange[] ; +} audio_control_range_4_t; + +// 5.2.3.1 1-byte Control RANGE Parameter Block +#define audio_control_range_1_n_t(numSubRanges) \ + struct TU_ATTR_PACKED { \ + uint16_t wNumSubRanges; \ + struct TU_ATTR_PACKED { \ + int8_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/\ + int8_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/\ + uint8_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/\ + } subrange[numSubRanges] ; \ +} + + /// 5.2.3.2 2-byte Control RANGE Parameter Block +#define audio_control_range_2_n_t(numSubRanges) \ + struct TU_ATTR_PACKED { \ + uint16_t wNumSubRanges; \ + struct TU_ATTR_PACKED { \ + int16_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/\ + int16_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/\ + uint16_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/\ + } subrange[numSubRanges]; \ +} + + // 5.2.3.3 4-byte Control RANGE Parameter Block +#define audio_control_range_4_n_t(numSubRanges) \ + struct TU_ATTR_PACKED { \ + uint16_t wNumSubRanges; \ + struct TU_ATTR_PACKED { \ + int32_t bMin ; /*The setting for the MIN attribute of the nth subrange of the addressed Control*/\ + int32_t bMax ; /*The setting for the MAX attribute of the nth subrange of the addressed Control*/\ + uint32_t bRes ; /*The setting for the RES attribute of the nth subrange of the addressed Control*/\ + } subrange[numSubRanges]; \ +} + + /** @} */ #ifdef __cplusplus - } + } #endif #endif -/** @} */ + /** @} */ diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/audio/audio_device.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/audio/audio_device.h new file mode 100644 index 00000000..d8623272 --- /dev/null +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/audio/audio_device.h @@ -0,0 +1,401 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2020 Ha Thach (tinyusb.org) + * Copyright (c) 2020 Reinhard Panhuber + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#ifndef _TUSB_AUDIO_DEVICE_H_ +#define _TUSB_AUDIO_DEVICE_H_ + +#include "assert.h" +#include "common/tusb_common.h" +#include "device/usbd.h" + +#include "audio.h" + +//--------------------------------------------------------------------+ +// Class Driver Configuration +//--------------------------------------------------------------------+ + +// Number of Standard AS Interface Descriptors (4.9.1) defined per audio function - this is required to be able to remember the current alternate settings of these interfaces - We restrict us here to have a constant number for all audio functions (which means this has to be the maximum number of AS interfaces an audio function has and a second audio function with less AS interfaces just waste a few bytes) +#ifndef CFG_TUD_AUDIO_N_AS_INT +#define CFG_TUD_AUDIO_N_AS_INT 0 +#endif + +// Size of control buffer used to receive and send control messages via EP0 - has to be big enough to hold your biggest request structure e.g. range requests with multiple intervals defined or cluster descriptors +#ifndef CFG_TUD_AUDIO_CTRL_BUF_SIZE +#error You must define an audio class control request buffer size! +#endif + +// Use of TX/RX FIFOs - If sizes are not zero, audio.c implements FIFOs for RX and TX (whatever defined). +// For RX: the input stream gets decoded into its corresponding channels, where for each channel a FIFO is setup to hold its data -> see: audio_rx_done_cb(). +// For TX: the output stream is composed from CFG_TUD_AUDIO_N_CHANNELS_TX channels, where for each channel a FIFO is defined. +// Further, it implements encoding and decoding of the individual channels (parameterized by the defines below). +// If you don't use the FIFOs you need to handle encoding and decoding on your own in audio_rx_done_cb() and audio_tx_done_cb(). This, however, allows for optimizations. + +#ifndef CFG_TUD_AUDIO_TX_FIFO_SIZE +#define CFG_TUD_AUDIO_TX_FIFO_SIZE 0 // Buffer size per channel +#endif + +#ifndef CFG_TUD_AUDIO_RX_FIFO_SIZE +#define CFG_TUD_AUDIO_RX_FIFO_SIZE 0 // Buffer size per channel +#endif + +// End point sizes - Limits: Full Speed <= 1023, High Speed <= 1024 +#ifndef CFG_TUD_AUDIO_EPSIZE_IN +#define CFG_TUD_AUDIO_EPSIZE_IN 0 // TX +#endif + +#ifndef CFG_TUD_AUDIO_EPSIZE_OUT +#define CFG_TUD_AUDIO_EPSIZE_OUT 0 // RX +#endif + +#ifndef CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP +#define CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP 0 // Feedback +#endif + +#ifndef CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN +#define CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN 0 // Audio interrupt control +#endif + +#if CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN +#ifndef CFG_TUD_AUDIO_INT_CTR_BUFSIZE +#define CFG_TUD_AUDIO_INT_CTR_BUFSIZE 6 // Buffer size of audio control interrupt EP - 6 Bytes according to UAC 2 specification (p. 74) +#endif +#endif + +#ifndef CFG_TUD_AUDIO_N_CHANNELS_TX +#define CFG_TUD_AUDIO_N_CHANNELS_TX 1 +#endif + +#ifndef CFG_TUD_AUDIO_N_CHANNELS_RX +#define CFG_TUD_AUDIO_N_CHANNELS_RX 1 +#endif + +// Audio data format types +#ifndef CFG_TUD_AUDIO_FORMAT_TYPE_TX +#define CFG_TUD_AUDIO_FORMAT_TYPE_TX AUDIO_FORMAT_TYPE_UNDEFINED // If this option is used, an encoding function has to be implemented in audio_device.c +#endif + +#ifndef CFG_TUD_AUDIO_FORMAT_TYPE_RX +#define CFG_TUD_AUDIO_FORMAT_TYPE_RX AUDIO_FORMAT_TYPE_UNDEFINED // If this option is used, a decoding function has to be implemented in audio_device.c +#endif + +// Audio data format type I specifications +#if CFG_TUD_AUDIO_FORMAT_TYPE_TX == AUDIO_FORMAT_TYPE_I + +// Type definitions - for possible formats see: audio_data_format_type_I_t and further in UAC2 specifications. +#ifndef CFG_TUD_AUDIO_FORMAT_TYPE_I_TX +#define CFG_TUD_AUDIO_FORMAT_TYPE_I_TX AUDIO_DATA_FORMAT_TYPE_I_PCM +#endif + +#ifndef CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_TX // bSubslotSize +#define CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_TX 1 +#endif + +#ifndef CFG_TUD_AUDIO_TX_ITEMSIZE +#if CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_TX == 1 +#define CFG_TUD_AUDIO_TX_ITEMSIZE 1 +#elif CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_TX == 2 +#define CFG_TUD_AUDIO_TX_ITEMSIZE 2 +#else +#define CFG_TUD_AUDIO_TX_ITEMSIZE 4 +#endif +#endif + +#if CFG_TUD_AUDIO_TX_ITEMSIZE < CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_TX +#error FIFO element size (ITEMSIZE) must not be smaller then sample size +#endif + +#endif + +#if CFG_TUD_AUDIO_FORMAT_TYPE_RX == AUDIO_FORMAT_TYPE_I + +#ifndef CFG_TUD_AUDIO_FORMAT_TYPE_I_RX +#define CFG_TUD_AUDIO_FORMAT_TYPE_I_RX AUDIO_DATA_FORMAT_TYPE_I_PCM +#endif + +#ifndef CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_RX // bSubslotSize +#define CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_RX 1 +#endif + +#if CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_RX == 1 +#define CFG_TUD_AUDIO_RX_ITEMSIZE 1 +#elif CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_RX == 2 +#define CFG_TUD_AUDIO_RX_ITEMSIZE 2 +#else +#define CFG_TUD_AUDIO_RX_ITEMSIZE 4 +#endif + +#endif + +//static_assert(sizeof(tud_audio_desc_lengths) != CFG_TUD_AUDIO, "Supply audio function descriptor pack length!"); + +// Supported types of this driver: +// AUDIO_DATA_FORMAT_TYPE_I_PCM - Required definitions: CFG_TUD_AUDIO_N_CHANNELS and CFG_TUD_AUDIO_BYTES_PER_CHANNEL + +#ifdef __cplusplus +extern "C" { +#endif + +/** \addtogroup AUDIO_Serial Serial + * @{ + * \defgroup AUDIO_Serial_Device Device + * @{ */ + +//--------------------------------------------------------------------+ +// Application API (Multiple Interfaces) +// CFG_TUD_AUDIO > 1 +//--------------------------------------------------------------------+ +bool tud_audio_n_mounted (uint8_t itf); + +#if CFG_TUD_AUDIO_EPSIZE_OUT && CFG_TUD_AUDIO_RX_FIFO_SIZE +#if CFG_TUD_AUDIO_RX_FIFO_COUNT > 1 +uint16_t tud_audio_n_available (uint8_t itf, uint8_t channelId); +uint16_t tud_audio_n_read (uint8_t itf, uint8_t channelId, void* buffer, uint16_t bufsize); +void tud_audio_n_read_flush (uint8_t itf, uint8_t channelId); +#else +uint16_t tud_audio_n_available (uint8_t itf); +uint16_t tud_audio_n_read (uint8_t itf, void* buffer, uint16_t bufsize); +void tud_audio_n_read_flush (uint8_t itf); +#endif +#endif + +/* This function is intended for later use once EP buffers (at least for ISO EPs) are implemented as ring buffers +#if CFG_TUD_AUDIO_EPSIZE_IN && !CFG_TUD_AUDIO_TX_FIFO_SIZE +uint16_t tud_audio_n_write_ep_in_buffer(uint8_t itf, const void * data, uint16_t len) +#endif +*/ + +#ifndef CFG_TUD_AUDIO_TX_FIFO_COUNT +#define CFG_TUD_AUDIO_TX_FIFO_COUNT 1 +#endif + +#if CFG_TUD_AUDIO_EPSIZE_IN && CFG_TUD_AUDIO_TX_FIFO_SIZE +#if CFG_TUD_AUDIO_TX_FIFO_COUNT > 1 +uint16_t tud_audio_n_write (uint8_t itf, uint8_t channelId, const void * data, uint16_t len); +#else +uint16_t tud_audio_n_write (uint8_t itf, const void * data, uint16_t len); +#endif +uint16_t tud_audio_n_write_flush(uint8_t itf); +#endif + +#if CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN > 0 +uint16_t tud_audio_int_ctr_n_available (uint8_t itf); +uint16_t tud_audio_int_ctr_n_read (uint8_t itf, void* buffer, uint16_t bufsize); +void tud_audio_int_ctr_n_read_flush (uint8_t itf); +uint16_t tud_audio_int_ctr_n_write (uint8_t itf, uint8_t const* buffer, uint16_t bufsize); +#endif + +//--------------------------------------------------------------------+ +// Application API (Interface0) +//--------------------------------------------------------------------+ + +static inline bool tud_audio_mounted (void); + +#if CFG_TUD_AUDIO_EPSIZE_OUT && CFG_TUD_AUDIO_RX_FIFO_SIZE +static inline uint16_t tud_audio_available (void); +static inline uint16_t tud_audio_read (void* buffer, uint16_t bufsize); +static inline void tud_audio_read_flush (void); +#endif + +#if CFG_TUD_AUDIO_EPSIZE_IN && CFG_TUD_AUDIO_TX_FIFO_SIZE +#if CFG_TUD_AUDIO_TX_FIFO_COUNT > 1 +static inline uint16_t tud_audio_write (uint8_t channelId, uint8_t const* buffer, uint16_t bufsize); +#else +static inline uint16_t tud_audio_write (uint8_t const* buffer, uint16_t bufsize); +#endif +#endif + +#if CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN > 0 +static inline uint32_t tud_audio_int_ctr_available (void); +static inline uint32_t tud_audio_int_ctr_read (void* buffer, uint32_t bufsize); +static inline void tud_audio_int_ctr_read_flush (void); +static inline uint32_t tud_audio_int_ctr_write (uint8_t const* buffer, uint32_t bufsize); +#endif + +// Buffer control EP data and schedule a transmit +// This function is intended to be used if you do not have a persistent buffer or memory location available (e.g. non-local variables) and need to answer onto a +// get request. This function buffers your answer request frame into the control buffer of the corresponding audio driver and schedules a transmit for sending it. +// Since transmission is triggered via interrupts, a persistent memory location is required onto which the buffer pointer in pointing. If you already have such +// available you may directly use 'tud_control_xfer(...)'. In this case data does not need to be copied into an additional buffer and you save some time. +// If the request's wLength is zero, a status packet is sent instead. +bool tud_audio_buffer_and_schedule_control_xfer(uint8_t rhport, tusb_control_request_t const * p_request, void* data, uint16_t len); + +//--------------------------------------------------------------------+ +// Application Callback API (weak is optional) +//--------------------------------------------------------------------+ + +#if CFG_TUD_AUDIO_EPSIZE_IN +TU_ATTR_WEAK bool tud_audio_tx_done_pre_load_cb(uint8_t rhport, uint8_t itf, uint8_t ep_in, uint8_t cur_alt_setting); +TU_ATTR_WEAK bool tud_audio_tx_done_post_load_cb(uint8_t rhport, uint16_t n_bytes_copied, uint8_t itf, uint8_t ep_in, uint8_t cur_alt_setting); +#endif + +#if CFG_TUD_AUDIO_EPSIZE_OUT +TU_ATTR_WEAK bool tud_audio_rx_done_cb(uint8_t rhport, uint8_t * buffer, uint16_t bufsize); +#endif + +#if CFG_TUD_AUDIO_EPSIZE_OUT > 0 && CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP +TU_ATTR_WEAK bool tud_audio_fb_done_cb(uint8_t rhport); +// User code should call this function with feedback value in 16.16 format for FS and HS. +// Value will be corrected for FS to 10.14 format automatically. +// (see Universal Serial Bus Specification Revision 2.0 5.12.4.2). +// Feedback value will be sent at FB endpoint interval till it's changed. +bool tud_audio_fb_set(uint8_t rhport, uint32_t feedback); +#endif + +#if CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN +TU_ATTR_WEAK bool tud_audio_int_ctr_done_cb(uint8_t rhport, uint16_t * n_bytes_copied); +#endif + +// Invoked when audio set interface request received +TU_ATTR_WEAK bool tud_audio_set_itf_cb(uint8_t rhport, tusb_control_request_t const * p_request); + +// Invoked when audio set interface request received which closes an EP +TU_ATTR_WEAK bool tud_audio_set_itf_close_EP_cb(uint8_t rhport, tusb_control_request_t const * p_request); + +// Invoked when audio class specific set request received for an EP +TU_ATTR_WEAK bool tud_audio_set_req_ep_cb(uint8_t rhport, tusb_control_request_t const * p_request, uint8_t *pBuff); + +// Invoked when audio class specific set request received for an interface +TU_ATTR_WEAK bool tud_audio_set_req_itf_cb(uint8_t rhport, tusb_control_request_t const * p_request, uint8_t *pBuff); + +// Invoked when audio class specific set request received for an entity +TU_ATTR_WEAK bool tud_audio_set_req_entity_cb(uint8_t rhport, tusb_control_request_t const * p_request, uint8_t *pBuff); + +// Invoked when audio class specific get request received for an EP +TU_ATTR_WEAK bool tud_audio_get_req_ep_cb(uint8_t rhport, tusb_control_request_t const * p_request); + +// Invoked when audio class specific get request received for an interface +TU_ATTR_WEAK bool tud_audio_get_req_itf_cb(uint8_t rhport, tusb_control_request_t const * p_request); + +// Invoked when audio class specific get request received for an entity +TU_ATTR_WEAK bool tud_audio_get_req_entity_cb(uint8_t rhport, tusb_control_request_t const * p_request); + +//--------------------------------------------------------------------+ +// Inline Functions +//--------------------------------------------------------------------+ + +static inline bool tud_audio_mounted(void) +{ + return tud_audio_n_mounted(0); +} + +#if CFG_TUD_AUDIO_EPSIZE_IN +#if CFG_TUD_AUDIO_TX_FIFO_SIZE && CFG_TUD_AUDIO_TX_FIFO_COUNT > 1 +static inline uint16_t tud_audio_write (uint8_t channelId, uint8_t const* buffer, uint16_t n_bytes) // Short version if only one audio function is used +{ + return tud_audio_n_write(0, channelId, buffer, n_bytes); +} +#else +static inline uint16_t tud_audio_write (uint8_t const* buffer, uint16_t n_bytes) // Short version if only one audio function is used +{ + return tud_audio_n_write(0, buffer, n_bytes); +} +#endif + +static inline uint16_t tud_audio_write_flush (void) // Short version if only one audio function is used +{ +#if CFG_TUD_AUDIO_TX_FIFO_SIZE + return tud_audio_n_write_flush(0); +#else + return 0; +#endif +} +#endif // CFG_TUD_AUDIO_EPSIZE_IN && CFG_TUD_AUDIO_TX_FIFO_SIZE + +#if CFG_TUD_AUDIO_EPSIZE_OUT && CFG_TUD_AUDIO_RX_FIFO_SIZE +#if CFG_TUD_AUDIO_RX_FIFO_COUNT > 1 +static inline uint16_t tud_audio_available(uint8_t channelId) +{ + return tud_audio_n_available(0, channelId); +} + +static inline uint16_t tud_audio_read(uint8_t channelId, void* buffer, uint16_t bufsize) +{ + return tud_audio_n_read(0, channelId, buffer, bufsize); +} + +static inline void tud_audio_read_flush(uint8_t channelId) +{ + tud_audio_n_read_flush(0, channelId); +} +#else +static inline uint16_t tud_audio_available(void) +{ + return tud_audio_n_available(0); +} + +static inline uint16_t tud_audio_read(void *buffer, uint16_t bufsize) +{ + return tud_audio_n_read(0, buffer, bufsize); +} + +static inline void tud_audio_read_flush(void) +{ + tud_audio_n_read_flush(0); +} +#endif +#endif + +#if CFG_TUD_AUDIO_INT_CTR_EPSIZE_IN > 0 +static inline uint16_t tud_audio_int_ctr_available(void) +{ + return tud_audio_int_ctr_n_available(0); +} + +static inline uint16_t tud_audio_int_ctr_read(void* buffer, uint16_t bufsize) +{ + return tud_audio_int_ctr_n_read(0, buffer, bufsize); +} + +static inline void tud_audio_int_ctr_read_flush(void) +{ + return tud_audio_int_ctr_n_read_flush(0); +} + +static inline uint16_t tud_audio_int_ctr_write(uint8_t const* buffer, uint16_t bufsize) +{ + return tud_audio_int_ctr_n_write(0, buffer, bufsize); +} +#endif + +//--------------------------------------------------------------------+ +// Internal Class Driver API +//--------------------------------------------------------------------+ +void audiod_init (void); +void audiod_reset (uint8_t rhport); +uint16_t audiod_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t max_len); +bool audiod_control_request (uint8_t rhport, tusb_control_request_t const * request); +bool audiod_control_complete (uint8_t rhport, tusb_control_request_t const * request); +bool audiod_xfer_cb (uint8_t rhport, uint8_t edpt_addr, xfer_result_t result, uint32_t xferred_bytes); + +#ifdef __cplusplus +} +#endif + +#endif /* _TUSB_AUDIO_DEVICE_H_ */ + +/** @} */ +/** @} */ diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/cdc/cdc_device.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/cdc/cdc_device.h index f9692e20..3c679c48 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/cdc/cdc_device.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/cdc/cdc_device.h @@ -57,7 +57,6 @@ // CFG_TUD_CDC > 1 //--------------------------------------------------------------------+ - // Check if terminal is connected to this port bool tud_cdc_n_connected (uint8_t itf); @@ -93,7 +92,7 @@ uint32_t tud_cdc_n_write (uint8_t itf, void const* buffer, uint32_t bu static inline uint32_t tud_cdc_n_write_char (uint8_t itf, char ch); -// Write a nul-terminated string +// Write a null-terminated string static inline uint32_t tud_cdc_n_write_str (uint8_t itf, char const* str); diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_device.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_device.h index f7ad38ba..d5b5b729 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_device.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_device.h @@ -1,4 +1,4 @@ -/* +/* * The MIT License (MIT) * * Copyright (c) 2019 Ha Thach (tinyusb.org) @@ -50,51 +50,104 @@ #endif //--------------------------------------------------------------------+ -// Application API +// Application API (Multiple Ports) +// CFG_TUD_HID > 1 //--------------------------------------------------------------------+ // Check if the interface is ready to use -bool tud_hid_ready(void); +bool tud_hid_n_ready(uint8_t itf); // Check if current mode is Boot (true) or Report (false) -bool tud_hid_boot_mode(void); +bool tud_hid_n_boot_mode(uint8_t itf); // Send report to host -bool tud_hid_report(uint8_t report_id, void const* report, uint8_t len); +bool tud_hid_n_report(uint8_t itf, uint8_t report_id, void const* report, uint8_t len); // KEYBOARD: convenient helper to send keyboard report if application // use template layout report as defined by hid_keyboard_report_t -bool tud_hid_keyboard_report(uint8_t report_id, uint8_t modifier, uint8_t keycode[6]); +bool tud_hid_n_keyboard_report(uint8_t itf, uint8_t report_id, uint8_t modifier, uint8_t keycode[6]); // MOUSE: convenient helper to send mouse report if application // use template layout report as defined by hid_mouse_report_t -bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8_t x, int8_t y, int8_t vertical, int8_t horizontal); +bool tud_hid_n_mouse_report(uint8_t itf, uint8_t report_id, uint8_t buttons, int8_t x, int8_t y, int8_t vertical, int8_t horizontal); + +//--------------------------------------------------------------------+ +// Application API (Single Port) +//--------------------------------------------------------------------+ +static inline bool tud_hid_ready(void); +static inline bool tud_hid_boot_mode(void); +static inline bool tud_hid_report(uint8_t report_id, void const* report, uint8_t len); +static inline bool tud_hid_keyboard_report(uint8_t report_id, uint8_t modifier, uint8_t keycode[6]); +static inline bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8_t x, int8_t y, int8_t vertical, int8_t horizontal); //--------------------------------------------------------------------+ // Callbacks (Weak is optional) //--------------------------------------------------------------------+ +#if CFG_TUD_HID > 1 + // Invoked when received GET HID REPORT DESCRIPTOR request // Application return pointer to descriptor, whose contents must exist long enough for transfer to complete -uint8_t const * tud_hid_descriptor_report_cb(void); +uint8_t const * tud_hid_descriptor_report_cb(uint8_t itf); // Invoked when received GET_REPORT control request // Application must fill buffer report's content and return its length. // Return zero will cause the stack to STALL request -uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen); +uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen); // Invoked when received SET_REPORT control request or // received data on OUT endpoint ( Report ID = 0, Type = 0 ) -void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize); +void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize); // Invoked when received SET_PROTOCOL request ( mode switch Boot <-> Report ) -TU_ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t boot_mode); +TU_ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t itf, uint8_t boot_mode); // Invoked when received SET_IDLE request. return false will stall the request // - Idle Rate = 0 : only send report if there is changes, i.e skip duplication // - Idle Rate > 0 : skip duplication, but send at least 1 report every idle rate (in unit of 4 ms). +TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t itf, uint8_t idle_rate); + +#else + +// TODO for backward compatible callback, remove later when appropriate +uint8_t const * tud_hid_descriptor_report_cb(void); +uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen); +void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize); + +TU_ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t boot_mode); TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t idle_rate); +#endif + + +//--------------------------------------------------------------------+ +// Inline Functions +//--------------------------------------------------------------------+ +static inline bool tud_hid_ready(void) +{ + return tud_hid_n_ready(0); +} + +static inline bool tud_hid_boot_mode(void) +{ + return tud_hid_n_boot_mode(0); +} + +static inline bool tud_hid_report(uint8_t report_id, void const* report, uint8_t len) +{ + return tud_hid_n_report(0, report_id, report, len); +} + +static inline bool tud_hid_keyboard_report(uint8_t report_id, uint8_t modifier, uint8_t keycode[6]) +{ + return tud_hid_n_keyboard_report(0, report_id, modifier, keycode); +} + +static inline bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8_t x, int8_t y, int8_t vertical, int8_t horizontal) +{ + return tud_hid_n_mouse_report(0, report_id, buttons, x, y, vertical, horizontal); +} + /* --------------------------------------------------------------------+ * HID Report Descriptor Template * @@ -264,7 +317,7 @@ TU_ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t idle_rate); HID_LOGICAL_MAX ( 1 ) ,\ HID_REPORT_COUNT ( 16 ) ,\ HID_REPORT_SIZE ( 1 ) ,\ - HID_INPUT ( HID_DATA | HID_ARRAY | HID_ABSOLUTE ) ,\ + HID_INPUT ( HID_DATA | HID_VARIABLE | HID_ABSOLUTE ) ,\ /* X, Y, Z, Rz (min -127, max 127 ) */ \ HID_USAGE_PAGE ( HID_USAGE_PAGE_DESKTOP ) ,\ HID_LOGICAL_MIN ( 0x81 ) ,\ @@ -318,4 +371,3 @@ bool hidd_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t e #endif #endif /* _TUSB_HID_DEVICE_H_ */ - diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_host.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_host.h index a3b614cd..2e7f5267 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_host.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/hid/hid_host.h @@ -195,15 +195,9 @@ void tuh_hid_generic_isr(uint8_t dev_addr, xfer_result_t event); //--------------------------------------------------------------------+ // Internal Class Driver API //--------------------------------------------------------------------+ -typedef struct { - pipe_handle_t pipe_hdl; - uint16_t report_size; - uint8_t interface_number; -}hidh_interface_info_t; - void hidh_init(void); -bool hidh_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length); -void hidh_isr(pipe_handle_t pipe_hdl, xfer_result_t event, uint32_t xferred_bytes); +bool hidh_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length); +void hidh_isr(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes); void hidh_close(uint8_t dev_addr); #ifdef __cplusplus diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/midi/midi_device.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/midi/midi_device.h index 1828a21a..b8fb55cc 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/midi/midi_device.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/midi/midi_device.h @@ -72,7 +72,7 @@ bool tud_midi_n_receive (uint8_t itf, uint8_t packet[4]); bool tud_midi_n_send (uint8_t itf, uint8_t const packet[4]); //--------------------------------------------------------------------+ -// Application API (Interface0) +// Application API (Single Interface) //--------------------------------------------------------------------+ static inline bool tud_midi_mounted (void); static inline uint32_t tud_midi_available (void); diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/msc/msc_host.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/msc/msc_host.h index 76cf8685..959294ad 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/msc/msc_host.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/class/msc/msc_host.h @@ -175,7 +175,7 @@ void tuh_msc_isr(uint8_t dev_addr, xfer_result_t event, uint32_t xferred_bytes); //--------------------------------------------------------------------+ typedef struct { - uint8_t itf_numr; + uint8_t itf_num; uint8_t ep_in; uint8_t ep_out; diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_common.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_common.h index d95c0ffc..15892fa3 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_common.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_common.h @@ -47,10 +47,10 @@ #define U16_TO_U8S_BE(u16) TU_U16_HIGH(u16), TU_U16_LOW(u16) #define U16_TO_U8S_LE(u16) TU_U16_LOW(u16), TU_U16_HIGH(u16) -#define U32_B1_U8(u32) ((uint8_t) (((u32) >> 24) & 0x000000ff)) // MSB -#define U32_B2_U8(u32) ((uint8_t) (((u32) >> 16) & 0x000000ff)) -#define U32_B3_U8(u32) ((uint8_t) (((u32) >> 8) & 0x000000ff)) -#define U32_B4_U8(u32) ((uint8_t) ((u32) & 0x000000ff)) // LSB +#define U32_B1_U8(u32) ((uint8_t) ((((uint32_t) u32) >> 24) & 0x000000ff)) // MSB +#define U32_B2_U8(u32) ((uint8_t) ((((uint32_t) u32) >> 16) & 0x000000ff)) +#define U32_B3_U8(u32) ((uint8_t) ((((uint32_t) u32) >> 8) & 0x000000ff)) +#define U32_B4_U8(u32) ((uint8_t) (((uint32_t) u32) & 0x000000ff)) // LSB #define U32_TO_U8S_BE(u32) U32_B1_U8(u32), U32_B2_U8(u32), U32_B3_U8(u32), U32_B4_U8(u32) #define U32_TO_U8S_LE(u32) U32_B4_U8(u32), U32_B3_U8(u32), U32_B2_U8(u32), U32_B1_U8(u32) diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_compiler.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_compiler.h index 6f6aa3c3..50554207 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_compiler.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_compiler.h @@ -44,8 +44,10 @@ #endif // Compile-time Assert -#if __STDC_VERSION__ >= 201112L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #define TU_VERIFY_STATIC _Static_assert +#elif defined (__cplusplus) && __cplusplus >= 201103L + #define TU_VERIFY_STATIC static_assert #else #define TU_VERIFY_STATIC(const_expr, _mess) enum { TU_XSTRCAT(_verify_static_, _TU_COUNTER_) = 1/(!!(const_expr)) } #endif diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_fifo.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_fifo.h index fb0c896f..b8769574 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_fifo.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_fifo.h @@ -31,6 +31,15 @@ #ifndef _TUSB_FIFO_H_ #define _TUSB_FIFO_H_ +// Due to the use of unmasked pointers, this FIFO does not suffer from loosing +// one item slice. Furthermore, write and read operations are completely +// decoupled as write and read functions do not modify a common state. Henceforth, +// writing or reading from the FIFO within an ISR is safe as long as no other +// process (thread or ISR) interferes. +// Also, this FIFO is ready to be used in combination with a DMA as the write and +// read pointers can be updated from within a DMA ISR. Overflows are detectable +// within a certain number (see tu_fifo_overflow()). + // mutex is only needed for RTOS // for OS None, we don't get preempted #define CFG_FIFO_MUTEX (CFG_TUSB_OS != OPT_OS_NONE) @@ -39,7 +48,7 @@ #include #ifdef __cplusplus - extern "C" { +extern "C" { #endif #if CFG_FIFO_MUTEX @@ -52,14 +61,16 @@ */ 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 item_size ; ///< size of each item + bool overwritable ; - volatile uint16_t count ; ///< number of items in queue - volatile uint16_t wr_idx ; ///< write pointer - volatile uint16_t rd_idx ; ///< read pointer + uint16_t non_used_index_space ; ///< required for non-power-of-two buffer length + uint16_t max_pointer_idx ; ///< maximum absolute pointer index + + volatile uint16_t wr_idx ; ///< write pointer + volatile uint16_t rd_idx ; ///< read pointer #if CFG_FIFO_MUTEX tu_fifo_mutex_t mutex; @@ -67,14 +78,16 @@ typedef struct } tu_fifo_t; -#define TU_FIFO_DEF(_name, _depth, _type, _overwritable) \ - uint8_t _name##_buf[_depth*sizeof(_type)]; \ - tu_fifo_t _name = { \ - .buffer = _name##_buf, \ - .depth = _depth, \ - .item_size = sizeof(_type), \ - .overwritable = _overwritable, \ - } +#define TU_FIFO_DEF(_name, _depth, _type, _overwritable) \ + uint8_t _name##_buf[_depth*sizeof(_type)]; \ + tu_fifo_t _name = { \ + .buffer = _name##_buf, \ + .depth = _depth, \ + .item_size = sizeof(_type), \ + .overwritable = _overwritable, \ + .max_pointer_idx = 2*_depth-1, \ + .non_used_index_space = 0xFFFF - 2*_depth-1, \ + } bool tu_fifo_clear(tu_fifo_t *f); bool tu_fifo_config(tu_fifo_t *f, void* buffer, uint16_t depth, uint16_t item_size, bool overwritable); @@ -86,46 +99,39 @@ static inline void tu_fifo_config_mutex(tu_fifo_t *f, tu_fifo_mutex_t mutex_hdl) } #endif -bool tu_fifo_write (tu_fifo_t* f, void const * p_data); -uint16_t tu_fifo_write_n (tu_fifo_t* f, void const * p_data, uint16_t count); +bool tu_fifo_write (tu_fifo_t* f, void const * p_data); +uint16_t tu_fifo_write_n (tu_fifo_t* f, void const * p_data, uint16_t count); -bool tu_fifo_read (tu_fifo_t* f, void * p_buffer); -uint16_t tu_fifo_read_n (tu_fifo_t* f, void * p_buffer, uint16_t count); +bool tu_fifo_read (tu_fifo_t* f, void * p_buffer); +uint16_t tu_fifo_read_n (tu_fifo_t* f, void * p_buffer, uint16_t count); -bool tu_fifo_peek_at (tu_fifo_t* f, uint16_t pos, void * p_buffer); +bool tu_fifo_peek_at (tu_fifo_t* f, uint16_t pos, void * p_buffer); +uint16_t tu_fifo_peek_at_n (tu_fifo_t* f, uint16_t pos, void * p_buffer, uint16_t n); + +uint16_t tu_fifo_count (tu_fifo_t* f); +bool tu_fifo_empty (tu_fifo_t* f); +bool tu_fifo_full (tu_fifo_t* f); +uint16_t tu_fifo_remaining (tu_fifo_t* f); +bool tu_fifo_overflowed (tu_fifo_t* f); +void tu_fifo_correct_read_pointer (tu_fifo_t* f); + +// Pointer modifications intended to be used in combinations with DMAs. +// USE WITH CARE - NO SAFTY CHECKS CONDUCTED HERE! NOT MUTEX PROTECTED! +void tu_fifo_advance_write_pointer (tu_fifo_t *f, uint16_t n); +void tu_fifo_advance_read_pointer (tu_fifo_t *f, uint16_t n); static inline bool tu_fifo_peek(tu_fifo_t* f, void * p_buffer) { return tu_fifo_peek_at(f, 0, p_buffer); } -static inline bool tu_fifo_empty(tu_fifo_t* f) -{ - return (f->count == 0); -} - -static inline bool tu_fifo_full(tu_fifo_t* f) -{ - return (f->count == f->depth); -} - -static inline uint16_t tu_fifo_count(tu_fifo_t* f) -{ - return f->count; -} - -static inline uint16_t tu_fifo_remaining(tu_fifo_t* f) -{ - return f->depth - f->count; -} - static inline uint16_t tu_fifo_depth(tu_fifo_t* f) { return f->depth; } #ifdef __cplusplus - } +} #endif #endif /* _TUSB_FIFO_H_ */ diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_verify.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_verify.h index 406f5e6e..8b724aef 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_verify.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/common/tusb_verify.h @@ -76,8 +76,8 @@ #if CFG_TUSB_DEBUG #include - #define _MESS_ERR(_err) printf("%s %d: failed, error = %s\r\n", __func__, __LINE__, tusb_strerr[_err]) - #define _MESS_FAILED() printf("%s %d: assert failed\r\n", __func__, __LINE__) + #define _MESS_ERR(_err) tu_printf("%s %d: failed, error = %s\r\n", __func__, __LINE__, tusb_strerr[_err]) + #define _MESS_FAILED() tu_printf("%s %d: assert failed\r\n", __func__, __LINE__) #else #define _MESS_ERR(_err) do {} while (0) #define _MESS_FAILED() do {} while (0) @@ -142,7 +142,9 @@ #define ASSERT_1ARGS(_cond) TU_VERIFY_DEFINE(_cond, _MESS_FAILED(); TU_BREAKPOINT(), false) #define ASSERT_2ARGS(_cond, _ret) TU_VERIFY_DEFINE(_cond, _MESS_FAILED(); TU_BREAKPOINT(), _ret) +#ifndef TU_ASSERT #define TU_ASSERT(...) GET_3RD_ARG(__VA_ARGS__, ASSERT_2ARGS, ASSERT_1ARGS,UNUSED)(__VA_ARGS__) +#endif // TODO remove TU_ASSERT_ERR() later @@ -163,10 +165,12 @@ /* ASSERT Error * basically TU_VERIFY Error with TU_BREAKPOINT() as handler *------------------------------------------------------------------*/ -#define ASERT_ERR_1ARGS(_error) TU_VERIFY_ERR_DEF2(_error, TU_BREAKPOINT()) -#define ASERT_ERR_2ARGS(_error, _ret) TU_VERIFY_ERR_DEF3(_error, TU_BREAKPOINT(), _ret) +#define ASSERT_ERR_1ARGS(_error) TU_VERIFY_ERR_DEF2(_error, TU_BREAKPOINT()) +#define ASSERT_ERR_2ARGS(_error, _ret) TU_VERIFY_ERR_DEF3(_error, TU_BREAKPOINT(), _ret) -#define TU_ASSERT_ERR(...) GET_3RD_ARG(__VA_ARGS__, ASERT_ERR_2ARGS, ASERT_ERR_1ARGS,UNUSED)(__VA_ARGS__) +#ifndef TU_ASSERT_ERR +#define TU_ASSERT_ERR(...) GET_3RD_ARG(__VA_ARGS__, ASSERT_ERR_2ARGS, ASSERT_ERR_1ARGS,UNUSED)(__VA_ARGS__) +#endif /*------------------------------------------------------------------*/ /* ASSERT HDLR diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/dcd.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/dcd.h index a4635346..776f782b 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/dcd.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/dcd.h @@ -87,9 +87,9 @@ typedef struct TU_ATTR_ALIGNED(4) //TU_VERIFY_STATIC(sizeof(dcd_event_t) <= 12, "size is not correct"); -/*------------------------------------------------------------------*/ -/* Device API - *------------------------------------------------------------------*/ +//--------------------------------------------------------------------+ +// Controller API +//--------------------------------------------------------------------+ // Initialize controller to device mode void dcd_init (uint8_t rhport); diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd.h index 5338be15..1b0f0cbd 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd.h @@ -31,7 +31,7 @@ #define _TUSB_USBD_H_ #ifdef __cplusplus - extern "C" { +extern "C" { #endif #include "common/tusb_common.h" @@ -168,7 +168,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re TUD_BOS_PLATFORM_DESCRIPTOR(TUD_BOS_MS_OS_20_UUID, U32_TO_U8S_LE(0x06030000), U16_TO_U8S_LE(_desc_set_len), _vendor_code, 0) #define TUD_BOS_MS_OS_20_UUID \ - 0xDF, 0x60, 0xDD, 0xD8, 0x89, 0x45, 0xC7, 0x4C, \ + 0xDF, 0x60, 0xDD, 0xD8, 0x89, 0x45, 0xC7, 0x4C, \ 0x9C, 0xD2, 0x65, 0x9D, 0x9E, 0x64, 0x8A, 0x9F //--------------------------------------------------------------------+ @@ -260,11 +260,11 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re #define TUD_MIDI_DESC_HEAD_LEN (9 + 9 + 9 + 7) #define TUD_MIDI_DESC_HEAD(_itfnum, _stridx, _numcables) \ /* Audio Control (AC) Interface */\ - 9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_PROTOCOL_V1, _stridx,\ + 9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_FUNC_PROTOCOL_CODE_UNDEF, _stridx,\ /* AC Header */\ - 9, TUSB_DESC_CS_INTERFACE, AUDIO_CS_INTERFACE_HEADER, U16_TO_U8S_LE(0x0100), U16_TO_U8S_LE(0x0009), 1, (uint8_t)((_itfnum) + 1),\ + 9, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AC_INTERFACE_HEADER, U16_TO_U8S_LE(0x0100), U16_TO_U8S_LE(0x0009), 1, (uint8_t)((_itfnum) + 1),\ /* MIDI Streaming (MS) Interface */\ - 9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum) + 1), 0, 2, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_MIDI_STREAMING, AUDIO_PROTOCOL_V1, 0,\ + 9, TUSB_DESC_INTERFACE, (uint8_t)((_itfnum) + 1), 0, 2, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_MIDI_STREAMING, AUDIO_FUNC_PROTOCOL_CODE_UNDEF, 0,\ /* MS Header */\ 7, TUSB_DESC_CS_INTERFACE, MIDI_CS_INTERFACE_HEADER, U16_TO_U8S_LE(0x0100), U16_TO_U8S_LE(7 + (_numcables) * TUD_MIDI_DESC_JACK_LEN) @@ -312,6 +312,174 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re TUD_MIDI_DESC_EP(_epin, _epsize, 1),\ TUD_MIDI_JACKID_OUT_EMB(1) +//------------- AUDIO -------------// + +/* Standard Interface Association Descriptor (IAD) */ +#define TUD_AUDIO_DESC_IAD_LEN 8 +#define TUD_AUDIO_DESC_IAD(_firstitfs, _nitfs, _stridx) \ + TUD_AUDIO_DESC_IAD_LEN, TUSB_DESC_INTERFACE_ASSOCIATION, _firstitfs, _nitfs, TUSB_CLASS_AUDIO, AUDIO_FUNCTION_SUBCLASS_UNDEFINED, AUDIO_FUNC_PROTOCOL_CODE_V2, _stridx + +/* Standard AC Interface Descriptor(4.7.1) */ +#define TUD_AUDIO_DESC_STD_AC_LEN 9 +#define TUD_AUDIO_DESC_STD_AC(_itfnum, _nEPs, _stridx) /* _nEPs is 0 or 1 */\ + TUD_AUDIO_DESC_STD_AC_LEN, TUSB_DESC_INTERFACE, _itfnum, /* fixed to zero */ 0x00, _nEPs, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_INT_PROTOCOL_CODE_V2, _stridx + +/* Class-Specific AC Interface Header Descriptor(4.7.2) */ +#define TUD_AUDIO_DESC_CS_AC_LEN 9 +#define TUD_AUDIO_DESC_CS_AC(_bcdADC, _category, _totallen, _ctrl) /* _bcdADC : Audio Device Class Specification Release Number in Binary-Coded Decimal, _category : see audio_function_t, _totallen : Total number of bytes returned for the class-specific AudioControl interface i.e. Clock Source, Unit and Terminal descriptors - Do not include TUD_AUDIO_DESC_CS_AC_LEN, we already do this here*/ \ + TUD_AUDIO_DESC_CS_AC_LEN, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AC_INTERFACE_HEADER, U16_TO_U8S_LE(_bcdADC), _category, U16_TO_U8S_LE(_totallen + TUD_AUDIO_DESC_CS_AC_LEN), _ctrl + +/* Clock Source Descriptor(4.7.2.1) */ +#define TUD_AUDIO_DESC_CLK_SRC_LEN 8 +#define TUD_AUDIO_DESC_CLK_SRC(_clkid, _attr, _ctrl, _assocTerm, _stridx) \ + TUD_AUDIO_DESC_CLK_SRC_LEN, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AC_INTERFACE_CLOCK_SOURCE, _clkid, _attr, _ctrl, _assocTerm, _stridx + +/* Input Terminal Descriptor(4.7.2.4) */ +#define TUD_AUDIO_DESC_INPUT_TERM_LEN 17 +#define TUD_AUDIO_DESC_INPUT_TERM(_termid, _termtype, _assocTerm, _clkid, _nchannelslogical, _channelcfg, _idxchannelnames, _ctrl, _stridx) \ + TUD_AUDIO_DESC_INPUT_TERM_LEN, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AC_INTERFACE_INPUT_TERMINAL, _termid, U16_TO_U8S_LE(_termtype), _assocTerm, _clkid, _nchannelslogical, U32_TO_U8S_LE(_channelcfg), _idxchannelnames, U16_TO_U8S_LE(_ctrl), _stridx + +/* Output Terminal Descriptor(4.7.2.5) */ +#define TUD_AUDIO_DESC_OUTPUT_TERM_LEN 12 +#define TUD_AUDIO_DESC_OUTPUT_TERM(_termid, _termtype, _assocTerm, _srcid, _clkid, _ctrl, _stridx) \ + TUD_AUDIO_DESC_OUTPUT_TERM_LEN, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AC_INTERFACE_OUTPUT_TERMINAL, _termid, U16_TO_U8S_LE(_termtype), _assocTerm, _srcid, _clkid, U16_TO_U8S_LE(_ctrl), _stridx + +/* Feature Unit Descriptor(4.7.2.8) */ +// 1 - Channel +#define TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL_LEN 6+(1+1)*4 +#define TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL(_unitid, _srcid, _ctrlch0master, _ctrlch1, _stridx) \ + TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL_LEN, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AC_INTERFACE_FEATURE_UNIT, _unitid, _srcid, U32_TO_U8S_LE(_ctrlch0master), U32_TO_U8S_LE(_ctrlch1), _stridx + +// For more channels, add definitions here + +/* Standard AS Interface Descriptor(4.9.1) */ +#define TUD_AUDIO_DESC_STD_AS_INT_LEN 9 +#define TUD_AUDIO_DESC_STD_AS_INT(_itfnum, _altset, _nEPs, _stridx) \ + TUD_AUDIO_DESC_STD_AS_INT_LEN, TUSB_DESC_INTERFACE, _itfnum, _altset, _nEPs, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_STREAMING, AUDIO_INT_PROTOCOL_CODE_V2, _stridx + +/* Class-Specific AS Interface Descriptor(4.9.2) */ +#define TUD_AUDIO_DESC_CS_AS_INT_LEN 16 +#define TUD_AUDIO_DESC_CS_AS_INT(_termid, _ctrl, _formattype, _formats, _nchannelsphysical, _channelcfg, _stridx) \ + TUD_AUDIO_DESC_CS_AS_INT_LEN, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AS_INTERFACE_AS_GENERAL, _termid, _ctrl, _formattype, U32_TO_U8S_LE(_formats), _nchannelsphysical, U32_TO_U8S_LE(_channelcfg), _stridx + +/* Type I Format Type Descriptor(2.3.1.6 - Audio Formats) */ +#define TUD_AUDIO_DESC_TYPE_I_FORMAT_LEN 6 +#define TUD_AUDIO_DESC_TYPE_I_FORMAT(_subslotsize, _bitresolution) /* _subslotsize is number of bytes per sample (i.e. subslot) and can be 1,2,3, or 4 */\ + TUD_AUDIO_DESC_TYPE_I_FORMAT_LEN, TUSB_DESC_CS_INTERFACE, AUDIO_CS_AS_INTERFACE_FORMAT_TYPE, AUDIO_FORMAT_TYPE_I, _subslotsize, _bitresolution + +/* Standard AS Isochronous Audio Data Endpoint Descriptor(4.10.1.1) */ +#define TUD_AUDIO_DESC_STD_AS_ISO_EP_LEN 7 +#define TUD_AUDIO_DESC_STD_AS_ISO_EP(_ep, _attr, _maxEPsize, _interval) \ + TUD_AUDIO_DESC_STD_AS_ISO_EP_LEN, TUSB_DESC_ENDPOINT, _ep, _attr, U16_TO_U8S_LE(_maxEPsize), _interval + +/* Class-Specific AS Isochronous Audio Data Endpoint Descriptor(4.10.1.2) */ +#define TUD_AUDIO_DESC_CS_AS_ISO_EP_LEN 8 +#define TUD_AUDIO_DESC_CS_AS_ISO_EP(_attr, _ctrl, _lockdelayunit, _lockdelay) \ + TUD_AUDIO_DESC_CS_AS_ISO_EP_LEN, TUSB_DESC_CS_ENDPOINT, AUDIO_CS_EP_SUBTYPE_GENERAL, _attr, _ctrl, _lockdelayunit, U16_TO_U8S_LE(_lockdelay) + +/* Standard AS Isochronous Feedback Endpoint Descriptor(4.10.2.1) */ +#define TUD_AUDIO_DESC_STD_AS_ISO_FB_EP_LEN 7 +#define TUD_AUDIO_DESC_STD_AS_ISO_FB_EP(_ep, _interval) \ + TUD_AUDIO_DESC_STD_AS_ISO_FB_EP_LEN, TUSB_DESC_ENDPOINT, _ep, (TUSB_XFER_ISOCHRONOUS | TUSB_ISO_EP_ATT_NO_SYNC | TUSB_ISO_EP_ATT_EXPLICIT_FB), U16_TO_U8S_LE(4), _interval + +// AUDIO simple descriptor (UAC2) for 1 microphone input +// - 1 Input Terminal, 1 Feature Unit (Mute and Volume Control), 1 Output Terminal, 1 Clock Source + +#define TUD_AUDIO_MIC_DESC_LEN (TUD_AUDIO_DESC_IAD_LEN\ + + TUD_AUDIO_DESC_STD_AC_LEN\ + + TUD_AUDIO_DESC_CS_AC_LEN\ + + TUD_AUDIO_DESC_CLK_SRC_LEN\ + + TUD_AUDIO_DESC_INPUT_TERM_LEN\ + + TUD_AUDIO_DESC_OUTPUT_TERM_LEN\ + + TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL_LEN\ + + TUD_AUDIO_DESC_STD_AS_INT_LEN\ + + TUD_AUDIO_DESC_STD_AS_INT_LEN\ + + TUD_AUDIO_DESC_CS_AS_INT_LEN\ + + TUD_AUDIO_DESC_TYPE_I_FORMAT_LEN\ + + TUD_AUDIO_DESC_STD_AS_ISO_EP_LEN\ + + TUD_AUDIO_DESC_CS_AS_ISO_EP_LEN) + +#define TUD_AUDIO_MIC_DESC_N_AS_INT 1 // Number of AS interfaces + +#define TUD_AUDIO_MIC_DESCRIPTOR(_itfnum, _stridx, _nBytesPerSample, _nBitsUsedPerSample, _epin, _epsize) \ + /* Standard Interface Association Descriptor (IAD) */\ + TUD_AUDIO_DESC_IAD(/*_firstitfs*/ _itfnum, /*_nitfs*/ 0x02, /*_stridx*/ 0x00),\ + /* Standard AC Interface Descriptor(4.7.1) */\ + TUD_AUDIO_DESC_STD_AC(/*_itfnum*/ _itfnum, /*_nEPs*/ 0x00, /*_stridx*/ _stridx),\ + /* Class-Specific AC Interface Header Descriptor(4.7.2) */\ + TUD_AUDIO_DESC_CS_AC(/*_bcdADC*/ 0x0200, /*_category*/ AUDIO_FUNC_MICROPHONE, /*_totallen*/ TUD_AUDIO_DESC_CLK_SRC_LEN+TUD_AUDIO_DESC_INPUT_TERM_LEN+TUD_AUDIO_DESC_OUTPUT_TERM_LEN+TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL_LEN, /*_ctrl*/ AUDIO_CS_AS_INTERFACE_CTRL_LATENCY_POS),\ + /* Clock Source Descriptor(4.7.2.1) */\ + TUD_AUDIO_DESC_CLK_SRC(/*_clkid*/ 0x04, /*_attr*/ AUDIO_CLOCK_SOURCE_ATT_INT_FIX_CLK, /*_ctrl*/ (AUDIO_CTRL_R << AUDIO_CLOCK_SOURCE_CTRL_CLK_FRQ_POS), /*_assocTerm*/ 0x01, /*_stridx*/ 0x00),\ + /* Input Terminal Descriptor(4.7.2.4) */\ + TUD_AUDIO_DESC_INPUT_TERM(/*_termid*/ 0x01, /*_termtype*/ AUDIO_TERM_TYPE_IN_GENERIC_MIC, /*_assocTerm*/ 0x03, /*_clkid*/ 0x04, /*_nchannelslogical*/ 0x01, /*_channelcfg*/ AUDIO_CHANNEL_CONFIG_NON_PREDEFINED, /*_idxchannelnames*/ 0x00, /*_ctrl*/ AUDIO_CTRL_R << AUDIO_IN_TERM_CTRL_CONNECTOR_POS, /*_stridx*/ 0x00),\ + /* Output Terminal Descriptor(4.7.2.5) */\ + TUD_AUDIO_DESC_OUTPUT_TERM(/*_termid*/ 0x03, /*_termtype*/ AUDIO_TERM_TYPE_USB_STREAMING, /*_assocTerm*/ 0x01, /*_srcid*/ 0x02, /*_clkid*/ 0x04, /*_ctrl*/ 0x0000, /*_stridx*/ 0x00),\ + /* Feature Unit Descriptor(4.7.2.8) */\ + TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL(/*_unitid*/ 0x02, /*_srcid*/ 0x01, /*_ctrlch0master*/ AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_MUTE_POS | AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_VOLUME_POS, /*_ctrlch1*/ AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_MUTE_POS | AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_VOLUME_POS, /*_stridx*/ 0x00),\ + /* Standard AS Interface Descriptor(4.9.1) */\ + /* Interface 1, Alternate 0 - default alternate setting with 0 bandwidth */\ + TUD_AUDIO_DESC_STD_AS_INT(/*_itfnum*/ (uint8_t)((_itfnum)+1), /*_altset*/ 0x00, /*_nEPs*/ 0x00, /*_stridx*/ 0x00),\ + /* Standard AS Interface Descriptor(4.9.1) */\ + /* Interface 1, Alternate 1 - alternate interface for data streaming */\ + TUD_AUDIO_DESC_STD_AS_INT(/*_itfnum*/ (uint8_t)((_itfnum)+1), /*_altset*/ 0x01, /*_nEPs*/ 0x01, /*_stridx*/ 0x00),\ + /* Class-Specific AS Interface Descriptor(4.9.2) */\ + TUD_AUDIO_DESC_CS_AS_INT(/*_termid*/ 0x03, /*_ctrl*/ AUDIO_CTRL_NONE, /*_formattype*/ AUDIO_FORMAT_TYPE_I, /*_formats*/ AUDIO_DATA_FORMAT_TYPE_I_PCM, /*_nchannelsphysical*/ 0x01, /*_channelcfg*/ AUDIO_CHANNEL_CONFIG_NON_PREDEFINED, /*_stridx*/ 0x00),\ + /* Type I Format Type Descriptor(2.3.1.6 - Audio Formats) */\ + TUD_AUDIO_DESC_TYPE_I_FORMAT(_nBytesPerSample, _nBitsUsedPerSample),\ + /* Standard AS Isochronous Audio Data Endpoint Descriptor(4.10.1.1) */\ + TUD_AUDIO_DESC_STD_AS_ISO_EP(/*_ep*/ _epin, /*_attr*/ (TUSB_XFER_ISOCHRONOUS | TUSB_ISO_EP_ATT_ASYNCHRONOUS | TUSB_ISO_EP_ATT_DATA), /*_maxEPsize*/ _epsize, /*_interval*/ (CFG_TUSB_RHPORT0_MODE & OPT_MODE_HIGH_SPEED) ? 0x04 : 0x01),\ + /* Class-Specific AS Isochronous Audio Data Endpoint Descriptor(4.10.1.2) */\ + TUD_AUDIO_DESC_CS_AS_ISO_EP(/*_attr*/ AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK, /*_ctrl*/ AUDIO_CTRL_NONE, /*_lockdelayunit*/ AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_UNDEFINED, /*_lockdelay*/ 0x0000) + +// AUDIO simple descriptor (UAC2) for mono speaker +// - 1 Input Terminal, 2 Feature Unit (Mute and Volume Control), 3 Output Terminal, 4 Clock Source + +#define TUD_AUDIO_SPEAKER_MONO_FB_DESC_LEN (TUD_AUDIO_DESC_IAD_LEN\ + + TUD_AUDIO_DESC_STD_AC_LEN\ + + TUD_AUDIO_DESC_CS_AC_LEN\ + + TUD_AUDIO_DESC_CLK_SRC_LEN\ + + TUD_AUDIO_DESC_INPUT_TERM_LEN\ + + TUD_AUDIO_DESC_OUTPUT_TERM_LEN\ + + TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL_LEN\ + + TUD_AUDIO_DESC_STD_AS_INT_LEN\ + + TUD_AUDIO_DESC_STD_AS_INT_LEN\ + + TUD_AUDIO_DESC_CS_AS_INT_LEN\ + + TUD_AUDIO_DESC_TYPE_I_FORMAT_LEN\ + + TUD_AUDIO_DESC_STD_AS_ISO_EP_LEN\ + + TUD_AUDIO_DESC_CS_AS_ISO_EP_LEN\ + + TUD_AUDIO_DESC_STD_AS_ISO_FB_EP_LEN) + +#define TUD_AUDIO_SPEAKER_MONO_FB_DESCRIPTOR(_itfnum, _stridx, _nBytesPerSample, _nBitsUsedPerSample, _epout, _epsize, _epfb) \ + /* Standard Interface Association Descriptor (IAD) */\ + TUD_AUDIO_DESC_IAD(/*_firstitfs*/ _itfnum, /*_nitfs*/ 0x02, /*_stridx*/ 0x00),\ + /* Standard AC Interface Descriptor(4.7.1) */\ + TUD_AUDIO_DESC_STD_AC(/*_itfnum*/ _itfnum, /*_nEPs*/ 0x00, /*_stridx*/ _stridx),\ + /* Class-Specific AC Interface Header Descriptor(4.7.2) */\ + TUD_AUDIO_DESC_CS_AC(/*_bcdADC*/ 0x0200, /*_category*/ AUDIO_FUNC_DESKTOP_SPEAKER, /*_totallen*/ TUD_AUDIO_DESC_CLK_SRC_LEN+TUD_AUDIO_DESC_INPUT_TERM_LEN+TUD_AUDIO_DESC_OUTPUT_TERM_LEN+TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL_LEN, /*_ctrl*/ AUDIO_CS_AS_INTERFACE_CTRL_LATENCY_POS),\ + /* Clock Source Descriptor(4.7.2.1) */\ + TUD_AUDIO_DESC_CLK_SRC(/*_clkid*/ 0x04, /*_attr*/ AUDIO_CLOCK_SOURCE_ATT_INT_FIX_CLK, /*_ctrl*/ (AUDIO_CTRL_R << AUDIO_CLOCK_SOURCE_CTRL_CLK_FRQ_POS), /*_assocTerm*/ 0x01, /*_stridx*/ 0x00),\ + /* Input Terminal Descriptor(4.7.2.4) */\ + TUD_AUDIO_DESC_INPUT_TERM(/*_termid*/ 0x01, /*_termtype*/ AUDIO_TERM_TYPE_USB_STREAMING, /*_assocTerm*/ 0x00, /*_clkid*/ 0x04, /*_nchannelslogical*/ 0x01, /*_channelcfg*/ AUDIO_CHANNEL_CONFIG_NON_PREDEFINED, /*_idxchannelnames*/ 0x00, /*_ctrl*/ 0 * (AUDIO_CTRL_R << AUDIO_IN_TERM_CTRL_CONNECTOR_POS), /*_stridx*/ 0x00),\ + /* Output Terminal Descriptor(4.7.2.5) */\ + TUD_AUDIO_DESC_OUTPUT_TERM(/*_termid*/ 0x03, /*_termtype*/ AUDIO_TERM_TYPE_OUT_DESKTOP_SPEAKER, /*_assocTerm*/ 0x01, /*_srcid*/ 0x02, /*_clkid*/ 0x04, /*_ctrl*/ 0x0000, /*_stridx*/ 0x00),\ + /* Feature Unit Descriptor(4.7.2.8) */\ + TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL(/*_unitid*/ 0x02, /*_srcid*/ 0x01, /*_ctrlch0master*/ 0 * (AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_MUTE_POS | AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_VOLUME_POS), /*_ctrlch1*/ 0 * (AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_MUTE_POS | AUDIO_CTRL_RW << AUDIO_FEATURE_UNIT_CTRL_VOLUME_POS), /*_stridx*/ 0x00),\ + /* Standard AS Interface Descriptor(4.9.1) */\ + /* Interface 1, Alternate 0 - default alternate setting with 0 bandwidth */\ + TUD_AUDIO_DESC_STD_AS_INT(/*_itfnum*/ (uint8_t)((_itfnum) + 1), /*_altset*/ 0x00, /*_nEPs*/ 0x00, /*_stridx*/ 0x00),\ + /* Standard AS Interface Descriptor(4.9.1) */\ + /* Interface 1, Alternate 1 - alternate interface for data streaming */\ + TUD_AUDIO_DESC_STD_AS_INT(/*_itfnum*/ (uint8_t)((_itfnum) + 1), /*_altset*/ 0x01, /*_nEPs*/ 0x02, /*_stridx*/ 0x00),\ + /* Class-Specific AS Interface Descriptor(4.9.2) */\ + TUD_AUDIO_DESC_CS_AS_INT(/*_termid*/ 0x01, /*_ctrl*/ AUDIO_CTRL_NONE, /*_formattype*/ AUDIO_FORMAT_TYPE_I, /*_formats*/ AUDIO_DATA_FORMAT_TYPE_I_PCM, /*_nchannelsphysical*/ 0x01, /*_channelcfg*/ AUDIO_CHANNEL_CONFIG_NON_PREDEFINED, /*_stridx*/ 0x00),\ + /* Type I Format Type Descriptor(2.3.1.6 - Audio Formats) */\ + TUD_AUDIO_DESC_TYPE_I_FORMAT(_nBytesPerSample, _nBitsUsedPerSample),\ + /* Standard AS Isochronous Audio Data Endpoint Descriptor(4.10.1.1) */\ + TUD_AUDIO_DESC_STD_AS_ISO_EP(/*_ep*/ _epout, /*_attr*/ (TUSB_XFER_ISOCHRONOUS | TUSB_ISO_EP_ATT_ASYNCHRONOUS | TUSB_ISO_EP_ATT_DATA), /*_maxEPsize*/ _epsize, /*_interval*/ (CFG_TUSB_RHPORT0_MODE & OPT_MODE_HIGH_SPEED) ? 0x04 : 0x01),\ + /* Class-Specific AS Isochronous Audio Data Endpoint Descriptor(4.10.1.2) */\ + TUD_AUDIO_DESC_CS_AS_ISO_EP(/*_attr*/ AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK, /*_ctrl*/ AUDIO_CTRL_NONE, /*_lockdelayunit*/ AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_UNDEFINED, /*_lockdelay*/ 0x0000),\ + /* Standard AS Isochronous Feedback Endpoint Descriptor(4.10.2.1) */\ + TUD_AUDIO_DESC_STD_AS_ISO_FB_EP(/*_ep*/ _epfb, /*_interval*/ 1)\ //------------- TUD_USBTMC/USB488 -------------// #define TUD_USBTMC_APP_CLASS (TUSB_CLASS_APPLICATION_SPECIFIC) @@ -405,15 +573,15 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re //------------- RNDIS -------------// #if 0 - /* Windows XP */ - #define TUD_RNDIS_ITF_CLASS TUSB_CLASS_CDC - #define TUD_RNDIS_ITF_SUBCLASS CDC_COMM_SUBCLASS_ABSTRACT_CONTROL_MODEL - #define TUD_RNDIS_ITF_PROTOCOL 0xFF /* CDC_COMM_PROTOCOL_MICROSOFT_RNDIS */ +/* Windows XP */ +#define TUD_RNDIS_ITF_CLASS TUSB_CLASS_CDC +#define TUD_RNDIS_ITF_SUBCLASS CDC_COMM_SUBCLASS_ABSTRACT_CONTROL_MODEL +#define TUD_RNDIS_ITF_PROTOCOL 0xFF /* CDC_COMM_PROTOCOL_MICROSOFT_RNDIS */ #else - /* Windows 7+ */ - #define TUD_RNDIS_ITF_CLASS TUSB_CLASS_WIRELESS_CONTROLLER - #define TUD_RNDIS_ITF_SUBCLASS 0x01 - #define TUD_RNDIS_ITF_PROTOCOL 0x03 +/* Windows 7+ */ +#define TUD_RNDIS_ITF_CLASS TUSB_CLASS_WIRELESS_CONTROLLER +#define TUD_RNDIS_ITF_SUBCLASS 0x01 +#define TUD_RNDIS_ITF_PROTOCOL 0x03 #endif // Length of template descriptor: 66 bytes @@ -479,18 +647,18 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re #define TUD_BTH_ISO_ITF_0(_itfnum, ...) #define TUD_BTH_ISO_ITF_1(_itfnum, _ep_in, _ep_out, ...) TUD_BTH_ISO_ITF(_itfnum, (CFG_TUD_BTH_ISO_ALT_COUNT) - 1, _ep_in, _ep_out, _FIRST(__VA_ARGS__)) #define TUD_BTH_ISO_ITF_2(_itfnum, _ep_in, _ep_out, ...) TUD_BTH_ISO_ITF(_itfnum, (CFG_TUD_BTH_ISO_ALT_COUNT) - 2, _ep_in, _ep_out, _FIRST(__VA_ARGS__)) \ - TUD_BTH_ISO_ITF_1(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) + TUD_BTH_ISO_ITF_1(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) #define TUD_BTH_ISO_ITF_3(_itfnum, _ep_in, _ep_out, ...) TUD_BTH_ISO_ITF(_itfnum, (CFG_TUD_BTH_ISO_ALT_COUNT) - 3, _ep_in, _ep_out, _FIRST(__VA_ARGS__)) \ - TUD_BTH_ISO_ITF_2(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) + TUD_BTH_ISO_ITF_2(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) #define TUD_BTH_ISO_ITF_4(_itfnum, _ep_in, _ep_out, ...) TUD_BTH_ISO_ITF(_itfnum, (CFG_TUD_BTH_ISO_ALT_COUNT) - 4, _ep_in, _ep_out, _FIRST(__VA_ARGS__)) \ - TUD_BTH_ISO_ITF_3(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) + TUD_BTH_ISO_ITF_3(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) #define TUD_BTH_ISO_ITF_5(_itfnum, _ep_in, _ep_out, ...) TUD_BTH_ISO_ITF(_itfnum, (CFG_TUD_BTH_ISO_ALT_COUNT) - 5, _ep_in, _ep_out, _FIRST(__VA_ARGS__)) \ - TUD_BTH_ISO_ITF_4(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) + TUD_BTH_ISO_ITF_4(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) #define TUD_BTH_ISO_ITF_6(_itfnum, _ep_in, _ep_out, ...) TUD_BTH_ISO_ITF(_itfnum, (CFG_TUD_BTH_ISO_ALT_COUNT) - 6, _ep_in, _ep_out, _FIRST(__VA_ARGS__)) \ - TUD_BTH_ISO_ITF_5(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) + TUD_BTH_ISO_ITF_5(_itfnum, _ep_in, _ep_out, _REST(__VA_ARGS__)) #define TUD_BTH_ISO_ITFS(_itfnum, _ep_in, _ep_out, ...) \ - TU_XSTRCAT(TUD_BTH_ISO_ITF_, CFG_TUD_BTH_ISO_ALT_COUNT)(_itfnum, _ep_in, _ep_out, __VA_ARGS__) + TU_XSTRCAT(TUD_BTH_ISO_ITF_, CFG_TUD_BTH_ISO_ALT_COUNT)(_itfnum, _ep_in, _ep_out, __VA_ARGS__) // BT Primary controller descriptor // Interface number, string index, attributes, event endpoint, event endpoint size, interval, data in, data out, data endpoint size, iso endpoint sizes @@ -499,7 +667,7 @@ TU_ATTR_WEAK bool tud_vendor_control_complete_cb(uint8_t rhport, tusb_control_re TUD_BTH_ISO_ITFS(_itfnum + 1, _ep_in + 1, _ep_out + 1, __VA_ARGS__) #ifdef __cplusplus - } +} #endif #endif /* _TUSB_USBD_H_ */ diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd_pvt.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd_pvt.h index a5d22332..09b28558 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd_pvt.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/device/usbd_pvt.h @@ -70,6 +70,13 @@ void usbd_edpt_close(uint8_t rhport, uint8_t ep_addr); // Submit a usb transfer bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes); +// Claim an endpoint before submitting a transfer. +// If caller does not make any transfer, it must release endpoint for others. +bool usbd_edpt_claim(uint8_t rhport, uint8_t ep_addr); + +// Release an endpoint without submitting a transfer +bool usbd_edpt_release(uint8_t rhport, uint8_t ep_addr); + // Check if endpoint transferring is complete bool usbd_edpt_busy(uint8_t rhport, uint8_t ep_addr); diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ehci/ehci.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ehci/ehci.h index ce2f5677..a6342b2d 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ehci/ehci.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ehci/ehci.h @@ -54,8 +54,8 @@ //--------------------------------------------------------------------+ // EHCI CONFIGURATION & CONSTANTS //--------------------------------------------------------------------+ -#define EHCI_CFG_FRAMELIST_SIZE_BITS 7 /// Framelist Size (NXP specific) (0:1024) - (1:512) - (2:256) - (3:128) - (4:64) - (5:32) - (6:16) - (7:8) -#define EHCI_FRAMELIST_SIZE (1024 >> EHCI_CFG_FRAMELIST_SIZE_BITS) +#define EHCI_CFG_FRAMELIST_SIZE_BITS 7 /// Framelist Size (NXP specific) (0:1024) - (1:512) - (2:256) - (3:128) - (4:64) - (5:32) - (6:16) - (7:8) +#define EHCI_FRAMELIST_SIZE (1024 >> EHCI_CFG_FRAMELIST_SIZE_BITS) // TODO merge OHCI with EHCI enum { @@ -311,10 +311,14 @@ enum ehci_usbcmd_pos_ { }; enum ehci_portsc_change_mask_{ + EHCI_PORTSC_MASK_CURRENT_CONNECT_STATUS = TU_BIT(0), EHCI_PORTSC_MASK_CONNECT_STATUS_CHANGE = TU_BIT(1), + EHCI_PORTSC_MASK_PORT_EANBLED = TU_BIT(2), EHCI_PORTSC_MASK_PORT_ENABLE_CHAGNE = TU_BIT(3), EHCI_PORTSC_MASK_OVER_CURRENT_CHANGE = TU_BIT(5), + EHCI_PORTSC_MASK_PORT_RESET = TU_BIT(8), + EHCI_PORTSC_MASK_ALL = EHCI_PORTSC_MASK_CONNECT_STATUS_CHANGE | EHCI_PORTSC_MASK_PORT_ENABLE_CHAGNE | @@ -445,6 +449,8 @@ typedef struct ehci_qtd_t qtd_pool[HCD_MAX_XFER] TU_ATTR_ALIGNED(32); ehci_registers_t* regs; + + volatile uint32_t uframe_number; }ehci_data_t; #ifdef __cplusplus diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/hcd.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/hcd.h index a39e7fe1..24cc6250 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/hcd.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/hcd.h @@ -84,17 +84,26 @@ enum { #endif //--------------------------------------------------------------------+ -// HCD API +// Controller & Port API //--------------------------------------------------------------------+ bool hcd_init(void); -void hcd_isr(uint8_t hostid); +void hcd_int_handler(uint8_t rhport); void hcd_int_enable (uint8_t rhport); void hcd_int_disable(uint8_t rhport); -// PORT API +// Get micro frame number (125 us) +uint32_t hcd_uframe_number(uint8_t rhport); + +// Get frame number (1ms) +static inline uint32_t hcd_frame_number(uint8_t rhport) +{ + return hcd_uframe_number(rhport) >> 3; +} + /// return the current connect status of roothub port bool hcd_port_connect_status(uint8_t hostid); void hcd_port_reset(uint8_t hostid); +void hcd_port_reset_end(uint8_t rhport); tusb_speed_t hcd_port_speed_get(uint8_t hostid); // HCD closes all opened endpoints belong to this device @@ -134,9 +143,7 @@ bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t * bool hcd_pipe_queue_xfer(uint8_t dev_addr, uint8_t ep_addr, uint8_t buffer[], uint16_t total_bytes); // only queue, not transferring yet bool hcd_pipe_xfer(uint8_t dev_addr, uint8_t ep_addr, uint8_t buffer[], uint16_t total_bytes, bool int_on_complete); -#if 0 -tusb_error_t hcd_pipe_cancel(); -#endif +// tusb_error_t hcd_pipe_cancel(); #ifdef __cplusplus } diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ohci/ohci.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ohci/ohci.h index 6f6ef967..bfcdaf9a 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ohci/ohci.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/ohci/ohci.h @@ -180,6 +180,8 @@ typedef struct TU_ATTR_ALIGNED(256) ohci_ed_t ed_pool[HCD_MAX_ENDPOINT]; ohci_gtd_t gtd_pool[HCD_MAX_XFER]; + volatile uint16_t frame_number_hi; + } ohci_data_t; //--------------------------------------------------------------------+ diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/usbh.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/usbh.h index fe39a19f..27193d37 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/usbh.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/host/usbh.h @@ -52,6 +52,10 @@ typedef enum tusb_interface_status_{ } tusb_interface_status_t; typedef struct { + #if CFG_TUSB_DEBUG >= 2 + char const* name; + #endif + uint8_t class_code; void (* const init) (void); @@ -69,7 +73,8 @@ typedef struct { void tuh_task(void); // Interrupt handler, name alias to HCD -#define tuh_isr hcd_isr +extern void hcd_int_handler(uint8_t rhport); +#define tuh_int_handler hcd_int_handler tusb_device_state_t tuh_device_get_state (uint8_t dev_addr); static inline bool tuh_device_is_configured(uint8_t dev_addr) @@ -97,6 +102,8 @@ TU_ATTR_WEAK void tuh_umount_cb(uint8_t dev_addr); bool usbh_init(void); bool usbh_control_xfer (uint8_t dev_addr, tusb_control_request_t* request, uint8_t* data); +bool usbh_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * ep_desc); + #ifdef __cplusplus } #endif diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal.h index 2e7a3539..b5057ff4 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal.h @@ -37,9 +37,9 @@ #include "common/tusb_common.h" // Return immediately -#define OSAL_TIMEOUT_NOTIMEOUT (0) +#define OSAL_TIMEOUT_NOTIMEOUT (0) // Default timeout -#define OSAL_TIMEOUT_NORMAL (10) +#define OSAL_TIMEOUT_NORMAL (10) // Wait forever #define OSAL_TIMEOUT_WAIT_FOREVER (UINT32_MAX) @@ -62,7 +62,7 @@ typedef void (*osal_task_func_t)( void * ); //--------------------------------------------------------------------+ // OSAL Porting API //--------------------------------------------------------------------+ -static inline void osal_task_delay(uint32_t msec); +//static inline void osal_task_delay(uint32_t msec); //------------- Semaphore -------------// static inline osal_semaphore_t osal_semaphore_create(osal_semaphore_def_t* semdef); diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal_none.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal_none.h index 0ac5e8aa..4a5843f8 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal_none.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/osal/osal_none.h @@ -34,14 +34,14 @@ //--------------------------------------------------------------------+ // TASK API //--------------------------------------------------------------------+ -static inline void osal_task_delay(uint32_t msec) -{ - (void) msec; - // TODO only used by Host stack, will implement using SOF - -// uint32_t start = tusb_hal_millis(); -// while ( ( tusb_hal_millis() - start ) < msec ) {} -} +//static inline void osal_task_delay(uint32_t msec) +//{ +// (void) msec; +// // TODO only used by Host stack, will implement using SOF +// +//// uint32_t start = tusb_hal_millis(); +//// while ( ( tusb_hal_millis() - start ) < msec ) {} +//} //--------------------------------------------------------------------+ // Binary Semaphore API diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h index 4f2b2294..d26c700d 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h @@ -143,13 +143,17 @@ static inline uint32_t pcd_get_eptype(USB_TypeDef * USBx, uint32_t bEpNum) static inline void pcd_clear_rx_ep_ctr(USB_TypeDef * USBx, uint32_t bEpNum) { uint32_t regVal = pcd_get_endpoint(USBx, bEpNum); - regVal &= 0x7FFFu & USB_EPREG_MASK; + regVal &= USB_EPREG_MASK; + regVal &= ~USB_EP_CTR_RX; + regVal |= USB_EP_CTR_TX; // preserve CTR_TX (clears on writing 0) pcd_set_endpoint(USBx, bEpNum, regVal); } static inline void pcd_clear_tx_ep_ctr(USB_TypeDef * USBx, uint32_t bEpNum) { uint32_t regVal = pcd_get_endpoint(USBx, bEpNum); - regVal &= regVal & 0xFF7FU & USB_EPREG_MASK; + regVal &= USB_EPREG_MASK; + regVal &= ~USB_EP_CTR_TX; + regVal |= USB_EP_CTR_RX; // preserve CTR_RX (clears on writing 0) pcd_set_endpoint(USBx, bEpNum,regVal); } /** diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb.h index c252a578..8b0dd103 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb.h @@ -76,6 +76,10 @@ #include "class/msc/msc_device.h" #endif +#if CFG_TUD_AUDIO + #include "class/audio/audio_device.h" +#endif + #if CFG_TUD_MIDI #include "class/midi/midi_device.h" #endif diff --git a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb_option.h b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb_option.h index abf6450c..39394028 100644 --- a/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb_option.h +++ b/tools/sdk/esp32s2/include/tinyusb/tinyusb/src/tusb_option.h @@ -55,10 +55,11 @@ #define OPT_MCU_NRF5X 100 ///< Nordic nRF5x series // SAM +#define OPT_MCU_SAMD11 204 ///< MicroChip SAMD11 #define OPT_MCU_SAMD21 200 ///< MicroChip SAMD21 #define OPT_MCU_SAMD51 201 ///< MicroChip SAMD51 -#define OPT_MCU_SAMG 202 ///< MicroChip SAMDG series #define OPT_MCU_SAME5X 203 ///< MicroChip SAM E5x +#define OPT_MCU_SAMG 202 ///< MicroChip SAMDG series // STM32 #define OPT_MCU_STM32F0 300 ///< ST STM32F0 @@ -109,11 +110,13 @@ // Allow to use command line to change the config name/location -#ifndef CFG_TUSB_CONFIG_FILE - #define CFG_TUSB_CONFIG_FILE "tusb_config.h" +#ifdef CFG_TUSB_CONFIG_FILE + #include CFG_TUSB_CONFIG_FILE +#else + #include "tusb_config.h" #endif -#include CFG_TUSB_CONFIG_FILE + /** \addtogroup group_configuration * @{ */ @@ -206,6 +209,10 @@ #define CFG_TUD_HID 0 #endif +#ifndef CFG_TUD_AUDIO + #define CFG_TUD_AUDIO 0 +#endif + #ifndef CFG_TUD_MIDI #define CFG_TUD_MIDI 0 #endif diff --git a/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h b/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h index 2f22937e..309f09b8 100644 --- a/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h +++ b/tools/sdk/esp32s2/include/ulp/include/esp32/ulp.h @@ -232,7 +232,7 @@ union ulp_insn { uint32_t unused : 8; /*!< Unused */ uint32_t low : 5; /*!< Low bit */ uint32_t high : 5; /*!< High bit */ - uint32_t opcode : 4; /*!< Opcode (OPCODE_WR_REG) */ + uint32_t opcode : 4; /*!< Opcode (OPCODE_RD_REG) */ } rd_reg; /*!< Format of RD_REG instruction */ struct { diff --git a/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h b/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h index 58331cf5..07ae895e 100644 --- a/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h +++ b/tools/sdk/esp32s2/include/ulp/include/esp32s2/ulp.h @@ -201,7 +201,7 @@ union ulp_insn { uint32_t unused : 8; /*!< Unused */ uint32_t low : 5; /*!< Low bit */ uint32_t high : 5; /*!< High bit */ - uint32_t opcode : 4; /*!< Opcode (OPCODE_WR_REG) */ + uint32_t opcode : 4; /*!< Opcode (OPCODE_RD_REG) */ } rd_reg; /*!< Format of RD_REG instruction */ struct { diff --git a/tools/sdk/esp32s2/include/unity/include/unity_config.h b/tools/sdk/esp32s2/include/unity/include/unity_config.h index 5d6fdfae..8ebd88f2 100644 --- a/tools/sdk/esp32s2/include/unity/include/unity_config.h +++ b/tools/sdk/esp32s2/include/unity/include/unity_config.h @@ -47,6 +47,10 @@ uint32_t unity_exec_time_get_ms(void); #endif //CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER +#ifdef CONFIG_UNITY_ENABLE_FIXTURE +#include "unity_fixture_extras.h" +#endif // CONFIG_UNITY_ENABLE_FIXTURE + // shorthand to check esp_err_t return code #define TEST_ESP_OK(rc) TEST_ASSERT_EQUAL_HEX32(ESP_OK, rc) #define TEST_ESP_ERR(err, rc) TEST_ASSERT_EQUAL_HEX32(err, rc) diff --git a/tools/sdk/esp32s2/include/unity/include/unity_fixture_extras.h b/tools/sdk/esp32s2/include/unity/include/unity_fixture_extras.h new file mode 100644 index 00000000..2eeaec2e --- /dev/null +++ b/tools/sdk/esp32s2/include/unity/include/unity_fixture_extras.h @@ -0,0 +1,25 @@ +/* IDF-specific additions to "Unity Fixture" */ +#pragma once + +#ifndef CONFIG_IDF_TARGET + +/* A shorthand for running one test group from the main function */ +#define UNITY_MAIN(group_) do { \ + const char* argv[] = { "test", "-v" }; \ + const int argc = sizeof(argv)/sizeof(argv[0]); \ + int rc = UnityMain(argc, argv, TEST_ ## group_ ## _GROUP_RUNNER); \ + printf("\nTests finished, rc=%d\n", rc); \ + exit(rc); \ +} while(0) + +#else // CONFIG_IDF_TARGET + +/* A shorthand for running one test group from the main function */ +#define UNITY_MAIN(group_) do { \ + const char* argv[] = { "test", "-v" }; \ + const int argc = sizeof(argv)/sizeof(argv[0]); \ + int rc = UnityMain(argc, argv, TEST_ ## group_ ## _GROUP_RUNNER); \ + printf("\nTests finished, rc=%d\n", rc); \ +} while(0) + +#endif // CONFIG_IDF_TARGET diff --git a/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture.h b/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture.h new file mode 100644 index 00000000..2dcf473c --- /dev/null +++ b/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture.h @@ -0,0 +1,83 @@ +/* Copyright (c) 2010 James Grenning and Contributed to Unity Project + * ========================================== + * Unity Project - A Test Framework for C + * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + * [Released under MIT License. Please refer to license.txt for details] + * ========================================== */ + +#ifndef UNITY_FIXTURE_H_ +#define UNITY_FIXTURE_H_ + +#include "unity.h" +#include "unity_internals.h" +#include "unity_fixture_malloc_overrides.h" +#include "unity_fixture_internals.h" + +int UnityMain(int argc, const char* argv[], void (*runAllTests)(void)); + + +#define TEST_GROUP(group)\ + static const char* TEST_GROUP_##group = #group + +#define TEST_SETUP(group) void TEST_##group##_SETUP(void);\ + void TEST_##group##_SETUP(void) + +#define TEST_TEAR_DOWN(group) void TEST_##group##_TEAR_DOWN(void);\ + void TEST_##group##_TEAR_DOWN(void) + + +#define TEST(group, name) \ + void TEST_##group##_##name##_(void);\ + void TEST_##group##_##name##_run(void);\ + void TEST_##group##_##name##_run(void)\ + {\ + UnityTestRunner(TEST_##group##_SETUP,\ + TEST_##group##_##name##_,\ + TEST_##group##_TEAR_DOWN,\ + "TEST(" #group ", " #name ")",\ + TEST_GROUP_##group, #name,\ + __FILE__, __LINE__);\ + }\ + void TEST_##group##_##name##_(void) + +#define IGNORE_TEST(group, name) \ + void TEST_##group##_##name##_(void);\ + void TEST_##group##_##name##_run(void);\ + void TEST_##group##_##name##_run(void)\ + {\ + UnityIgnoreTest("IGNORE_TEST(" #group ", " #name ")", TEST_GROUP_##group, #name);\ + }\ + void TEST_##group##_##name##_(void) + +/* Call this for each test, insider the group runner */ +#define RUN_TEST_CASE(group, name) \ + { void TEST_##group##_##name##_run(void);\ + TEST_##group##_##name##_run(); } + +/* This goes at the bottom of each test file or in a separate c file */ +#define TEST_GROUP_RUNNER(group)\ + void TEST_##group##_GROUP_RUNNER(void);\ + void TEST_##group##_GROUP_RUNNER(void) + +/* Call this from main */ +#define RUN_TEST_GROUP(group)\ + { void TEST_##group##_GROUP_RUNNER(void);\ + TEST_##group##_GROUP_RUNNER(); } + +/* CppUTest Compatibility Macros */ +#ifndef UNITY_EXCLUDE_CPPUTEST_ASSERTS +/* Sets a pointer and automatically restores it to its old value after teardown */ +#define UT_PTR_SET(ptr, newPointerValue) UnityPointer_Set((void**)&(ptr), (void*)(newPointerValue), __LINE__) +#define TEST_ASSERT_POINTERS_EQUAL(expected, actual) TEST_ASSERT_EQUAL_PTR((expected), (actual)) +#define TEST_ASSERT_BYTES_EQUAL(expected, actual) TEST_ASSERT_EQUAL_HEX8(0xff & (expected), 0xff & (actual)) +#define FAIL(message) TEST_FAIL_MESSAGE((message)) +#define CHECK(condition) TEST_ASSERT_TRUE((condition)) +#define LONGS_EQUAL(expected, actual) TEST_ASSERT_EQUAL_INT((expected), (actual)) +#define STRCMP_EQUAL(expected, actual) TEST_ASSERT_EQUAL_STRING((expected), (actual)) +#define DOUBLES_EQUAL(expected, actual, delta) TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual)) +#endif + +/* You must compile with malloc replacement, as defined in unity_fixture_malloc_overrides.h */ +void UnityMalloc_MakeMallocFailAfterCount(int countdown); + +#endif /* UNITY_FIXTURE_H_ */ diff --git a/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture_internals.h b/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture_internals.h new file mode 100644 index 00000000..00cee883 --- /dev/null +++ b/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture_internals.h @@ -0,0 +1,51 @@ +/* Copyright (c) 2010 James Grenning and Contributed to Unity Project + * ========================================== + * Unity Project - A Test Framework for C + * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + * [Released under MIT License. Please refer to license.txt for details] + * ========================================== */ + +#ifndef UNITY_FIXTURE_INTERNALS_H_ +#define UNITY_FIXTURE_INTERNALS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +struct UNITY_FIXTURE_T +{ + int Verbose; + unsigned int RepeatCount; + const char* NameFilter; + const char* GroupFilter; +}; +extern struct UNITY_FIXTURE_T UnityFixture; + +typedef void unityfunction(void); +void UnityTestRunner(unityfunction* setup, + unityfunction* testBody, + unityfunction* teardown, + const char* printableName, + const char* group, + const char* name, + const char* file, unsigned int line); + +void UnityIgnoreTest(const char* printableName, const char* group, const char* name); +void UnityMalloc_StartTest(void); +void UnityMalloc_EndTest(void); +int UnityGetCommandLineOptions(int argc, const char* argv[]); +void UnityConcludeFixtureTest(void); + +void UnityPointer_Set(void** pointer, void* newValue, UNITY_LINE_TYPE line); +void UnityPointer_UndoAllSets(void); +void UnityPointer_Init(void); +#ifndef UNITY_MAX_POINTERS +#define UNITY_MAX_POINTERS 5 +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* UNITY_FIXTURE_INTERNALS_H_ */ diff --git a/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture_malloc_overrides.h b/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture_malloc_overrides.h new file mode 100644 index 00000000..7daba50a --- /dev/null +++ b/tools/sdk/esp32s2/include/unity/unity/extras/fixture/src/unity_fixture_malloc_overrides.h @@ -0,0 +1,47 @@ +/* Copyright (c) 2010 James Grenning and Contributed to Unity Project + * ========================================== + * Unity Project - A Test Framework for C + * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams + * [Released under MIT License. Please refer to license.txt for details] + * ========================================== */ + +#ifndef UNITY_FIXTURE_MALLOC_OVERRIDES_H_ +#define UNITY_FIXTURE_MALLOC_OVERRIDES_H_ + +#include + +#ifdef UNITY_EXCLUDE_STDLIB_MALLOC +/* Define this macro to remove the use of stdlib.h, malloc, and free. + * Many embedded systems do not have a heap or malloc/free by default. + * This internal unity_malloc() provides allocated memory deterministically from + * the end of an array only, unity_free() only releases from end-of-array, + * blocks are not coalesced, and memory not freed in LIFO order is stranded. */ + #ifndef UNITY_INTERNAL_HEAP_SIZE_BYTES + #define UNITY_INTERNAL_HEAP_SIZE_BYTES 256 + #endif +#endif + +/* These functions are used by the Unity Fixture to allocate and release memory + * on the heap and can be overridden with platform-specific implementations. + * For example, when using FreeRTOS UNITY_FIXTURE_MALLOC becomes pvPortMalloc() + * and UNITY_FIXTURE_FREE becomes vPortFree(). */ +#if !defined(UNITY_FIXTURE_MALLOC) || !defined(UNITY_FIXTURE_FREE) + #include + #define UNITY_FIXTURE_MALLOC(size) malloc(size) + #define UNITY_FIXTURE_FREE(ptr) free(ptr) +#else + extern void* UNITY_FIXTURE_MALLOC(size_t size); + extern void UNITY_FIXTURE_FREE(void* ptr); +#endif + +#define malloc unity_malloc +#define calloc unity_calloc +#define realloc unity_realloc +#define free unity_free + +void* unity_malloc(size_t size); +void* unity_calloc(size_t num, size_t size); +void* unity_realloc(void * oldMem, size_t size); +void unity_free(void * mem); + +#endif /* UNITY_FIXTURE_MALLOC_OVERRIDES_H_ */ diff --git a/tools/sdk/esp32s2/ld/esp32s2.project.ld b/tools/sdk/esp32s2/ld/esp32s2.project.ld index 097dc50b..49518637 100644 --- a/tools/sdk/esp32s2/ld/esp32s2.project.ld +++ b/tools/sdk/esp32s2/ld/esp32s2.project.ld @@ -14,10 +14,10 @@ SECTIONS { . = ALIGN(4); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.literal EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.text EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.text.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.literal EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.text EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.text.*) *libfreertos.a:queue.*( .rtc.text.*) *libfreertos.a:queue.*(.rtc.text.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.literal .rtc.text .rtc.text.*) + *libhal.a:uart_hal_iram.*( .rtc.literal .rtc.text .rtc.text.*) *rtc_wake_stub*.*(.literal .text .literal.* .text.*) _rtc_text_end = ABSOLUTE(.); @@ -45,10 +45,10 @@ SECTIONS _rtc_force_fast_start = ABSOLUTE(.); _coredump_rtc_fast_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.fast.coredump EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.fast.coredump.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.fast.coredump EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.fast.coredump.*) *libfreertos.a:queue.*( .rtc.fast.coredump.*) *libfreertos.a:queue.*(.rtc.fast.coredump.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.fast.coredump .rtc.fast.coredump.*) + *libhal.a:uart_hal_iram.*( .rtc.fast.coredump .rtc.fast.coredump.*) _coredump_rtc_fast_end = ABSOLUTE(.); *(.rtc.force_fast .rtc.force_fast.*) @@ -69,17 +69,17 @@ SECTIONS /* coredump mapping */ _coredump_rtc_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.coredump EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.coredump.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.coredump EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.coredump.*) *libfreertos.a:queue.*( .rtc.coredump.*) *libfreertos.a:queue.*(.rtc.coredump.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.coredump .rtc.coredump.*) + *libhal.a:uart_hal_iram.*( .rtc.coredump .rtc.coredump.*) _coredump_rtc_end = ABSOLUTE(.); /* should be placed after coredump mapping */ - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.data EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.data.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.rodata EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.rodata.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.data EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.data.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.rodata EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .rtc.rodata.*) *libfreertos.a:queue.*( .rtc.data.* .rtc.rodata.*) *libfreertos.a:queue.*(.rtc.data.xQueueGenericCreateStatic .rtc.rodata.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .rtc.data .rtc.data.* .rtc.rodata .rtc.rodata.*) + *libhal.a:uart_hal_iram.*( .rtc.data .rtc.data.* .rtc.rodata .rtc.rodata.*) *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*) _rtc_data_end = ABSOLUTE(.); @@ -92,8 +92,8 @@ SECTIONS *rtc_wake_stub*.*(.bss .bss.*) *rtc_wake_stub*.*(COMMON) - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .rtc.bss) - *libsoc.a:uart_hal_iram.*( .rtc.bss) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .rtc.bss) + *libhal.a:uart_hal_iram.*( .rtc.bss) _rtc_bss_end = ABSOLUTE(.); } > rtc_data_location @@ -187,7 +187,7 @@ SECTIONS /* Code marked as runnning out of IRAM */ _iram_text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .iram1 EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram1.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .iram1 EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .iram1.*) *libapp_trace.a:SEGGER_RTT_esp32.*( .literal .literal.* .text .text.*) *libapp_trace.a:SEGGER_SYSVIEW.*( .literal .literal.* .text .text.*) *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.*( .literal .literal.* .text .text.*) @@ -207,7 +207,17 @@ SECTIONS *libfreertos.a:queue.*(.iram1.xQueueGenericCreateStatic) *libgcc.a:lib2funcs.*( .literal .literal.* .text .text.*) *libgcov.a:( .literal .literal.* .text .text.*) - *libhal.a:( .literal .literal.* .text .text.*) + *libhal.a:cpu_hal.*( .literal .literal.* .text .text.*) + *libhal.a:i2c_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:ledc_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:soc_hal.*( .literal .literal.* .text .text.*) + *libhal.a:spi_flash_hal_gpspi.*( .literal .literal.* .text .text.*) + *libhal.a:spi_flash_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:spi_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:spi_slave_hal_iram.*( .literal .literal.* .text .text.*) + *libhal.a:systimer_hal.*( .literal .literal.* .text .text.*) + *libhal.a:uart_hal_iram.*( .iram1 .iram1.*) + *libhal.a:wdt_hal_iram.*( .literal .literal.* .text .text.*) *libheap.a:multi_heap.*( .literal .literal.* .text .text.*) *libheap.a:multi_heap_poisoning.*( .literal .literal.* .text .text.*) *liblog.a:log.*(.literal.esp_log_write .text.esp_log_write) @@ -221,10 +231,7 @@ SECTIONS *libnewlib.a:heap.*( .literal .literal.* .text .text.*) *libpp.a:( .wifi0iram .wifi0iram.*) *librtc.a:( .literal .literal.* .text .text.*) - *libsoc.a:cpu_hal.*( .literal .literal.* .text .text.*) *libsoc.a:cpu_util.*( .literal .literal.* .text .text.*) - *libsoc.a:i2c_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:ledc_hal_iram.*( .literal .literal.* .text .text.*) *libsoc.a:lldesc.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_clk.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_periph.*( .literal .literal.* .text .text.*) @@ -232,14 +239,6 @@ SECTIONS *libsoc.a:rtc_sleep.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_time.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_wdt.*( .literal .literal.* .text .text.*) - *libsoc.a:soc_hal.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_flash_hal_gpspi.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_flash_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:spi_slave_hal_iram.*( .literal .literal.* .text .text.*) - *libsoc.a:systimer_hal.*( .literal .literal.* .text .text.*) - *libsoc.a:uart_hal_iram.*( .iram1 .iram1.*) - *libsoc.a:wdt_hal_iram.*( .literal .literal.* .text .text.*) *libsoc.a:rtc_init.*(.literal.rtc_vddsdio_set_config .text.rtc_vddsdio_set_config) *libspi_flash.a:memspi_host_driver.*( .literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_gd.*( .literal .literal.* .text .text.*) @@ -247,6 +246,7 @@ SECTIONS *libspi_flash.a:spi_flash_chip_issi.*( .literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_chip_mxic.*( .literal .literal.* .text .text.*) *libspi_flash.a:spi_flash_rom_patch.*( .literal .literal.* .text .text.*) + *libxt_hal.a:( .literal .literal.* .text .text.*) *libxtensa.a:eri.*( .literal .literal.* .text .text.*) *libxtensa.a:stdatomic.*( .literal .literal.* .text .text.*) @@ -280,10 +280,10 @@ SECTIONS /* coredump mapping */ _coredump_dram_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .dram1.coredump EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.coredump.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .dram1.coredump EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.coredump.*) *libfreertos.a:queue.*( .dram1.coredump.*) *libfreertos.a:queue.*(.dram1.coredump.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .dram1.coredump .dram1.coredump.*) + *libhal.a:uart_hal_iram.*( .dram1.coredump .dram1.coredump.*) _coredump_dram_end = ABSOLUTE(.); /* should be placed after coredump mapping */ @@ -291,7 +291,7 @@ SECTIONS KEEP (*(SORT(.esp_system_init_fn) SORT(.esp_system_init_fn.*))) _esp_system_init_fn_array_end = ABSOLUTE(.); - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .data EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .data.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .dram1 EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.*) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .data EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .data.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .dram1 EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .dram1.*) *libapp_trace.a:SEGGER_RTT_esp32.*( .rodata .rodata.*) *libapp_trace.a:SEGGER_SYSVIEW.*( .rodata .rodata.*) *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.*( .rodata .rodata.*) @@ -308,6 +308,17 @@ SECTIONS *libfreertos.a:queue.*( .data.* .dram1.*) *libfreertos.a:queue.*(.data.xQueueGenericCreateStatic .dram1.xQueueGenericCreateStatic) *libgcov.a:( .rodata .rodata.*) + *libhal.a:cpu_hal.*( .rodata .rodata.*) + *libhal.a:i2c_hal_iram.*( .rodata .rodata.*) + *libhal.a:ledc_hal_iram.*( .rodata .rodata.*) + *libhal.a:soc_hal.*( .rodata .rodata.*) + *libhal.a:spi_flash_hal_gpspi.*( .rodata .rodata.*) + *libhal.a:spi_flash_hal_iram.*( .rodata .rodata.*) + *libhal.a:spi_hal_iram.*( .rodata .rodata.*) + *libhal.a:spi_slave_hal_iram.*( .rodata .rodata.*) + *libhal.a:systimer_hal.*( .rodata .rodata.*) + *libhal.a:uart_hal_iram.*( .data .data.* .dram1 .dram1.*) + *libhal.a:wdt_hal_iram.*( .rodata .rodata.*) *libheap.a:multi_heap.*( .rodata .rodata.*) *libheap.a:multi_heap_poisoning.*( .rodata .rodata.*) *liblog.a:log.*(.rodata.esp_log_write) @@ -319,19 +330,8 @@ SECTIONS *libnewlib.a:abort.*( .rodata .rodata.*) *libnewlib.a:heap.*( .rodata .rodata.*) *libphy.a:( .rodata .rodata.*) - *libsoc.a:cpu_hal.*( .rodata .rodata.*) - *libsoc.a:i2c_hal_iram.*( .rodata .rodata.*) - *libsoc.a:ledc_hal_iram.*( .rodata .rodata.*) *libsoc.a:lldesc.*( .rodata .rodata.*) *libsoc.a:rtc_clk.*( .rodata .rodata.*) - *libsoc.a:soc_hal.*( .rodata .rodata.*) - *libsoc.a:spi_flash_hal_gpspi.*( .rodata .rodata.*) - *libsoc.a:spi_flash_hal_iram.*( .rodata .rodata.*) - *libsoc.a:spi_hal_iram.*( .rodata .rodata.*) - *libsoc.a:spi_slave_hal_iram.*( .rodata .rodata.*) - *libsoc.a:systimer_hal.*( .rodata .rodata.*) - *libsoc.a:uart_hal_iram.*( .data .data.* .dram1 .dram1.*) - *libsoc.a:wdt_hal_iram.*( .rodata .rodata.*) *libsoc.a:rtc_init.*(.rodata.rtc_vddsdio_set_config) *libspi_flash.a:memspi_host_driver.*( .rodata .rodata.*) *libspi_flash.a:spi_flash_chip_gd.*( .rodata .rodata.*) @@ -366,10 +366,10 @@ SECTIONS _bss_start = ABSOLUTE(.); *(.ext_ram.bss*) - *(EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .bss EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .bss.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) COMMON) + *(EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .bss EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .bss.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) COMMON) *libfreertos.a:queue.*( .bss.*) *libfreertos.a:queue.*(.bss.xQueueGenericCreateStatic) - *libsoc.a:uart_hal_iram.*( .bss .bss.* COMMON) + *libhal.a:uart_hal_iram.*( .bss .bss.* COMMON) *(.dynsbss) *(.sbss) @@ -396,16 +396,16 @@ SECTIONS *(.rodata_desc .rodata_desc.*) /* Should be the first. App version info. DO NOT PUT ANYTHING BEFORE IT! */ *(.rodata_custom_desc .rodata_custom_desc.*) /* Should be the second. Custom app version info. DO NOT PUT ANYTHING BEFORE IT! */ - *(EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:spi_hal_iram.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libphy.a) .rodata EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log_freertos.* *liblog.a:log.* *libesp_event.a:esp_event.* *libesp_event.a:default_event_loop.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:spi_hal_iram.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libfreertos.a:queue.* *libphy.a) .rodata.*) + *(EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libphy.a) .rodata EXCLUDE_FILE(*libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log_freertos.* *liblog.a:log.* *libesp_event.a:esp_event.* *libesp_event.a:default_event_loop.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libxtensa.a:stdatomic.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a:queue.* *libphy.a) .rodata.*) *libesp_event.a:default_event_loop.*(.rodata.esp_event_loop_create_default.str1.4 .rodata.esp_event_send_to_default_loop) - *libesp_event.a:esp_event.*(.rodata.base_node_add_handler.str1.4 .rodata.loop_node_add_handler.str1.4 .rodata.esp_event_loop_create.str1.4 .rodata.esp_event_loop_run.str1.4 .rodata.esp_event_loop_run_task.str1.4 .rodata.esp_event_handler_register_with_internal.str1.4 .rodata.esp_event_handler_unregister_with_internal.str1.4 .rodata.__func__$9830 .rodata.__func__$9817 .rodata.__func__$9784 .rodata.__func__$9752 .rodata.__func__$9727 .rodata.__func__$9686 .rodata.__func__$9677) + *libesp_event.a:esp_event.*(.rodata.base_node_add_handler.str1.4 .rodata.loop_node_add_handler.str1.4 .rodata.esp_event_loop_create.str1.4 .rodata.esp_event_loop_run.str1.4 .rodata.esp_event_loop_run_task.str1.4 .rodata.esp_event_handler_register_with_internal.str1.4 .rodata.esp_event_handler_unregister_with_internal.str1.4 .rodata.__func__$9843 .rodata.__func__$9830 .rodata.__func__$9797 .rodata.__func__$9765 .rodata.__func__$9740 .rodata.__func__$9699 .rodata.__func__$9690) *libesp_system.a:system_api.*(.rodata.esp_get_idf_version.str1.4) - *libfreertos.a:queue.*(.rodata.prvNotifyQueueSetContainer.str1.4 .rodata.__FUNCTION__$5270 .rodata.__FUNCTION__$5260 .rodata.__FUNCTION__$5240 .rodata.__FUNCTION__$5235 .rodata.__FUNCTION__$5229 .rodata.__FUNCTION__$5223 .rodata.__FUNCTION__$5217 .rodata.__FUNCTION__$5208 .rodata.__FUNCTION__$5198 .rodata.__FUNCTION__$5187 .rodata.__FUNCTION__$5179 .rodata.__FUNCTION__$5306 .rodata.__FUNCTION__$5168 .rodata.__FUNCTION__$5157 .rodata.__FUNCTION__$5151 .rodata.__FUNCTION__$5144 .rodata.__FUNCTION__$5137 .rodata.__FUNCTION__$5103 .rodata.__FUNCTION__$5093 .rodata.__FUNCTION__$5084) + *libfreertos.a:queue.*(.rodata.prvNotifyQueueSetContainer.str1.4 .rodata.__FUNCTION__$5272 .rodata.__FUNCTION__$5262 .rodata.__FUNCTION__$5242 .rodata.__FUNCTION__$5237 .rodata.__FUNCTION__$5231 .rodata.__FUNCTION__$5225 .rodata.__FUNCTION__$5219 .rodata.__FUNCTION__$5210 .rodata.__FUNCTION__$5200 .rodata.__FUNCTION__$5189 .rodata.__FUNCTION__$5181 .rodata.__FUNCTION__$5308 .rodata.__FUNCTION__$5170 .rodata.__FUNCTION__$5159 .rodata.__FUNCTION__$5153 .rodata.__FUNCTION__$5146 .rodata.__FUNCTION__$5139 .rodata.__FUNCTION__$5105 .rodata.__FUNCTION__$5095 .rodata.__FUNCTION__$5086) *libfreertos.a:queue.*(.rodata.xQueueGenericCreateStatic) + *libhal.a:uart_hal_iram.*( .rodata .rodata.*) *liblog.a:log.*(.rodata.esp_log_level_set.str1.4 .rodata.__func__$3542 .rodata.__func__$3513) *liblog.a:log_freertos.*(.rodata.esp_log_system_timestamp.str1.4) *libsoc.a:rtc_init.*( .rodata.*) - *libsoc.a:uart_hal_iram.*( .rodata .rodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) @@ -467,16 +467,16 @@ SECTIONS _instruction_reserved_start = ABSOLUTE(.); _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .text EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:ledc_hal_iram.* *libsoc.a:spi_flash_hal_iram.* *libsoc.a:cpu_hal.* *libsoc.a:wdt_hal_iram.* *libsoc.a:cpu_util.* *libsoc.a:uart_hal_iram.* *libsoc.a:i2c_hal_iram.* *libsoc.a:soc_hal.* *libsoc.a:spi_flash_hal_gpspi.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:spi_slave_hal_iram.* *libsoc.a:lldesc.* *libsoc.a:systimer_hal.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:spi_hal_iram.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a *libfreertos.a) .text.* EXCLUDE_FILE(*libpp.a *libnet80211.a *libsoc.a:uart_hal_iram.*) .wifi0iram EXCLUDE_FILE(*libpp.a *libnet80211.a *libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifi0iram.* EXCLUDE_FILE(*libsoc.a:uart_hal_iram.*) .wifirxiram EXCLUDE_FILE(*libsoc.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifirxiram.*) + *(EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .literal EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .literal.* EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *libgcc.a:lib2funcs.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .text EXCLUDE_FILE(*libesp_ringbuf.a *libgcov.a *libapp_trace.a:SEGGER_RTT_esp32.* *libapp_trace.a:SEGGER_SYSVIEW_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW_Config_FreeRTOS.* *libapp_trace.a:SEGGER_SYSVIEW.* *libapp_trace.a:app_trace.* *libapp_trace.a:app_trace_util.* *liblog.a:log.* *liblog.a:log_freertos.* *libgcc.a:lib2funcs.* *libesp_event.a:default_event_loop.* *libesp_event.a:esp_event.* *librtc.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libxt_hal.a *libesp_system.a:system_api.* *libesp_system.a:panic_handler.* *libesp_system.a:reset_reason.* *libesp_system.a:panic.* *libesp_common.a:esp_err.* *libspi_flash.a:spi_flash_chip_mxic.* *libspi_flash.a:spi_flash_chip_issi.* *libspi_flash.a:spi_flash_rom_patch.* *libspi_flash.a:spi_flash_chip_gd.* *libspi_flash.a:memspi_host_driver.* *libspi_flash.a:spi_flash_chip_generic.* *libsoc.a:rtc_init.* *libsoc.a:cpu_util.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_clk.* *libsoc.a:lldesc.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_time.* *libsoc.a:rtc_periph.* *libxtensa.a:stdatomic.* *libxtensa.a:eri.* *libnewlib.a:heap.* *libnewlib.a:abort.* *libhal.a:spi_flash_hal_iram.* *libhal.a:uart_hal_iram.* *libhal.a:i2c_hal_iram.* *libhal.a:soc_hal.* *libhal.a:spi_flash_hal_gpspi.* *libhal.a:cpu_hal.* *libhal.a:ledc_hal_iram.* *libhal.a:spi_slave_hal_iram.* *libhal.a:systimer_hal.* *libhal.a:wdt_hal_iram.* *libhal.a:spi_hal_iram.* *libfreertos.a) .text.* EXCLUDE_FILE(*libpp.a *libnet80211.a *libhal.a:uart_hal_iram.*) .wifi0iram EXCLUDE_FILE(*libpp.a *libnet80211.a *libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifi0iram.* EXCLUDE_FILE(*libhal.a:uart_hal_iram.*) .wifirxiram EXCLUDE_FILE(*libhal.a:uart_hal_iram.* *libfreertos.a:queue.*) .wifirxiram.*) *libesp_event.a:default_event_loop.*(.literal.esp_event_handler_register .literal.esp_event_handler_instance_register .literal.esp_event_handler_unregister .literal.esp_event_handler_instance_unregister .literal.esp_event_post .literal.esp_event_loop_create_default .literal.esp_event_loop_delete_default .literal.esp_event_send_to_default_loop .text.esp_event_handler_register .text.esp_event_handler_instance_register .text.esp_event_handler_unregister .text.esp_event_handler_instance_unregister .text.esp_event_post .text.esp_event_loop_create_default .text.esp_event_loop_delete_default .text.esp_event_send_to_default_loop) *libesp_event.a:esp_event.*(.literal.handler_instances_add .literal.base_node_add_handler .literal.loop_node_add_handler .literal.handler_instances_remove .literal.handler_instances_remove_all$isra$1 .literal.esp_event_loop_create .literal.esp_event_loop_run .literal.esp_event_loop_run_task .literal.esp_event_loop_delete .literal.esp_event_handler_register_with_internal .literal.esp_event_handler_register_with .literal.esp_event_handler_instance_register_with .literal.esp_event_handler_unregister_with_internal .literal.esp_event_handler_unregister_with .literal.esp_event_handler_instance_unregister_with .literal.esp_event_post_to .text.handler_instances_add .text.base_node_add_handler .text.loop_node_add_handler .text.handler_instances_remove .text.handler_instances_remove_all$isra$1 .text.esp_event_loop_create .text.esp_event_loop_run .text.esp_event_loop_run_task .text.esp_event_loop_delete .text.esp_event_handler_register_with_internal .text.esp_event_handler_register_with .text.esp_event_handler_instance_register_with .text.esp_event_handler_unregister_with_internal .text.esp_event_handler_unregister_with .text.esp_event_handler_instance_unregister_with .text.esp_event_post_to .text.esp_event_dump) *libesp_system.a:system_api.*(.literal.esp_register_shutdown_handler .literal.esp_unregister_shutdown_handler .literal.esp_get_free_heap_size .literal.esp_get_free_internal_heap_size .literal.esp_get_minimum_free_heap_size .literal.esp_get_idf_version .text.esp_register_shutdown_handler .text.esp_unregister_shutdown_handler .text.esp_get_free_heap_size .text.esp_get_free_internal_heap_size .text.esp_get_minimum_free_heap_size .text.esp_get_idf_version) *libfreertos.a:queue.*( .wifi0iram.* .wifirxiram.*) *libfreertos.a:queue.*(.literal.xQueueGenericCreateStatic .text.xQueueGenericCreateStatic .wifi0iram.xQueueGenericCreateStatic .wifirxiram.xQueueGenericCreateStatic) + *libhal.a:uart_hal_iram.*( .literal .literal.* .text .text.* .wifi0iram .wifi0iram.* .wifirxiram .wifirxiram.*) *liblog.a:log.*(.literal.heap_bubble_down .literal.esp_log_set_vprintf .literal.esp_log_level_set .literal.esp_log_writev .text.heap_bubble_down .text.esp_log_set_vprintf .text.esp_log_level_set .text.esp_log_writev) *liblog.a:log_freertos.*(.literal.esp_log_system_timestamp .text.esp_log_system_timestamp) *libsoc.a:rtc_init.*(.literal.rtc_init .literal.rtc_vddsdio_get_config .text.rtc_init .text.rtc_vddsdio_get_config) - *libsoc.a:uart_hal_iram.*( .literal .literal.* .text .text.* .wifi0iram .wifi0iram.* .wifirxiram .wifirxiram.*) *(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) *(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */ diff --git a/tools/sdk/esp32s2/lib/libapp_trace.a b/tools/sdk/esp32s2/lib/libapp_trace.a index 47930b69..3ac06497 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 ad5cd0d2..b3b23d12 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/libasio.a b/tools/sdk/esp32s2/lib/libasio.a index 116d0fd1..12fcd69a 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 5eaa98f0..d3a8c0b9 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 3ab77074..64b03ff0 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 new file mode 100644 index 00000000..132010c1 Binary files /dev/null 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 f8e5f4de..e45562fc 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 e06000c0..3d203b16 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 b796992d..7614fbf6 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 7c4f2895..e3d00a12 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 33830271..a691ec35 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 00a0fdc6..1ea278ef 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 0c901a48..45a59d00 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-face.a b/tools/sdk/esp32s2/lib/libesp-face.a index 71a9c507..e0a6de9a 100644 Binary files a/tools/sdk/esp32s2/lib/libesp-face.a and b/tools/sdk/esp32s2/lib/libesp-face.a differ diff --git a/tools/sdk/esp32s2/lib/libesp-tls.a b/tools/sdk/esp32s2/lib/libesp-tls.a index d2217b0b..2d5c83b9 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/libesp32s2.a b/tools/sdk/esp32s2/lib/libesp32s2.a index 87803a64..2d0ec8f3 100644 Binary files a/tools/sdk/esp32s2/lib/libesp32s2.a and b/tools/sdk/esp32s2/lib/libesp32s2.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_adc_cal.a b/tools/sdk/esp32s2/lib/libesp_adc_cal.a index b086ce6a..d2be28c1 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 9a762535..062d92ec 100644 Binary files a/tools/sdk/esp32s2/lib/libesp_common.a and b/tools/sdk/esp32s2/lib/libesp_common.a differ diff --git a/tools/sdk/esp32s2/lib/libesp_eth.a b/tools/sdk/esp32s2/lib/libesp_eth.a index 1f705125..bde3350c 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 168621f5..34b97b42 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 0b940ca0..63a5429e 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 604322f8..8ac51a46 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 642b88f1..5b7d32f6 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 cb43e06e..905699ab 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 65016dc6..e210647c 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 1ecc995a..13036ff1 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_ipc.a b/tools/sdk/esp32s2/lib/libesp_ipc.a index ee080b7e..52fe41c5 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_local_ctrl.a b/tools/sdk/esp32s2/lib/libesp_local_ctrl.a index b6cedc1e..bd47e23f 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 13ebee5e..0d75531b 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_ringbuf.a b/tools/sdk/esp32s2/lib/libesp_ringbuf.a index db77881c..a6f01482 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 5d733d49..a0978fed 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_serial_slave_link.a b/tools/sdk/esp32s2/lib/libesp_serial_slave_link.a index 8129cc91..4f4d5859 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 04a32561..b12865d0 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 bb7e715e..536090ad 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 b8815ea3..1a63ac40 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 39165842..332b89b5 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 99e52ce1..20fb4ac4 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 173d9ea3..88d0d7c3 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/libexpat.a b/tools/sdk/esp32s2/lib/libexpat.a index 535a5f52..9550124e 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 98ed407a..c0187948 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 92dea5d7..73718d16 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 27cf09e5..4d0a819f 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 c68c9750..9f59bbca 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/libhal.a b/tools/sdk/esp32s2/lib/libhal.a index 42a19a23..0095fc1b 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 dbc67888..cd606ba7 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 10d95b76..27ceacd9 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 63eb1d57..16e2eebc 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/liblibsodium.a b/tools/sdk/esp32s2/lib/liblibsodium.a index 55d272e2..20ca4468 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 9a752e6a..578b51f8 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 f017ecbf..155c3223 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 559e355e..76f6f7f2 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 61697266..ff42d93a 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/libmbedx509.a b/tools/sdk/esp32s2/lib/libmbedx509.a index 882a639e..483c3309 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 ea2a7f69..60597d35 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 bdc82d1c..7ba3ace4 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 805ac602..73ab06d5 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 a85830b3..b1ae82ab 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 b4cade45..1ea3471e 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 4f7dda1e..f83b76df 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 1feaf96e..3d035f83 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 0df8500e..8812b4ca 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 d11dd387..b5a36d00 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 767881f7..625e5fae 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 163b2661..38fcd030 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 c0ff1a97..8ad9aab6 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 dba0b931..17d75fe0 100644 Binary files a/tools/sdk/esp32s2/lib/libpthread.a and b/tools/sdk/esp32s2/lib/libpthread.a differ diff --git a/tools/sdk/esp32s2/lib/libsdmmc.a b/tools/sdk/esp32s2/lib/libsdmmc.a index aad4f2b6..59880480 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 3caa0810..79b50716 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 b81c3b68..9020b2ba 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/libsoc_esp32s2.a b/tools/sdk/esp32s2/lib/libsoc_esp32s2.a index 21fcc2b8..bc86d403 100644 Binary files a/tools/sdk/esp32s2/lib/libsoc_esp32s2.a and b/tools/sdk/esp32s2/lib/libsoc_esp32s2.a differ diff --git a/tools/sdk/esp32s2/lib/libspi_flash.a b/tools/sdk/esp32s2/lib/libspi_flash.a index 9125f6b4..8f15baec 100644 Binary files a/tools/sdk/esp32s2/lib/libspi_flash.a and b/tools/sdk/esp32s2/lib/libspi_flash.a differ diff --git a/tools/sdk/esp32s2/lib/libspiffs.a b/tools/sdk/esp32s2/lib/libspiffs.a index b50cbe4e..4e60e5f7 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 f431db03..5830ab50 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 015c39f1..d299939f 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/libtinyusb.a b/tools/sdk/esp32s2/lib/libtinyusb.a index 6338df1b..d98dfc99 100644 Binary files a/tools/sdk/esp32s2/lib/libtinyusb.a and b/tools/sdk/esp32s2/lib/libtinyusb.a differ diff --git a/tools/sdk/esp32s2/lib/libulp.a b/tools/sdk/esp32s2/lib/libulp.a index 73f34085..624ac2c3 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 eb77a2aa..c198d1e5 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/libvfs.a b/tools/sdk/esp32s2/lib/libvfs.a index 771fc6fa..c5001025 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/libwear_levelling.a b/tools/sdk/esp32s2/lib/libwear_levelling.a index e3188ae2..f36359f4 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 9a9426ea..8d9c2c7f 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 41789d28..934dbe2d 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/libxt_hal.a b/tools/sdk/esp32s2/lib/libxt_hal.a new file mode 100644 index 00000000..42a19a23 Binary files /dev/null and b/tools/sdk/esp32s2/lib/libxt_hal.a differ diff --git a/tools/sdk/esp32s2/lib/libxtensa.a b/tools/sdk/esp32s2/lib/libxtensa.a index 88354727..b5ec0cf0 100644 Binary files a/tools/sdk/esp32s2/lib/libxtensa.a and b/tools/sdk/esp32s2/lib/libxtensa.a differ diff --git a/tools/sdk/esp32s2/sdkconfig b/tools/sdk/esp32s2/sdkconfig index d2d1725e..47fab72a 100644 --- a/tools/sdk/esp32s2/sdkconfig +++ b/tools/sdk/esp32s2/sdkconfig @@ -76,7 +76,7 @@ CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y # Serial flasher config # CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set +CONFIG_ESPTOOLPY_WITH_STUB=y CONFIG_ESPTOOLPY_FLASHMODE_QIO=y # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set # CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set @@ -188,6 +188,7 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NORM=y CONFIG_COMPILER_STACK_CHECK=y CONFIG_COMPILER_WARN_WRITE_STRINGS=y # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set # end of Compiler options # @@ -623,6 +624,7 @@ CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set CONFIG_FREERTOS_DEBUG_OCDAWARE=y # end of FreeRTOS @@ -985,6 +987,7 @@ CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set # # Auto-detect flash chips