Hi Nordic,
We are planning to port our project from the nRF5 SDK to NCS v2.7.
Currently, we are using NCS v2.7 to build the firmware for our existing custom board based on the nRF52840. We need both the bootloader and the application to be updatable, so we chose the solution that includes NSIB (b0) + MCUBoot + app. We are using an out-of-tree project structure, and we have defined our custom board within the project folder. The project folder is structured as follows:
We successfully built the project using the following configuration in sysbuild.conf:
SB_CONFIG_BOOTLOADER_MCUBOOT=y
However, when we enable the following configurations:
SB_CONFIG_SECURE_BOOT_APPCORE=y SB_CONFIG_BOOTLOADER_MCUBOOT=y
we encounter the following error during the linking process:
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(log_core.c.obj): in function `arch_k_cycle_get_32':
/opt/nordic/ncs/v2.7.0/zephyr/include/zephyr/arch/arm/misc.h:26: undefined reference to `sys_clock_cycle_get_32'
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/kernel/libkernel.a(fatal.c.obj): in function `thread_name_get':
/opt/nordic/ncs/v2.7.0/zephyr/kernel/fatal.c:51: undefined reference to `k_thread_name_get'
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/kernel/libkernel.a(timeout.c.obj): in function `elapsed':
/opt/nordic/ncs/v2.7.0/zephyr/kernel/timeout.c:80: undefined reference to `sys_clock_elapsed'
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(mpsc_pbuf.c.obj): in function `k_sem_init':
/Users/tongli/Kinvent/kinvent_firmware/nRF_Connect_SDK/bootloader_test/build/b0/zephyr/include/generated/syscalls/kernel.h:1086: undefined reference to `z_impl_k_sem_init'
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(mpsc_pbuf.c.obj): in function `k_sem_take':
/Users/tongli/Kinvent/kinvent_firmware/nRF_Connect_SDK/bootloader_test/build/b0/zephyr/include/generated/syscalls/kernel.h:1103: undefined reference to `z_impl_k_sem_take'
/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(mpsc_pbuf.c.obj): in function `k_sem_give':
/Users/tongli/Kinvent/kinvent_firmware/nRF_Connect_SDK/bootloader_test/build/b0/zephyr/include/generated/syscalls/kernel.h:1120: undefined reference to `z_impl_k_sem_give'
collect2: error: ld returned 1 exit status
Did we miss any configurations that are necessary for this setup? We have attached the project files (bootloader_test.zip) for your reference.
Thank you in advance for your assistance.
Best regards,