Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenThread Network Time Synchronization Fails to Build on the ESP Thread Border Router (IDFGH-13108) #14055

Closed
3 tasks done
SimeonAT opened this issue Jun 22, 2024 · 9 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@SimeonAT
Copy link

SimeonAT commented Jun 22, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.4-dev-1030-g0479494e7a

Operating System used.

macOS

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

I should be able to use the OpenThread Network Time Synchronization feature on an ESP Thread Border Router, whether it be programmatically through the API or the command line interface.

What is the actual behavior?

I am using the ESP Thread Border Router SDK, using the OPENTHREAD_TIME_SYNC flag per the instructions given in Issue 12154. I enabled that flag in both the RCP and Border Router programs.

The idf.py build process is successful for the RCP. However, the idf.py build process fails for the Border Router, giving the following error below:

/Users/simeon/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/openthread/libopenthread.a(mle_router.cpp.obj):(.literal._ZN2ot3Mle9MleRouter18SendAddressSolicitENS_15ThreadStatusTlv6StatusE+0x0): undefined reference to `otPlatTimeGetXtalAccuracy'
/Users/simeon/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/openthread/libopenthread.a(mle_router.cpp.obj): in function `_ZN2ot3Tlv6AppendINS_15ThreadStatusTlvEEE7otErrorRNS_7MessageENT_13UintValueTypeE':
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/tlvs.hpp:584:(.text._ZN2ot3Mle9MleRouter18SendAddressSolicitENS_15ThreadStatusTlv6StatusE+0x66): undefined reference to `otPlatTimeGetXtalAccuracy'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I was able to successfully build this on ESP32-H2s using the ot_cli example program and they were able to use network time synchronization without any issues.

I describe how I attempted to solve this issue in the More Information section. However, I had to modify the ESP-IDF source code in order to do so. This leads me to believe that it may be the case that the OpenThread Network Time Synchronization for the ESP Border Router does not have support yet.

As a result, I would like to ask the following question:

Is it possible to use OpenThread Network Time Synchronization on an ESP Thread Border Router, or is this feature only available for non-Border Router devices? If so, what steps do I need to take in order to properly navigate this build error (rather than using the ad-hoc solution I described in the More Information section?

I am not asking for a feature or bug fix to be implemented. However, my higher level question is if such a feature is currently possible in ESP-IDF. If it is not possible, I can change the OpenThread app layer programs that I am writing given that fact. However, I don't want to assume that it isn't possible to do so without asking if it possible first, as it may be the case that I am using the ESP-IDF OpenThread Network Time Sync feature incorrectly.

Steps to reproduce.

I want to note that I was running my fork of the ESP Thread Border Router SDK that I am using for my own purposes. However, I believe the problem can be easily reproduced on using the ESP Thread Border Router SDK.

The specific hardware I am using is the ESP Thread Border Router/Zigbee Gateway.

  1. Clone the ESP Thread Border Router SDK.
  2. Navigate to the ot_rcp example program. Use idf.py menuconfig, enable the OPENTHREAD_TIME_SYNC flag, and then run idf.py build.
  3. Navigate to the Basic Thread Border Router example program in the ESP Thread Border Router SDK. Use idf.py menuconfig, enable the OPENTHREAD_TIME_SYNC, and run idf.py build.
  4. During the build process that was started in Step 3, the error will be displayed.

Build or installation Logs.

The Console Output When I Build.
❯ esp_fbm /dev/cu.usbmodem211301
Executing action: all (aliases: build)
Running ninja in directory /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build
Executing "ninja all"...
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32s3
Processing 6 dependencies:
[6/6] idf (5.4.0)
-- Project sdkconfig file /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/sdkconfig
Loading defaults file /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/sdkconfig.defaults...
-- Compiler supported targets: xtensa-esp-elf
-- App "esp_ot_br" version: ef1e23b
-- Adding linker script /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.wdt.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_br_http_ota esp_coex esp_common esp_driver_ana_cmpr esp_driver_cam esp_driver_dac esp_driver_gpio esp_driver_gptimer esp_driver_i2c esp_driver_i2s esp_driver_isp esp_driver_jpeg esp_driver_ledc esp_driver_mcpwm esp_driver_parlio esp_driver_pcnt esp_driver_ppa esp_driver_rmt esp_driver_sdio esp_driver_sdm esp_driver_sdmmc esp_driver_sdspi esp_driver_spi esp_driver_touch_sens esp_driver_tsens esp_driver_uart esp_driver_usb_serial_jtag esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_ot_br_server esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_vfs_console esp_wifi espcoredump espressif__esp-serial-flasher espressif__esp_ot_cli_extension espressif__esp_rcp_update espressif__iperf espressif__mdns esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocol_examples_common protocomm pthread sdmmc soc spi_flash spiffs tcp_transport thread_border_router touch_element ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /Users/simeon/esp/esp-idf/components/app_trace /Users/simeon/esp/esp-idf/components/app_update /Users/simeon/esp/esp-idf/components/bootloader /Users/simeon/esp/esp-idf/components/bootloader_support /Users/simeon/esp/esp-idf/components/bt /Users/simeon/esp/esp-idf/components/cmock /Users/simeon/esp/esp-idf/components/console /Users/simeon/esp/esp-idf/components/cxx /Users/simeon/esp/esp-idf/components/driver /Users/simeon/esp/esp-idf/components/efuse /Users/simeon/esp/esp-idf/components/esp-tls /Users/simeon/esp/esp-idf/components/esp_adc /Users/simeon/esp/esp-idf/components/esp_app_format /Users/simeon/esp/esp-idf/components/esp_bootloader_format /Users/simeon/Desktop/Repositories/br_throughput/components/esp_br_http_ota /Users/simeon/esp/esp-idf/components/esp_coex /Users/simeon/esp/esp-idf/components/esp_common /Users/simeon/esp/esp-idf/components/esp_driver_ana_cmpr /Users/simeon/esp/esp-idf/components/esp_driver_cam /Users/simeon/esp/esp-idf/components/esp_driver_dac /Users/simeon/esp/esp-idf/components/esp_driver_gpio /Users/simeon/esp/esp-idf/components/esp_driver_gptimer /Users/simeon/esp/esp-idf/components/esp_driver_i2c /Users/simeon/esp/esp-idf/components/esp_driver_i2s /Users/simeon/esp/esp-idf/components/esp_driver_isp /Users/simeon/esp/esp-idf/components/esp_driver_jpeg /Users/simeon/esp/esp-idf/components/esp_driver_ledc /Users/simeon/esp/esp-idf/components/esp_driver_mcpwm /Users/simeon/esp/esp-idf/components/esp_driver_parlio /Users/simeon/esp/esp-idf/components/esp_driver_pcnt /Users/simeon/esp/esp-idf/components/esp_driver_ppa /Users/simeon/esp/esp-idf/components/esp_driver_rmt /Users/simeon/esp/esp-idf/components/esp_driver_sdio /Users/simeon/esp/esp-idf/components/esp_driver_sdm /Users/simeon/esp/esp-idf/components/esp_driver_sdmmc /Users/simeon/esp/esp-idf/components/esp_driver_sdspi /Users/simeon/esp/esp-idf/components/esp_driver_spi /Users/simeon/esp/esp-idf/components/esp_driver_touch_sens /Users/simeon/esp/esp-idf/components/esp_driver_tsens /Users/simeon/esp/esp-idf/components/esp_driver_uart /Users/simeon/esp/esp-idf/components/esp_driver_usb_serial_jtag /Users/simeon/esp/esp-idf/components/esp_eth /Users/simeon/esp/esp-idf/components/esp_event /Users/simeon/esp/esp-idf/components/esp_gdbstub /Users/simeon/esp/esp-idf/components/esp_hid /Users/simeon/esp/esp-idf/components/esp_http_client /Users/simeon/esp/esp-idf/components/esp_http_server /Users/simeon/esp/esp-idf/components/esp_https_ota /Users/simeon/esp/esp-idf/components/esp_https_server /Users/simeon/esp/esp-idf/components/esp_hw_support /Users/simeon/esp/esp-idf/components/esp_lcd /Users/simeon/esp/esp-idf/components/esp_local_ctrl /Users/simeon/esp/esp-idf/components/esp_mm /Users/simeon/esp/esp-idf/components/esp_netif /Users/simeon/esp/esp-idf/components/esp_netif_stack /Users/simeon/Desktop/Repositories/br_throughput/components/esp_ot_br_server /Users/simeon/esp/esp-idf/components/esp_partition /Users/simeon/esp/esp-idf/components/esp_phy /Users/simeon/esp/esp-idf/components/esp_pm /Users/simeon/esp/esp-idf/components/esp_psram /Users/simeon/esp/esp-idf/components/esp_ringbuf /Users/simeon/esp/esp-idf/components/esp_rom /Users/simeon/esp/esp-idf/components/esp_system /Users/simeon/esp/esp-idf/components/esp_timer /Users/simeon/esp/esp-idf/components/esp_vfs_console /Users/simeon/esp/esp-idf/components/esp_wifi /Users/simeon/esp/esp-idf/components/espcoredump /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/managed_components/espressif__esp-serial-flasher /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/managed_components/espressif__esp_ot_cli_extension /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/managed_components/espressif__esp_rcp_update /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/managed_components/espressif__iperf /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/managed_components/espressif__mdns /Users/simeon/esp/esp-idf/components/esptool_py /Users/simeon/esp/esp-idf/components/fatfs /Users/simeon/esp/esp-idf/components/freertos /Users/simeon/esp/esp-idf/components/hal /Users/simeon/esp/esp-idf/components/heap /Users/simeon/esp/esp-idf/components/http_parser /Users/simeon/esp/esp-idf/components/idf_test /Users/simeon/esp/esp-idf/components/ieee802154 /Users/simeon/esp/esp-idf/components/json /Users/simeon/esp/esp-idf/components/log /Users/simeon/esp/esp-idf/components/lwip /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/main /Users/simeon/esp/esp-idf/components/mbedtls /Users/simeon/esp/esp-idf/components/mqtt /Users/simeon/esp/esp-idf/components/newlib /Users/simeon/esp/esp-idf/components/nvs_flash /Users/simeon/esp/esp-idf/components/nvs_sec_provider /Users/simeon/esp/esp-idf/components/openthread /Users/simeon/esp/esp-idf/components/partition_table /Users/simeon/esp/esp-idf/components/perfmon /Users/simeon/esp/esp-idf/components/protobuf-c /Users/simeon/esp/esp-idf/examples/common_components/protocol_examples_common /Users/simeon/esp/esp-idf/components/protocomm /Users/simeon/esp/esp-idf/components/pthread /Users/simeon/esp/esp-idf/components/sdmmc /Users/simeon/esp/esp-idf/components/soc /Users/simeon/esp/esp-idf/components/spi_flash /Users/simeon/esp/esp-idf/components/spiffs /Users/simeon/esp/esp-idf/components/tcp_transport /Users/simeon/Desktop/Repositories/br_throughput/examples/common/thread_border_router /Users/simeon/esp/esp-idf/components/touch_element /Users/simeon/esp/esp-idf/components/ulp /Users/simeon/esp/esp-idf/components/unity /Users/simeon/esp/esp-idf/components/usb /Users/simeon/esp/esp-idf/components/vfs /Users/simeon/esp/esp-idf/components/wear_levelling /Users/simeon/esp/esp-idf/components/wifi_provisioning /Users/simeon/esp/esp-idf/components/wpa_supplicant /Users/simeon/esp/esp-idf/components/xtensa
-- Configuring done (2.8s)
-- Generating done (0.3s)
-- Build files have been written to: /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build
[6/1356] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
otadata,data,ota,0xf000,8K,
phy_init,data,phy,0x11000,4K,
ota_0,app,ota_0,0x20000,1600K,
ota_1,app,ota_1,0x1b0000,1600K,
web_storage,data,spiffs,0x340000,100K,
rcp_fw,data,spiffs,0x359000,640K,
*******************************************************************************
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32s3
-- Project sdkconfig file /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Adding linker script /Users/simeon/esp/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Bootloader project name: "bootloader" version: 1
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.wdt.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld
-- Adding linker script /Users/simeon/esp/esp-idf/components/bootloader/subproject/main/ld/esp32s3/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_bootloader_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /Users/simeon/esp/esp-idf/components/bootloader /Users/simeon/esp/esp-idf/components/bootloader_support /Users/simeon/esp/esp-idf/components/efuse /Users/simeon/esp/esp-idf/components/esp_app_format /Users/simeon/esp/esp-idf/components/esp_bootloader_format /Users/simeon/esp/esp-idf/components/esp_common /Users/simeon/esp/esp-idf/components/esp_hw_support /Users/simeon/esp/esp-idf/components/esp_rom /Users/simeon/esp/esp-idf/components/esp_system /Users/simeon/esp/esp-idf/components/esptool_py /Users/simeon/esp/esp-idf/components/freertos /Users/simeon/esp/esp-idf/components/hal /Users/simeon/esp/esp-idf/components/log /Users/simeon/esp/esp-idf/components/bootloader/subproject/main /Users/simeon/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /Users/simeon/esp/esp-idf/components/newlib /Users/simeon/esp/esp-idf/components/partition_table /Users/simeon/esp/esp-idf/components/soc /Users/simeon/esp/esp-idf/components/spi_flash /Users/simeon/esp/esp-idf/components/xtensa
-- Configuring done (3.3s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/bootloader
[111/112] Generating binary image from built executable
esptool.py v4.8.dev4
Creating esp32s3 image...
Merged 2 ELF sections
Successfully created esp32s3 image.
Generated /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/bootloader/bootloader.bin
[112/112] cd /Users/simeon/Desktop/Repositories/br_throughput/examples...ut/examples/basic_thread_border_router/build/bootloader/bootloader.bin
Bootloader binary size 0x51d0 bytes. 0x2e30 bytes (36%) free.
[1354/1356] Linking CXX executable esp_ot_br.elf
FAILED: esp_ot_br.elf
: && /Users/simeon/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++ -mlongcalls  -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32S3=0 -Wl,--Map=/Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/esp_ot_br.map -Wl,--no-warn-rwx-segments -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32s3.peripherals.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.wdt.ld -T esp32s3.rom.version.ld -T esp32s3.rom.newlib.ld -T memory.ld -T sections.ld CMakeFiles/esp_ot_br.elf.dir/project_elf_src_esp32s3.c.obj -o esp_ot_br.elf -L/Users/simeon/esp/esp-idf/components/soc/esp32s3/ld   -L/Users/simeon/esp/esp-idf/components/esp_rom/esp32s3/ld   -L/Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/esp-idf/esp_system/ld   -L/Users/simeon/esp/esp-idf/components/esp_phy/lib/esp32s3   -L/Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3 esp-idf/xtensa/libxtensa.a  esp-idf/esp_driver_gpio/libesp_driver_gpio.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/esp_bootloader_format/libesp_bootloader_format.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/pthread/libpthread.a  esp-idf/cxx/libcxx.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/esp_driver_gptimer/libesp_driver_gptimer.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/esp_driver_uart/libesp_driver_uart.a  esp-idf/app_trace/libapp_trace.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_driver_pcnt/libesp_driver_pcnt.a  esp-idf/esp_driver_spi/libesp_driver_spi.a  esp-idf/esp_driver_mcpwm/libesp_driver_mcpwm.a  esp-idf/esp_driver_i2s/libesp_driver_i2s.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/esp_driver_sdmmc/libesp_driver_sdmmc.a  esp-idf/esp_driver_sdspi/libesp_driver_sdspi.a  esp-idf/esp_driver_rmt/libesp_driver_rmt.a  esp-idf/esp_driver_tsens/libesp_driver_tsens.a  esp-idf/esp_driver_sdm/libesp_driver_sdm.a  esp-idf/esp_driver_i2c/libesp_driver_i2c.a  esp-idf/esp_driver_ledc/libesp_driver_ledc.a  esp-idf/esp_driver_usb_serial_jtag/libesp_driver_usb_serial_jtag.a  esp-idf/driver/libdriver.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_vfs_console/libesp_vfs_console.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/unity/libunity.a  esp-idf/cmock/libcmock.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_driver_cam/libesp_driver_cam.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/esp_hid/libesp_hid.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/esp_https_server/libesp_https_server.a  esp-idf/esp_lcd/libesp_lcd.a  esp-idf/protobuf-c/libprotobuf-c.a  esp-idf/protocomm/libprotocomm.a  esp-idf/esp_local_ctrl/libesp_local_ctrl.a  esp-idf/espcoredump/libespcoredump.a  esp-idf/wear_levelling/libwear_levelling.a  esp-idf/fatfs/libfatfs.a  esp-idf/json/libjson.a  esp-idf/mqtt/libmqtt.a  esp-idf/nvs_sec_provider/libnvs_sec_provider.a  esp-idf/openthread/libopenthread.a  esp-idf/perfmon/libperfmon.a  esp-idf/spiffs/libspiffs.a  esp-idf/touch_element/libtouch_element.a  esp-idf/usb/libusb.a  esp-idf/wifi_provisioning/libwifi_provisioning.a  esp-idf/espressif__esp-serial-flasher/libespressif__esp-serial-flasher.a  esp-idf/espressif__iperf/libespressif__iperf.a  esp-idf/espressif__esp_ot_cli_extension/libespressif__esp_ot_cli_extension.a  esp-idf/espressif__esp_rcp_update/libespressif__esp_rcp_update.a  esp-idf/espressif__mdns/libespressif__mdns.a  esp-idf/main/libmain.a  esp-idf/protocol_examples_common/libprotocol_examples_common.a  esp-idf/thread_border_router/libthread_border_router.a  esp-idf/esp_br_http_ota/libesp_br_http_ota.a  esp-idf/esp_ot_br_server/libesp_ot_br_server.a  esp-idf/app_trace/libapp_trace.a  esp-idf/app_trace/libapp_trace.a  esp-idf/cmock/libcmock.a  esp-idf/unity/libunity.a  esp-idf/esp_driver_cam/libesp_driver_cam.a  esp-idf/esp_hid/libesp_hid.a  esp-idf/esp_lcd/libesp_lcd.a  esp-idf/esp_local_ctrl/libesp_local_ctrl.a  esp-idf/esp_https_server/libesp_https_server.a  esp-idf/espcoredump/libespcoredump.a  -u esp_system_include_coredump_init  esp-idf/mqtt/libmqtt.a  esp-idf/nvs_sec_provider/libnvs_sec_provider.a  -u nvs_sec_provider_include_impl  esp-idf/perfmon/libperfmon.a  esp-idf/touch_element/libtouch_element.a  esp-idf/usb/libusb.a  esp-idf/wifi_provisioning/libwifi_provisioning.a  esp-idf/protocomm/libprotocomm.a  esp-idf/protobuf-c/libprotobuf-c.a  esp-idf/espressif__esp_ot_cli_extension/libespressif__esp_ot_cli_extension.a  esp-idf/espressif__iperf/libespressif__iperf.a  esp-idf/esp_br_http_ota/libesp_br_http_ota.a  esp-idf/espressif__esp_rcp_update/libespressif__esp_rcp_update.a  esp-idf/espressif__esp-serial-flasher/libespressif__esp-serial-flasher.a  esp-idf/fatfs/libfatfs.a  esp-idf/wear_levelling/libwear_levelling.a  esp-idf/json/libjson.a  esp-idf/spiffs/libspiffs.a  esp-idf/espressif__mdns/libespressif__mdns.a  esp-idf/protocol_examples_common/libprotocol_examples_common.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_driver_gpio/libesp_driver_gpio.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/esp_bootloader_format/libesp_bootloader_format.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/pthread/libpthread.a  esp-idf/cxx/libcxx.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/esp_driver_gptimer/libesp_driver_gptimer.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/esp_driver_uart/libesp_driver_uart.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_driver_pcnt/libesp_driver_pcnt.a  esp-idf/esp_driver_spi/libesp_driver_spi.a  esp-idf/esp_driver_mcpwm/libesp_driver_mcpwm.a  esp-idf/esp_driver_i2s/libesp_driver_i2s.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/esp_driver_sdmmc/libesp_driver_sdmmc.a  esp-idf/esp_driver_sdspi/libesp_driver_sdspi.a  esp-idf/esp_driver_rmt/libesp_driver_rmt.a  esp-idf/esp_driver_tsens/libesp_driver_tsens.a  esp-idf/esp_driver_sdm/libesp_driver_sdm.a  esp-idf/esp_driver_i2c/libesp_driver_i2c.a  esp-idf/esp_driver_ledc/libesp_driver_ledc.a  esp-idf/esp_driver_usb_serial_jtag/libesp_driver_usb_serial_jtag.a  esp-idf/driver/libdriver.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_vfs_console/libesp_vfs_console.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/openthread/libopenthread.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a  esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libcore.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libespnow.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libmesh.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libnet80211.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libpp.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libwapi.a  /Users/simeon/esp/esp-idf/components/openthread/lib/esp32s3/libopenthread_br.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_driver_gpio/libesp_driver_gpio.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/esp_bootloader_format/libesp_bootloader_format.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/pthread/libpthread.a  esp-idf/cxx/libcxx.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/esp_driver_gptimer/libesp_driver_gptimer.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/esp_driver_uart/libesp_driver_uart.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_driver_pcnt/libesp_driver_pcnt.a  esp-idf/esp_driver_spi/libesp_driver_spi.a  esp-idf/esp_driver_mcpwm/libesp_driver_mcpwm.a  esp-idf/esp_driver_i2s/libesp_driver_i2s.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/esp_driver_sdmmc/libesp_driver_sdmmc.a  esp-idf/esp_driver_sdspi/libesp_driver_sdspi.a  esp-idf/esp_driver_rmt/libesp_driver_rmt.a  esp-idf/esp_driver_tsens/libesp_driver_tsens.a  esp-idf/esp_driver_sdm/libesp_driver_sdm.a  esp-idf/esp_driver_i2c/libesp_driver_i2c.a  esp-idf/esp_driver_ledc/libesp_driver_ledc.a  esp-idf/esp_driver_usb_serial_jtag/libesp_driver_usb_serial_jtag.a  esp-idf/driver/libdriver.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_vfs_console/libesp_vfs_console.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/openthread/libopenthread.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a  esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libcore.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libespnow.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libmesh.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libnet80211.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libpp.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libwapi.a  /Users/simeon/esp/esp-idf/components/openthread/lib/esp32s3/libopenthread_br.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_driver_gpio/libesp_driver_gpio.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/esp_bootloader_format/libesp_bootloader_format.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/pthread/libpthread.a  esp-idf/cxx/libcxx.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/esp_driver_gptimer/libesp_driver_gptimer.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/esp_driver_uart/libesp_driver_uart.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_driver_pcnt/libesp_driver_pcnt.a  esp-idf/esp_driver_spi/libesp_driver_spi.a  esp-idf/esp_driver_mcpwm/libesp_driver_mcpwm.a  esp-idf/esp_driver_i2s/libesp_driver_i2s.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/esp_driver_sdmmc/libesp_driver_sdmmc.a  esp-idf/esp_driver_sdspi/libesp_driver_sdspi.a  esp-idf/esp_driver_rmt/libesp_driver_rmt.a  esp-idf/esp_driver_tsens/libesp_driver_tsens.a  esp-idf/esp_driver_sdm/libesp_driver_sdm.a  esp-idf/esp_driver_i2c/libesp_driver_i2c.a  esp-idf/esp_driver_ledc/libesp_driver_ledc.a  esp-idf/esp_driver_usb_serial_jtag/libesp_driver_usb_serial_jtag.a  esp-idf/driver/libdriver.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_vfs_console/libesp_vfs_console.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/openthread/libopenthread.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a  esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libcore.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libespnow.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libmesh.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libnet80211.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libpp.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libwapi.a  /Users/simeon/esp/esp-idf/components/openthread/lib/esp32s3/libopenthread_br.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_driver_gpio/libesp_driver_gpio.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/esp_bootloader_format/libesp_bootloader_format.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/pthread/libpthread.a  esp-idf/cxx/libcxx.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/esp_driver_gptimer/libesp_driver_gptimer.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/esp_driver_uart/libesp_driver_uart.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_driver_pcnt/libesp_driver_pcnt.a  esp-idf/esp_driver_spi/libesp_driver_spi.a  esp-idf/esp_driver_mcpwm/libesp_driver_mcpwm.a  esp-idf/esp_driver_i2s/libesp_driver_i2s.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/esp_driver_sdmmc/libesp_driver_sdmmc.a  esp-idf/esp_driver_sdspi/libesp_driver_sdspi.a  esp-idf/esp_driver_rmt/libesp_driver_rmt.a  esp-idf/esp_driver_tsens/libesp_driver_tsens.a  esp-idf/esp_driver_sdm/libesp_driver_sdm.a  esp-idf/esp_driver_i2c/libesp_driver_i2c.a  esp-idf/esp_driver_ledc/libesp_driver_ledc.a  esp-idf/esp_driver_usb_serial_jtag/libesp_driver_usb_serial_jtag.a  esp-idf/driver/libdriver.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_vfs_console/libesp_vfs_console.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/openthread/libopenthread.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a  esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libcore.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libespnow.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libmesh.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libnet80211.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libpp.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libwapi.a  /Users/simeon/esp/esp-idf/components/openthread/lib/esp32s3/libopenthread_br.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_driver_gpio/libesp_driver_gpio.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/esp_bootloader_format/libesp_bootloader_format.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/pthread/libpthread.a  esp-idf/cxx/libcxx.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/esp_driver_gptimer/libesp_driver_gptimer.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/esp_driver_uart/libesp_driver_uart.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_driver_pcnt/libesp_driver_pcnt.a  esp-idf/esp_driver_spi/libesp_driver_spi.a  esp-idf/esp_driver_mcpwm/libesp_driver_mcpwm.a  esp-idf/esp_driver_i2s/libesp_driver_i2s.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/esp_driver_sdmmc/libesp_driver_sdmmc.a  esp-idf/esp_driver_sdspi/libesp_driver_sdspi.a  esp-idf/esp_driver_rmt/libesp_driver_rmt.a  esp-idf/esp_driver_tsens/libesp_driver_tsens.a  esp-idf/esp_driver_sdm/libesp_driver_sdm.a  esp-idf/esp_driver_i2c/libesp_driver_i2c.a  esp-idf/esp_driver_ledc/libesp_driver_ledc.a  esp-idf/esp_driver_usb_serial_jtag/libesp_driver_usb_serial_jtag.a  esp-idf/driver/libdriver.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_vfs_console/libesp_vfs_console.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/openthread/libopenthread.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a  esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libcore.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libespnow.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libmesh.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libnet80211.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libpp.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libwapi.a  /Users/simeon/esp/esp-idf/components/openthread/lib/esp32s3/libopenthread_br.a  esp-idf/xtensa/libxtensa.a  esp-idf/esp_driver_gpio/libesp_driver_gpio.a  esp-idf/esp_pm/libesp_pm.a  esp-idf/mbedtls/libmbedtls.a  esp-idf/esp_app_format/libesp_app_format.a  esp-idf/esp_bootloader_format/libesp_bootloader_format.a  esp-idf/app_update/libapp_update.a  esp-idf/esp_partition/libesp_partition.a  esp-idf/efuse/libefuse.a  esp-idf/bootloader_support/libbootloader_support.a  esp-idf/esp_mm/libesp_mm.a  esp-idf/spi_flash/libspi_flash.a  esp-idf/esp_system/libesp_system.a  esp-idf/esp_common/libesp_common.a  esp-idf/esp_rom/libesp_rom.a  esp-idf/hal/libhal.a  esp-idf/log/liblog.a  esp-idf/heap/libheap.a  esp-idf/soc/libsoc.a  esp-idf/esp_hw_support/libesp_hw_support.a  esp-idf/freertos/libfreertos.a  esp-idf/newlib/libnewlib.a  esp-idf/pthread/libpthread.a  esp-idf/cxx/libcxx.a  esp-idf/esp_timer/libesp_timer.a  esp-idf/esp_driver_gptimer/libesp_driver_gptimer.a  esp-idf/esp_ringbuf/libesp_ringbuf.a  esp-idf/esp_driver_uart/libesp_driver_uart.a  esp-idf/esp_event/libesp_event.a  esp-idf/nvs_flash/libnvs_flash.a  esp-idf/esp_driver_pcnt/libesp_driver_pcnt.a  esp-idf/esp_driver_spi/libesp_driver_spi.a  esp-idf/esp_driver_mcpwm/libesp_driver_mcpwm.a  esp-idf/esp_driver_i2s/libesp_driver_i2s.a  esp-idf/sdmmc/libsdmmc.a  esp-idf/esp_driver_sdmmc/libesp_driver_sdmmc.a  esp-idf/esp_driver_sdspi/libesp_driver_sdspi.a  esp-idf/esp_driver_rmt/libesp_driver_rmt.a  esp-idf/esp_driver_tsens/libesp_driver_tsens.a  esp-idf/esp_driver_sdm/libesp_driver_sdm.a  esp-idf/esp_driver_i2c/libesp_driver_i2c.a  esp-idf/esp_driver_ledc/libesp_driver_ledc.a  esp-idf/esp_driver_usb_serial_jtag/libesp_driver_usb_serial_jtag.a  esp-idf/driver/libdriver.a  esp-idf/esp_phy/libesp_phy.a  esp-idf/esp_vfs_console/libesp_vfs_console.a  esp-idf/vfs/libvfs.a  esp-idf/lwip/liblwip.a  esp-idf/esp_netif/libesp_netif.a  esp-idf/wpa_supplicant/libwpa_supplicant.a  esp-idf/esp_coex/libesp_coex.a  esp-idf/esp_wifi/libesp_wifi.a  esp-idf/console/libconsole.a  esp-idf/http_parser/libhttp_parser.a  esp-idf/esp-tls/libesp-tls.a  esp-idf/esp_adc/libesp_adc.a  esp-idf/esp_eth/libesp_eth.a  esp-idf/esp_gdbstub/libesp_gdbstub.a  esp-idf/tcp_transport/libtcp_transport.a  esp-idf/esp_http_client/libesp_http_client.a  esp-idf/esp_http_server/libesp_http_server.a  esp-idf/esp_https_ota/libesp_https_ota.a  esp-idf/openthread/libopenthread.a  esp-idf/mbedtls/mbedtls/library/libmbedtls.a  esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a  esp-idf/mbedtls/mbedtls/library/libmbedx509.a  esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a  esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libcore.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libespnow.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libmesh.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libnet80211.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libpp.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libsmartconfig.a  /Users/simeon/esp/esp-idf/components/esp_wifi/lib/esp32s3/libwapi.a  /Users/simeon/esp/esp-idf/components/openthread/lib/esp32s3/libopenthread_br.a  /Users/simeon/esp/esp-idf/components/xtensa/esp32s3/libxt_hal.a  -u esp_app_desc  -u esp_efuse_startup_include_func  -u ld_include_highint_hdl  -u start_app  -u start_app_other_cores  -u __ubsan_include  -u esp_system_include_startup_funcs  -Wl,--wrap=longjmp  -u __assert_func  -Wl,--undefined=FreeRTOS_openocd_params  -u app_main  -lc  -lm  -u newlib_include_heap_impl  -u newlib_include_syscalls_impl  -u newlib_include_pthread_impl  -u newlib_include_assert_impl  -u newlib_include_getentropy_impl  -u newlib_include_init_funcs  --specs=nano.specs  -u pthread_include_pthread_impl  -u pthread_include_pthread_cond_var_impl  -u pthread_include_pthread_local_storage_impl  -u pthread_include_pthread_rwlock_impl  -u pthread_include_pthread_semaphore_impl  -Wl,--wrap=__register_frame_info_bases  -Wl,--wrap=__register_frame_info  -Wl,--wrap=__register_frame  -Wl,--wrap=__register_frame_info_table_bases  -Wl,--wrap=__register_frame_info_table  -Wl,--wrap=__register_frame_table  -Wl,--wrap=__deregister_frame_info_bases  -Wl,--wrap=__deregister_frame_info  -Wl,--wrap=_Unwind_Find_FDE  -Wl,--wrap=_Unwind_GetGR  -Wl,--wrap=_Unwind_GetCFA  -Wl,--wrap=_Unwind_GetIP  -Wl,--wrap=_Unwind_GetIPInfo  -Wl,--wrap=_Unwind_GetRegionStart  -Wl,--wrap=_Unwind_GetDataRelBase  -Wl,--wrap=_Unwind_GetTextRelBase  -Wl,--wrap=_Unwind_SetIP  -Wl,--wrap=_Unwind_SetGR  -Wl,--wrap=_Unwind_GetLanguageSpecificData  -Wl,--wrap=_Unwind_FindEnclosingFunction  -Wl,--wrap=_Unwind_Resume  -Wl,--wrap=_Unwind_RaiseException  -Wl,--wrap=_Unwind_DeleteException  -Wl,--wrap=_Unwind_ForcedUnwind  -Wl,--wrap=_Unwind_Resume_or_Rethrow  -Wl,--wrap=_Unwind_Backtrace  -Wl,--wrap=__cxa_call_unexpected  -Wl,--wrap=__gxx_personality_v0  -Wl,--wrap=__cxa_throw  -Wl,--wrap=__cxa_allocate_exception  -u __cxa_guard_dummy  -u __cxx_init_dummy  -lstdc++  esp-idf/pthread/libpthread.a  esp-idf/newlib/libnewlib.a  -lgcc  esp-idf/cxx/libcxx.a  -u __cxx_fatal_exception  -u esp_timer_init_include_func  -u usb_serial_jtag_vfs_include_dev_init  -u usb_serial_jtag_connection_monitor_include  -u include_esp_phy_override  -lphy  -lbtbb  esp-idf/esp_phy/libesp_phy.a  -lphy  -lbtbb  esp-idf/esp_phy/libesp_phy.a  -lphy  -lbtbb  -u esp_vfs_include_console_register  -u vfs_include_syscalls_impl  -u esp_vfs_include_nullfs_register && :
/Users/simeon/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/openthread/libopenthread.a(mle_router.cpp.obj):(.literal._ZN2ot3Mle9MleRouter18SendAddressSolicitENS_15ThreadStatusTlv6StatusE+0x0): undefined reference to `otPlatTimeGetXtalAccuracy'
/Users/simeon/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/openthread/libopenthread.a(mle_router.cpp.obj): in function `_ZN2ot3Tlv6AppendINS_15ThreadStatusTlvEEE7otErrorRNS_7MessageENT_13UintValueTypeE':
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/tlvs.hpp:584:(.text._ZN2ot3Mle9MleRouter18SendAddressSolicitENS_15ThreadStatusTlv6StatusE+0x66): undefined reference to `otPlatTimeGetXtalAccuracy'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/log/idf_py_stderr_output_23861 and /Users/simeon/Desktop/Repositories/br_throughput/examples/basic_thread_border_router/build/log/idf_py_stdout_output_23861

