Error build compilation MPSL Enable with MCU_Boot or Secure BOOT

Hi,

I start a new project with nRF Connect SDK (i was using nRF5 SDK since 5 years).

For my device we are using a custom nrf52833 board with a fem skyworks66408, so i create my custom board and add an overlay to manage fem.

The fem is working with my board.

Then i wanted to add a bootloader on my device (MCU or Secure bootloader).

But when i add it i have compilation error (see file below)

FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/lib/multithreading_lock/lib..__nrf__lib__multithreading_lock.a(multithreading_lock.c.obj): in function `k_mutex_lock':
C:\Users\julf1\Bureau\Workspace\KFIR-3004\Repeteur\project\project_nrf52833\build\b0\zephyr\include\generated\syscalls\kernel.h:946: undefined reference to `z_impl_k_mutex_lock'
c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/lib/multithreading_lock/lib..__nrf__lib__multithreading_lock.a(multithreading_lock.c.obj): in function `k_mutex_unlock':
C:\Users\julf1\Bureau\Workspace\KFIR-3004\Repeteur\project\project_nrf52833\build\b0\zephyr\include\generated\syscalls\kernel.h:962: undefined reference to `z_impl_k_mutex_unlock'
c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a(mpsl_init.c.obj): in function `mpsl_low_prio_irq_handler':
C:\ncs\v2.4.1\nrf\subsys\mpsl\init\mpsl_init.c:61: undefined reference to `k_work_submit_to_queue'
c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a(mpsl_init.c.obj): in function `mpsl_low_prio_init':
C:\ncs\v2.4.1\nrf\subsys\mpsl\init\mpsl_init.c:280: undefined reference to `k_work_queue_start'
c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: C:\ncs\v2.4.1\nrf\subsys\mpsl\init\mpsl_init.c:284: undefined reference to `k_work_init'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[212/233] Linking C static library modules\hal_nordic\nrfx\libmodules__hal_nordic__nrfx.a
FAILED: modules/nrf/samples/b0_subimage-prefix/src/b0_subimage-stamp/b0_subimage-build b0/zephyr/zephyr.hex b0/zephyr/zephyr.elf 
[214/233] Linking C executable zephyr\zephyr_pre0.elf

If i disable bootloader my build succeed.

In the same time if I keep bootloader enable but i disable CONFIG_MPSL my build succeed too.

Are I missing something ? Like a configuration parameter for bootloader ?

Thanks in advance,

Regards,

Julien

Parents Reply
  • Nice!

    As MCUboot is a bootloader, you want it to be as small as possible and have as little complexity as possible. Therefore I suggest that you move all configurations needed only for the application to prj.conf.

    The board file then only has configurations which is relevant for the whole board.
    Alternativley, you can disable configurations inside child_image/mcuboot.conf, or use a little bit of both of these.

Children
No Data
Related