espressif / esp-thread-br

Espressif Thread Border Router SDK
Apache License 2.0
111 stars 24 forks source link

esp-thread-br not building against latest esp-idf (v5.3.1) (TZ-1127) #94

Closed JanneKiiskila closed 2 months ago

JanneKiiskila commented 2 months ago

Checklist

How often does this bug occurs?

always

Expected behavior

I would expect I should be able to update the ESF-IDF to latest version (to get latest openthread and Wi-Fi SW) against the master of this repository.

That's however not the case.

esp-idf/examples/openthread/ot_rcp was built succesfully.

esp-idf version:

commit c8fc5f643b7a7b0d3b182d3df610844e3dc9bd74 (HEAD, tag: v5.3.1)
Author: Marius Vikhammer <marius.vikhammer@espressif.com>
Date:   Tue Sep 3 09:37:24 2024 +0800

    change(version): Update version to 5.3.1

esp-thread-br version:

commit ceeb84afc77d868f786c92df93204fc5b0fe90cb (HEAD -> main, origin/main, origin/HEAD)
Merge: 6011f07 93716d9
Author: Shu Chen <chenshu@espressif.com>
Date:   Tue Sep 10 16:24:16 2024 +0800

    Merge branch 'fix/fix_the_rcp_update_issue' into 'main'

    fix(rcp update): fix a compilation issue

    See merge request espressif/esp-thread-br!138

Actual behavior (suspected bug)

The build will fail with a complaint that the LwIP IPv6 addresses are not configured right.

Error logs or terminal output

