Skip to content

"-s" slot argument is not working/getting rejected when "Slot0" or "Slot1" strings are in the given file path #39

@rasihonurolgun

Description

@rasihonurolgun

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

Result:
Image

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.
  • 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.

Image

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions