Unable to build MCU boot with Mcumgr with custom board

I'm trying the Add DFU support to your application tutorial. The code is running well when I use the nrf52833dk board. However, when I put my custom board config I get the following errors

[0/249] Performing build step for 'mcuboot_subimage'
[1/34] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
[2/34] Building C object zephyr/CMakeFiles/zephyr.dir/opt/nordic/ncs/v2.3.0/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
[3/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
[4/34] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
[5/34] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map_layout.c.obj
[6/34] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
[7/34] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
[8/34] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
[9/34] Building C object CMakeFiles/app.dir/main.c.obj
[10/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
[11/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
[12/34] Linking C static library modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a
[13/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
[14/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/loader.c.obj
[15/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/swap_misc.c.obj
[16/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/swap_move.c.obj
[17/34] Building C object CMakeFiles/app.dir/opt/nordic/ncs/v2.3.0/bootloader/mcuboot/boot/bootutil/src/swap_scratch.c.obj
[18/34] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
[19/34] Linking C static library zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a
[20/34] Generating linker_zephyr_pre0.cmd
[21/34] Generating linker_zephyr_pre1.cmd
[22/34] Linking C static library app/libapp.a
[23/34] Linking C static library zephyr/libzephyr.a
[24/34] Linking C executable zephyr/zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
: && ccache /opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  -fuse-ld=bfd  -Wl,-T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/zephyr_pre0.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/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/adc/libdrivers__adc.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/timer/libdrivers__timer.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/mbedtls/libmodules__mbedtls.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/thumb/v7e-m/nofp"  -L/Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -no-pie  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn && cd /Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr && /opt/nordic/ncs/toolchains/v2.3.0/Cellar/cmake/3.20.5/bin/cmake -E echo
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/adc/libdrivers__adc.a(adc_nrfx_saadc.c.obj): in function `k_sem_take':
/Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:1072: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:1072: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/adc/libdrivers__adc.a(adc_nrfx_saadc.c.obj): in function `k_sem_give':
/Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:1089: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/adc/libdrivers__adc.a(adc_nrfx_saadc.c.obj): in function `k_sem_take':
/Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:1072: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/drivers/adc/libdrivers__adc.a(adc_nrfx_saadc.c.obj): in function `k_sem_give':
/Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:1089: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:1089: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /Users/nilslahaye/Documents/Git/iot_obj-sicro-sensor/code/broadcaster/build_1/mcuboot/zephyr/include/generated/syscalls/kernel.h:1089: undefined reference to `z_impl_k_sem_give'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/kernel/libkernel.a(poll.c.obj): in function `signal_poller':
/opt/nordic/ncs/v2.3.0/zephyr/kernel/poll.c:278: undefined reference to `z_unpend_thread'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /opt/nordic/ncs/v2.3.0/zephyr/kernel/poll.c:286: undefined reference to `z_ready_thread'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/kernel/libkernel.a(poll.c.obj): in function `signal_triggered_work':
/opt/nordic/ncs/v2.3.0/zephyr/kernel/poll.c:617: undefined reference to `z_work_submit_to_queue'
/opt/nordic/ncs/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/kernel/libkernel.a(poll.c.obj): in function `z_impl_k_poll_signal_raise':
/opt/nordic/ncs/v2.3.0/zephyr/kernel/poll.c:548: undefined reference to `z_reschedule'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[1/249] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf 

Zephyr version: 3.2.9

SDK version v2.3.0

west version 0.14.0

Related