Thingy53 - peripheral_lbs sample fails to build for target thingy53/cpuapp/ns

Hello,

Attempts to build the "peripheral_lbs" sample for target thingy53/cpuapp/ns in the latest nRF Connect SDK v3.2.1 fails.

The build for target thingy53/cpuapp works fine.

The build failed with error  "‘FLASH overflowed when building TFM image".

/opt/nordic/ncs/toolchains/322ac893fe/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: address 0x241e0 of bin/tfm_s.axf section `.TFM_UNPRIV_CODE' is not within region `FLASH'
/opt/nordic/ncs/toolchains/322ac893fe/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: address 0x27c40 of bin/tfm_s.axf section `.gnu.sgstubs' is not within region `FLASH'
/opt/nordic/ncs/toolchains/322ac893fe/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: bin/tfm_s.axf section `.TFM_PSA_ROT_LINKER_DATA' will not fit in region `FLASH'
/opt/nordic/ncs/toolchains/322ac893fe/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: address 0x241e0 of bin/tfm_s.axf section `.TFM_UNPRIV_CODE' is not within region `FLASH'
/opt/nordic/ncs/toolchains/322ac893fe/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: address 0x27c40 of bin/tfm_s.axf section `.gnu.sgstubs' is not within region `FLASH'
/opt/nordic/ncs/toolchains/322ac893fe/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld: region `FLASH' overflowed by 48668 bytes
Memory region         Used Size  Region Size  %age Used
           FLASH:       97308 B      48640 B    200.06%
             RAM:       48404 B       192 KB     24.62%
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I've used the following temporary workaround:

  • Disabled “CONFIG_BT_LBS_SECURITY_ENABLED=n" in prj.conf
  • Used SB_CONFIG_NETCORE_HCI_IPC=y in sysbuild.conf 
  • Removed Kconfig.sysbuild
  • Built for thingy53/cpuapp/ns
  • Application built and ran fine

However, I'd like to have the BT_LBS_SECURITY_ENABLED set.

What is the fix for thingy53/cpuapp/ns build with the default Kconfig “BT_LBS_SECURITY_ENABLED=y"?


Thank you.

Parents
  • Update:

    I've re-built the peripheral_lbs for target thingy53/cpuapp/ns for both NETCORE_IPC_RADIO and NETWORE_HCI_IPC, with “CONFIG_BT_LBS_SECURITY_ENABLED=n" in prj.conf.

    Configurations and results as follow.

    NETCORE_IPC_RADIO

    • Disabled “CONFIG_BT_LBS_SECURITY_ENABLED=n" in prj.conf
    • Sample Kconfig.sysbuild used (NETCORE_IPC_RADIO_BT_HCI_IPC)
    • Built with thingy53/cpuapp/ns
    • Application built and ran fine
    • In Kconfig.sysbuild, “NRF_DEFAULT_IPC_RADIO” is defined. 
    • Where is "NRF_DEFAULT_IPC_RADIO" used? “Kconfig search” in docs.nordicsemi.com has no entry for it.

    Console output:

    [Disconnected]
    [Connected]
    [00:00:00.000,793] <inf> udc_nrf: Preinit
    *** Booting My Application v3.2.1 - unknown commit ***
    *** Using nRF Connect SDK v3.2.1-d8887f6f32df ***
    *** Using Zephyr OS v4.2.99-ec78104f1569 ***
    [00:00:00.001,342] <inf> udc_nrf: Initialized
    Starting Bluetooth Peripheral LBS sample
    [00:00:00.005,584] <inf> udc_nrf: SUSPEND state detected
    [00:00:00.015,502] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.015,533] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    [00:00:00.015,563] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 155.44175 Build 2923568579
    [00:00:00.018,432] <inf> bt_hci_core: HCI transport: IPC
    [00:00:00.018,524] <inf> bt_hci_core: Identity: C3:A6:C8:C4:25:42 (random)
    [00:00:00.018,554] <inf> bt_hci_core: HCI: version 6.2 (0x10) revision 0x2020, manufacturer 0x0059
    [00:00:00.018,585] <inf> bt_hci_core: LMP: version 6.2 (0x10) subver 0x2020
    Bluetooth initialized
    Advertising successfully started
    [00:00:00.103,851] <inf> udc_nrf: Reset
    [00:00:00.103,912] <inf> udc: ep 0x80 is not halted|disabled
    [00:00:00.103,942] <inf> udc_nrf: RESUMING from suspend
    Connected
    [00:01:55.334,228] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
    Disconnected, reason 0x13 
    Connection object available from previous conn. Disconnect is complete!
    Advertising successfully started

    NETWORE_HCI_IPC

    • Disabled “CONFIG_BT_LBS_SECURITY_ENABLED=n" in prj.conf
    • Used SB_CONFIG_NETCORE_HCI_IPC=y in sysbuild.conf 
    • Removed Kconfig.sysbuild
    • Built with thingy53/cpuapp/ns
    • Application built and ran fine


    Console Output

    Note that this configuration threw error:

    [00:00:00.028,961] <err> bt_gatt: Unable to import the key for AES CMAC -134

    [Disconnected]
    [Connected]
    [00:00:00.000,762] <inf> udc_nrf: Preinit
    *** Booting My Application v3.2.1 - unknown commit ***
    *** Using nRF Connect SDK v3.2.1-d8887f6f32df ***
    *** Using Zephyr OS v4.2.99-ec78104f1569 ***
    [00:00:00.001,525] <inf> udc_nrf: Initialized
    Starting Bluetooth Peripheral LBS sample
    [00:00:00.005,767] <inf> udc_nrf: SUSPEND state detected
    [00:00:00.015,838] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.015,869] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    [00:00:00.015,869] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 155.44175 Build 2923568579
    [00:00:00.018,829] <inf> bt_hci_core: HCI transport: IPC
    [00:00:00.018,920] <inf> bt_hci_core: Identity: C3:A6:C8:C4:25:42 (random)
    [00:00:00.018,951] <inf> bt_hci_core: HCI: version 6.2 (0x10) revision 0x2020, manufacturer 0x0059
    [00:00:00.018,981] <inf> bt_hci_core: LMP: version 6.2 (0x10) subver 0x2020
    Bluetooth initialized
    Advertising successfully started
    [00:00:00.028,961] <err> bt_gatt: Unable to import the key for AES CMAC -134
    [00:00:00.102,935] <inf> udc_nrf: Reset
    [00:00:00.102,996] <inf> udc: ep 0x80 is not halted|disabled
    [00:00:00.103,027] <inf> udc_nrf: RESUMING from suspend
    Connected
    [00:00:22.549,224] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
    Disconnected, reason 0x13 
    Connection object available from previous conn. Disconnect is complete!
    Advertising successfully started
    Connected
    [00:01:00.380,340] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a
    Disconnected, reason 0x13 
    Connection object available from previous conn. Disconnect is complete!
    Advertising successfully started
    [Disconnected]


    What is the fix for thingy53/cpuapp/ns build with the default Kconfig “BT_LBS_SECURITY_ENABLED=y"?

    Is it a case that thingy53/cpuapp/ns build doesn't support BT_LBS_SECURITY_ENABLED?

    Thank you.

  • Hi,

    I am able to reproduce this issue. I am working on this and will get back to you with a response.

    -Priyanka

  • Hi Priyanka,

    Thank you. Do you have any updates?

    Regards,
    Ravi

Reply Children
Related