This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrfutil application version string inconsistent with help

In implementing the --application-version-string with nrfutil I found the help was inconsistent with the application.

The help for this option is:

 --application-version-string TEXT
                                  The application version string, e.g.
                                  "2.7.31". Will be converted to an integer,
                                  e.g. 207031.

In the example 2.7.31 is to be converted to 207031, but it is actually converted to 20731.

Even stranger, when I try 2.7.131, the version number output is 20831. So you can see the the 7 part is added to the one hundred of the following part.

Is this a bug or just incorrect documentation?

Parents
  • Hello,

    I believe this is actually a typo (and possibly a bug). The range for a, b and c in --application-version-string "a.b.c" is 0-99, not 0-999. So it should have said in the description:

     --application-version-string TEXT
                                      The application version string, e.g.
                                      "2.7.31". Will be converted to an integer,
                                      e.g. 20731.

    or possibly even "020731".

    Looking at the output from nrfutil pkg display, the hex value for the application version is consistent with 2 digits for a, b and c.

    At least I haven't found any testing saying that there is any errors when using 0-99. Have you?

    The possible bug I see is that it should warn you if you use a number higher than 99, because the first 1 from 131 is added to the number before:

    02 . (07 + 1) . 31.

    I haven't looked at the source code for this, but it looks like this is what's happening. I'll forward this to the team that develop our nrfutil tools. Thank you for reporting!

    Best regards,

    Edvin

  • Thanks for clarifying this and forwarding on to the nrfutil dev team Edvin!

Reply Children
No Data
Related