thedjnK / AuTerm

AuTerm (for autonomous terminal) offers a free extensible feature rich terminal utility created in Qt
GNU General Public License v3.0
25 stars 7 forks source link

MCUBoot Serial Recovery reports "command not supported" after Image upload #33

Open butok opened 2 days ago

butok commented 2 days ago

AuTerm application reports "command not supported" after Upload via UART, for MCUBoot Serial Recovery.

Steps:

image

thedjnK commented 2 days ago

This is because test is ticked, that will mark the image for test after it has been updated, but serial recovery in MCUboot (by default) does not have support for the image state set command, see https://github.com/mcu-tools/mcuboot/blob/main/boot/zephyr/Kconfig.serial_recovery#L199 as it will upload directly to the primary slot, not the secondary slot, which means the image is confirmed already

butok commented 2 days ago

OK. Same with set the confirm flag: image

thedjnK commented 2 days ago

Yes, test/confirm are setting the image state (only difference is confirm has the confirm option but they are the same command), you can enable the Kconfig for MCUboot to use them but there's no point because it loads to the primary slot and the primary slot is always confirmed when you do a firmware update directly there (only reason to use it would be if you enable the Kconfig for supporting the slot number as then you can upload to the secondary slot), so for MCUboot you can leave it at No action

butok commented 2 days ago

Understand. Just a strange information message, if no action: image

thedjnK commented 2 days ago

I'll add some more debug for that as the issue is not addressed after all. How long does it take to upload that file to your device, less than 1 second?

butok commented 2 days ago

I'll add some more debug for that as the issue is not addressed after all. How long does it take to upload that file to your device, less than 1 second?

<1 second

butok commented 2 days ago

BTW: Is it possible to add more information "what exact command" is not supported to the "command is not supported" message?

thedjnK commented 2 days ago

I'll add some more debug for that as the issue is not addressed after all. How long does it take to upload that file to your device, less than 1 second?

<1 second

You have the fastest device/upload using MCUmgr I've ever seen

Give this a try, should fix the wrong speed message and tell you set image state is not supported: https://github.com/thedjnK/AuTerm-Build/actions/runs/11969635739

butok commented 2 days ago

I'll add some more debug for that as the issue is not addressed after all. How long does it take to upload that file to your device, less than 1 second?

<1 second

You have the fastest device/upload using MCUmgr I've ever seen

Give this a try, should fix the wrong speed message and tell you set image state is not supported: https://github.com/thedjnK/AuTerm-Build/actions/runs/11969635739

thedjnK commented 1 day ago

Should check things before pushing, will post once build finishes

thedjnK commented 1 day ago

https://github.com/thedjnK/AuTerm-Build/actions/runs/11974437712 should fix it

butok commented 1 day ago

https://github.com/thedjnK/AuTerm-Build/actions/runs/11974437712 should fix it

Fixed. Thank you.