Build fails when enabling SQSPI in Device Tree (with MCUBoot)

Hi,
I’m seeing a build failure after enabling SQSPI in the device tree when building with MCUBoot on NCS v3.2.1 for nRF54L15.

The build works fine without SQSPI, but once it’s enabled the link step fails. 

In function 'nrf_sqspi_init',
    inlined from 'dev_init' at /opt/nordic/ncs/v3.2.1/nrf/drivers/mspi/mspi_sqspi.c:513:8:
/opt/nordic/ncs/v3.2.1/nrfxlib/softperipheral/sQSPI/src/nrf_sqspi.c:164:9: warning: 'memcpy' reading 14144 bytes from a region of size 12088 [-Wstringop-overread]
  164 |         memcpy((void *)vpr_init_pc, nvm_fw_addr, meta->fw_code_size << 4);
      |         ^
/opt/nordic/ncs/v3.2.1/nrfxlib/softperipheral/sQSPI/include/nrf54l/sqspi_firmware_v1.2.1.h: In function 'dev_init':
/opt/nordic/ncs/v3.2.1/nrfxlib/softperipheral/sQSPI/include/nrf54l/sqspi_firmware_v1.2.1.h:12:15: note: source object 'sqspi_firmware_bin' of size 12088
   12 | const uint8_t sqspi_firmware_bin[] = {
      |               ^
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /var/folders/1b/v55__bbd543bfrt51p0y5tq00000gp/T//ccXqqwuC.ltrans0.ltrans.o: in function `done_callback':
/Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /var/folders/1b/v55__bbd543bfrt51p0y5tq00000gp/T//ccXqqwuC.ltrans0.ltrans.o: in function `api_dev_config':
/Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1158: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1158: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /var/folders/1b/v55__bbd543bfrt51p0y5tq00000gp/T//ccXqqwuC.ltrans0.ltrans.o:/Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /var/folders/1b/v55__bbd543bfrt51p0y5tq00000gp/T//ccXqqwuC.ltrans0.ltrans.o:/Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /var/folders/1b/v55__bbd543bfrt51p0y5tq00000gp/T//ccXqqwuC.ltrans0.ltrans.o: in function `api_get_channel_status':
/Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1158: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /var/folders/1b/v55__bbd543bfrt51p0y5tq00000gp/T//ccXqqwuC.ltrans0.ltrans.o: in function `api_transceive':
/Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1158: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1175: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1158: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /var/folders/1b/v55__bbd543bfrt51p0y5tq00000gp/T//ccXqqwuC.ltrans0.ltrans.o: in function `dev_init':
/Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1141: undefined reference to `z_impl_k_sem_init'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1141: undefined reference to `z_impl_k_sem_init'
/opt/nordic/ncs/toolchains/561dce9adf/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/ghazifaisal/github/project/build/mcuboot/zephyr/include/generated/zephyr/syscalls/kernel.h:1141: undefined reference to `z_impl_k_sem_init'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[15/20] Generating ../dfu_application.zip
FAILED: _sysbuild/sysbuild/images/bootloader/mcuboot-prefix/src/mcuboot-stamp/mcuboot-build /Users/ghazifaisal/github/project/build/_sysbuild/sysbuild/images/bootloader/mcuboot-prefix/src/mcuboot-stamp/mcuboot-build 
cd /Users/ghazifaisal/github/project/build/mcuboot && /opt/nordic/ncs/toolchains/561dce9adf/Cellar/cmake/3.21.0/bin/cmake --build .
ninja: build stopped: subcommand failed.

Parents Reply Children
  • I configured the littlefs sample to use sQSPI and to include MCUBoot, but did not manage to reproduce the problem here.

    Memory layout 

    Log output 

    Ghazi-Faisal said:
    The errors I posted at the beginning of this thread were for SQSPI being enabled only in the application, not in the bootloader.

    I'm not sure what caused it, but the errors show the sQSPI being enabled in the bootloader. 

    Attached below is the modified sample I used for test. Please try it on your side to see if it works on your end as well.

    8054.littlefs.zip

Related