13:47 jannek@jannek-P720:~/openThread/esp32/esp-thread-br/examples/basic_thread_border_router$ idf.py fullclean
Executing action: fullclean
Executing action: remove_managed_components
Done
 14:53 jannek@jannek-P720:~/openThread/esp32/esp-thread-br/examples/basic_thread_border_router$ idf.py set-target esp32s3
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory '/home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build' is empty. Nothing to clean.
Executing action: set-target
Set Target to: esp32s3, new sdkconfig will be created.
Running cmake in directory /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/jannek/.espressif/python_env/idf5.3_py3.12_env/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32s3 -DCCACHE_ENABLE=0 /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router"...
-- Existing sdkconfig '/home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/sdkconfig' renamed to '/home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/sdkconfig.old'.
-- Found Git: /usr/bin/git (found version "2.46.0") 
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/jannek/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/jannek/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/jannek/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s3
NOTICE: 
Following dependencies have new versions available:
Dependency "espressif/esp_ot_cli_extension": "1.2.2" -> "1.2.3"
Consider running "idf.py update-dependencies" to update your lock file.
Processing 6 dependencies:
[1/6] espressif/esp-serial-flasher (0.0.11)
[2/6] espressif/esp_ot_cli_extension (1.2.2)
[3/6] espressif/esp_rcp_update (1.2.0)
[4/6] espressif/iperf (0.1.3)
[5/6] espressif/mdns (1.4.0)
[6/6] idf (5.3.1)
-- Project sdkconfig file /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/sdkconfig
Loading defaults file /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/sdkconfig.defaults...
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: /home/jannek/.espressif/python_env/idf5.3_py3.12_env/bin/python (found version "3.12.3") found components: Interpreter 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "esp_ot_br" version: v1.0-77-gceeb84a
-- Adding linker script /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.wdt.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script /home/jannek/openThread/esp32/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: /home/jannek/openThread/esp32/esp-idf/components/app_trace /home/jannek/openThread/esp32/esp-idf/components/app_update /home/jannek/openThread/esp32/esp-idf/components/bootloader /home/jannek/openThread/esp32/esp-idf/components/bootloader_support /home/jannek/openThread/esp32/esp-idf/components/bt /home/jannek/openThread/esp32/esp-idf/components/cmock /home/jannek/openThread/esp32/esp-idf/components/console /home/jannek/openThread/esp32/esp-idf/components/cxx /home/jannek/openThread/esp32/esp-idf/components/driver /home/jannek/openThread/esp32/esp-idf/components/efuse /home/jannek/openThread/esp32/esp-idf/components/esp-tls /home/jannek/openThread/esp32/esp-idf/components/esp_adc /home/jannek/openThread/esp32/esp-idf/components/esp_app_format /home/jannek/openThread/esp32/esp-idf/components/esp_bootloader_format /home/jannek/openThread/esp32/esp-thread-br/components/esp_br_http_ota /home/jannek/openThread/esp32/esp-idf/components/esp_coex /home/jannek/openThread/esp32/esp-idf/components/esp_common /home/jannek/openThread/esp32/esp-idf/components/esp_driver_ana_cmpr /home/jannek/openThread/esp32/esp-idf/components/esp_driver_cam /home/jannek/openThread/esp32/esp-idf/components/esp_driver_dac /home/jannek/openThread/esp32/esp-idf/components/esp_driver_gpio /home/jannek/openThread/esp32/esp-idf/components/esp_driver_gptimer /home/jannek/openThread/esp32/esp-idf/components/esp_driver_i2c /home/jannek/openThread/esp32/esp-idf/components/esp_driver_i2s /home/jannek/openThread/esp32/esp-idf/components/esp_driver_isp /home/jannek/openThread/esp32/esp-idf/components/esp_driver_jpeg /home/jannek/openThread/esp32/esp-idf/components/esp_driver_ledc /home/jannek/openThread/esp32/esp-idf/components/esp_driver_mcpwm /home/jannek/openThread/esp32/esp-idf/components/esp_driver_parlio /home/jannek/openThread/esp32/esp-idf/components/esp_driver_pcnt /home/jannek/openThread/esp32/esp-idf/components/esp_driver_ppa /home/jannek/openThread/esp32/esp-idf/components/esp_driver_rmt /home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdio /home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdm /home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdmmc /home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdspi /home/jannek/openThread/esp32/esp-idf/components/esp_driver_spi /home/jannek/openThread/esp32/esp-idf/components/esp_driver_touch_sens /home/jannek/openThread/esp32/esp-idf/components/esp_driver_tsens /home/jannek/openThread/esp32/esp-idf/components/esp_driver_uart /home/jannek/openThread/esp32/esp-idf/components/esp_driver_usb_serial_jtag /home/jannek/openThread/esp32/esp-idf/components/esp_eth /home/jannek/openThread/esp32/esp-idf/components/esp_event /home/jannek/openThread/esp32/esp-idf/components/esp_gdbstub /home/jannek/openThread/esp32/esp-idf/components/esp_hid /home/jannek/openThread/esp32/esp-idf/components/esp_http_client /home/jannek/openThread/esp32/esp-idf/components/esp_http_server /home/jannek/openThread/esp32/esp-idf/components/esp_https_ota /home/jannek/openThread/esp32/esp-idf/components/esp_https_server /home/jannek/openThread/esp32/esp-idf/components/esp_hw_support /home/jannek/openThread/esp32/esp-idf/components/esp_lcd /home/jannek/openThread/esp32/esp-idf/components/esp_local_ctrl /home/jannek/openThread/esp32/esp-idf/components/esp_mm /home/jannek/openThread/esp32/esp-idf/components/esp_netif /home/jannek/openThread/esp32/esp-idf/components/esp_netif_stack /home/jannek/openThread/esp32/esp-thread-br/components/esp_ot_br_server /home/jannek/openThread/esp32/esp-idf/components/esp_partition /home/jannek/openThread/esp32/esp-idf/components/esp_phy /home/jannek/openThread/esp32/esp-idf/components/esp_pm /home/jannek/openThread/esp32/esp-idf/components/esp_psram /home/jannek/openThread/esp32/esp-idf/components/esp_ringbuf /home/jannek/openThread/esp32/esp-idf/components/esp_rom /home/jannek/openThread/esp32/esp-idf/components/esp_system /home/jannek/openThread/esp32/esp-idf/components/esp_timer /home/jannek/openThread/esp32/esp-idf/components/esp_vfs_console /home/jannek/openThread/esp32/esp-idf/components/esp_wifi /home/jannek/openThread/esp32/esp-idf/components/espcoredump /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/managed_components/espressif__esp-serial-flasher /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/managed_components/espressif__esp_ot_cli_extension /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/managed_components/espressif__esp_rcp_update /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/managed_components/espressif__iperf /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/managed_components/espressif__mdns /home/jannek/openThread/esp32/esp-idf/components/esptool_py /home/jannek/openThread/esp32/esp-idf/components/fatfs /home/jannek/openThread/esp32/esp-idf/components/freertos /home/jannek/openThread/esp32/esp-idf/components/hal /home/jannek/openThread/esp32/esp-idf/components/heap /home/jannek/openThread/esp32/esp-idf/components/http_parser /home/jannek/openThread/esp32/esp-idf/components/idf_test /home/jannek/openThread/esp32/esp-idf/components/ieee802154 /home/jannek/openThread/esp32/esp-idf/components/json /home/jannek/openThread/esp32/esp-idf/components/log /home/jannek/openThread/esp32/esp-idf/components/lwip /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/main /home/jannek/openThread/esp32/esp-idf/components/mbedtls /home/jannek/openThread/esp32/esp-idf/components/mqtt /home/jannek/openThread/esp32/esp-idf/components/newlib /home/jannek/openThread/esp32/esp-idf/components/nvs_flash /home/jannek/openThread/esp32/esp-idf/components/nvs_sec_provider /home/jannek/openThread/esp32/esp-idf/components/openthread /home/jannek/openThread/esp32/esp-idf/components/partition_table /home/jannek/openThread/esp32/esp-idf/components/perfmon /home/jannek/openThread/esp32/esp-idf/components/protobuf-c /home/jannek/openThread/esp32/esp-idf/examples/common_components/protocol_examples_common /home/jannek/openThread/esp32/esp-idf/components/protocomm /home/jannek/openThread/esp32/esp-idf/components/pthread /home/jannek/openThread/esp32/esp-idf/components/sdmmc /home/jannek/openThread/esp32/esp-idf/components/soc /home/jannek/openThread/esp32/esp-idf/components/spi_flash /home/jannek/openThread/esp32/esp-idf/components/spiffs /home/jannek/openThread/esp32/esp-idf/components/tcp_transport /home/jannek/openThread/esp32/esp-thread-br/examples/common/thread_border_router /home/jannek/openThread/esp32/esp-idf/components/touch_element /home/jannek/openThread/esp32/esp-idf/components/ulp /home/jannek/openThread/esp32/esp-idf/components/unity /home/jannek/openThread/esp32/esp-idf/components/usb /home/jannek/openThread/esp32/esp-idf/components/vfs /home/jannek/openThread/esp32/esp-idf/components/wear_levelling /home/jannek/openThread/esp32/esp-idf/components/wifi_provisioning /home/jannek/openThread/esp32/esp-idf/components/wpa_supplicant /home/jannek/openThread/esp32/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build
 14:54 jannek@jannek-P720:~/openThread/esp32/esp-thread-br/examples/basic_thread_border_router$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build
