DevOps setup guide

Parasoft C++test +
TI Arm Clang Compiler

MISRA C 2025 & Flow Analysis Setup Guide for DevOps

TI Arm Clang 5.1.0.LTS · Parasoft C++test Standard 2026.1.2 · MISRA C 2025

← Swipe to navigate →
Prerequisites

What You Need Before You Start

ItemExample
Parasoft C++test Standard installedC:\Projects\...\cpptest\
TI Arm Clang compiler installed...\ti-cgt-armllvm_5.1.0.LTS\bin\tiarmclang.exe
DTP / License Server runninghttps://<dtp-host>:8443 (admin/admin)
Your C project source filesAny .c/.h project
tiarmclang.exe --version  →  "TI Arm Clang Compiler 5.1.0.LTS, Target: arm-ti-none-eabi"
Test-NetConnection -ComputerName <dtp-host> -Port 8443
Compiler strategy

TI Arm Clang is NOT on the Supported Compiler List

Parasoft C++test ships approximately 45 supported compiler configurations. tiarmclang is LLVM/Clang-based and is not one of them.

Config IDTargetsWorks with tiarmclang?
tiarm_20_2Legacy TI armcl (EDG-based, uses -fc=, -fr=)NO — wrong flag syntax
tiarmgcc_7TI ARM GCC 7.x (GCC/Clang-style: -c, -I, -std)YES — Clang accepts same flags
Solution: Use tiarmgcc_7 as the compiler family
Step 1

Configure License & DTP Settings

parasoft.eula.accepted=true
cpptest.license.use_network=true
cpptest.license.network.edition=server_compliance_edition
license.network.url=https://<dtp-host>:8443
license.network.use.specified.server=true
license.network.auth.enabled=true
license.network.user=admin
license.network.password=admin
dtp.url=https://<dtp-host>:8443
dtp.user=admin
dtp.password=admin
cpptest.configuration=builtin://MISRA C 2025
cpptest.compiler.family=tiarmgcc_7

For CI/CD, use a per-project localsettings.properties file instead.

Step 2

Scan Your Build with cpptestscan

cpptestscan intercepts compiler calls and records them into a .bdf file.

set CPPTEST_SCAN_OUTPUT_FILE=cpptestscan.bdf
set CPPTEST_SCAN_PROJECT_NAME=YourProject
set CPPTEST_SCAN_RUN_ORIG_CMD=0

cpptestscan.exe tiarmclang.exe -c -I. -std=c11 file1.c
cpptestscan.exe tiarmclang.exe -c -I. -std=c11 file2.c
cpptestscan.exe tiarmclang.exe -c -I. -std=c11 file3.c

For CMake projects, use compile_commands.json with the -compiler-commands flag instead.

Step 3

Run MISRA C 2025 Static Analysis

cpptestcli.exe ^
    -localsettings localsettings.properties ^
    -config "builtin://MISRA C 2025" ^
    -compiler tiarmgcc_7 ^
    -bdf cpptestscan.bdf ^
    -report report
FlagPurpose
-localsettingsPer-project settings file
-configRule set (MISRA C 2025, CERT C, CWE, etc.)
-compilerCompiler front-end config (tiarmgcc_7)
-bdfBuild Data File from cpptestscan
-reportOutput directory for HTML/XML reports
Analysis pipeline

What Happens During the Run

  1. License check — connects to DTP, validates all rule features
  2. Scope collection — reads BDF, determines which files to analyze
  3. Code Analysis — pattern-based static rules (fastest)
  4. Flow Analysis — dataflow (null deref, buffer overflow, etc.)
  5. Global Static Analysis — cross-translation-unit rules
  6. Report generation — writes report.html and report.xml
Example output

Timer Project Results: 167 Violations

CountRuleDescription
35RULE_17_7-aUnused function return value
26RULE_7_4-aString literal as non-const pointer
15DIR_4_6-bStandard integer type 'int' should not be used
15RULE_17_3-aFunction called before prototype
10RULE_8_2-cFunction not in prototype form
10RULE_21_10-btime.h functions not allowed
6RULE_8_7-aReferenced only in defining TU
5RULE_2_8-cLocal variable declared but not used

30 distinct MISRA C 2025 rules triggered across 4 source files.

Flow Analysis

Flow Analysis Standard: Bug Detective

After MISRA C 2025 validated the compiler setup, we tested Flow Analysis Standard — Parasoft's interprocedural bug-detection engine — on a project with 13 C files containing intentionally seeded defects.

What Flow Analysis Does

  • Builds control-flow graphs across functions
  • Tracks taint from external inputs (console, file, socket)
  • Detects null deref, buffer overflow, resource leaks, division by zero, SQL injection, and more
  • Interprocedural: follows values through function calls

How We Ran It

cpptestcli.exe ^
  -localsettings localsettings.properties ^
  -config "builtin://Flow Analysis Standard" ^
  -compiler tiarmgcc_7 ^
  -bdf cpptestscan.bdf ^
  -report report

Same compiler config, same BDF approach — just a different analysis config.

Flow Analysis Results

Detection Matrix: 10 of 11 Defects Found (91%)

