### Start Intray for Audio Capture Source: https://github.com/heywillow/willow/blob/main/NOTES.md Use this command to start the intray tool for capturing audio data to a specified directory. Intray appends suffixes to filenames if they already exist. ```bash ./intray-x86_64-unknown-linux-musl --dir /tmp ``` -------------------------------- ### Configuration Command Source: https://github.com/heywillow/willow/wiki/Local-Command-Support Enable Multinet support during the Willow configuration process. Ensure PCM codec is selected to reveal the Multinet option. ```bash ./utils.sh config ``` -------------------------------- ### Build Command Source: https://github.com/heywillow/willow/wiki/Local-Command-Support The build process utilizes a Python script to generate Multinet grammar and mapping files for local command detection. ```bash utils.sh build ``` -------------------------------- ### Create SPIFFS Partition Image Source: https://github.com/heywillow/willow/blob/main/main/CMakeLists.txt Creates a SPIFFS partition image named 'user' from the '../spiffs/user' directory and places it in the project. ```cmake spiffs_create_partition_image(user ../spiffs/user FLASH_IN_PROJECT) ``` -------------------------------- ### Willow CMakeLists.txt Boilerplate Source: https://github.com/heywillow/willow/blob/main/CMakeLists.txt These lines must be included in your project's CMakeLists.txt in this exact order for CMake to function correctly. ```cmake cmake_minimum_required(VERSION 3.5) if($ENV{MULTINET}) message("Enabling MultiNet support. Please note we will not provide support. Issues related to MultiNet will be closed without resolution.") add_definitions(-DWILLOW_SUPPORT_MULTINET) endif() if(DEFINED ENV{WILLOW_VERSION}) add_definitions(-DWILLOW_USER_AGENT="Willow/$ENV{WILLOW_VERSION}") else() add_definitions(-DWILLOW_USER_AGENT="Willow/0.1") endif() set(EXCLUDE_COMPONENTS "adf_utils" "app_trace" "battery_service" "bluetooth_service" "cmock" "coredump_upload_service" "esp_codec_dev" "esp_eth" "esp_event_cast" "esp_gdbstub" "esp_hid" "esp_http_server" "esp_https_ota" "esp_https_server" "esp_local_ctrl" "espcoredump" "idf_test" "ieee802154" "mqtt" "openthread" "ota_service" "perfmon" "playlist" "protobuf-c" "protocomm" "touch_element" "ulp" "unity" "usb" "wifi_provisioning" ) include($ENV{ADF_PATH}/CMakeLists.txt) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(willow) ``` -------------------------------- ### Play Raw Audio with ffplay Source: https://github.com/heywillow/willow/blob/main/NOTES.md This command plays back raw audio data captured by intray using ffplay. Ensure the format options match the captured audio stream. ```bash ffplay -f s16le -ac 1 -ar 16000 willow.raw ``` -------------------------------- ### Register Willow Component with Source and Include Directories Source: https://github.com/heywillow/willow/blob/main/main/CMakeLists.txt Registers the main Willow component, specifying source and include directories. Conditionally includes the 'net' directory if CONFIG_WILLOW_ETHERNET is enabled. ```cmake if(CONFIG_WILLOW_ETHERNET) set(WILLOW_ETHERNET_SRC_DIRS "net") endif() idf_component_register( SRC_DIRS "." "endpoint" "${WILLOW_ETHERNET_SRC_DIRS}" INCLUDE_DIRS "." "${WILLOW_ETHERNET_SRC_DIRS}" PRIV_REQUIRES app_update audio_board audio_hal audio_pipeline audio_recorder audio_sal audio_stream esp_http_client esp_peripherals esp_websocket_client input_key_service spiffs ) ``` -------------------------------- ### SDK Configuration Sanity Checks for Wi-Fi Credentials Source: https://github.com/heywillow/willow/blob/main/main/CMakeLists.txt Performs sanity checks on Wi-Fi credentials if SDK configuration sanity checks are enabled and Ethernet is not configured. Validates that the Wi-Fi passphrase contains only ASCII characters and meets length requirements. ```cmake # sdkconfig sanity checks if($ENV{WILLOW_SDKCONFIG_SANITY_CHECKS}) if (NOT CONFIG_WILLOW_ETHERNET) string(REGEX MATCH "^[ -~]+" WIFI_PASSPHRASE "${CONFIG_WIFI_PASSWORD}") if(NOT "${CONFIG_WIFI_PASSWORD}" STREQUAL "${WIFI_PASSPHRASE}") message(FATAL_ERROR "Wi-Fi WPA passphrase must only contain ASCII characters") endif() string(LENGTH "${CONFIG_WIFI_PASSWORD}" WIFI_PLEN) if(WIFI_PLEN LESS 8 OR WIFI_PLEN GREATER 63) message(FATAL_ERROR "Wi-Fi WPA passphrase must be between 8 and 63 ASCII characters") endif() endif() endif() ``` -------------------------------- ### Generate NVS Partition Binary Source: https://github.com/heywillow/willow/blob/main/NOTES.md This command generates a binary NVS partition file from a CSV definition. Specify the version, input CSV file, output binary file, and partition size. ```bash /opt/esp/idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate --version 2 nvs.csv nvs.bin 0x24000 ``` -------------------------------- ### Analyze Crash Dump with addr2line Source: https://github.com/heywillow/willow/blob/main/NOTES.md Use addr2line to translate memory addresses from a crash dump into human-readable source code locations. Provide the ELF file and the backtrace addresses. ```bash /opt/esp/tools/xtensa-esp32s3-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-addr2line -e build/willow.elf 0x42043afc:0x3fcaf490 0x42042b4a:0x3fcaf4b0 0x420245f6:0x3fcaf4d0 0x42024637:0x3fcaf840 0x420105ea:0x3fcaf860 0x42008b20:0x3fcaf890 0x4211bd17:0x3fcafac0 ``` -------------------------------- ### Append Warning Flag for C Compiler Source: https://github.com/heywillow/willow/blob/main/main/CMakeLists.txt Appends the -Werror flag to C compiler flags, treating all warnings as errors. ```cmake string(APPEND CMAKE_C_FLAGS -Werror) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.