Repository navigation
RTC setting script and Refactor: tools subpackage - #9
Merged
Merged
Conversation
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
force-pushed
the
refactor/tools-subpackage
branch
from
October 26, 2026 15:42
6dd8eb0 to
7086cb9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Script for setting MCU RTC (
mcu_set_rtc)Moves the command-line scripts out of the package root into a
cm_interface.toolssubpackage, with one shared set of command-line arguments. The RPM now installs a/usr/bin/cm-<name>launcher for each tool (for examplecm-lga80d-dumpandcm-clock-checks); from a checkout the tools still run directly as./tools/NAME.py. Every tool takes--dev-pathand--debug. Device tools take positional names or--all: dumps need one of the two, and checks default to every device.--out-dirwrites onecm<boardid>_<name>.txtper entry and prints only thewrotelines; without it, everything is printed. Both check tools end with a device × check OK/FAIL summary. Breaking changes: the checks'--deviceoption is replaced by positional names,cm-ff-statusnow needs names or--all, and--out-dirno longer also prints the dump.ff_statusandmcu_set_rtcare now tracked, and the branch also carries additional Firefly12 register definitions (ca49039).