Issue on peripheral HR example using nrf5340DK

Hello,

I’m using the nRF Connect extension for VS Code, and I encountered an error while trying to compile the peripheral_hr sample code.

I'm using SDK 2.9.0 with toolchain 2.9.0.

Here is the error log I received:


lto-wrapper.exe: warning: using serial compilation of 2 LTRANS jobs
lto-wrapper.exe: note: see the '-flto' option documentation for more information
c:/ncs/toolchains/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: C:\Users\DRIBOL~1\AppData\Local\Temp\ccFvCKw3.ltrans0.ltrans.o: in function `tx_thread':
C:/ncs/v2.9.0/zephyr/samples/bluetooth/hci_ipc/src/main.c:211: undefined reference to `__device_dts_ord_82'
c:/ncs/toolchains/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: C:\Users\DRIBOL~1\AppData\Local\Temp\ccFvCKw3.ltrans0.ltrans.o: in function `bg_thread_main':
C:/ncs/v2.9.0/zephyr/samples/bluetooth/hci_ipc/src/main.c:274: undefined reference to `__device_dts_ord_82'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[10/16] No configure step for 'peripheral_hr'
FAILED: _sysbuild/hci_ipc-prefix/src/hci_ipc-stamp/hci_ipc-build C:/ncs/peripheral_hr/build/_sysbuild/hci_ipc-prefix/src/hci_ipc-stamp/hci_ipc-build

I configured the project with nrf5340dk/nrf5340/cpuapp/ns.

Has anyone else faced the same issue? Can someone help me understand and fix this problem?

Thank you in advance!

Parents
  • Hello,

    Sorry for the late reply.

    It seems like a bug. If you copy the Kconfig.sysbuild file from NCS\nrf\samples\bluetooth\peripheral_hr_coded, and replace the one that is present in NCS\zephyr\samples\bluetooth\peripheral_hr, then it should build. I will report this internally.

    Thank you for reporting!

    Best regards,

    Edvin

  • Hello Edvin,

    thanks for your support. The procedure you described doesn't resolve the issue. Now I have a new error

    [62/131] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    [...]C:/ncs/v2.9.0/nrf/applications/ipc_radio/src/main.c
    C:/ncs/v2.9.0/nrf/applications/ipc_radio/src/main.c:15:2: error: #error "No radio serialization selected."
    15 | #error "No radio serialization selected."
    | ^~~~~
    [83/131] Building C object zephyr/kernel/CMakeFiles/kernel.dir/condvar.c.obj
    ninja: build stopped: subcommand failed.
    [15/20] Generating ../merged.hex
    FAILED: modules/nrf/ipc_radio-prefix/src/ipc_radio-stamp/ipc_radio-build 

    In the meanwhile, I also started different example and I think there is a similar issue (the one missing __device_dts_ord_82) on hci_ipc in version 2.9.0 if i want to configure the network core with nrf5340_cpunet_bt_mesh-bt_ll_sw_split.conf (as reported in this example https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/mesh_demo/README.html)

    I can also tell you that if I use hci_ipc sample in 2.6.0 SDK it works.

  • danix2k said:
    I can also tell you that if I use hci_ipc sample in 2.6.0 SDK it works.

    Yes, this is due to the build system changing to sysbuild in NCS v2.7.0 from the old child image structure to the new one, called "sysbuild". You will probably see the presence of files and folders with the name sysbuild in it, as well as references to it in the build log. 

    danix2k said:

    In the meanwhile, I also started different example and I think there is a similar issue (the one missing __device_dts_ord_82) on hci_ipc in version 2.9.0 if i want to configure the network core with nrf5340_cpunet_bt_mesh-bt_ll_sw_split.conf (as reported in this example https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/mesh_demo/README.html)

    It is correct that you need a network image for the network core, but this part of the documentation, which is from zephyr directly, and not NCS, is a bit misleading. If you were to use standalone zephyr, this would be the case, but as long as you are using the zephyr samples through NCS, this will be done automatically for you, whenever you build a sample. 

    Well, almost automatically. It is the part that is failing right now, but it is supposed to build and flash the network image to the nRF5340 Network Core. 

    Also, you should not use the bt_ll_sw_split, which is the default Zephyr BLE controller. While it may work, we have not certified it as a production BLE stack, so certifying products using this is a considerable amount of work, and you probably don't want to go down that road. Instead, you should use our BLE controller (called the SoftDevice Controller). This is already certified, and makes the product certification a lot simpler. 

    danix2k said:
    thanks for your support. The procedure you described doesn't resolve the issue. Now I have a new error

    Did you do any other changes? Can you please zip and upload the application that you are trying to build? Together with the build command you are trying to use? If you are using VS Code, you can right click the build folder and select "copy build command":

    Best regards,

    Edvin

