Hi!
I'm working with the nrf52840 custom board, porting working project (tested on the ncs 1.4.1) to the ncs 1.7.1. As we are using several board variations for the same project, each board has a separate board_name_defconfig file, containing configs for that board, while all common configs are located in the main prj.conf file.
I have a problem building project with MCUBoot, resulting in error:
[17/211] Performing build step for 'mcuboot_subimage' [1/8] Linking C executable zephyr\zephyr_prebuilt.elf FAILED: zephyr/zephyr_prebuilt.elf zephyr/zephyr_prebuilt.map C:/Repos/my_project/build/mcuboot/zephyr/zephyr_prebuilt.map cmd.exe /C "cd . && C:\Users\Eva\ncs\v1.7.1\toolchain\opt\bin\arm-none-eabi-gcc.exe zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -o zephyr\zephyr_prebuilt.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -Wl,-T zephyr/linker_zephyr_prebuilt.cmd -Wl,-Map=C:/Repos/my_project/build/mcuboot/zephyr/zephyr_prebuilt.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/lib/posix/liblib__posix.a zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/spi/libdrivers__spi.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/serial/libdrivers__serial.a modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/segger/libmodules__segger.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L"c:/users/eva/ncs/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v7e-m+fp/hard" -LC:/Repos/my_project/build/mcuboot/zephyr -lgcc zephyr/arch/common/libisr_tables.a C:/Users/Eva/ncs/v1.7.1/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.11.a -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -no-pie -Wl,-X -Wl,-N -Wl,--orphan-handling=warn C:/Users/Eva/ncs/v1.7.1/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a && cmd.exe /C "cd /D C:\Repos\my_project\build\mcuboot\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -E echo "" c:/users/eva/ncs/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr/drivers/spi/libdrivers__spi.a(spi_nrfx_spi.c.obj): in function `k_sem_give': C:/Repos/my_project/build/mcuboot/zephyr/include/generated/syscalls/kernel.h:841: undefined reference to `z_impl_k_sem_give' c:/users/eva/ncs/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:/Repos/my_project/build/mcuboot/zephyr/include/generated/syscalls/kernel.h:841: undefined reference to `z_impl_k_sem_give' c:/users/eva/ncs/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr/drivers/spi/libdrivers__spi.a(spi_nrfx_spi.c.obj): in function `k_sem_take': C:/Repos/my_project/build/mcuboot/zephyr/include/generated/syscalls/kernel.h:826: undefined reference to `z_impl_k_sem_take' c:/users/eva/ncs/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr/drivers/spi/libdrivers__spi.a(spi_nrfx_spi.c.obj): in function `k_sem_give': C:/Repos/my_project/build/mcuboot/zephyr/include/generated/syscalls/kernel.h:841: undefined reference to `z_impl_k_sem_give' c:/users/eva/ncs/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr/drivers/spi/libdrivers__spi.a(spi_nrfx_spi.c.obj): in function `k_sem_take': C:/Repos/my_project/build/mcuboot/zephyr/include/generated/syscalls/kernel.h:826: undefined reference to `z_impl_k_sem_take' collect2.exe: error: ld returned 1 exit status
However, if I remove CONFIG_SPI from board_name_defconfig file and just have it in the prj.conf file the problem disappears.
Why is CONFIG_SPI causing problems when placed in that folder? Am I missing something?
Thank you for your help in advance!