Executing "ninja all"...
[43/1347] 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,
*******************************************************************************
[752/1347] Building C object esp-idf/openthread/CMakeFiles/__idf_openthread.dir/src/esp_openthread_lwip_netif.c.obj
FAILED: esp-idf/openthread/CMakeFiles/__idf_openthread.dir/src/esp_openthread_lwip_netif.c.obj 
/home/jannek/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc -DESP_PLATFORM -DIDF_VER=\"v5.3.1\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DOPENTHREAD_BUILD_DATETIME="\" 2024-09-11 11:54:17 UTC\"" -DOPENTHREAD_CONFIG_FILE=\"openthread-core-esp32x-ftd-config.h\" -DOPENTHREAD_FTD=1 -DOPENTHREAD_PROJECT_LIB_CONFIG_FILE=\"openthread-core-esp32x-ftd-config.h\" -DPACKAGE_VERSION=\"c8fc5f643b-f32c18bc0\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build/config -I/home/jannek/openThread/esp32/esp-idf/components/openthread/include -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/include -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/examples/platforms -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/include/openthread -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/core -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/lib -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/lib/hdlc -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/lib/spinel -I/home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/ncp -I/home/jannek/openThread/esp32/esp-idf/components/openthread/private_include -I/home/jannek/openThread/esp32/esp-idf/components/newlib/platform_include -I/home/jannek/openThread/esp32/esp-idf/components/freertos/config/include -I/home/jannek/openThread/esp32/esp-idf/components/freertos/config/include/freertos -I/home/jannek/openThread/esp32/esp-idf/components/freertos/config/xtensa/include -I/home/jannek/openThread/esp32/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/jannek/openThread/esp32/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/jannek/openThread/esp32/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -I/home/jannek/openThread/esp32/esp-idf/components/freertos/esp_additions/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_hw_support/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_hw_support/include/soc -I/home/jannek/openThread/esp32/esp-idf/components/esp_hw_support/include/soc/esp32s3 -I/home/jannek/openThread/esp32/esp-idf/components/esp_hw_support/dma/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_hw_support/ldo/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_hw_support/port/esp32s3/. -I/home/jannek/openThread/esp32/esp-idf/components/esp_hw_support/port/esp32s3/include -I/home/jannek/openThread/esp32/esp-idf/components/heap/include -I/home/jannek/openThread/esp32/esp-idf/components/log/include -I/home/jannek/openThread/esp32/esp-idf/components/soc/include -I/home/jannek/openThread/esp32/esp-idf/components/soc/esp32s3 -I/home/jannek/openThread/esp32/esp-idf/components/soc/esp32s3/include -I/home/jannek/openThread/esp32/esp-idf/components/hal/platform_port/include -I/home/jannek/openThread/esp32/esp-idf/components/hal/esp32s3/include -I/home/jannek/openThread/esp32/esp-idf/components/hal/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_rom/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_rom/include/esp32s3 -I/home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3 -I/home/jannek/openThread/esp32/esp-idf/components/esp_common/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_system/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_system/port/soc -I/home/jannek/openThread/esp32/esp-idf/components/esp_system/port/include/private -I/home/jannek/openThread/esp32/esp-idf/components/xtensa/esp32s3/include -I/home/jannek/openThread/esp32/esp-idf/components/xtensa/include -I/home/jannek/openThread/esp32/esp-idf/components/xtensa/deprecated_include -I/home/jannek/openThread/esp32/esp-idf/components/lwip/include -I/home/jannek/openThread/esp32/esp-idf/components/lwip/include/apps -I/home/jannek/openThread/esp32/esp-idf/components/lwip/include/apps/sntp -I/home/jannek/openThread/esp32/esp-idf/components/lwip/lwip/src/include -I/home/jannek/openThread/esp32/esp-idf/components/lwip/port/include -I/home/jannek/openThread/esp32/esp-idf/components/lwip/port/freertos/include -I/home/jannek/openThread/esp32/esp-idf/components/lwip/port/esp32xx/include -I/home/jannek/openThread/esp32/esp-idf/components/lwip/port/esp32xx/include/arch -I/home/jannek/openThread/esp32/esp-idf/components/lwip/port/esp32xx/include/sys -I/home/jannek/openThread/esp32/esp-idf/components/esp_netif/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_event/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_uart/include -I/home/jannek/openThread/esp32/esp-idf/components/vfs/include -I/home/jannek/openThread/esp32/esp-idf/components/driver/deprecated -I/home/jannek/openThread/esp32/esp-idf/components/driver/i2c/include -I/home/jannek/openThread/esp32/esp-idf/components/driver/touch_sensor/include -I/home/jannek/openThread/esp32/esp-idf/components/driver/twai/include -I/home/jannek/openThread/esp32/esp-idf/components/driver/touch_sensor/esp32s3/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_pm/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_ringbuf/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_gpio/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_pcnt/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_gptimer/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_spi/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_mcpwm/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_ana_cmpr/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_i2s/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdmmc/include -I/home/jannek/openThread/esp32/esp-idf/components/sdmmc/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdspi/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdio/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_dac/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_rmt/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_tsens/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_sdm/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_i2c/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_ledc/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_parlio/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_driver_usb_serial_jtag/include -I/home/jannek/openThread/esp32/esp-idf/components/console -I/home/jannek/openThread/esp32/esp-idf/components/esp_vfs_console/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_partition/include -I/home/jannek/openThread/esp32/esp-idf/components/esp_timer/include -I/home/jannek/openThread/esp32/esp-idf/components/ieee802154/include -I/home/jannek/openThread/esp32/esp-idf/components/mbedtls/port/include -I/home/jannek/openThread/esp32/esp-idf/components/mbedtls/mbedtls/include -I/home/jannek/openThread/esp32/esp-idf/components/mbedtls/mbedtls/library -I/home/jannek/openThread/esp32/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/jannek/openThread/esp32/esp-idf/components/mbedtls/mbedtls/3rdparty/everest/include -I/home/jannek/openThread/esp32/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m -I/home/jannek/openThread/esp32/esp-idf/components/mbedtls/mbedtls/3rdparty/p256-m/p256-m -I/home/jannek/openThread/esp32/esp-idf/components/nvs_flash/include -I/home/jannek/openThread/esp32/esp-idf/components/spi_flash/include -mlongcalls  -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Os -freorder-blocks -fmacro-prefix-map=/home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router=. -fmacro-prefix-map=/home/jannek/openThread/esp32/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/openthread/CMakeFiles/__idf_openthread.dir/src/esp_openthread_lwip_netif.c.obj -MF esp-idf/openthread/CMakeFiles/__idf_openthread.dir/src/esp_openthread_lwip_netif.c.obj.d -o esp-idf/openthread/CMakeFiles/__idf_openthread.dir/src/esp_openthread_lwip_netif.c.obj -c /home/jannek/openThread/esp32/esp-idf/components/openthread/src/esp_openthread_lwip_netif.c
/home/jannek/openThread/esp32/esp-idf/components/openthread/src/esp_openthread_lwip_netif.c:28:2: error: #error CONFIG_LWIP_IPV6_NUM_ADDRESSES should be set to 12, please configure it using `idf.py menuconfig`
   28 | #error CONFIG_LWIP_IPV6_NUM_ADDRESSES should be set to 12, please configure it using `idf.py menuconfig`
      |  ^~~~~