FileExpected DefectDetected?Rule(s)
divisionByZero.cDivision by zero✅ YesBD-PB-ZERO
bufferOverflow.cBuffer overflow✅ YesBD-PB-OVERFWR, BD-SECURITY-OVERFWR
arrayOutOfBounds.cArray out of bounds✅ YesBD-PB-ARRAY, BD-SECURITY-ARRAY
nullPointerDeref.cNull pointer deref✅ YesBD-PB-NP (4 findings)
memoryLeaks.cMemory leak✅ YesBD-RES-LEAKS
integerOverflow.cInteger overflow✅ YesBD-SECURITY-INTOVERF
sqlInjection.cSQL injection✅ YesBD-SECURITY-TDSQL
unreachableCode.cUnreachable code✅ YesBD-PB-CC, BD-PB-SWITCH
useBeforeInit.cUse before init✅ YesBD-PB-NOTINIT
nullPointerDerefBenchmark.cBenchmark (TP + FP)✅ 3 TP, 0 FPBD-PB-NP
fileLeaks.cFile/resource leak⚠️ PartialOther issues found, leak missed

41 total violations across 13 files. The file leak in fileLeaks.c (fclose commented out) was not flagged with BD-RES-LEAKS, likely because the file handle flows through an interprocedural helper.

Flow Analysis Deep Dive

What the Bug Detective Caught

🏆 Top Detections

  • Division by zero — found both instances (struct field and function parameter)
  • SQL injection — traced file input → fread → sprintf → SQLExecDirect (taint tracking)
  • Integer overflow — detected socket-controlled length used in arithmetic
  • Null pointer deref — 7 findings, including interprocedural paths through helper1() and helper2()
  • Buffer overflow — both definite (1000 bytes into 999) and possible (arbitrary length)
  • Unreachable code — 6 findings: always-true/false conditions + unreachable switch case

🎯 Benchmark Accuracy

  • nullPointerDerefBenchmark.c has 6 "noFalseViolation" functions that should NOT trigger
  • Flow Analysis produced 0 false positives on these
  • All 3 findings were on intentionally buggy paths (trueViolation, functionCall_trueViolation1/2)
  • This validates the precision of the interprocedural null-tracking engine
41 violations · 19 distinct rules · 13 files analyzed · 0 setup problems · 0 preprocessing errors
Automation

Integrate into Your CI/CD Pipeline

Jenkins

bat "cpptestcli -localsettings ... -compiler tiarmgcc_7 -bdf ... -report ... -fail"
publishHTML(target: [reportDir: 'report', reportFiles: 'report.html'])

Azure DevOps

- task: CmdLine@2
  script: cpptestcli -localsettings ... -compiler tiarmgcc_7 -bdf ... -report ... -fail
- task: PublishBuildArtifacts@1

GitHub Actions

- run: cpptestcli -localsettings ... -compiler tiarmgcc_7 -bdf ... -report ... -fail
- uses: actions/upload-artifact@v4
  with: { name: parasoft-report, path: report/ }
Team visibility

Publish Results to DTP for Team Dashboards

report.dtp.publish=true
dtp.project=YourProjectName
build.id=YourProjectName-${time:yyyy-MM-dd}
✓ Track violation trends over time
✓ Filter by rule, severity, author, file
✓ Set quality gates and compliance policies
✓ Generate compliance reports for audits
Diagnostics

Troubleshooting

ProblemFix
License activation failedSet edition=server_compliance_edition
EULA not acceptedSet parasoft.eula.accepted=true
DTP services not foundCheck dtp.url and context path
Compiler crash/hangUse tiarmgcc_7, NOT tiarm_20_2
Missing files in analysisRe-scan with cpptestscan, check BDF
Preprocessor errorsPass exact -I and -D flags from your build
0 violations in reportCheck BDF has entries, verify file paths
Implementation plan

Checklist: Adapt for Your Project

  1. Verify your TI compiler path → tiarmclang.exe --version
  2. Verify your DTP server URL → Test-NetConnection
  3. Create localsettings.properties with your DTP host/user/password
  4. Scan your build → cpptestscan for each source file with real flags
  5. Set your project name → CPPTEST_SCAN_PROJECT_NAME
  6. Run the analysis → cpptestcli -compiler tiarmgcc_7 -bdf ... -report ...
  7. Choose your rule set → MISRA C 2025, CERT C, CWE Top 25, etc.
  8. Wire into CI → Jenkins, Azure DevOps, or GitHub Actions
Summary

Key Takeaways

1. TI Arm Clang is NOT on Parasoft's supported list → use tiarmgcc_7 (GCC/Clang-style)
2. cpptestscan intercepts your build to create the BDF → use exact compiler flags
3. One command runs all three analysis engines → static, flow, global
4. Reports in HTML + XML → publish to DTP or CI artifacts
5. Flow Analysis found 10/11 seeded defects (91%) with 0 false positives on benchmarks
6. Same setup works for both MISRA C 2025 and Flow Analysis — just change -config

Questions? Check the full guide in the project repository.

Build machine

Files on the Build Machine

cpptest\
├── cpptestcli.properties              ← global config
└── your-project\
    ├── localsettings.properties       ← per-project settings
    ├── cpptestscan.bdf                ← build data file
    ├── run_misra_analysis.bat         ← convenience script
    └── report\
        ├── report.html                ← human-readable report
        └── report.xml                 ← machine-readable report
1 / 14