This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MCUBoot for nrf5340 netcore

Hello Nordic Community,

I am currently following the SMP guide provided here: https://docs.zephyrproject.org/latest/samples/subsys/mgmt/mcumgr/smp_svr/README.html

The examples are oriented towards the nrf52 boards, but I am currently working with the nrf5340_pdfk which contains the two cores (app and net). I was successfully able to build the MCUBoot for the appcore and flash the appcore with the MCUBoot. It seems to be working with the hello world example.

```

*** Booting Zephyr OS build v2.4.0-ncs1-1-ga3a6410b55fa  ***
[00:00:00.385,620] <inf> mcuboot: Starting bootloader
[00:00:00.391,815] <inf> mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
[00:00:00.401,916] <inf> mcuboot: Boot source: none
[00:00:00.407,409] <inf> mcuboot: Swap type: none
[00:00:00.494,567] <inf> mcuboot: Bootloader chainload address offset: 0x10000
[00:00:00.502,410] <inf> mcuboot: Jumping to the first image slot
*** Booting Zephyr OS build v2.4.0-ncs1-1-ga3a6410b55fa  ***
Hello World from Zephyr on nrf5340pdk_nrf5340_cpuapp!

```

I am able to successfully build the MCUBoot for the netcore utilizing the -b nrf5340pdk_nrf5340_cpunet during the west build procedure. But during the flash of the MCUBoot image to the flash area of the netcore, it says that the region is not empty, meaning the previous erase command was not successful. I have tried with nrfjprog --eraseall but this yields the same results with flash failing due to a non empty target address.

Possibly, the MCUBoot (and OTA DFU) is only possible for the main app core?

So is it possible to utilize mcumgr for the netcore on nrf5340?

If anyone could give more guidance on how to do MCUBoot and effectively the SMP/mcumgr/OTA DFU on the netapp core, it would be much appreciated.


Thank you for your support,

Parents
  • Thank you for the reference to netboot. This is what I was missing.

    During the build of child netboot image, I am receiving an error about undefined PM PCD SRAM

    ```

    error: 'PM__PCD_SRAM_ADDRESS' undeclared here

    ```

    I am rebuilding my environment currently, but is there a specific version/commit of zephyr, nrf-sdk, and netboot that have strict version compatibility? Or does the user have to define the SRAM in the pm.yml ?

    Should it be that if user wants to include the netboot, only requirement is the CONFIG_IS_SECURE_BOOTLOADER needs to be enabled on the netcore prj config?

    PCD (Peripheral CPU DFU) seems to be enabled by default when SECURE BOOTLOADER is enabled.

    - developer.nordicsemi.com/.../CONFIG_PCD.html

    Thank you for your guidance and apologies for the minimal error output. I will try to append when available. Slight smile

    * when the sample in a fresh clone of nrf conneck sdk (master) is built ie (bluetooth/peripheral) with netboot enabled, it seems to build fine. so i am thinking it is my environment having the incorrect versions of repos.

  • Have you remembered to run west update from <ncs location>/nrf? If you are checking out a different tag/commit in the nrf repo you should always run west update right after, which should get the correct versions of all the repos specificed by <ncs location>/nrf/west.yml

    Best regards,

    Simon

Reply Children
No Data
Related