[809/1347] Performing configure step for 'bootloader'
-- Found Git: /usr/bin/git (found version "2.46.0") 
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/jannek/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/jannek/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/jannek/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s3
-- Project sdkconfig file /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Bootloader project name: "bootloader" version: 1
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.wdt.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script /home/jannek/openThread/esp32/esp-idf/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld
-- Adding linker script /home/jannek/openThread/esp32/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: /home/jannek/openThread/esp32/esp-idf/components/bootloader /home/jannek/openThread/esp32/esp-idf/components/bootloader_support /home/jannek/openThread/esp32/esp-idf/components/efuse /home/jannek/openThread/esp32/esp-idf/components/esp_app_format /home/jannek/openThread/esp32/esp-idf/components/esp_bootloader_format /home/jannek/openThread/esp32/esp-idf/components/esp_common /home/jannek/openThread/esp32/esp-idf/components/esp_hw_support /home/jannek/openThread/esp32/esp-idf/components/esp_rom /home/jannek/openThread/esp32/esp-idf/components/esp_system /home/jannek/openThread/esp32/esp-idf/components/esptool_py /home/jannek/openThread/esp32/esp-idf/components/freertos /home/jannek/openThread/esp32/esp-idf/components/hal /home/jannek/openThread/esp32/esp-idf/components/log /home/jannek/openThread/esp32/esp-idf/components/bootloader/subproject/main /home/jannek/openThread/esp32/esp-idf/components/bootloader/subproject/components/micro-ecc /home/jannek/openThread/esp32/esp-idf/components/newlib /home/jannek/openThread/esp32/esp-idf/components/partition_table /home/jannek/openThread/esp32/esp-idf/components/soc /home/jannek/openThread/esp32/esp-idf/components/spi_flash /home/jannek/openThread/esp32/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build/bootloader
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build/log/idf_py_stderr_output_467592 and /home/jannek/openThread/esp32/esp-thread-br/examples/basic_thread_border_router/build/log/idf_py_stdout_output_467592

