Skip to content

RTC setting script and Refactor: tools subpackage - #9

Merged
pwittich merged 5 commits into
mainfrom
refactor/tools-subpackage
Oct 26, 2026
Merged

pwittich merged 5 commits into
mainfrom
refactor/tools-subpackage

Conversation

@pwittich

@pwittich pwittich commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Script for setting MCU RTC (mcu_set_rtc)
Moves the command-line scripts out of the package root into a cm_interface.tools subpackage, with one shared set of command-line arguments. The RPM now installs a /usr/bin/cm-<name> launcher for each tool (for example cm-lga80d-dump and cm-clock-checks); from a checkout the tools still run directly as ./tools/NAME.py. Every tool takes --dev-path and --debug. Device tools take positional names or --all: dumps need one of the two, and checks default to every device. --out-dir writes one cm<boardid>_<name>.txt per entry and prints only the wrote lines; without it, everything is printed. Both check tools end with a device × check OK/FAIL summary. Breaking changes: the checks' --device option is replaced by positional names, cm-ff-status now needs names or --all, and --out-dir no longer also prints the dump. ff_status and mcu_set_rtc are now tracked, and the branch also carries additional Firefly12 register definitions (ca49039).

The scripts lived in the package root next to the library modules. They
now live in the cm_interface.tools subpackage:

- clock_checks, clock_dump, exercise_mcu, ff_status, lga80d_checks,
  lga80d_dump, lga80d_status, mcu_dump, mcu_set_rtc, vccint_2phase and
  examples move to tools/. ff_status and mcu_set_rtc were not tracked
  before and are added here.
- Each tool still runs directly from a checkout (./tools/NAME.py); the
  sys.path setup now goes two levels up. exercise_mcu's shebang is
  python3, since the boards have no `python`.
- The RPM installs tools/ into site-packages and generates a
  /usr/bin/cm-<name> launcher for each tool except vccint_2phase and
  examples. The RPM workflow runs `cm-mcu-dump --help` after install.
- Usage text and docs refer to the cm-* names.
tools/_common.py holds the shared conventions:

- Every tool takes --dev-path and --debug.
- Device tools take positional names or --all. Dumps (clock_dump,
  lga80d_dump, lga80d_status, ff_status) need one of the two; checks
  (clock_checks, lga80d_checks) default to every device. The checks'
  --device option is replaced by the positional names. ff_status names
  are locations (F1_1 selects both x12 halves).
- --out-dir writes cm<boardid>_<name>.txt per entry and stdout shows only
  the 'wrote' and result lines; without it everything is printed, and
  --all no longer requires --out-dir. lga80d_status and ff_status gain
  --out-dir; mcu_dump with --out-dir no longer also prints the dump.
- Both checks end with a device x check OK/FAIL table and an overall
  result. lga80d_checks' check functions now return per-device results;
  a cell fails only on a read failure, as before.
- board_info moves from lga80d_dump to _common.
@pwittich
pwittich force-pushed the refactor/tools-subpackage branch from 6dd8eb0 to 7086cb9 Compare October 26, 2026 15:42
@pwittich pwittich changed the title RTC setting and Refactor: tools subpackage RTC setting script and Refactor: tools subpackage Oct 26, 2026
@pwittich
pwittich merged commit 64260cf into main Oct 26, 2026
3 checks passed
@pwittich
pwittich deleted the refactor/tools-subpackage branch October 26, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant