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 Reply
  • Hi,

    I have always used external flash,

    In NCS2.4,i use buildprog.py:
    python buildprog.py -c both -b debug -d headset -m external.

    but in NCS2.6,the dfu firmware does not support this construct.

    Is there something wrong with the build instructions I use? How should I modify it? The reference link does not specify the method.

    Best ragards,

    Reskyllr

Children
  • Hi Reskyllr,

    Reskyllr said:
    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

    I guess this is just a typo on your end, but it should be -DCONFIG_BOOTLOADER_MCUBOOT=y.

    Reskyllr said:
    Is there something wrong with the build instructions I use?

    Apart from what I mentioned above, build command looks fine. Currently, there is a limitation on FOTA upgrade due to updating SoftDevice on the network core in both DFU methods (single and multi-image). SoftDevice binary becomes too large to run on a network core together with a bootloader. Suggested solution for reducing the size of SoftDevice binary would be to disable unused features of the SoftDevice Controller.

    Best regards,
    Dejan 

  • Hi dejans,

    You're right, I'm definitely working in that direction.
    What I need assistance with is: As the controller of Le audio BIS, what features can I disable? I have made some efforts, but the size still cannot meet the needs of dfu.

    Best regards,
    Dejan

  • Hi Reskyllr,

    Which features of SoftDevice Controller have you tried to disable? What was the result? How big improvement did you get on the initial overflow of 20308 bytes?

    Best regards,
    Dejan


  • Hi,dejans,

    It's my hci_ipc.conf.

    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_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

    now log:

    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 3604 bytes.

    For Le audio BIS,I don't know what improvements could be made, that's what I want to know.

    Best regards,

    Reskyllr.

Related