### Steps to reproduce the behavior

Follow the openthread.io guide https://openthread.io/guides/border-router/espressif-esp32.
Instead of checking out `v5.1.2`, check out `v5.3.1`.

git clone -b v5.3.1 --recursive https://github.com/espressif/esp-idf.git cd esp-idf ./install.sh . ./export.sh cd .. git clone -b v1.0 --recursive https://github.com/espressif/esp-thread-br.git



### Project release version

master

### System architecture

Intel/AMD 64-bit (modern PC, older Mac)

### Operating system

Linux

### Operating system version

Ubuntu 22.04

### Shell

Bash

### Additional context

_No response_
JanneKiiskila commented 2 months ago

You can fix this issue by manually configuring it with idf.py menuconfig.

Component config
-> LWIP
   -> (8) Number of IPv6 addresses per network interface

Change that to 12. However, after this - the device will just crash/reset.

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40375a01
0x40375a01: esp_restart_noos at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/soc/esp32s3/system_internal.c:158

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2810,len:0x178c
load:0x403c8700,len:0x4
load:0x403c8704,len:0xc10
load:0x403cb700,len:0x2dc0
entry 0x403c8904
I (26) boot: ESP-IDF v5.3.1 2nd stage bootloader
I (26) boot: compile time Sep 11 2024 15:12:25
I (26) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (27) boot.esp32s3: Boot SPI Speed : 80MHz
I (27) boot.esp32s3: SPI Mode       : DIO
I (27) boot.esp32s3: SPI Flash Size : 4MB
I (28) boot: Enabling RNG early entropy source...
I (28) boot: Partition Table:
I (28) boot: ## Label            Usage          Type ST Offset   Length
I (28) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (29) boot:  1 otadata          OTA data         01 00 0000f000 00002000
I (29) boot:  2 phy_init         RF data          01 01 00011000 00001000
I (30) boot:  3 ota_0            OTA app          00 10 00020000 00190000
I (30) boot:  4 ota_1            OTA app          00 11 001b0000 00190000
I (31) boot:  5 web_storage      Unknown data     01 82 00340000 00019000
I (31) boot:  6 rcp_fw           Unknown data     01 82 00359000 000a0000
I (32) boot: End of partition table
I (32) esp_image: segment 0: paddr=00020020 vaddr=3c100020 size=4ed10h (322832) map
I (90) esp_image: segment 1: paddr=0006ed38 vaddr=3fc99700 size=012e0h (  4832) load
I (92) esp_image: segment 2: paddr=00070020 vaddr=42000020 size=f386ch (997484) map
I (271) esp_image: segment 3: paddr=00163894 vaddr=3fc9a9e0 size=03be4h ( 15332) load
I (275) esp_image: segment 4: paddr=00167480 vaddr=40374000 size=156ach ( 87724) load
I (303) boot: Loaded app from partition at offset 0x20000
I (303) boot: Disabling RNG early entropy source...
I (305) cpu_start: Multicore app
I (313) cpu_start: Pro cpu start user code
I (313) cpu_start: cpu freq: 160000000 Hz
I (314) app_init: Application information:
I (314) app_init: Project name:     esp_ot_br
I (314) app_init: App version:      v1.0-77-gceeb84a
I (314) app_init: Compile time:     Sep 11 2024 15:12:18
I (315) app_init: ELF file SHA256:  630dc64a6...
I (315) app_init: ESP-IDF:          v5.3.1
I (315) efuse_init: Min chip rev:     v0.0
I (315) efuse_init: Max chip rev:     v0.99 
I (315) efuse_init: Chip rev:         v0.2
I (316) heap_init: Initializing. RAM available for dynamic allocation:
I (316) heap_init: At 3FCAE218 len 0003B4F8 (237 KiB): RAM
I (316) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (316) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (317) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
I (318) spi_flash: detected chip: gd
I (318) spi_flash: flash io: dio
W (318) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
I (319) sleep: Configure to isolate all GPIO pins in sleep state
I (320) sleep: Enable automatic switching of GPIO sleep configuration
I (321) main_task: Started on CPU0
I (331) main_task: Calling app_main()
I (381) RCP_UPDATE: RCP: using update sequence 0
I (381) uart: ESP_INTR_FLAG_IRAM flag not set while CONFIG_UART_ISR_IN_IRAM is enabled, flag updated
I (381) OPENTHREAD: spinel UART interface initialization completed
I (381) main_task: Returned from app_main()
W(391) OPENTHREAD:[W] P-SpinelDrive-: Error processing frame: Drop
W(391) OPENTHREAD:[W] P-SpinelDrive-: Error processing frame: Drop
I(391) OPENTHREAD:[I] P-SpinelDrive-: co-processor reset: RESET_POWER_ON
E(391) OPENTHREAD:[C] P-SpinelDrive-: Software reset co-processor successfully
E(401) OPENTHREAD:[C] P-RadioSpinel-: RCP is missing required capabilities: 
E(411) OPENTHREAD:[C] Platform------: CheckRadioCapabilities() at radio_spinel.cpp:245: RadioSpinelIncompatible

