`otp get`: device selection given after the row/field selector is silently ignored

Open Beginner friendly
#371 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
cli

Research direction

Start by reading the otp get command’s argument parsing and compare it with the otp load, otp white-label, and otp set examples named in the issue. Reproduce with two RP2350 devices in BOOTSEL, then check that selection options placed after the row or field selector are honored or rejected clearly. Done means both --bus/--address and --ser behave consistently.

Written by the indexing model from the issue text.

Description

Title

otp get: device selection given after the row/field selector is silently ignored

Body

Environment

picotool v2.3.1 (Linux), two RP2350s in BOOTSEL on the same host.

Steps to reproduce
$ picotool otp get --raw OTP_DATA_BOOTKEY0_0 --bus 1 --address 49
ERROR: Command requires a single RP-series device to be targeted.        # exit 248

$ picotool otp get --raw --bus 1 --address 49 OTP_DATA_BOOTKEY0_0
    VALUE 0x2cd845                                                       # works

$ picotool otp get -n OTP_DATA_BOOT_FLAGS1.KEY_VALID --bus 1 --address 49
ERROR: Command requires a single RP-series device to be targeted.

--ser behaves the same way.

Expected

Either the selection is honoured wherever it appears, as it is for otp load FILE --ser …, otp white-label … --ser … and otp set ROW VALUE --ser …, or the command rejects the stray options.

Actual

The device-selection options after the selector are dropped without a warning. That only shows up once a second device is connected: the same command line works with one device and fails with two. Scripts that ran fine on a single-board bench break in the field.

Dominant language
C++
Stars
1k
Forks
199
Avg merge
7d 18h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/picotool

All issues in raspberrypi/picotool

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.