nRF5340 netcore update

Hi:

Currently I am testing to upgrade dual core application on nRF5340 DK, NCS version is V2.0.0.

The two core applications are written by myselves, not based on NCS routines, and the related codes of MCUboot (bootloader of appcore) and B0n (bootloader of netcore) have not been changed.

A spi flash is plugged in on the nRF5340 DK and made sure that the application can access it.

According to the "Working with nRF5340 DK" documentation, "CONFIG_BOOTLOADER_MCUBOOT" and "PARTITION_MANAGER_ENABLED" are enabled in appcore's app.conf, and support for SPI flash is also enabled.

In mcuboot.conf, "CONFIG_BOOT_UPGRADE_ONLY" and "CONFIG_PCD_APP" are enabled, and "CONFIG_UPDATEABLE_IMAGE_NUMBER=2" is set.

My firmware upgrade plan is to place the upgrade package in the "mcuboot_secondary" and "mcuboot_secondary_1" areas of the spi flash, then call "boot_request_upgrade_multi(x, BOOT_UPGRADE_TEST)" in the appcore program to request the firmware upgrade, then reset the nRF5340 DK, and wait The result of the firmware upgrade.


Among them, the upgrade package of appcore is ~/build/zephyr/app_update.bin, and the upgrade package of netcore is ~/build/cpunet/zephyr/signed_by_b0_app.bin (there is no file starting with core_net_xxx in my project, it may be me manually added the netcore subimage in the CMakeLists.txt file).

I can now upgrade the appcore app alone, but when I upgrade the netcore app alone, I'm running into a problem that I can't upgrade. After I press the reset button on the nRF5340 DK, netcore still prints the log information for the old firmware.


I would like to confirm the following points:


1. The "x" in "boot_request_upgrade_multi(x, BOOT_UPGRADE_TEST)" is 0 to upgrade appcore and 1 to upgrade netcore, right? What is the value of the dual core upgrade together?

2. I don't see any files starting with "core_net_xxx", why is this, do I need to manually change the signed_by_b0_app.bin name to core_net_xxx.bin?
3. Is the upgrade firmware name of netcore signed_by_b0_app.bin, I just need to convert this file into a C language array and download it to the "mcuboot_secondary_1" area, then I can call "boot_request_upgrade_multi(1, BOOT_UPGRADE_TEST)" to request the netcore firmware upgrade?
4. In the "Working with nRF5340 DK" document, I see that dual-core upgrade does not support the firmware rollback of netcore, but I can't rollback the firmware of appcore, even though the type of upgrade I request is "BOOT_UPGRADE_TEST", why is this? why is that?

Attached is the project I used for testing.
Open this project with the nRF Connect for VS Code plugin, select the nRF5340dk_nrf5340_cpuapp board level file, and finally build it.
Appcore applications, in the corresponding CMakelists.txt can be seen in ~/src/main.c, netcore in ~/cpunet/src/main.c

Parents Reply Children
No Data
Related