abort() was called at PC 0x420077f2 on core 0
0x420077f2: syscall_not_implemented_aborts at /home/jannek/openThread/esp32/esp-idf/components/newlib/syscalls.c:27

Backtrace: 0x40375ac2:0x3fcb9e30 0x4037d37d:0x3fcb9e50 0x40384c72:0x3fcb9e70 0x420077f2:0x3fcb9ee0 0x420def7d:0x3fcb9f00 0x420626a5:0x3fcb9f20 0x42062ab2:0x3fcb9f60 0x42040059:0x3fcb9f90 0x4203fbfc:0x3fcb9fe0 0x4203e889:0x3fcba010 0x42008ca1:0x3fcba040
0x40375ac2: panic_abort at /home/jannek/openThread/esp32/esp-idf/components/esp_system/panic.c:463
0x4037d37d: esp_system_abort at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/esp_system_chip.c:92
0x40384c72: abort at /home/jannek/openThread/esp32/esp-idf/components/newlib/abort.c:38
0x420077f2: syscall_not_implemented_aborts at /home/jannek/openThread/esp32/esp-idf/components/newlib/syscalls.c:27
0x420def7d: exit at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdlib/exit.c:65
0x420626a5: ot::Spinel::RadioSpinel::CheckRadioCapabilities(unsigned short) at /home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/lib/spinel/radio_spinel.cpp:245 (discriminator 2)
0x42062ab2: ot::Spinel::RadioSpinel::Init(bool, bool, ot::Spinel::SpinelDriver*, unsigned short) at /home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/lib/spinel/radio_spinel.cpp:154
0x42040059: esp_openthread_radio_init at /home/jannek/openThread/esp32/esp-idf/components/openthread/src/port/esp_openthread_radio_spinel.cpp:92
0x4203fbfc: esp_openthread_platform_init at /home/jannek/openThread/esp32/esp-idf/components/openthread/src/esp_openthread_platform.cpp:149
0x4203e889: esp_openthread_init at /home/jannek/openThread/esp32/esp-idf/components/openthread/src/esp_openthread.cpp:69
0x42008ca1: ot_task_worker at /home/jannek/openThread/esp32/esp-thread-br/examples/common/thread_border_router/src/border_router_launch.c:164