More Information.

In order to investigate this problem, I took a look at the openthread directory in the ESP-IDF Github repository.

To the best of my knowledge, the ESP Thread Border Router program (not the RCP) uses port/esp_openthread_radio_spinel.cpp, while "non-Border Router" FTDs (e.g. an ESP32-H2 or ESP32-C6), uses port/esp_openthread_radio.cpp. I believe the build error is coming from the fact otPlatTimeGetXtalAccuracy() is not defined in port/esp_openthread_radio_spinel.cpp, and is only defined in port/esp_openthread_radio.c. As a result, the ESP Thread Border Router program does not have a definition of otPlatTimeGetXtalAccuracy() that it can actually use.

What I Did to Try to Solve the Problem

I decided to give it a try and see if I can solve this issue. I believe I was able to create a (naive) solution in my forks of ESP-IDF and OpenThread:

  1. In my OpenThread fork, I set the OPENTHREAD_CONFIG_TIME_SYNC_ENABLE and OPENTHREAD_CONFIG_TIME_SYNC_REQUIRED to the value of OPENTHREAD_FTD. I did not set both flags to 1, as I had problems building with the RCP when OPENTHREAD_CONFIG_TIME_SYNC_ENABLE was enabled (I describe this in further detail at the bottom of this post).

  2. I created a KConfig variable: OT_RCP_ENABLE_TIME_SYNC that I used to turn on time synchronization for the RCP only.

  3. I copied the function definition for otPlatTimeGetXtalAccuracy() used in esp_openthread_radio.c, and added it to esp_openthread_radio_spinel.cpp.

  4. To the best of my knowledge, I believe the RCP has access to both esp_openthread_radio.c and esp_openthread_radio_spinel.cpp. I made esp_ieee802154_transmit_sfd_done() function process the network time sync packets for the RCP when the OT_RCP_ENABLE_TIME_SYNC is enabled. I got the idea to edit this function from the changes made in commit
    2652881.

  5. I used idf.py menuconfig on the RCP to enable the OT_RCP_ENABLE_TIME_SYNC flag, but turned off the OPENTHREAD_CONFIG_TIME_SYNC_ENABLE flag, then I built the RCP using idf.py build.

  6. I used idf.py menuconfig on the Basic Thread Border Router program to enable the OPENTHREAD_CONFIG_TIME_SYNC_ENABLE, then built using idf.py build.

