CppDepend
Medical Devices — Case Study

Case Study: Achieving IEC 62304 Compliance and Code Maintainability in Embedded Medical Devices

The client was developing embedded firmware for a Class III patient monitoring device used in cardiac care. Given its life-critical nature, the software had to comply with IEC 62304 (Safety Class C)…

Case Study: Achieving IEC 62304 Compliance and Code Maintainability in Embedded Medical Devices

Industry: Medical DevicesClient Profile: U.S.-based MedTech company specializing in implantable and diagnostic equipmentDomain: Embedded software for patient monitoring and wireless telemetryTeam Size: 35 embedded software engineersLanguages: C, C++Key Standards: IEC 62304, FDA Guidance, MISRA C/C++, CERT C

The Challenge

The client was developing embedded firmware for a Class III patient monitoring device used in cardiac care. Given its life-critical nature, the software had to comply with IEC 62304 (Safety Class C) and FDA guidelines, while meeting stringent internal standards for portability, robustness, and traceability.

The team encountered several obstacles during development:

  • Manual verification was unsustainable: Manual code reviews for safety and portability rules (MISRA, CERT) were error-prone and consuming ~30% of development time.
  • Difficulty in enforcing internal safety rules: Critical logic such as device startup routines had to follow strict control-flow and resource-allocation patterns, which were inconsistently enforced.
  • Documentation for audits was spread across tools, required significant cleanup, and often lagged behind code changes.
  • Legacy code risk: Older modules (some from 10+ years ago) were being reused and did not align with modern safety expectations.

They needed a static analysis solution that could support formal safety processes, automate rule enforcement, and provide traceability artifacts aligned with IEC 62304 section 5.5 and 5.7 requirements (verification and architectural design documentation).

The Solution: CppDepend

CppDepend was introduced as a core quality gate tool during the project’s transition from prototype to regulatory submission. Key goals included:

  • Automating compliance checks for MISRA, CERT, and internal coding policies
  • Generating code metrics and documentation for submission to notified bodies
  • Ensuring long-term maintainability through continuous architectural validation
  • Establishing technical debt visibility to support risk management

CppDepend’s customizable CQLinq rule engine and powerful dependency analysis made it possible to tailor the platform to both regulatory and internal needs.

Implementation Strategy

Phase 1 – Safety Baseline (Weeks 1–3)

  • Scanned entire embedded codebase (~400K LOC) and identified:
  • ~950 MISRA violations
  • 40+ functions exceeding cyclomatic complexity threshold
  • Over 200 risky constructs (e.g. dynamic memory, deep nesting)

Phase 2 – Standards Integration (Weeks 4–6)

  • Developed a set of custom CQLinq rules to enforce resource management constraints, startup sequencing guidelines, and error-handling logic.
  • Aligned reports with IEC 62304 verification steps and FDA software documentation guidance.

Phase 3 – Automation & Traceability (Weeks 7–10)

  • Integrated CppDepend into the CI/CD pipeline (Jenkins-based) with nightly reports.
  • Created visual architecture diagrams to accompany software risk analysis documents (per ISO 14971).
  • Added summary dashboards to internal Confluence for QA and V&V teams.

Results After 10 Weeks

MetricBefore CppDependAfter 10 Weeks
MISRA/CERT violations950+< 120
Functions above complexity threshold40+8
Time to prepare audit documentation4–5 days< 6 hours
Technical debt estimate (SQA)~17%8.3%
Regression issues caught pre-release~60% manually95% automated

Outcomes & Benefits

  • IEC 62304 Verification Streamlined: CppDepend was used directly to satisfy IEC 62304 sections related to verification and architecture, simplifying audits.
  • Code Quality Improvement: Teams reported fewer defects, better code clarity, and higher confidence in reused modules.
  • Developer Enablement: Feedback loops were shortened by integrating analysis into daily development, preventing rule violations before they reached QA.
  • Scalable for Future Products: CppDepend templates and rules were reused for other devices in the client’s pipeline, accelerating safety process reuse.

Why CppDepend?

CppDepend provided a unique combination of standard-based rule checking, custom rule extensibility, and regulatory-aligned reporting. Unlike simple linters, it helped the team reason about architectural design, risk exposure, and long-term code sustainability, making it ideal for a medical device development lifecycle.

Conclusion

With CppDepend, the MedTech team significantly improved code compliance, reduced review effort, and streamlined safety documentation. As a result, they submitted their Class III device with stronger justification and faster audit turnaround — all while future-proofing their code for maintenance and reuse in follow-up models.

← Back to Medical Devices overview

See what CppDepend reveals in your codebase

Run the analysis on your own projects: coding standards, architecture validation, technical debt and quality gates — in minutes.