nRF5340 audio application FOTA problem with latest SDK

I am building and testing the nRF5340 audio application from the latest SDK 2.6.0 and trying to get FOTA updates working by following this guide : 

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/applications/nrf5340_audio/doc/fota.html

When I try to build the image for flashing, even for just the app core as follows :  buildprog.py -c app -b release -d headset -m internal , I get the following error : 

Traceback (most recent call last):
  File "C:\ncs\v2.6.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 498, in <module>
    __main()
  File "C:\ncs\v2.6.0\nrf\applications\nrf5340_audio\tools\buildprog\buildprog.py", line 384, in __main
    raise Exception("DFU arguments only accepted when using controller: " +
Exception: DFU arguments only accepted when using controller: ACS_nRF53. Please use standard tools.

How to solve this? Thanks

  • Hi, 

    The buildprog.py can only support the LE Audio controller for nRF5340 instead of the SoftDevice Controller. Because the default controller in v2.6.0 has been changed from the LE Audio controller for nRF5340 to the SoftDevice Controller, it causes that errors. We will update the guide later. Since the developer is out of the office for the Easter holiday, I will update the case when I gather enough information.  

    Due to the Easter holidays in Norway, we are less staffed than usual. During this time, you may receive late responses. After next Monday, staff will return to normal. Sorry for the inconvenience and thanks for your patience. 

    Regards,
    Amanda H.

  • Hi,

    Could you try to add the following configs in the child_image/hci_ipc.conf to reduce the size:

    CONFIG_BT_ISO_CENTRAL=n
    CONFIG_BT_ISO_BROADCASTER=n
    CONFIG_BT_ISO_SYNC_RECEIVER=n
    CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=n
    CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER=n

    and this command to build for DFU?

    $ west build -b nrf5340_audio_dk_nrf5340_cpuapp -p -d headset_dfu -- -DCONFIG_AUDIO_DEV=1 -DCONFIG_AUDIO_DFU=2 -DCONFIG_MCUMGR=y CONFIG_BOOTLOADER_MCUBOOT=y

    Regards,
    Amanda H.

  • Hi  

    When I try to build using the mentioned command, I get the following error. Even when I delete the build folder initially. The thing is, I have extra code added to the receiver application to advertise, allow a connection, and received commands over NUS. This all builds fine when using the buildprog Python script 

    C:/ble-nus-ctrl-260/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_sink.c:44:10: fatal error: dfu_entry.h: No such file or directory
       44 | #include "dfu_entry.h"
          |          ^~~~~~~~~~~~~
    compilation terminated.
    [31/1066] Building C object CMakeFiles/app.dir/src/drivers/cs47l63_comm.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'C:\ble-nus-ctrl-260\applications\nrf5340_audio\headset_dfu'

    Here is another problem :  

    In file included from C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/gcc.h:98,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain.h:50,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/sys/atomic.h:12,
                     from C:/ncs/v2.6.0/zephyr/include/zephyr/bluetooth/audio/audio.h:21,
                     from C:/ble-nus-ctrl-260/applications/nrf5340_audio/src/bluetooth/bt_stream/bt_le_audio_tx/bt_le_audio_tx.h:10,
                     from C:/ble-nus-ctrl-260/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_sink.h:10,
                     from C:/ble-nus-ctrl-260/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_sink.c:10:
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_CHOSEN_nordic_nus_uart_ORD' undeclared here (not in a function)
       89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
      137 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
       89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
      216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    C:/ble-nus-ctrl-260/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_sink.c:140:36: note: in expansion of macro 'DEVICE_DT_GET'
      140 | static const struct device *uart = DEVICE_DT_GET(DT_CHOSEN(nordic_nus_uart));
          |                                    ^~~~~~~~~~~~~
    [45/1066] Building C object CMakeFiles/app.dir/src/utils/error_handler.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'C:\ble-nus-ctrl-260\applications\nrf5340_audio\headset_dfu'

  • Hi, 

    I cannot find this line "#include "dfu_entry.h"" in the https://github.com/nrfconnect/sdk-nrf/blob/v2.6.0/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_sink.c. Please make sure the files from v2.6.0 nrf5340_audio application.  

    If you use VS code to build the code, you have to add the overlay/configs to the build configuration manually if you have extra settings. 

    -Amanda H.

Related