Reply
  • danix2k said:
    I can also tell you that if I use hci_ipc sample in 2.6.0 SDK it works.

    Yes, this is due to the build system changing to sysbuild in NCS v2.7.0 from the old child image structure to the new one, called "sysbuild". You will probably see the presence of files and folders with the name sysbuild in it, as well as references to it in the build log. 

    danix2k said:

    In the meanwhile, I also started different example and I think there is a similar issue (the one missing __device_dts_ord_82) on hci_ipc in version 2.9.0 if i want to configure the network core with nrf5340_cpunet_bt_mesh-bt_ll_sw_split.conf (as reported in this example https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/mesh_demo/README.html)

    It is correct that you need a network image for the network core, but this part of the documentation, which is from zephyr directly, and not NCS, is a bit misleading. If you were to use standalone zephyr, this would be the case, but as long as you are using the zephyr samples through NCS, this will be done automatically for you, whenever you build a sample. 

    Well, almost automatically. It is the part that is failing right now, but it is supposed to build and flash the network image to the nRF5340 Network Core. 

    Also, you should not use the bt_ll_sw_split, which is the default Zephyr BLE controller. While it may work, we have not certified it as a production BLE stack, so certifying products using this is a considerable amount of work, and you probably don't want to go down that road. Instead, you should use our BLE controller (called the SoftDevice Controller). This is already certified, and makes the product certification a lot simpler. 

    danix2k said:
    thanks for your support. The procedure you described doesn't resolve the issue. Now I have a new error

    Did you do any other changes? Can you please zip and upload the application that you are trying to build? Together with the build command you are trying to use? If you are using VS Code, you can right click the build folder and select "copy build command":

    Best regards,

    Edvin

Children
  • following the build command from VS code extension. I didn't change anything from the example (just added the build configuration)

    west build --build-dir c:/ncs/peripheral_hr_3/build c:/ncs/peripheral_hr_3 --pristine --board nrf5340dk/nrf5340/cpuapp/ns --sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:\ncs\peripheral_hr_3

    peripheral_hr_3.zip

    Also, you should not use the bt_ll_sw_split, which is the default Zephyr BLE controller. While it may work, we have not certified it as a production BLE stack, so certifying products using this is a considerable amount of work, and you probably don't want to go down that road. Instead, you should use our BLE controller (called the SoftDevice Controller). This is already certified, and makes the product certification a lot simpler. 

    About this point: how can I "not use" bt_ll_sw_split? I didn't change anything from the example and so it seems it's automatically added in the test application.

    Regards,

    D.

  • I am sorry. When I tested to get it working, I also copied the sysbuild folder from the nrf\samples\bluetooth\peripheral_hr_coded, but I forgot because it didn't build before I added the Kconfig.sysbuild. 

    Attached is the project, and it should build. But in case you want to do it yourself, you can copy both the Kconfig.sybuild and the sysbuild folder from the ncs\nrf\samples\bluetooth\peripheral_coded_phy. 

    central_hr.zip

    Best regards,

    Edvin

  • Hello,

    coping Kconfig.sysbuild and sysbuild folder form peripheral_coded_phy it works.

    Thanks

Related