This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2674P10: Failed to build the example in connectedhomeip

Part Number: CC2674P10
Other Parts Discussed in Thread: SYSCONFIG, CC1354P10

Tool/software:

Hi Expert,

I follow the readme.md in example below.

github.com/.../README.md

when I use " gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\"" ", it shows error below. It seems from code but I don't change anything. Just build the project.

frank@frank-virtual-machine:~/connectedhomeip/examples/lock-app/cc13x4_26x4$ gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\""
ERROR at //third_party/connectedhomeip/src/app/chip_data_model.gni:228:26: Script returned non-zero exit code.
      _cluster_sources = exec_script("${_app_root}/zap_cluster_list.py",
                         ^----------
Current dir: /home/frank/connectedhomeip/examples/lock-app/cc13x4_26x4/out/debug/
Command: python /home/frank/connectedhomeip/examples/lock-app/cc13x4_26x4/third_party/connectedhomeip/src/app/zap_cluster_list.py --zap_file ../../third_party/connectedhomeip/examples/lock-app/lock-common/lock-app.zap
Returned 127.
See //third_party/connectedhomeip/examples/lock-app/lock-common/BUILD.gn:18:1: whence it was called.
chip_data_model("lock-common") {
^-------------------------------
See //BUILD.gn:90:5: which caused the file to be included.
    "${chip_root}/examples/lock-app/lock-common",
    ^-------------------------------------------

Do I miss something?

BR,

frank

  • Hi Frank,

    Please follow the entire Building Matter Guide and confirm that "source scripts/bootstrap.sh" / "source scripts/activate.sh" returns successfully.  Also, what is your Ubuntu OS version, what connectedhomeip branch/tag/commit are you using, and have you installed SysConfig 1.18 under your /ti folder?  I have not observed this issue before, so we need to further inspect your build environment for inconsistencies.

    Regards,
    Ryan

  • Ryan,

    Thanks for remind.

    My environment is below.

    -ubuntu 22.4.4

    i commit below.

    git clone --depth=1 git@github.com:project-chip/connectedhomeip.git
    python3 scripts/checkout_submodules.py --shallow --platform cc13xx_26xx


    There is a warning when running "source scripts/bootstrap.sh" . After I run "sudo apt install python3.10-venv", I can pass the this step.
    But I have another error at running "ninja -C out/debug" as below. Do I miss something to install?

    frank@frank-virtual-machine:~/connectedhomeip$ source ./scripts/activate.sh

      WELCOME TO...

             █
             █
         ▄   █   ▄                                █     █
         ▀▀█████▀▀      ▄▀▀▀▄ ▄▀▀▀▄    ▄▀▀▀▀▄█  ▀▀█▀▀▀▀▀█▀▀   ▄▀▀▀▀▄    ▄▀▀
       ▀█▄       ▄█▀   █     █     █  █      █    █     █    █▄▄▄▄▄▄█  █   
         ▀█▄   ▄█▀     █     █     █  █      █    █     █    █         █   
      ▄██▀▀█   █▀▀██▄  █     █     █   ▀▄▄▄▄▀█    ▀▄▄   ▀▄▄   ▀▄▄▄▄▀   █   
     ▀▀    █   █    ▀▀

      ACTIVATOR! This sets your shell environment variables.

    Activating environment (setting environment variables):

      Setting environment variables for CIPD package manager...done
      Setting environment variables for Project actions........skipped
      Setting environment variables for Python environment.....done
      Setting environment variables for pw packages............skipped
      Setting environment variables for Host tools.............done

    Checking the environment:

    20240718 14:01:29 INF Environment passes all checks!

    Environment looks good, you are ready to go!

    frank@frank-virtual-machine:~/connectedhomeip$ cd ~/connectedhomeip/examples/lighting-app/cc13x4_26x4
    frank@frank-virtual-machine:~/connectedhomeip/examples/lighting-app/cc13x4_26x4$ gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\""
    Done. Made 3688 targets from 302 files in 895ms
    frank@frank-virtual-machine:~/connectedhomeip/examples/lighting-app/cc13x4_26x4$ ninja -C out/debug
    ninja: Entering directory `out/debug'
    [8/999] ACTION //:build_external_library(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)
    FAILED: gen/drivers_cc13x4.a gen/driverlib.lib
    python ../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/run_sdk_drivers_gen.py --sdk /home/frank/connectedhomeip/examples/lighting-app/cc13x4_26x4/third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx --chip-root /home/frank/connectedhomeip/examples/lighting-app/cc13x4_26x4/third_party/connectedhomeip --src-path-drivers /source/ti/drivers/lib/gcc/m33f/drivers_cc13x4.a --src-path-driverlib /source/ti/devices/cc13x4_cc26x4/driverlib/bin/gcc/driverlib.lib --dest-path /home/frank/connectedhomeip/examples/lighting-app/cc13x4_26x4/out/debug/gen
    !!!!!!!!!!!! EXEC FAILED !!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!! STDOUT !!!!!!!!!!!!!!!!!!
    make: Entering directory '/home/frank/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx'
    Skipping TICLANG build, no compiler defined
    make: Leaving directory '/home/frank/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx'

    !!!!!!!!!!!!!!! STDERR !!!!!!!!!!!!!!!!!!
    make: cmake: No such file or directory
    make: *** [Makefile:26: build-gcc] Error 127

    res.returncode: %d 2
    Driver does not exist or path is incorrect.
    [10/999] ACTION //third_party/connectedhomeip/src/tracing:gen_tra...ig(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)
    ninja: build stopped: subcommand failed.

    BR,

    Frank

  • !!!!!!!!!!!!!!! STDERR !!!!!!!!!!!!!!!!!!
    make: cmake: No such file or directory
    make: *** [Makefile:26: build-gcc] Error 127

    Check your cmake version and connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx git branch.  Also see the https://github.com/TexasInstruments/simplelink-lowpower-f2-sdk github repo as this dependency fails to build before getting to the actual Matter project.

    Regards,
    Ryan

  • Ryan,

    after I install cmake, I can build the project and see "chip-LP_EM_CC1354P10_6-lock-example.hex".

    But it still shows error. Can I know what happens?

    frank@frank-virtual-machine:~/connectedhomeip/examples/lock-app/cc13x4_26x4$ ninja -C out/debug
    ninja: Entering directory `out/debug'
    [1015/1027] ACTION //:lock_app-without...omeip/build/toolchain/arm_gcc:arm_gcc)
    FAILED: chip-LP_EM_CC1354P10_6-lock-example-without-factory-data.hex
    python ../../third_party/connectedhomeip/third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../.. --default-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --current-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --capture-output --python-virtualenv-config python/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/pigweed_build_venv/venv_metadata.json --python-dep-list-files gen/lock_app-without-factory-data.hex_metadata_path_list.txt -- ../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/factory_data_trim.py chip-LP_EM_CC1354P10_6-lock-example.hex chip-LP_EM_CC1354P10_6-lock-example.out.map chip-LP_EM_CC1354P10_6-lock-example-without-factory-data.hex cc13x4_26x4
    Traceback (most recent call last):
      File "/home/frank/connectedhomeip/examples/lock-app/cc13x4_26x4/out/debug/../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/factory_data_trim.py", line 37, in <module>
        with open(matter_app_map_file, "r") as map_file:
    FileNotFoundError: [Errno 2] No such file or directory: 'chip-LP_EM_CC1354P10_6-lock-example.out.map'
    ninja: build stopped: subcommand failed.

    by the way, I also build lighting_app without issue.

    frank@frank-virtual-machine:~/connectedhomeip/examples/lighting-app/cc13x4_26x4$ ninja -C out/debug
    ninja: Entering directory `out/debug'
    [990/990] stamp obj/default.stamp

    BR,

    frank

  • You must generate a *-mcuboot.hex file before completing a successful build.  Since making all of these changes, please ensure that you've cleaned the project space (i.e. "rm -rf out/debug" in the /lock-app/cc13x4_26x4 folder) before re-attempting to build.  Otherwise lighting_app build completion indicates that the environment and repository are sufficient, thus you will need to determine whether the lock-app configuration has been corrupted in any way.

    Regards,
    Ryan

  • Ryan,

    I did "rm -rf out/debug" but the result is the same as below.

    few questions:

    - I can see "chip-LP_EM_CC1354P10_6-lighting-example.out" in the folder. So, it's not the final image file.

    - Can I know what's the purpose of chip-LP_EM_CC1354P10_6-lock-example-without-factory-data.hex ?

    - what I miss to build the project?

    frank@frank-virtual-machine:~/connectedhomeip/examples/lock-app/cc13x4_26x4$ rm -rf out/debug
    frank@frank-virtual-machine:~/connectedhomeip/examples/lock-app/cc13x4_26x4$ cd ~/connectedhomeip
    frank@frank-virtual-machine:~/connectedhomeip$ source ./scripts/activate.sh

      WELCOME TO...

             █
             █
         ▄   █   ▄                                █     █
         ▀▀█████▀▀      ▄▀▀▀▄ ▄▀▀▀▄    ▄▀▀▀▀▄█  ▀▀█▀▀▀▀▀█▀▀   ▄▀▀▀▀▄    ▄▀▀
       ▀█▄       ▄█▀   █     █     █  █      █    █     █    █▄▄▄▄▄▄█  █   
         ▀█▄   ▄█▀     █     █     █  █      █    █     █    █         █   
      ▄██▀▀█   █▀▀██▄  █     █     █   ▀▄▄▄▄▀█    ▀▄▄   ▀▄▄   ▀▄▄▄▄▀   █   
     ▀▀    █   █    ▀▀

      ACTIVATOR! This sets your shell environment variables.

    Activating environment (setting environment variables):

      Setting environment variables for CIPD package manager...done
      Setting environment variables for Project actions........skipped
      Setting environment variables for Python environment.....done
      Setting environment variables for pw packages............skipped
      Setting environment variables for Host tools.............done

    Checking the environment:

    20240722 09:38:06 INF Environment passes all checks!

    Environment looks good, you are ready to go!

    frank@frank-virtual-machine:~/connectedhomeip$ cd ~/connectedhomeip/examples/lock-app/cc13x4_26x4
    frank@frank-virtual-machine:~/connectedhomeip/examples/lock-app/cc13x4_26x4$ gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\""
    Done. Made 3691 targets from 302 files in 519ms
    frank@frank-virtual-machine:~/connectedhomeip/examples/lock-app/cc13x4_26x4$ ninja -C out/debug
    ninja: Entering directory `out/debug'
    [1048/1060] ACTION //:lock_app-without-factory-data.hex(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)
    FAILED: chip-LP_EM_CC1354P10_6-lock-example-without-factory-data.hex
    python ../../third_party/connectedhomeip/third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../.. --default-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --current-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --capture-output --python-virtualenv-config python/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/pigweed_build_venv/venv_metadata.json --python-dep-list-files gen/lock_app-without-factory-data.hex_metadata_path_list.txt -- ../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/factory_data_trim.py chip-LP_EM_CC1354P10_6-lock-example.hex chip-LP_EM_CC1354P10_6-lock-example.out.map chip-LP_EM_CC1354P10_6-lock-example-without-factory-data.hex cc13x4_26x4
    Traceback (most recent call last):
      File "/home/frank/connectedhomeip/examples/lock-app/cc13x4_26x4/out/debug/../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/factory_data_trim.py", line 37, in <module>
        with open(matter_app_map_file, "r") as map_file:
    FileNotFoundError: [Errno 2] No such file or directory: 'chip-LP_EM_CC1354P10_6-lock-example.out.map'
    ninja: build stopped: subcommand failed.

    BR,

    frank

  • Hi Frank,

    Thanks for the update.

    I'm Ryan's colleague and will maintain his threads while he is out of office.

    Can I know what's the purpose of chip-LP_EM_CC1354P10_6-lock-example-without-factory-data.hex ?

    This is an intermediate image used prior to generating the final image.

    Please refer to: https://github.com/project-chip/connectedhomeip/blob/a10b47d4da020aef369041967dcf8901b534ddea/docs/guides/ti/matter-users-guide/ti_factory_data_user_guide.md?plain=1#L42

    what I miss to build the project?

    I'll reach out to the development team to see if they have a quick idea what the issue could be.

    Will update here within 4 business days.

    Thanks,
    Toby

  • Hi Frank,

    For the "gn" command, can you try this?

    gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true"

    Thanks,
    Toby