After doing these steps, I was able to create a network with an ESP32-H2 and ESP Thread Border router that is time synchronized. I have attached screenshots showing the successful network time synchronization between the two devices.
Screenshot 2024-06-22 at 4 24 13 PM
Screenshot 2024-06-22 at 4 28 34 PM

Caveat

In order to test it works consistently, I would reset the Border Router and ESP32-H2 and run networktime multiple times in a row. Sometimes, the Border Router would crash due to an RCP failure.
Screenshot 2024-06-22 at 4 27 28 PM

Why I Didn't Set OPENTHREAD_CONFIG_TIME_SYNC_ENABLE to 1 in Step 1

If I did so, I would get the following error when doing `idf.py build` on the RCP, shown in the code block below. That's why I thought it would be best to avoid setting this flag in the RCP.
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:49:46: error: 'TimeSync' was not declared in this scope
   49 |     return MapEnum(AsCoreType(aInstance).Get<TimeSync>().GetTime(*aNetworkTime));
      |                                              ^~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:49:55: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   49 |     return MapEnum(AsCoreType(aInstance).Get<TimeSync>().GetTime(*aNetworkTime));
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/locator_getters.hpp:42,
                 from /Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:41:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:49:55: error: template argument 1 is invalid
   49 |     return MapEnum(AsCoreType(aInstance).Get<TimeSync>().GetTime(*aNetworkTime));
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/code_utils.hpp:41,
                 from /Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/array.hpp:39,
                 from /Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:47:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp: In function 'otError otNetworkTimeSetSyncPeriod(otInstance*, uint16_t)':
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:56:49: error: 'MleRouter' is not a member of 'ot::Mle'; did you mean 'kRoleRouter'?
   56 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |                                                 ^~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/arg_macros.hpp:77:40: note: in definition of macro '_OT_GET_FIRST_ARG'
   77 | #define _OT_GET_FIRST_ARG(aFirst, ...) aFirst
      |                                        ^~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/code_utils.hpp:124:15: note: in expansion of macro 'OT_FIRST_ARG'
  124 |         if (!(OT_FIRST_ARG(__VA_ARGS__))) \
      |               ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:56:5: note: in expansion of macro 'VerifyOrExit'
   56 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |     ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:56:59: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   56 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/arg_macros.hpp:77:40: note: in definition of macro '_OT_GET_FIRST_ARG'
   77 | #define _OT_GET_FIRST_ARG(aFirst, ...) aFirst
      |                                        ^~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/code_utils.hpp:124:15: note: in expansion of macro 'OT_FIRST_ARG'
  124 |         if (!(OT_FIRST_ARG(__VA_ARGS__))) \
      |               ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:56:5: note: in expansion of macro 'VerifyOrExit'
   56 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |     ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:56:59: error: template argument 1 is invalid
   56 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/arg_macros.hpp:77:40: note: in definition of macro '_OT_GET_FIRST_ARG'
   77 | #define _OT_GET_FIRST_ARG(aFirst, ...) aFirst
      |                                        ^~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/code_utils.hpp:124:15: note: in expansion of macro 'OT_FIRST_ARG'
  124 |         if (!(OT_FIRST_ARG(__VA_ARGS__))) \
      |               ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:56:5: note: in expansion of macro 'VerifyOrExit'
   56 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |     ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:58:31: error: 'TimeSync' was not declared in this scope
   58 |     AsCoreType(aInstance).Get<TimeSync>().SetTimeSyncPeriod(aTimeSyncPeriod);
      |                               ^~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:58:40: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   58 |     AsCoreType(aInstance).Get<TimeSync>().SetTimeSyncPeriod(aTimeSyncPeriod);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:58:40: error: template argument 1 is invalid
   58 |     AsCoreType(aInstance).Get<TimeSync>().SetTimeSyncPeriod(aTimeSyncPeriod);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp: In function 'uint16_t otNetworkTimeGetSyncPeriod(otInstance*)':
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:66:38: error: 'TimeSync' was not declared in this scope
   66 |     return AsCoreType(aInstance).Get<TimeSync>().GetTimeSyncPeriod();
      |                                      ^~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:66:47: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   66 |     return AsCoreType(aInstance).Get<TimeSync>().GetTimeSyncPeriod();
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:66:47: error: template argument 1 is invalid
   66 |     return AsCoreType(aInstance).Get<TimeSync>().GetTimeSyncPeriod();
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp: In function 'otError otNetworkTimeSetXtalThreshold(otInstance*, uint16_t)':
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:73:49: error: 'MleRouter' is not a member of 'ot::Mle'; did you mean 'kRoleRouter'?
   73 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |                                                 ^~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/arg_macros.hpp:77:40: note: in definition of macro '_OT_GET_FIRST_ARG'
   77 | #define _OT_GET_FIRST_ARG(aFirst, ...) aFirst
      |                                        ^~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/code_utils.hpp:124:15: note: in expansion of macro 'OT_FIRST_ARG'
  124 |         if (!(OT_FIRST_ARG(__VA_ARGS__))) \
      |               ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:73:5: note: in expansion of macro 'VerifyOrExit'
   73 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |     ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:73:59: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   73 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/arg_macros.hpp:77:40: note: in definition of macro '_OT_GET_FIRST_ARG'
   77 | #define _OT_GET_FIRST_ARG(aFirst, ...) aFirst
      |                                        ^~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/code_utils.hpp:124:15: note: in expansion of macro 'OT_FIRST_ARG'
  124 |         if (!(OT_FIRST_ARG(__VA_ARGS__))) \
      |               ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:73:5: note: in expansion of macro 'VerifyOrExit'
   73 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |     ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:73:59: error: template argument 1 is invalid
   73 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/arg_macros.hpp:77:40: note: in definition of macro '_OT_GET_FIRST_ARG'
   77 | #define _OT_GET_FIRST_ARG(aFirst, ...) aFirst
      |                                        ^~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/common/code_utils.hpp:124:15: note: in expansion of macro 'OT_FIRST_ARG'
  124 |         if (!(OT_FIRST_ARG(__VA_ARGS__))) \
      |               ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:73:5: note: in expansion of macro 'VerifyOrExit'
   73 |     VerifyOrExit(AsCoreType(aInstance).Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
      |     ^~~~~~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:75:31: error: 'TimeSync' was not declared in this scope
   75 |     AsCoreType(aInstance).Get<TimeSync>().SetXtalThreshold(aXtalThreshold);
      |                               ^~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:75:40: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   75 |     AsCoreType(aInstance).Get<TimeSync>().SetXtalThreshold(aXtalThreshold);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:75:40: error: template argument 1 is invalid
   75 |     AsCoreType(aInstance).Get<TimeSync>().SetXtalThreshold(aXtalThreshold);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp: In function 'uint16_t otNetworkTimeGetXtalThreshold(otInstance*)':
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:83:38: error: 'TimeSync' was not declared in this scope
   83 |     return AsCoreType(aInstance).Get<TimeSync>().GetXtalThreshold();
      |                                      ^~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:83:47: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   83 |     return AsCoreType(aInstance).Get<TimeSync>().GetXtalThreshold();
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:83:47: error: template argument 1 is invalid
   83 |     return AsCoreType(aInstance).Get<TimeSync>().GetXtalThreshold();
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp: In function 'void otNetworkTimeSyncSetCallback(otInstance*, otNetworkTimeSyncCallbackFn, void*)':
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:88:38: error: 'TimeSync' was not declared in this scope
   88 |     return AsCoreType(aInstance).Get<TimeSync>().SetTimeSyncCallback(aCallback, aCallbackContext);
      |                                      ^~~~~~~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:88:47: error: no matching function for call to 'ot::Instance::Get<<expression error> >()'
   88 |     return AsCoreType(aInstance).Get<TimeSync>().SetTimeSyncCallback(aCallback, aCallbackContext);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note: candidate: 'template<class Type> Type& ot::Instance::Get()'
  436 |     template <typename Type> inline Type &Get(void);
      |                                           ^~~
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/instance/instance.hpp:436:43: note:   template argument deduction/substitution failed:
/Users/simeon/esp/esp-idf/components/openthread/openthread/src/core/api/network_time_api.cpp:88:47: error: template argument 1 is invalid
   88 |     return AsCoreType(aInstance).Get<TimeSync>().SetTimeSyncCallback(aCallback, aCallbackContext);
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
[56/154] Building CXX object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/openthread/src/core/api/tcp_ext_api.cpp.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /Users/simeon/esp/esp-idf/examples/openthread/ot_rcp/build/log/idf_py_stderr_output_92985 and /Users/simeon/esp/esp-idf/examples/openthread/ot_rcp/build/log/idf_py_stdout_output_92985
@SimeonAT SimeonAT added the Type: Bug bugs in IDF label Jun 22, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jun 22, 2024
@github-actions github-actions bot changed the title OpenThread Network Time Synchronization Fails to Build on the ESP Thread Border Router OpenThread Network Time Synchronization Fails to Build on the ESP Thread Border Router (IDFGH-13108) Jun 22, 2024
@no2chem
Copy link
Contributor

no2chem commented Jun 23, 2024

Hi, I am running into some similar issues as you. I think the issue is because the espressif RCP does not process the MAC header IE field properly if present, which results in a RCP RESET_FAULT.

I started documenting some of the issues in the openthread repository (I am using ot-br-posix)
openthread/openthread#10426

@SimeonAT
Copy link
Author

Hi @no2chem,

Thank you so much for taking the time to look over my issue! After reading your Github issue and corresponding pull request in the OpenThread source code, it makes much more sense why the RCP is crashing with my changes.

But more importantly, it makes a lot more sense why I can't get time synchronization to work on my ESP Thread Border: there isn't support for it yet for ESP32 devices, and it was only recently that RCP support for time sync was added to OpenThread (which is essential for border routers if they want to time sync).

Is my understanding of the issue correct? If not, what parts am I misunderstanding? Any guidance you can give me will be greatly appreciated.

@no2chem
Copy link
Contributor

no2chem commented Jun 24, 2024

It seems that the RCP build isn't even passing the TIME_SYNC config options correctly, so there's no chance for it to work in the first place...

I opened an issue and will submit a PR soon:
#14059

@SimeonAT
Copy link
Author

Thank you again @no2chem! Please keep me posted your discoveries and when your pull requests get approved.

This may be an obvious question, but for the sake of learning, I want to ask. To the best of my knowledge, the way that a Thread Border Router works (in general, not just ESP border routers), is that packets get received from the RCP, then get passed to through the Spinel to the code running the network layers and above in the OpenThread stack.

Thus, the problem with time sync is that the RCP fails to pass in the time sync packets to the network layer and above. I don't believe the problem is with the RCP itself when it first receives a time sync packet, since it's able to parse it when it first sees it. The problem must arise after the RCP parses the packet, and it sends it to the OpenThread network layer (and the code response for MLE) for further processing.

Is my understanding correct, or is there some parts I got wrong or haven't fully understood yet?

@no2chem
Copy link
Contributor

no2chem commented Jun 24, 2024

honestly, I'm not really a thread expert myself.

AFAICT, the line you highlighted isn't even in the RCP until you apply my PR (you can test yourself by adding a #error directive in the middle of the function).

The time sync stuff in openthread isn't really documented. From reading the code, sync messages don't get sent until a leader shows up with time sync support. If the leader has time sync support, the mle sends a broadcast with the current time sequence. This is the problematic message, if you have a cli then running state leader with time sync enabled will cause the crash.

If the message contains a TimeIE, then for some reason the RCP will puke on it. Sync messages contain a Time IE that gets set in mac.cpp. If the TimeIEOffset is 0 (and it will be for the leader sync message), the ESP RCP will crash, even with the PR I sent.

I haven't really debugged it more, but I will once I get a debug UART on the h2 working.

@no2chem
Copy link
Contributor

no2chem commented Jun 24, 2024

well, got logging working on a different UART than the RCP UART.

Looks like theres an assertion that is failing now:

assert failed: 0x40809702
0x40809702: isr_handle_rx_abort at /esp-idf/components/ieee802154/driver/esp_ieee802154_dev.c:523
 (inlined by) ieee802154_isr at /esp-idf/components/ieee802154/driver/esp_ieee802154_dev.c:657

I'll look into it further tomorrow... weird that its in the RX path (looks like a default handler), but it ALWAYS happens right after the leader broadcasts a new time sequence.

@no2chem
Copy link
Contributor

no2chem commented Jun 24, 2024

I've debugged more into this and the problem is an assert, but not the line above (for some reason the backtrace seems to be inaccurate). I'm trying to determine whether we actually ended up in the wrong state or not.

#14068

@no2chem
Copy link
Contributor

no2chem commented Jun 27, 2024

Hi @SimeonAT - it looks like I resolved the issue, it appears the 802154 driver has some issues on state transition changes when transmit_at and rx_on_idle were enabled at the same time.

If you apply #14060 and #14089 and turn the time sync option on, you should get a RCP that works with time sync. however I think you won't be able to get the ESP thread border router working with time sync because the ESP border router is provided as a closed source library so you can't change the compile options on it. I just have the ESP32-S3 run serial over ethernet (or wi-fi) and use socat to pipe to a ot-br-posix instance to give you full control over the BR (it looks like you're running some experiments?, so perhaps that would be the best to give you some room to play with the BR code).

@SimeonAT
Copy link
Author

SimeonAT commented Jun 28, 2024

Thank you so much for the help @no2chem! I really appreciate the help, and the detailed and thorough explanation you given me. I don't necessarily need to run it over the border router. If I can get it in to run in the border router - then great. However, given such problems, I won't run my experiments in the border router - I'll stick with running them on non-border router FTDs. What's important for me in this case is if I don't run it in the border router, I'll need a justification as to why, and the discussion we have in this Github issue will allow me to describe why I'm not using the border router in my experiments.

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants