Skip to main content
TESSY + Arm Keil MDK: Compile with AC6, Test with TESSY, Full Cortex-M Coverage, featured image

TESSY + Arm Keil MDK: Compile with AC6, Test with TESSY, Full Cortex-M Coverage

GSAS Engineering · · 5 min read

TESSY + Arm Keil MDK: Compile with AC6, Test with TESSY, Full Cortex-M Coverage

Arm Cortex-M microcontrollers dominate Indian embedded design, from automotive body controllers and ADAS sensor interfaces in Pune to industrial PLC modules in Chennai and medical device firmware in Bengaluru. The standard development environment for Cortex-M is Arm Keil MDK with Arm Compiler 6 (AC6). But compilation is only half the engineering workflow.

The other half, the part that safety standards mandate, is systematic unit testing with structural coverage measurement.

Razorcat TESSY integrates directly with Keil MDK and Arm Compiler 6, creating a workflow where engineers compile and test with the same toolchain they ship to production.

Why the Compiler Matters for Unit Testing

A common mistake in embedded unit testing is compiling test code with GCC on a Linux host while the production code compiles with AC6 for Cortex-M. The problem is that different compilers handle structure packing, bit-field ordering, integer promotion, and optimization differently. A test that passes under GCC may not reflect the actual behaviour of the code compiled under AC6.

TESSY eliminates this problem. When configured for a Keil MDK project, TESSY uses AC6 to compile the test harness, stubs, and unit under test. The compiled test code uses the same calling conventions, type sizes, alignment rules, and optimization passes as the production build. Coverage results reflect the actual production binary, not a host simulation with different compiler semantics.

Setting Up the Integration

The TESSY–Keil MDK integration requires three configuration steps:

1. Compiler configuration. In TESSY’s project settings, specify the Arm Compiler 6 executable path and the compiler flags from the Keil project. TESSY parses the project’s compile options, target CPU (Cortex-M0/M3/M4/M7/M33), optimization level, FPU settings, endianness, so the test compilation matches production exactly.

2. Include paths and defines. TESSY imports the include paths and preprocessor definitions from the Keil MDK project. CMSIS headers, device-specific startup files, and project-level defines are resolved automatically. Engineers do not need to manually replicate the Keil project’s build configuration.

3. Test execution target. Tests can run in three modes:

  • Simulator: TESSY uses the Arm instruction set simulator for fast, hardware-independent execution. Suitable for logic-level unit testing where hardware peripheral access is not required.
  • On-target via J-Link: Tests download to the Cortex-M device through a SEGGER J-Link debug probe and execute on real hardware. Coverage data is read back through the debug channel. This is the preferred mode for safety-critical projects where assessors require target-based evidence.
  • On-target via ULINKplus: For teams using Arm’s own debug probe, TESSY supports ULINKplus for target execution and power measurement.

The Testing Workflow

Once configured, the daily engineering workflow is:

  1. Write or modify firmware in Keil MDK (uVision or VS Code with Keil extension)
  2. Open the module in TESSY: TESSY’s automatic interface analysis parses the function signatures, identifies parameters, return types, global variables, and called functions
  3. Design test cases using the Classification Tree Editor (equivalence classes, boundary values) or directly in the tabular test data editor
  4. Configure stubs for called functions, define return values and side effects per test case
  5. Execute tests: TESSY compiles with AC6, runs on simulator or target, and measures coverage
  6. Review coverage: colour-coded source view shows which statements, branches, and MC/DC conditions are covered
  7. Generate reports: HTML or PDF reports with coverage matrices and requirements traceability for safety case inclusion

Steps 2 through 7 happen inside TESSY. The Keil MDK project and TESSY project coexist, TESSY reads the Keil build configuration but does not modify it.

CI/CD Pipeline Integration