Also, once the device is in the crashloop you can't exit the idf.py monitor anymore. :-( CTRL-T - CTRL-X or CTRL-] do not seem to work.

JanneKiiskila commented 2 months ago

Seems the rcp is not compatible somehow?

gytxxsy commented 2 months ago

It seems that the ESP32-H2 has an older ot_rcp firmware , which could lead to compatibility issues.

You need to connect the ESP32-S3 and run idf.py -p <port> erase-flash, then connect the ESP32-H2 and run idf.py -p <port> erase-flash. After that, re-flash the latest firmware(based on idf v5.3.1 and esp-thread-br ceeb84af) you built to the ESP32-S3, wait for the the RCP auto update.

elgerg commented 2 months ago

Damn, did I half duplicate this issue? https://github.com/espressif/esp-thread-br/issues/96

My setup is a new board, first time flashing it following the prescribed instructions. Seems like they need updating.

JanneKiiskila commented 2 months ago

, then connect the ESP32-H2 and run idf.py -p <port> erase-flash. After that, re-flash the latest firmware(based on idf v5.3.1 and esp-thread-br ceeb84af) you built to the ESP32-S3, wait for the the RCP auto update.

So, @gytxxsy do mean that because I have once built this example with an earlier version - the firmware in the ESP32-H2 does not get updated at all with steps in the current documentation? The instructions are lacking this information then completely.

However, based on @elgerg 's comments something is still not matching.

mys721tx commented 2 months ago

Manually flashing the ot_rcp firmware (espressif/esp-idf@4d0db70) to esp32h2 and then the boarder router firmware (2eab508) to esp32s3 indeed fix the problem on my board. The number of IP addresses also requires manual fixing every time I switch targets.

JanneKiiskila commented 2 months ago

Yes, I noticed the same. If you change the target you will lose all configuration changes. Not so pleasant or polite to override all configs without a warning.

chshu commented 2 months ago

@mys721tx @JanneKiiskila If you are using the IDF v5.3.1 or later releases, you can change the default configuration here: https://github.com/espressif/esp-thread-br/blob/main/examples/basic_thread_border_router/sdkconfig.defaults#L63, then the configuration will be persistent.

The current IDF version suggested in the Thread BR docs is v5.1.3, with which the default configuration works. We will update both the docs and default configuration to work with IDF v5.3.1 soon.