SDK v2.5.99-dev1 has many compile errors

Hello,

I am working on a Mac mini, Apple M2 chipset, macOS Sonoma 14.2.1.   I am using Visual Studio Code Version: 1.86.2 (Universal) Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda
Date: 2024-02-13T19:42:13.651Z Electron: 27.2.3 ElectronBuildId: 26908389 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.2.0

I have been developing code on the nRF52840 DK for several months using SDK v2.5.0.   I recently downloaded SDK v2.5.99-dev1

After successfully building with SDK v2.5.0, I remove the build directory, change the active SDK to 2.5.99-dev1, create a new Build configuration (the same way I did for v2.5.0 SDK), and then build.   I get many compile errors like this:

../../../../../../../opt/nordic/ncs/v2.5.99-dev1/modules/lib/matter/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp: In member function 'CHIP_ERROR chip::app::Clusters::UnitTesting::Structs::TestFabricScoped::DecodableType::Decode(chip::TLV::TLVReader&)':
../../../../../../../opt/nordic/ncs/v2.5.99-dev1/modules/lib/matter/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp:20334:37: error: 'class chip::app::Clusters::detail::StructDecodeIterator' has no member named 'Next'
20334 |         auto __element = __iterator.Next();
      |                                     ^~~~
../../../../../../../opt/nordic/ncs/v2.5.99-dev1/modules/lib/matter/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp:20335:18: error: 'holds_alternative' is not a member of 'std'
20335 |         if (std::holds_alternative<CHIP_ERROR>(__element))
      |                  ^~~~~~~~~~~~~~~~~

Parents
  • Hi,

    I will look into this

    However the build error state that the Clusters and structs have changed since you last compiled it. Have you examined the changes from 2.5.99-dev1 and v2.5.0 w.r.t this aspect?

    Is your application custom or is it based on a sample found in the SDK? If so, which sample? Do you see the same thing if you try to take a sample from NCS v2.5.0 and compile it in the 2.5.99-dev tag?

    Kind regards,
    Andreas

  • Andreas,

    Thanks for the reply.  I will look at the release notes for version 2.5.99-dev1 branch and see there are any indications for the issue I am seeing.

    The code that I am building is based on the nrf/samples/matter/template sample code.

    Any other thoughts?

    Best Regards,
    Gene

  • Hi Gene,

    Great, let me know if you have any progress in tracking down the differences. There are a quite significant amount of changes in 2.5.0 and 2.6.0 w.r.t Matter, and among them are the adaptation of Matter v1.2 spec. 

    Since my initial reply we have also tagged v2.6.0-rc1 which should be both more stable and closer to the full release of NCS v2.6.0

    Kind regards,
    Andreas

  • Andreas,

    Thank you for the information.  I did notice that there was an option to install the v2.6.0-rc1 that showed up in my Visual Studio Code application.  I tried it out and it successfully installed.  However, at the end of the installation, I got these warnings:

    [17:53:17] =========== Toolchain validation report for nRF Connect SDK Toolchain v2.5.1 ===========
    Package Using the nRF Connect SDK v2.6.0-rc1 at /shared/ncs/v2.6.0-rc1
    Clock3 zephyr-sdk is outdated. Found 0.16.1, but 0.16.5 is required by the SDK.
    Clock3 cmake is outdated. Found 3.20.5, but 3.21.0 is required by the SDK.
    Clock3 west is outdated. Found 1.1.0, but 1.2.0 is required by the SDK.
    Clock3 python is outdated. Found 3.8.2, but 3.9.18 is required by the SDK.
    Clock3 ninja is outdated. Found 1.9.0, but 1.10.2 is required by the SDK.
    Clock3 dtc is outdated. Found 1.4.7, but 1.5.1-1 is required by the SDK.

    I am wondering if these outdated tools are contributing to the failures that I do experience when  trying out the v2.6.0-rc1 SDK.  I have spent some time searching your website for ways to manually update these tools, since there is not a v2.6.0 version of the Toolchain.  I have not been able to find a satisfactory answer.

    Would it be possible to provide me with instructions on how to update these tools (perhaps from a command-line tool)?

    Thanks so much,
    Gene

  • Hi Gene,

    It looks like you're validating the toolchain corresponding to nRF Connect SDK v2.5.1 with SDK v2.6.0 selected. Could you verify how it looks in the VS Code extension on your end? On my end it looks like this. I've installed and/or set the SDK version first, then Toolchain version.

    The installation should update every requirement when installing, but it looks like it has skipped this in your case (unless installing Toolchain for v2.6.0).

    An issue that typically happening on Windows (not sure how it is for MacOs) is that VSCode inherits the SDK and toolchain versions from a project that is in your workspace, so the first thing I would like you to do is to open VSCode and nRF Connect for VS Code extension without any NCS projects in the workspace and then try to set the SDK version and Toolchain version as in the image below.  Remove the installation you have present to make sure that you don't have any artifacts from there and select "Install SDK" before selecting toolchain.

     

    Alternatively you can install the SDK version through the Toolchain manager found in nRF Connect for Desktop.

    If you open the SDK through the toolchain manager, it should set both SDK and Toolchain version in the extension to match the instance you opened in the toolchain manager.

    Let me know if this resolves the issue

    Kind regards,
    Andreas

