Skip to content

Taccl section 5 - #58

Open
Shama Zabeen Shaik (Shama-zabeen-shaik) wants to merge 7 commits into
qualcomm:mainfrom
bryantf-qc:taccl-section-5
Open

Taccl section 5#58
Shama Zabeen Shaik (Shama-zabeen-shaik) wants to merge 7 commits into
qualcomm:mainfrom
bryantf-qc:taccl-section-5

Conversation

@Shama-zabeen-shaik

Copy link
Copy Markdown

Implements Section 5 (State Controls) from docs/taccl-plan.md as a standalone Qt-free CLI under tools/taccl/.

  • All 17 Section 5 subcommands wired up via a table-driven dispatcher.
  • Standalone CMake project; links only against TACDev, uses CLI11 and nlohmann/json fetched via FetchContent.
  • Device open by --device / --serial (plus TACCL_DEVICE / TACCL_SERIAL env vars), human and JSON output, exit codes per the plan doc.
  • Verified live against the Qt build of TACDev.dll (QTAC 5.5.2 / TAC 7.0.1): --version, --help, error paths, JSON output, argument validation all pass.
  • Sections 1-4, 6-9 not implemented yet; scaffolding is in place so each remaining section is a small follow-up.

See tools/taccl/README.md and tools/taccl/QUICKSTART.md for build and demo instructions.

Change-Id: I9ade38974c52f7967c1c87438bf9e7bbfa81b697
Standalone command-line frontend for TACDev.dll implementing Section 5 of docs/taccl-plan.md. Builds as a separate CMake project under tools/taccl/, links only against TACDev (no Qt inside the CLI), and uses CLI11 + nlohmann/json fetched via CMake FetchContent. Covers all 17 Section 5 subcommands via a table-driven dispatcher, plus device-open helpers (--device / --serial / TACCL_DEVICE / TACCL_SERIAL), human and JSON output, and plan-doc-aligned exit codes. See tools/taccl/README.md and tools/taccl/QUICKSTART.md for build and demo instructions.
- Device.cpp: call enumerateDevices() unconditionally in resolvePortName()
  so GetDeviceCount() always runs before OpenHandleByDescription(). TACDev
  requires this to populate its internal device list; without it the open
  silently fails regardless of whether the device is present.

- main.cpp: suppress MSVC debug CRT "Abort/Retry/Ignore" dialogs via
  _CrtSetReportMode so test runs are non-interactive even on debug builds.

- test_baseline.py: 71-case baseline suite covering tool-level flags,
  error paths, state queries for all 15 controls, round-trip set/get,
  set-only commands, JSON output validation, and env-var device selection.
  Sets SetErrorMode to suppress OS crash dialogs from child processes.
  Sets cwd=<exe_dir> on subprocesses to ensure Windows DLL search works.

- probe.cpp: standalone enumeration/open diagnostic used to isolate the
  Device.cpp bug; retained as a debug tool.

- do_build.bat: update VS path from 2019 to 2022 BuildTools to match
  Qt 6.11.1 which requires MSVC >= 19.30.

Change-Id: I324d65583c5bb90210bfd9aa8f73d0d3fed73f59
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- QuickCommands.h/.cpp: implements `taccl quick-commands --device=<port>`
  using GetQuickCommandCount / GetQuickCommand. Outputs one name per line
  (human) or a JSON array (--json). Supports --quiet, --device, --serial,
  and TACCL_DEVICE / TACCL_SERIAL env fallbacks. Error paths: missing
  device → exit 3, device not found → exit 2, TACDev failure → exit 4.

- main.cpp: register QuickCommands, bump version to 0.2.0.

- CMakeLists.txt: add QuickCommands.cpp / .h to executable sources.

- test_baseline.py: Section 8 with 7 new cases covering --help, text/JSON/
  quiet output, bad port (text + JSON), and missing device.

Change-Id: I68652f87eda8d478e534a2ffa63aad731d411f35
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements all remaining sections from docs/taccl-plan.md:

- Section 1 (DeviceList.cpp): `list` – enumerate TAC devices
- Section 2 (DeviceList.cpp): `version` – QTAC/TAC version subcommand
- Section 3 (DeviceList.cpp): `info` – device name, firmware, hardware,
  uuid, reset-count (individual filter flags or all by default)
- Section 4 (DeviceList.cpp): `set` – rename device, clear reset counter
- Section 6 (BootSequences.cpp): `boot --mode=<mode>` – power-on/off,
  fastboot, uefi, edl, secondary-edl
- Section 8 (ScriptVars.cpp): `vars` / `var` – list or get/set script
  variables (semicolon-delimited raw format parsed correctly)
- Section 9 (Utility.cpp): `help-text`, `queue-clear`, `logging`

Also fixes:
- Device.cpp: GetPortData return value is byte count, not error code
  (was silently skipping all entries in enumerateDevices/list)
- Device.cpp: parsePortData was reading description as serial; correct
  field order is port;description;serial;flags

Baseline: 156 tests, all passing against COM16 PSOC device.

Change-Id: I12d3e01a5805147e855d5c0f8b89a8d7087945d1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Biswajee

Copy link
Copy Markdown
Member

Shama Zabeen Shaik (@Shama-zabeen-shaik), could we use the latest plan as the basis for preparing the CLI? It would also be great to move the application into the existing project structure (src/applications) 🙂

We’d also like to keep one file in src/application/taccl, ideally a readme to guide users on CLI usage.

The project build steps and dependencies are already covered in the existing documentation. Please also update the CMakeLists.txt so it works with the single step build workflow.

Extends test_baseline.py with 79 FTDI-specific test cases (section F)
covering state queries, round-trip set/get, info, commands, quick-commands,
vars, help-text, queue-clear, and env-var device path. Adds --ftdi-device
CLI argument so existing PSoC-only invocations are unaffected.

Updates taccl_baseline_a_only.json with the new FTDI results against VTP1
(FT9BLNN7, platform 13 / generic ALPACA LITE).

Change-Id: Ic595cfa2ff9e94499d73a1858ca47e77b69587c8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-F12)

Change-Id: Iee567ab803d63ccdc35d5898113e7c30e8d253e2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

3 participants