This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF5340 Multi image build with MCUBOOT + netboot

Short
Our project runs application code on the nrf5340 application core and a bt_mesh configuration on the network core.
Everything works as expected when we build as two separate projects and flash the two cores independently, but things break when we add multi-image build and bootloader support.

System:
-nRF5340
- nRFConnect SDK V1.5.0

Goal
The goal is to:

  1. Enable MCUBOOT with netboot support on the application core
  2. Enable netboot on the network core

Issues:

  1. Add multi-image configuration
    I have followed the steps outlined here: https://devzone.nordicsemi.com/f/nordic-q-a/72840/nrf5340-multi-image-example-configuration-help in order to enable multi image builds with our network core image as a child to our application core image.

    Result:
    Building the application core with this configuration will successfully produce images for both cores, but now settings subsys init fails on the network core:
    E: settings_subsys_init failed (err -37).

    I have not been able to resolve this issue. It seems like settings subsys will fail no matter what I don when multi image builds are enabled. Are there any examples I could look at to figure out how this is supposed to be done?
  2. Enable MCUBOOT for the application core
    I am enabling mcuboot by adding CONFIG_BOOTLOADER_MCUBOOT=y to our application core prj.conf file
    Result: Build is successful, and the application core bootloader correctly jumps to the loaded image. Settings are still failing on the network core.

  3. Enableing secure for the network core
    I am enabling secure boot on the network core by adding CONFIG_SECURE_BOOT=y to our network core prj.conf file and building with
    west build targets/nRF5340/cpuapp/ -d build/nrf5340_cpuapp/ --pristine -- -DZEPHYR_EXTENTIONS_DIR=c:/git/alpha/zephyr -Dmcuboot_CONFIG_PCD=y

    Result:Everything builds but the application core hangs after printing "Jumping to the first image slot" in the debug terminal.
    This problem seems to be related to the RPMSG service. Removing this disables functionality we need, but the cores seems to boot as expected.

  4. Removing RPMSG
    I am removing RPMSG by commenting out the following configurations from our network core and application core proj.conf files
    Network core Appication core
    CONFIG_IPM=y
    CONFIG_RPMSG_SERVICE=y
    CONFIG_RPMSG_SERVICE_MODE_REMOTE=y
    CONFIG_OPENAMP_MASTER=n
    CONFIG_IPM=y
    CONFIG_RPMSG_SERVICE=y
    CONFIG_RPMSG_SERVICE_MODE_MASTER=y
    CONFIG_OPENAMP_SLAVE=n

    Result:
    • Both cores boot.
    • The bootloader seems to handle application core uppdates correctly.
    • There are no images with net_core_ prefix in the build output folder
    • Flashing with a net_core image from nRF5340: Network core bootloader activates the net core bootloader

Summary

  • Enabeling multi-image build breakes the settings subsys on the network core
  • Enabeling secure boot on the network core breaks everything if RPMSG is enabled
  • net_core_ prefixed are not available as expected after building with secureboot(network core) + mcuboot(application core)

I have looked at the samples and documentation, but I have not been able to figure out what I am missing. Suggestions are most welcome.

  • Could you upload your application (or a simple project that demonstrates the issue), so I can reproduce the error "E: settings_subsys_init failed (err -37)" and try to get to the bottom of it.

    I can make the ticket private if you would like to.

Related