Before you start
-
Install and license the analyzer on the machine that runs Embedder, and make its command-line tool available on
PATH. - Enable the analyzer and open its settings. Enable an analyzer has the steps for VS Code and the terminal UI. These analyzers are off by default. If you run a workflow with a disabled analyzer, Embedder asks before it enables it.
- Set what your analyzer’s section below lists. In VS Code, the analyzer’s Setup list marks each item, such as a license or project setting, as Ready, Needed, or To verify.
-
Have the build ready. Analysis needs the same build inputs your firmware uses, such as a clean build command or a current
compile_commands.json.
Run an analysis
Run one of these commands in chat. Add instructions after the command to name the analyzer, standard, build, or scope.
For example:
/validate-MISRA and /validate-CERT analyze the whole project unless you list paths after the command, for example /validate-MISRA src/drivers.
To choose the analyzer, Embedder uses the one you name. Otherwise it prefers an enabled analyzer that is ready for the standard: Perforce QAC when its project, license, and module are ready, or Parasoft C/C++test when it’s ready with a licensed configuration for the standard. If neither is ready, /validate-MISRA uses cppcheck’s MISRA checks and /validate-CERT uses clang-tidy’s CERT checks, which don’t cover MISRA C++. Name Coverity to use that workflow.
Embedder asks before it changes shared settings, publishes results, adds suppressions, or excludes source.
Read the result
Each report separates:- the files and build configuration that were analyzed;
- setup errors, skipped files, and incomplete checks;
- automated findings, with exact counts by rule and file;
- requirements that need manual review;
- existing approved deviations or suppressions.
The Coverity, Parasoft, and QAC reports use their own status values, such as
STOPPED or NOT RUN, and explain them in the report.
A successful process exit is not enough. If capture was partial or a report is missing, Embedder marks the run incomplete instead of reporting a clean result.
Automated analysis supports a review. It does not establish MISRA compliance, CERT conformance, or certification by itself.
Remediate findings
- Choose a finding or module and ask for a focused fix.
- Repeat the same analysis and the relevant tests.
- Review any proposal to suppress a finding, exclude source, change shared rules, or publish results separately from the code fix.
cppcheck and clang-tidy
/validate-MISRA uses cppcheck and /validate-CERT uses clang-tidy when you name the analyzer, or when neither Perforce QAC nor Parasoft C/C++test is ready.
Neither analyzer checks MISRA C++. For MISRA C++, use Perforce QAC, Parasoft C/C++test, or Coverity.
To run the MISRA workflow with cppcheck:
- Install cppcheck with a working MISRA addon.
-
In
/static-analyzer, enable cppcheck. See Enable an analyzer. -
Set Compile database to the current
compile_commands.json. -
Ask for the run:
- Install clang-tidy.
-
In
/static-analyzer, enable clang-tidy. -
Set Compile database directory to the folder that contains
compile_commands.json. -
Ask for the run:
Coverity
Run/validate-coverity. Name the coding standard when you need one, such as MISRA C, AUTOSAR C++14, or CERT C.
Provide:
- the source revision and build variant;
- the clean build command and compiler configuration;
- where results should go: local reports only, or Coverity Connect.
Keep capture and analysis on the same source revision and tool version, and review the generated report before you rely on it. Local results go to
.embedder/reports/coverity by default.
Embedder creates local reports first. It publishes to Coverity Connect only when you approve. For setup questions, run /coverity-cli or /coverity-connect. To run a coding-standard analysis directly, run /coverity-compliance.
Parasoft C/C++test
Run/validate-parasoft and name the exact standard and edition. Embedder does not guess between editions. In the Parasoft settings, choose the matching Test configuration:
Your license must include the compliance pack for that configuration. Before the first run:
- Set License source. It starts as Not configured.
- Accept the Parasoft license agreement yourself by setting
parasoft.eula.accepted=truein your C/C++test properties. Embedder never accepts it for you. - Choose the Input scope that matches your project: compile_commands.json, Existing cpptest.bdf, Trace a clean build, or Single compile command. Analysis of a single compile command covers only that file, and the report says so.
.embedder/reports/parasoft by default. Embedder publishes to Parasoft DTP only when you approve.
The optional Parasoft C/C++test MCP server can look up rules and read existing reports. It does not replace running the analyzer. To set it up, run /parasoft-cpptest-mcp, or add it yourself as described in Add your own server.
Perforce QAC
The QAC workflow has five stages. The first two give you local reports. The last three need a Perforce Validate server.Set up QAC
Have these ready:- the controlled QAC project (its
prqaproject.xmlfile andprqadirectory); - the current build inputs;
- the standard and the analysis components it needs;
- your first-party source roots.
Then start setup in chat. In VS Code, you can also open Perforce QAC in the Static Analysis panel and select Set Up with Agent, or Continue with Agent once some setup checks are ready.
embedder qac readiness in a terminal at the project root. It prints JSON and exits with 1 when setup is missing something.
Analyze and report
Run/validate-qac and say what to analyze and report:
.embedder/reports/qac by default.
For questions about a specific part of QAC, use the bundled skills:
Connect to Perforce Validate
Publish QAC results to Perforce Validate when your team reviews findings, deviations, and baselines on a shared server. Turn on Connect to Validate (Share Results with Team under Team Sharing in VS Code), then set:
Embedder doesn’t store the token in the project configuration. Set the variable in the environment that runs Embedder:
embedder qac command. You can run it yourself, or Embedder runs it from chat. Every command prints JSON.
connect,upload,deviation, andbaselineare dry runs by default. They print the planned change. Add--yesto apply it.- Embedder sends the Validate token only when you pass
--serverwith the same origin as Validate server URL. A server URL in the repository settings alone can’t authorize sending the token. - When Embedder runs
embedder qacwith--server, or runsdeviationorbaselinewith--yes, it asks for your approval first. These approvals can’t be granted automatically, so background runs are denied.
embedder qac diagnostics with --server.
Record deviations and baselines
To accept a single finding, record a deviation. Give the Validate finding ID, whichembedder qac findings lists, a rationale, the risk, and how the risk is verified. Each text needs at least 10 characters.
--yes, this prints the planned deviation. Run it again with --yes to record it. Embedder then sets the finding’s status in Validate to Not a Problem, with your texts as its comment.
To accept all current findings of a build as known debt, approve a baseline. The build must be the latest one on Validate. Without --yes, Embedder saves a draft and prints its path and the number of findings it covers. Review the draft, then run the command again with --yes and the same build and rationale. With Approved baseline source set, Embedder also sets that QAC baseline.
.embedder/qac/.
Gate a release on QAC and hardware tests
Use the verification gate when a firmware build needs QAC results and hardware-in-the-loop (HIL) results that match the same sources. The gate compares the build’s findings with your approved baseline, so approve a baseline first. The build you gate must be the latest one on Validate.-
Record the firmware build.
embedder qac buildruns your build command and records digests of the sources and the firmware artifact. The command must only build the firmware, not flash it. It must rewrite the artifact file and finish within 10 minutes. -
Upload the same build to Validate.
-
Ask Embedder to run your HIL suite for that build and artifact as a hardware script. The script must load the firmware through GDB exactly once, on real hardware, and return each test’s name and result: passed, failed, or skipped. Embedder records the results under
.embedder/qac/hil/and reports the file’s path. Results you write yourself fail the gate. -
Run the gate. Add
--packto also create an evidence pack.
1, when any of these is true:
- The QAC analysis is incomplete, components were skipped, or compiler introspection was turned off or its errors ignored.
- The current sources don’t match the uploaded Validate build.
- The build has new required, mandatory, or unclassified findings.
- The HIL results are for a different build, sources, or artifact, have no passing test, or report failed or skipped tests.
.embedder/reports/verification/ as a folder and a .zip archive. It contains the QAC reports, deviations, baselines, and a verification summary. The gate also refreshes the qac-compliance dashboard, which you can open with embedder dashboard qac-compliance.
The evidence pack is a starting point for a review. Requirements traceability, coverage objectives, and certification need a separate assessment.