For teams running continuous integration (common among automotive Tier-1 suppliers in Pune and Hyderabad serving European OEMs), the workflow extends into the CI pipeline:

  1. Developer pushes code to GitLab/GitHub
  2. CI pipeline triggers a TESSY batch execution (command-line mode)
  3. TESSY compiles all affected modules with AC6 and runs test suites
  4. Coverage reports are generated and compared against thresholds (e.g., 100% MC/DC for ASIL D functions)
  5. Pipeline passes or fails based on coverage gates
  6. Reports are archived as build artifacts for audit trail

This automation ensures that no code change reaches the integration branch without passing the coverage requirements defined by the safety plan.

Coverage Metrics for Cortex-M Code

TESSY measures MC/DC coverage on the instrumented AC6-compiled code. For Cortex-M4 and M7 firmware using hardware FPU instructions, conditional branches related to floating-point comparisons are instrumented and covered. For Cortex-M33 with TrustZone, TESSY handles secure/non-secure function calls through its stub mechanism.

The coverage report maps directly to the AC6-compiled source, so engineers and assessors see coverage results that correspond to the code the compiler actually generates, not a host-compiled approximation.

Why Buy from GSAS

GSAS Micro Systems is the authorized partner for both Razorcat (TESSY) and Arm (Keil MDK). This means a single local partner for the complete compile-and-test workflow, with INR invoicing, joint onboarding training, and integrated technical support. Our engineers in Bengaluru, Hyderabad, Chennai, Pune, Mumbai, and Delhi NCR configure the TESSY–Keil MDK integration on your project, train your team on the Classification Tree Method, and help set up CI/CD quality gates for MC/DC coverage.

Request a TESSY + Keil MDK evaluation →

Interested in Razorcat tools?

Talk to our application engineers for personalized tool recommendations.

Stay in the Loop

Get monthly compliance updates, product insights, and engineering best practices delivered to your inbox.

Related Articles

Master and slave roles on a 100BASE-T1 link: the master PHY times its transmitter from a local clock, the slave recovers the clock from the received signal, with the both-master and both-slave misconfigurations that leave the link down, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

100BASE-T1 Link Won't Come Up: A Vendor-Neutral Checklist

A 100BASE-T1 link that will not come up is almost never a mystery, but the answers on the web are written per silicon vendor and do not transfer. This is the ordered bring-up checklist that holds regardless of which PHY, switch or SoC you have: physical layer first, then the PHY over MDIO, then the master and slave pairing, then the causes of a link that comes up and drops. The standards and tooling claims trace to IEEE 802.3 task force records, the Linux ethtool and kernel documentation or published test material. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 14 min read
Side by side comparison of a 10BASE-T1S multidrop mixing segment, one balanced pair with four nodes on short stubs and a termination at each end, against a point to point star of four separate links into switch ports, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

10BASE-T1S and PLCA: Multidrop Ethernet Explained

10BASE-T1S is the one member of the T1 single-pair Ethernet family that keeps a shared medium, and PLCA is the reconciliation sublayer that stops the nodes on it from colliding. This article covers what IEEE 802.3cg standardises, how the beacon and transmit opportunities schedule a cycle, the node count and segment length figures the OPEN Alliance interoperability test suite works to, and the failure modes that put a segment quietly back into contention while every link still looks up. Written by the GSAS Micro Systems engineering team in India for teams bringing up multidrop segments on the bench.

29 Aug 2026 · 12 min read
Horizontal stacked bar showing where an ADAS test vehicle's bandwidth budget is spent, split into cameras, lidar, radar and bus traffic, with the logger uplink limit drawn as a vertical rule crossing the bar, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

ADAS Sensor Data Logging: Bandwidth Budgets That Add Up

Every page that tells you an ADAS test vehicle produces terabytes a day states the headline and skips the arithmetic, so you cannot redo it for your own sensor set. This article publishes the arithmetic instead: one formula, every table row derived on the page, a worked eight-hour drive that chains those rows into a sustained write rate, a media count and an offload window, and the five places bandwidth budgets go wrong. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 15 min read