Add USB DFU serial recovery to BLE SMP server example

Hello there,

I am using NCS Toolchain 2.6.20240605.885759407716 

I am trying to configure a project with following Firmware Update specs:

- Target MCU is NRF5340, no external flash on our project.

- BLE SMP server for both core (extracted from peripheral LBS example with added DFU from Nordic Academy).

- I successfully added serial recovery over UART (I could do the firmware upgrade both through BLE and recovery).

When I try to change serial recovery from UART to USB ACM, I am getting error when linking MCUBOOT:

 

FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/esw/tap/tap/test/integration/dfu_smp_test/build/mcuboot/zephyr/zephyr_pre0.map
c:/esw/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/kernel/libkernel.a(queue.c.obj): in function `z_thread_malloc':
C:/esw/tap/zephyr/kernel/include/kernel_internal.h:107: undefined reference to `z_thread_aligned_alloc'
c:/esw/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr/kernel/libkernel.a(queue.c.obj): in function `z_queue_node_peek':
C:/esw/tap/zephyr/kernel/queue.c:45: undefined reference to `k_free'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I also customized the pm_static.yml file to increase bootloader region (and keep all partition in internal flash).

I can easily build and run serial recovery over USB example, and BLE smp server examples, but I am unable to 'merge' these together.

How can I get this to work ? 

Thanks a lot

dfu_smp_test.zip

Related