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.