firmware update using mcumgr displays information for only slot 0 and not slot 1. #36943
Replies: 17 comments
-
Can you check whether the DTS correctly labels slot0_partition parition as "image-0" and slot1_partition as "image-1"? |
Beta Was this translation helpful? Give feedback.
-
Hi, As far as I know, enabling CONFIG_BOOTLOADER_MCUBOOT configures smp_server. &flash0 {
}; confugration file.CONFIG_PRINTK=y
|
Beta Was this translation helpful? Give feedback.
-
What is the SHA of modules/lib/mcumgr you are using? |
Beta Was this translation helpful? Give feedback.
-
name: mcumgr |
Beta Was this translation helpful? Give feedback.
-
Inside your build directory, can you check file
inside Does the file |
Beta Was this translation helpful? Give feedback.
-
I have added .config and zephyr.dts file for both MCU BOOT and Application. zephyr/zephyr.dts for MCU BOOT/ { zephyr/zephyr.dts for Application./ { zephyr/.config for MCU BOOTCONFIG_HAS_FLASH_LOAD_OFFSET=y zephyr/.config for ApplicationCONFIG_HAS_FLASH_LOAD_OFFSET=y confugration file for MCUBOOT.CONFIG_CONSOLE=n confugration file for Application.CONFIG_PRINTK=y |
Beta Was this translation helpful? Give feedback.
-
Hi, isn't this error caused by mcumgr communicating with mcuboot directly (and not smp_srv) ? |
Beta Was this translation helpful? Give feedback.
-
Yes, I checked the config file and its not configured as smp_server. Is it necessary to be configured as smp_server? |
Beta Was this translation helpful? Give feedback.
-
Where do you upload the software, to the mcuboot serial recovery or to an application? |
Beta Was this translation helpful? Give feedback.
-
I upload the software to an mcuboot serial recovery. |
Beta Was this translation helpful? Give feedback.
-
@khalidjmi1200, mcuboot serial recovery has limited functionality and will upload to slot0. In a "normal" operation mode your application (running smp_server) is responsible for uploading to slot1. Then mcuboot will do the move to slot0 |
Beta Was this translation helpful? Give feedback.
-
It is not mcumgr problem, mcumgr library is not used by mcuboot. This is not a bug. |
Beta Was this translation helpful? Give feedback.
-
@khalidjmi1200 I agree with de-nordic, this is not a bug. What you could say is that mcumgr should not respond to the |
Beta Was this translation helpful? Give feedback.
-
I should have specified that "this is not a bug" in Zephyr or modules/lib/mcumgr. I do not know whether it could be considered bug in mcuboot, as mcuboot does implement the |
Beta Was this translation helpful? Give feedback.
-
Btw, the mcumgr command line tool, unless |
Beta Was this translation helpful? Give feedback.
-
Hi @de-nordic and @Laczen, Thanks for your prompt reply. I will investigate the way to communicate through smp_server from the other device. I will let you know. |
Beta Was this translation helpful? Give feedback.
-
@khalidjmi1200 Can you convert the issue into discussion, so that it would not be hanging over our heads as a bug? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
when command mcumgr -c TTYMXC2 image list is issued from the mcumgr info for only slot 0 is displayed
bootable: false
flags:
hash: Unavailable
Above given flags are also not correct. I have primary and secondary partition.
To Reproduce
Steps to reproduce the behavior:
Images:
image=0 slot=0
version: 0.0.0.0
bootable: false
flags:
hash: Unavailable
Expected behavior
Images for slot 0 and slot 1 should be displayed.
Images:
image=0 slot=0
version: 0.0.0.0
bootable: true
flags:
hash: Unavailable
image=0 slot=1
version: 0.0.0.0
bootable: true.
flags:
hash: Unavailable
Impact
showstopper
Logs and console output
command executed from mcumgr
mcumgr conn add TTYMXC2 type="serial" connstring='dev=/dev/ttymxc2,baud=115200'
mcumgr conn show TTYMXC2mcumgr -c TTYMXC2 image list
mcumgr -c TTYMXC2 image upload /home/root/user_data/settings/zephyr.signed.bin -e -t 30
mcumgr -c TTYMXC2 image list
mcumgr -c TTYMXC2 reset
Output for Upload process.
Connection profile TTYMXC2 successfully added
Connection profiles:
TTYMXC2: type=serial, connstring='dev=/dev/ttymxc2,baud=115200'
Images:
image=0 slot=0
version: 0.0.0.0
bootable: false
flags:
hash: Unavailable
Split status: N/A (0)
21.03 KiB / 21.03 KiB [==============================================================================================================================================================] 100.00% 879 B/s 24s
Done
Images:
image=0 slot=0
version: 1.7.0.0
bootable: false
flags:
hash: Unavailable
Split status: N/A (0)
configuration file for MCU BOOT APPLICATION
CONFIG_PRINTK=y
CONFIG_STDOUT_CONSOLE=y # std::cout and printf output...
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_3" # ...goes to UART_3CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="bootloader/mcuboot/root-rsa-2048.pem"# Enable mcumgr.
CONFIG_MCUMGR=y# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048# Enable flash operations.
CONFIG_FLASH=y# Enable most core commands.
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
Additional context
Upload process is completed successful but it always uploads to slot 0 and never to slot 1. So if upload process is interrupted, then MCU can not reboot.
Beta Was this translation helpful? Give feedback.
All reactions