-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Explanation:
I had a unexpected behavior while I was trying to flash my device's two slots. Device has slot0 and slot1. While using mcumgr-client,
I am using:
-s 1
parameter to flash slot 0 of the device-s 2
parameter to flash slot 1 of the device
Problem:
Problem is, if you have "slot0" or "slot1" (case insensitive) in your file path (it can be on file name, or folder name etc.) it seems to ommit/reject the -s
parameter.
Example:
List of images currently on the device via using command: .\mcumgr-client.exe -d COM6 -b 921600 -t 5 list
I would like to flash the Slot 1 of the device to version 1.7.2 since both slots on the device should be flashed to same version.
-
String "slot1" in the file path:
- If I use this command,
.\mcumgr-client.exe -d COM6 -b 921600 -u 1000 -m 1024 upload -s 2 C:\DTA\technical\ROO_MCU\BRC1K_1.7.2\st-application-1.7.2-prod-slot1.bin
, it results in "Flashing to the slot 1 of the device". This is not correct, it should have said slot 2.
- If I use this command,
-
No "slot1" string in the file path:
-
If I use this command,
.\mcumgr-client.exe -d COM6 -b 921600 -u 1000 -m 1024 upload -s 2 C:\DTA\technical\ROO_MCU\BRC1K_1.7.2\st-application-1.7.2-prod-s1.bin
, it results in "Flashing to the slot 2 of the device". This is correct. The given slot argument is respected and used by the exe.

So, I had some unexpected behavior in the flashing part because of this issue. Either it should be documented somehow, or (in my opinion better choice) -s {slot_number}
should always be the source of truth if given.
Is there anything I am missing, or is this expected behavior ?