nrf5340 audio: FOTA Firmware can't build

We have a project based on nrf5340 audio demo,Now we upgrade SDK from NCS2.4 to NCS2.6.

But when I built the DFU, I found that FLASH was not enough

c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `text' will not fit in region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 20308 bytes

I know this problem exists in NCS2.5.99 and the reason is, but NCS2.6 should have fixed it?

I know that I need to cut the controller. For BIS headset and BIS gateway, what configurations can I use to reduce the size?

Parents
  • Hi,

    Which board do you use?

    But when I built the DFU, I found that FLASH was not enough

    Could you provide a complete log?

    I know this problem exists in NCS2.5.99

    Could you provide a reference for this?

    Best regards,
    Dejan

  • Hi,dejans,

      The above is the complete log. The other logs have nothing to do with this problem. The only problem is that region `FLASH' overflowed.
    For NCS2.5.99, it is clearly stated that FOTA cannot be used, so there is no need to test.
    For NCS2.6.0, the instructions provided are as follows:
    Updating the SoftDevice:
    Both FOTA upgrade methods support updating the SoftDevice on the network core. However, the current default build options for the SoftDevice create a binary that is too large to run on the network core together with a bootloader. To reduce the size of the SoftDevice binary, you can disable unused features in the SoftDevice. See SoftDevice Controller documentation for more information.

    What I want to know is which configs I can modify to reduce the size of the softDevice controller.

    At the same time, it does not affect BIS functions.

    Best regards,

    Reskyllr

  • Hi,dejans,

    This is valid and can be compiled successfully, but SMP broadcasts will not be created successfully, which is necessary for FOTA:
    HL [00:00:00.024139]<wrn>bt_hci_core: opcode 0x2036 status 0x11
    HL [00:00:00.024139]<err>bt_mgmtdfu: SMP_SVR Advertising failed to start (ret-5)

    Best regards,

    Reskyllr

  • Hi Reskyllr,

    Reskyllr said:
    HL [00:00:00.024139]<wrn>bt_hci_core: opcode 0x2036 status 0x11
    HL [00:00:00.024139]<err>bt_mgmtdfu: SMP_SVR Advertising failed to start (ret-5)

    Can you confirm that this error happens with config options that are shown below?

    CONFIG_BT_ISO_PERIPHERAL=n
    CONFIG_BT_CENTRAL=n
    CONFIG_BT_PERIPHERAL=n

    Best regards,
    Dejan

  • Hi,dejans,

    I've fixed the problem and now it works smoothly, albeit with flash woes.
    It is hoped that the size can be reduced as soon as possible, because adding the CIS function is obviously unrealistic at present.

    Best regards,

    Reskyllr

  • Hi  ,

    I hope you don't mind sharing how you managed to solve it.

    Could you share the configuration you used?



    Thanks,

    Ahmed

  • Be sure,

    hci_ipc.conf

    #
    # Copyright (c) 2023 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    CONFIG_BT_ISO_PERIPHERAL=y
    # CONFIG_BT_ISO_CENTRAL=y
    # CONFIG_BT_ISO_BROADCASTER=y
    # CONFIG_BT_ISO_SYNC_RECEIVER=y
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=n
    CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER=n
    CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=1
    CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
    CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
    CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT=2
    CONFIG_BT_CTLR_ADV_ISO_SET=1
    CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=2
    
    # Support two links as a central, or one link as a peripheral
    CONFIG_BT_MAX_CONN=3
    CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=1
    
    # Allow using more than default advertising event length
    CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=251
    
    # To present the audio at the right point in time, we need the controller and
    # audio clock to be synchronized
    CONFIG_MPSL_TRIGGER_IPC_TASK_ON_RTC_START=y
    CONFIG_MPSL_TRIGGER_IPC_TASK_ON_RTC_START_CHANNEL=4
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    #
    # If using FEM the CONFIG_BT_CTLR_TX_PWR_ANTENNA should be set here if the
    # value required is not 10 dBm
    #
    
    # hdeadset needn't
    CONFIG_BT_ISO_CENTRAL=n
    #CONFIG_BT_PERIPHERAL=n
    CONFIG_BT_ISO_PERIPHERAL=n
    
    CONFIG_BT_ISO_BROADCASTER=y
    CONFIG_BT_ISO_SYNC_RECEIVER=y
    CONFIG_DEBUG=n
    CONFIG_ASSERT=n
    CONFIG_STACK_USAGE=n
    CONFIG_THREAD_MONITOR=n
    CONFIG_SERIAL=n
    CONFIG_CONSOLE=n
    CONFIG_PRINTK=n
    CONFIG_UART_CONSOLE=n
    CONFIG_BOOT_BANNER=n

    Please note that it only supports BIS.

    Best regards,

    Reskyllr

Reply
  • Be sure,

    hci_ipc.conf

    #
    # Copyright (c) 2023 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    CONFIG_BT_ISO_PERIPHERAL=y
    # CONFIG_BT_ISO_CENTRAL=y
    # CONFIG_BT_ISO_BROADCASTER=y
    # CONFIG_BT_ISO_SYNC_RECEIVER=y
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=n
    CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER=n
    CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=1
    CONFIG_BT_CTLR_CONN_ISO_GROUPS=1
    CONFIG_BT_CTLR_CONN_ISO_STREAMS=2
    CONFIG_BT_CTLR_SYNC_ISO_STREAM_COUNT=2
    CONFIG_BT_CTLR_ADV_ISO_SET=1
    CONFIG_BT_CTLR_ADV_ISO_STREAM_COUNT=2
    
    # Support two links as a central, or one link as a peripheral
    CONFIG_BT_MAX_CONN=3
    CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=1
    
    # Allow using more than default advertising event length
    CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=251
    
    # To present the audio at the right point in time, we need the controller and
    # audio clock to be synchronized
    CONFIG_MPSL_TRIGGER_IPC_TASK_ON_RTC_START=y
    CONFIG_MPSL_TRIGGER_IPC_TASK_ON_RTC_START_CHANNEL=4
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y
    #
    # If using FEM the CONFIG_BT_CTLR_TX_PWR_ANTENNA should be set here if the
    # value required is not 10 dBm
    #
    
    # hdeadset needn't
    CONFIG_BT_ISO_CENTRAL=n
    #CONFIG_BT_PERIPHERAL=n
    CONFIG_BT_ISO_PERIPHERAL=n
    
    CONFIG_BT_ISO_BROADCASTER=y
    CONFIG_BT_ISO_SYNC_RECEIVER=y
    CONFIG_DEBUG=n
    CONFIG_ASSERT=n
    CONFIG_STACK_USAGE=n
    CONFIG_THREAD_MONITOR=n
    CONFIG_SERIAL=n
    CONFIG_CONSOLE=n
    CONFIG_PRINTK=n
    CONFIG_UART_CONSOLE=n
    CONFIG_BOOT_BANNER=n

    Please note that it only supports BIS.

    Best regards,

    Reskyllr

Children
Related