Reply
  • Hi Gene,

    It looks like you're validating the toolchain corresponding to nRF Connect SDK v2.5.1 with SDK v2.6.0 selected. Could you verify how it looks in the VS Code extension on your end? On my end it looks like this. I've installed and/or set the SDK version first, then Toolchain version.

    The installation should update every requirement when installing, but it looks like it has skipped this in your case (unless installing Toolchain for v2.6.0).

    An issue that typically happening on Windows (not sure how it is for MacOs) is that VSCode inherits the SDK and toolchain versions from a project that is in your workspace, so the first thing I would like you to do is to open VSCode and nRF Connect for VS Code extension without any NCS projects in the workspace and then try to set the SDK version and Toolchain version as in the image below.  Remove the installation you have present to make sure that you don't have any artifacts from there and select "Install SDK" before selecting toolchain.

     

    Alternatively you can install the SDK version through the Toolchain manager found in nRF Connect for Desktop.

    If you open the SDK through the toolchain manager, it should set both SDK and Toolchain version in the extension to match the instance you opened in the toolchain manager.

    Let me know if this resolves the issue

    Kind regards,
    Andreas

Children
  • Andreas,

    Thanks for the suggestions.  I tried the following on my Mac OS system.  I went into /opt/nordic/ncs/ and moved my existing v2.6.0-rc1 directory to Saved.v2.6.0-rc1 (to save my work).   I then started up the Toolchain manager and installed the v2.6.0-rc1 tool chain.  This installed the /opt/nordic/ncs/toolchains files AND the ~/nrf/v2.6.0-rc1 SDF.   I then opened up VSCode and set the active toolchain and SDK to point to these versions of v2.6.0-rc1.   I got the following error on my first build:

    Cannot file file: /opt/nordic/v2.6.0-rc1/nrf/samples/matter/common/src/led_widget.h

    I had several other iterations of similar errors.  I fixed these by running these shell commands:

    cd /opt/nordic/v2.6.0-rc1/nrf/samples/matter/common/src
    ln -s app/fabric_table_delegate.h .
    ln -s board/led_* .
    ln -s bt_nus/bt_nus_service.* .
    ln -s dfu/ota/ota_util.* .
    ln -s pwm/pwm_device.* .
    ln -s persistent_storage/persistent_storage_* .

    This allowed me to get past the compile errors.  However the build now fails during the "Generating new Factory Data..." step.  I will attach the error message below.

  • [10/774] Generating new Factory Data...
    FAILED: zephyr/factory_data.json /Users/puzl/nrf/PuzLLabs_Thread/build/zephyr/factory_data.json
    cd /Users/puzl/nrf/PuzLLabs_Thread/build/modules/connectedhomeip && /opt/nordic/ncs/toolchains/da6f6379ec/opt/[email protected]/bin/python3.9 /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py --sn 11223344556677889900 --date 2022-01-01 --vendor_id 65521 --product_id 32768 --vendor_name PuzL\ Labs --product_name PuzL\ Detect --hw_ver 0 --hw_ver_str prerelease --dac_cert /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-DAC-FFF1-8000-Cert.der --dac_key /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-DAC-FFF1-8000-Key.der --pai_cert /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-PAI-FFF1-noPID-Cert.der --spake2_it 1000 --spake2_salt U1BBS0UyUCBLZXkgU2FsdA== --discriminator 0xF00 --passcode 20202021 --include_passcode --overwrite --product_finish other --generate_onboarding --enable_key 00112233445566778899AABBCCDDEEFF -o /Users/puzl/nrf/PuzLLabs_Thread/build/zephyr/factory_data.json -s /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/nrfconnect_factory_data.schema
    [INFO] Generating SPAKE2+ Verifier...
    Traceback (most recent call last):
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 577, in <module>
        main()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 573, in main
        generator.generate_json()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 277, in generate_json
        spake_2_verifier = self._generate_spake2_verifier()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 380, in _generate_spake2_verifier
        return generate_verifier(self._args.passcode, self._args.spake2_salt, self._args.spake2_it)
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/spake2p/spake2p.py", line 51, in generate_verifier
        return w0.to_bytes(NIST256p.baselen, byteorder='big') + L.to_bytes('uncompressed')
    AttributeError: 'Point' object has no attribute 'to_bytes'
    [12/774] cd /Users/puzl/nrf/PuzLLabs_Thread/build/modules/openthread/build && /opt/nordic/ncs/toolchains/da6f6379ec/Cellar/cmake/3.21.0/bin/cmake -DLIST="OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE=1;OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE=0;OPENTHREAD_CONFIG_ASSERT_ENABLE=1;OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=0;OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0;OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0;OPENTHREAD_CONFIG_BLE_TCAT_ENABLE=0;OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=0;OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=0;OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=0;OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE=0;OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE=0;OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=0;OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0;OPENTHREAD_CONFIG_COAP_API_ENABLE=1;OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=0;OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=0;OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=0;OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=0;OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1;OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=0;OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1;OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_LOCAL_TIME_SYNC=0;OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=0;OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE=0;OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=0;OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=0;OPENTHREAD_CONFIG_DIAG_ENABLE=0;OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1;OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE=0;OPENTHREAD_CONFIG_DNS_DSO_ENABLE=0;OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE=0;OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=0;OPENTHREAD_CONFIG_DUA_ENABLE=1;OPENTHREAD_CONFIG_ECDSA_ENABLE=1;OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1;OPENTHREAD_POSIX_CONFIG_FIREWALL_ENABLE=0;OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=0;OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1;OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=0;OPENTHREAD_CONFIG_JOINER_ENABLE=0;OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=0;OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE=0;OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=0;OPENTHREAD_CONFIG_LINK_RAW_ENABLE=0;OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=0;OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=0;OPENTHREAD_CONFIG_MESH_DIAG_ENABLE=0;OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=0;OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=0;OPENTHREAD_CONFIG_MLR_ENABLE=1;OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE=0;OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=0;OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE=0;OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE=0;OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=0;OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=0;OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1;OPENTHREAD_CONFIG_OPERATIONAL_DATASET_AUTO_INIT=1;OPENTHREAD_CONFIG_OTNS_ENABLE=0;OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1;OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE=0;OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE=1;OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=0;OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE=0;OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=0;OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=0;OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=0;OPENTHREAD_SETTINGS_RAM=0;OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1;OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=0;OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1;OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=0;OPENTHREAD_CONFIG_TCP_ENABLE=0;OPENTHREAD_CONFIG_TIME_SYNC_ENABLE=0;OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=0;OPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=0;OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE=0;OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=0;OPENTHREAD_CONFIG_UPTIME_ENABLE=0;OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3;OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY=OT_POWER_SUPPLY_EXTERNAL;OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0;OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0;PACKAGE_NAME="OPENTHREAD";OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1;KERNEL;__ZEPHYR__=1;_FORTIFY_SOURCE=1;_ANSI_SOURCE;__LINUX_ERRNO_EXTENSIONS__;USE_PARTITION_MANAGER=1;__PROGRAM_START;NRF52840_XXAA;ZCBOR_ASSERTS;MBEDTLS_CONFIG_FILE="nrf-config.h";MBEDTLS_PSA_CRYPTO_CONFIG_FILE="nrf-psa-crypto-want-config.h";MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE="nrf-psa-crypto-config.h";NRF_802154_SERIALIZATION_HOST=0;NRF_802154_USE_RAW_API=1;NRF_802154_PENDING_SHORT_ADDRESSES=16;NRF_802154_PENDING_EXTENDED_ADDRESSES=16;NRF_802154_RX_BUFFERS=16;NRF_802154_TX_STARTED_NOTIFY_ENABLED=1;NRF_802154_ACK_TIMEOUT_ENABLED=1;NRF_802154_CCA_CORR_LIMIT_DEFAULT=2;NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45;NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45;NRF_802154_SECURITY_KEY_STORAGE_SIZE=3;NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED;NRF_802154_ENCRYPTION_ENABLED=1;NRF_802154_SECURITY_WRITER_ENABLED=1;NRF_802154_IE_WRITER_ENABLED=1;NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0;NRF_802154_CARRIER_FUNCTIONS_ENABLED=0;NRF_802154_ENERGY_DETECTED_VERSION=1;NRF_802154_PLATFORM_ASSERT_INCLUDE="nrf_802154_assert_zephyr.h";NRF_802154_ECB_PRIORITY=-1;NRF_802154_SWI_PRIORITY=1" -P /opt/nordic/ncs/v2.6.0-rc1/modules/lib/openthread/etc/cmake/print.cmake
    OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE=1
    OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE=0
    OPENTHREAD_CONFIG_ASSERT_ENABLE=1
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_BLE_TCAT_ENABLE=0
    OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=0
    OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=0
    OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE=0
    OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE=0
    OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=0
    OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0
    OPENTHREAD_CONFIG_COAP_API_ENABLE=1
    OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=0
    OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=0
    OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=0
    OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=0
    OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=0
    OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_LOCAL_TIME_SYNC=0
    OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=0
    OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE=0
    OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=0
    OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=0
    OPENTHREAD_CONFIG_DIAG_ENABLE=0
    OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE=0
    OPENTHREAD_CONFIG_DNS_DSO_ENABLE=0
    OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE=0
    OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=0
    OPENTHREAD_CONFIG_DUA_ENABLE=1
    OPENTHREAD_CONFIG_ECDSA_ENABLE=1
    OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
    OPENTHREAD_POSIX_CONFIG_FIREWALL_ENABLE=0
    OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=0
    OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
    OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=0
    OPENTHREAD_CONFIG_JOINER_ENABLE=0
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=0
    OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE=0
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=0
    OPENTHREAD_CONFIG_LINK_RAW_ENABLE=0
    OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=0
    OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=0
    OPENTHREAD_CONFIG_MESH_DIAG_ENABLE=0
    OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=0
    OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=0
    OPENTHREAD_CONFIG_MLR_ENABLE=1
    OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE=0
    OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=0
    OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE=0
    OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=0
    OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=0
    OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_OPERATIONAL_DATASET_AUTO_INIT=1
    OPENTHREAD_CONFIG_OTNS_ENABLE=0
    OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
    OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE=0
    OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE=1
    OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=0
    OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE=0
    OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=0
    OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=0
    OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=0
    OPENTHREAD_SETTINGS_RAM=0
    OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
    OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=0
    OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=0
    OPENTHREAD_CONFIG_TCP_ENABLE=0
    OPENTHREAD_CONFIG_TIME_SYNC_ENABLE=0
    OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=0
    OPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=0
    OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE=0
    OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=0
    OPENTHREAD_CONFIG_UPTIME_ENABLE=0
    OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3
    OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY=OT_POWER_SUPPLY_EXTERNAL
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
    PACKAGE_NAME=OPENTHREAD
    OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
    KERNEL
    __ZEPHYR__=1
    _FORTIFY_SOURCE=1
    _ANSI_SOURCE
    __LINUX_ERRNO_EXTENSIONS__
    USE_PARTITION_MANAGER=1
    __PROGRAM_START
    NRF52840_XXAA
    ZCBOR_ASSERTS
    MBEDTLS_CONFIG_FILE=nrf-config.h
    MBEDTLS_PSA_CRYPTO_CONFIG_FILE=nrf-psa-crypto-want-config.h
    MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=nrf-psa-crypto-config.h
    NRF_802154_SERIALIZATION_HOST=0
    NRF_802154_USE_RAW_API=1
    NRF_802154_PENDING_SHORT_ADDRESSES=16
    NRF_802154_PENDING_EXTENDED_ADDRESSES=16
    NRF_802154_RX_BUFFERS=16
    NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
    NRF_802154_ACK_TIMEOUT_ENABLED=1
    NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
    NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
    NRF_802154_SECURITY_KEY_STORAGE_SIZE=3
    NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
    NRF_802154_ENCRYPTION_ENABLED=1
    NRF_802154_SECURITY_WRITER_ENABLED=1
    NRF_802154_IE_WRITER_ENABLED=1
    NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
    NRF_802154_CARRIER_FUNCTIONS_ENABLED=0
    NRF_802154_ENERGY_DETECTED_VERSION=1
    NRF_802154_PLATFORM_ASSERT_INCLUDE=nrf_802154_assert_zephyr.h
    NRF_802154_ECB_PRIORITY=-1
    NRF_802154_SWI_PRIORITY=1
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/da6f6379ec/bin/cmake --build /Users/puzl/nrf/PuzLLabs_Thread/build
    
     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it.

  • Good morning from Norway,

    Do you see the same error with a pristine sample from the SDK, as well as your custom firmware based on the Matter template? How about other non-matter samples?

    What build configuration have you selected, i.e did you use west build with any other parameters added? If you've used the nRF Connect extension to build, could you post a screen shot of the build configuration?

    The error you're getting seems to be connected to the SPAKE2+ verifier specifically. 

      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/spake2p/spake2p.py", line 51, in generate_verifier
        return w0.to_bytes(NIST256p.baselen, byteorder='big') + L.to_bytes('uncompressed')
    AttributeError: 'Point' object has no attribute 'to_bytes'

    If you're using a SPAKE2+ from your 2.5 based custom project using Matter v1.1 into the NCS v2.6.0 using Matter v1.2, could you verify if anything has changed w.r.t formatting or other things? 

    Kind regards,
    Andreas

  • Hello again,

    I was able to perform the following experiment with the v2.6.0 SDK:

    1.  WELCOME -> Create a new application -> Copy a sample -> Matter Template

    2. Add Build Configuration
        Board = nrf52840dk_nrf52840
        Configuration = prj.conf
        Add Devicetree overlays:  boards/nrf52840dk_nrf52840.overlay

    3. Build Configuration

    I seem to get the same failure as last time:

    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.0-rc1/zephyr), build: v3.5.99-ncs1-rc1
    [173/173] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       26618 B        28 KB     92.84%
                 RAM:         18 KB       256 KB      7.03%
            IDT_LIST:          0 GB        32 KB      0.00%
    [11/732] Generating new Factory Data...
    FAILED: zephyr/factory_data.json /Users/puzl/nrf/template_1/build/zephyr/factory_data.json
    cd /Users/puzl/nrf/template_1/build/modules/connectedhomeip && /opt/nordic/ncs/toolchains/580e4ef81c/opt/[email protected]/bin/python3.9 /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py --sn 11223344556677889900 --date 2022-01-01 --vendor_id 65521 --product_id 32768 --vendor_name Nordic\ Semiconductor\ ASA --product_name not-specified --hw_ver 0 --hw_ver_str prerelease --dac_cert /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-DAC-FFF1-8000-Cert.der --dac_key /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-DAC-FFF1-8000-Key.der --pai_cert /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/credentials/development/attestation/Matter-Development-PAI-FFF1-noPID-Cert.der --spake2_it 1000 --spake2_salt U1BBS0UyUCBLZXkgU2FsdA== --discriminator 0xF00 --passcode 20202021 --include_passcode --overwrite --product_finish other --generate_onboarding --enable_key 00112233445566778899AABBCCDDEEFF -o /Users/puzl/nrf/template_1/build/zephyr/factory_data.json -s /opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/nrfconnect_factory_data.schema
    [INFO] Generating SPAKE2+ Verifier...
    Traceback (most recent call last):
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 577, in <module>
        main()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 573, in main
        generator.generate_json()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 277, in generate_json
        spake_2_verifier = self._generate_spake2_verifier()
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py", line 380, in _generate_spake2_verifier
        return generate_verifier(self._args.passcode, self._args.spake2_salt, self._args.spake2_it)
      File "/opt/nordic/ncs/v2.6.0-rc1/modules/lib/matter/scripts/tools/spake2p/spake2p.py", line 51, in generate_verifier
        return w0.to_bytes(NIST256p.baselen, byteorder='big') + L.to_bytes('uncompressed')
    AttributeError: 'Point' object has no attribute 'to_bytes'

    Any further thoughts?

    Thanks,
    Gene

  • Hi Gene,

    Gene Roylance said:
    2. Add Build Configuration
        Board = nrf52840dk_nrf52840
        Configuration = prj.conf
        Add Devicetree overlays:  boards/nrf52840dk_nrf52840.overlay

    In step 2: You don't need to specify the configuration and the device tree overlay. If you use "System default", then the build system will use the prj.conf that exists in the source folder. Next it will look at the board you've selected, and if it is a board file that is supported in the SDK out of the box, it will use the default board files located in https://github.com/nrfconnect/sdk-zephyr/tree/main/boards/arm/, for instance the nRF52840DK

    After it has found this board, it will use this to configure the board and next look for any overlay files within your project. The build system will always use <your_board>.overlay if it exists. In this case it does exist within boards/nrf52840dk.nrf52840.overlay, so it will automatically be included.

    This is explained in greater detail under the Configuration and building pages in our documentation as well as in our academy pages, more specifically in the first 3 lessons in https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/ 

    When you at a later point in time might get to adding a custom board to your projects, we also have documentation for this. Lesson 3 in the intermediate course also shows how to do this: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/ 

    The following configuration resulted in a successful build with no warnings on my end (Windows 10, NCS 2.6.0, Toolchain v2.6.0):

    Let me know if you are successful with building the Matter template sample with a similar build configuration as showed in the image above

    Kind regards,
    Andreas

Related