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

[Build] TI applications fail to build (intelhex) #27937

Closed
jjm202 opened this issue Jul 13, 2023 · 5 comments
Closed

[Build] TI applications fail to build (intelhex) #27937

jjm202 opened this issue Jul 13, 2023 · 5 comments

Comments

@jjm202
Copy link

jjm202 commented Jul 13, 2023

Build issue(s)

The pump-contoller-app and the lighting-app fail to build.


 2045  git clone https://github.com/project-chip/connectedhomeip.git
 2046  cd connectedhomeip/
 2047  git submodule update --init
 2048  source ./scripts/bootstrap.sh
 2049  cd examples/pump-controller-app/cc13x2x7_26x2x7/
 2050  gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.15.0\""
 2051  ninja -C out/debug

ninja: Entering directory `out/debug'
[1/9] ACTION //:pump_controller_app.bin(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)
FAILED: chip-LP_CC2652R7-pump-controller-example.bin
python ../../third_party/connectedhomeip/third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../.. --default-toolchain=//third_party/con
nnectedhomeip/build/toolchain/arm_gcc:arm_gcc --capture-output --python-virtualenv-config python/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/pigweed_buil
adata_path_list.txt -- ../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/tools/common/oad/oad_image_tool.py --verbose ccs . 7 -hex1 chip-LP_CC2652
../third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/tools/common/oad/private.pem
Traceback (most recent call last):
  File "../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/tools/common/oad/oad_image_tool.py", line 22, in <module>
    import intelhex
ModuleNotFoundError: No module named 'intelhex'
ninja: build stopped: subcommand failed.

jmarkel@ILA1LT7WDN593:~/connectedhomeip/examples/lighting-app/cc13x2x7_26x2x7$ ninja -C out/debug
ninja: Entering directory `out/debug'
[1086/1097] ld ./chip-LP_CC2652R7-lighting-example.out
FAILED: chip-LP_CC2652R7-lighting-example.out chip-LP_CC2652R7-lighting-example.out.map
arm-none-eabi-g++ -L../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/source gen/sysconfig/ti_utils_build_linker.cmd.genlibs -T../../third_party/connectedhomeip/src/platform/cc13xx_26xx/cc13x2_26x2/cc13x2x7_cc26x2x7_freertos_ot
a.lds -march=armv7e-m -mcpu=cortex-m4 -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -Os --specs=nosys.specs --specs=nano.specs -Werror -Wl,--fatal-warnings -fdiagnostics-color -Wl,--gc-sections -nostartfiles -fno-exceptions -fno-unwind-tables -Wl,-Map
,./chip-LP_CC2652R7-lighting-example.out.map -Wl,--cref @./chip-LP_CC2652R7-lighting-example.out.rsp -o ./chip-LP_CC2652R7-lighting-example.out
/home/jmarkel/connectedhomeip/.environment/cipd/packages/arm/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: section .nvs VMA [000aa000,000adfff] overlaps section .rodata VMA [00095ea0,000ad09e]
/home/jmarkel/connectedhomeip/.environment/cipd/packages/arm/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: section .ARM.exidx VMA [000add6c,000add73] overlaps section .nvs VMA [000aa000,000adfff]
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Platform

cc13x2_cc26x2

Anything else?

jmarkel@ILA1LT7WDN593:~/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7$ pip install intelhex
Requirement already satisfied: intelhex in /home/jmarkel/connectedhomeip/.environment/pigweed-venv/lib/python3.8/site-packages (2.3.0)

jmarkel@ILA1LT7WDN593:~/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7$ pip list | grep intel
**intelhex                      2.3.0**

@jjm202
Copy link
Author

jjm202 commented Jul 13, 2023

Interestingly, checking out a prior commit and building will work, as will switch back to the original/master (if the out/debug directory remains intact):

$ git checkout 66b2d01b0f47c2952495e88a95c2d6913b83e0e8
jmarkel@ILA1LT7WDN593:~/temp/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7$ ninja -C out/debug
ninja: Entering directory `out/debug'
[0/1] Regenerating ninja files
[402/402] stamp obj/default.stamp

jmarkel@ILA1LT7WDN593:~/temp/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7$ **git switch -**
Previous HEAD position was 66b2d01b0f [OIS] Platform improvements (#27291)
Switched to branch 'master'
**Your branch is up to date with 'origin/master'.**
jmarkel@ILA1LT7WDN593:~/temp/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7$ ninja -C out/debug
ninja: Entering directory `out/debug'
[0/1] Regenerating ninja files
[400/400] stamp obj/pump_controller_app.ota.stamp

but removing and regenerating the out/debug folder

jmarkel@ILA1LT7WDN593:~/temp/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7$ rm -rf out/
jmarkel@ILA1LT7WDN593:~/temp/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7$ gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.15.0\""
Done. Made 272 targets from 226 files in 95ms
jmarkel@ILA1LT7WDN593:~/temp/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7$ ninja -C out/debug
ninja: Entering directory `out/debug'
[1076/1084] ACTION //:pump_controller_app.bin(//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc)
FAILED: chip-LP_CC2652R7-pump-controller-example.bin
python ../../third_party/connectedhomeip/third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../.. --default-toolchain=//
onnectedhomeip/build/toolchain/arm_gcc:arm_gcc --current-toolchain=//third_party/connectedhomeip/build/toolchain/arm_gcc:arm_gcc --capture-output --python-virtualen
on/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_env_setup/pigweed_build_venv/venv_metadata.json --python-dep-list-files gen/pump_controller_app.bin_m
list.txt -- ../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/tools/common/oad/oad_image_tool.py --verbose ccs . 7 -hex1 chip-LP_CC
ontroller-example.hex -o chip-LP_CC2652R7-pump-controller-example -k ../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/tools/common
pem
Traceback (most recent call last):
  File "../../third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/tools/common/oad/oad_image_tool.py", line 22, in <module>
    import intelhex
ModuleNotFoundError: No module named 'intelhex'
ninja: build stopped: subcommand failed.

@jjm202
Copy link
Author

jjm202 commented Jul 14, 2023

I worked through this with @ReneJosefsen yesterday. He suggested the following workaround, which was successful:

As a workaround, it seems like you can add:
intelhex
to connectedhomeip/scripts/setup/requirements.ti.txt and then add
pw_build_PIP_REQUIREMENTS += [ "${chip_root}/scripts/setup/requirements.ti.txt" ]
to connectedhomeip/examples/lock-app/cc13x2x7_26x2x7/.gn, just below import("//args.gni")

Also, please query TI for when the CC26x2x7 builds will be enabled again in the workflows.

#26955

@ReneJosefsen
Copy link
Contributor

We should find a way to get this added to the TI platform in a way that is get applied for all applicable examples. The above is mainly to get unblocked. Given this is related to OTA it could also be worth to only require these modules if OTA is enabled.

@ReneJosefsen
Copy link
Contributor

Given the mentioned PR have merged, I would assume this issue is ok to close.

@Alami-Amine
Copy link
Contributor

it looks like the issue was resolved
additionally, we are now supporting cc13x4_26x4 instead of cc13x2_26x2, I assume we can close this

@github-project-automation github-project-automation bot moved this from Todo to Done in [Build] Build Issues Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants