SlideShare a Scribd company logo
www.verifysoft.com
Code coverage for small
safety-critical embedded
targets
www.verifysoft.com 2
Agenda
1. Speaker Introduction
2. Verifysoft Short Introduction
3. Why Code Coverage?
4. Safety Standards and Code Coverage
5. Different Coverage Levels
6. Compiler Support
7. How does it work? Code Instrumention
8. Support for Embedded Targets
9. Qualification Kit
10. Different Reports
11. Supported Platforms/IDEand Tool Integrations
12. Live Demo
www.verifysoft.com 3
1. Introduction – Meet the speaker
Sebastian Götzinger
• ISTQB® Certified Tester Foundation Level
• Employed since 2013 at
Verifysoft Technology GmbH
• Trainer for test tools
www.verifysoft.com 4
2. Where does he come from?
VerifysoftTechnologyGmbH
• Founded 2003
• Headquarters: Offenburg, Germany
• >400 customers in more than 30 countries
• Owner of:
▪ Testwell CTC++ (Code Coverage)
▪ Testwell CMT++ (SW-Metrics)
▪ Testwell CTA++ (Unit-Tests)
• Distrubution of complementary Software
(e.g. Grammatec Codesonar® in Germany)
• Seminars for software quality
www.verifysoft.com 5
3. Why Code Coverage?
Code Coverage
shows the parts of the code
which have been executed / not executed
tested / not tested
Mandatory for security-critical development
-> security standards
Code Coverage Test Coverage Requirement Coverage
www.verifysoft.com 6
3. Why Code Coverage?
www.verifysoft.com 7
3. Why Code Coverage?
Why measure Code Coverage ?
• Helps to write better (more adapted) tests
• Helps to avoid redundant tests
• You know when you can stop testing
• Prove to your customers you have good quality
• You can be sure that your development partner delivers
good quality
• Helps to find Dead Code
• Required to obtain certifications
• Mandatory for security critical development
(standards DO-178C, IEC 61508, EN 50128, ISO 26262, …)
www.verifysoft.com 8
4. Safety Standards and Code Coverage
Code Coverage
shows the parts of the code
which have been executed / not executed
tested / not tested
Mandatory for security-critical development
-> security standards
www.verifysoft.com 9
Table B.2 from DIN EN 61508-3
++ Highly recommended
+ Recommended
4. Safety Standards and Code Coverage
DIN EN 61508-3
www.verifysoft.com 10
++ Highly recommended
+ Recommended
4. Safety Standards and Code Coverage
ISO 26262-6
www.verifysoft.com 11
4. Safety Standards and Code Coverage
www.verifysoft.com 12
int goo( int a, int b, int c)
{
int x;
if (((a>0) || (b>0)) && (c>0))
{
x = 1;
}
else
{
x = 0;
}
return x;
}
DO-178B Definition:
„Every decision has taken all possible outcomes at least once, and every
condition in a decision is shown to independently affect that decision‘s
outcome.“
(a>0) (b>0) (c>0) x
true - true 1
true - false 0
false true true 1
false true false 0
false false - 0
Incomplete Evaluation in C/C++
- is not to be evaluated, can be true or false
n+1 Tests necessary, n := amount of atomic conditions
12
4. Safety Standards and Code Coverage
www.verifysoft.com 13
Code Coverage Requirements: CENELEC EN 50128
www.verifysoft.com 14
5. Different Coverage Levels
Testwell CTC++ supports all required coverage levels:
• Function Coverage
• Decision Coverage
• Statement Coverage
• Condition Coverage
• Modified Condition/Decision Coverage (MC/DC)
• Multicondition Coverage (MCC)
works together with all unit-test tools
www.verifysoft.com 15
6. Compiler Support
Testwell CTC++ works with all compilers
Support is available for (as of March 2014, for actual list refer to
www.verifysoft.com/en_compilers.html):
Altium Tasking classic toolsets,VX-toolsettoolsets,c166,cc166, ccm16c,cc51
ARM DS-5, Keil MDK-ARM
Borland/Inprise/Paradigm/Codegear bcc, bcc32,pcc, pcc32 (Paradigm)
Ceva DSP all (justusegcc settings)
Cosmic cx6805,cx6808,cx6812, cxs12x,cxs12z, cxxgate, cx6811,cx6816,cx332,cxst10,cxstm8, cxst7,
cxcf,cx56K, cxppc
Freescale/Metrowerks mwccmcf, mwcceppc, mwccmcore, mwcc56800, mwcc56800e, chc12, chc08
Fujitsu/Softune fcc907s,fcc911s,fcc896s
gcc and all gcc based cross-compilers i586-mingw32msvc-gcc,x86_64-linux-gnu-gcc,m68k-palmos-coff-
gcc, tricore-gcc,arm-linux-gnueabi-gcc,arm-none-eabi-gcc,arm-none-linux-gnueabi-gcc,arm-elf-gcc,
arm-montavista-linux-gnueabi-gcc,pic30-gcc,pic32-gcc,avr-gcc,xc16-gcc,mlx16-gcc,thumb-epoc-pe-
gcc, arm4-epoc-pe-gcc, armv-epoc-pe-gcc, powerpc-wrs-linux-gnu-e500v2-glibc_small-gcc,*-gcc,*-*-gcc,
*-*-*-gcc
GHS/GreenHills/Multi ccv850,cxv850, ccmips,cxmips,ccarm,cxarm,ccthumb, cxthumb, ccppc,
cxppc,gcc (GreenHill,not GNU)
Hitatchi shc, shcpp,ch38,cxrx
HI-Tech PICC (Windows and Linux) picc,picc18,picc32, dspicc,xc16-gcc,xc32-gcc,
HP HPUX CC, HP C++, aCC
IAR compilers and toolchains icc430,icc78k,icc78k0r,icc8051, iccarm,iccavr,iccavr32,icccf,icchcs12,
iccdspic,iccmaxq,iccpic18,icccr16c,iccv850,icch8,iccm8k,iccm32c,iccm16c,iccr32c,iccrl78, iccrx,
iccsam8,iccstm8
Intel (all platforms) icc,ic86,ic96
Java compilers Javac,jikes,ecj,gcj,kaffe
Keil c51,c166, c251,ca/ cx51, cx2, tcc / armcc
LLVM clang,clang++/ Matlab/Simulink / lcc
Metaware (both Windows and Linux host) hcac,hcarc,hcarm
Microchip MPLAB C pic30-gcc,pic32-gcc
---->
www.verifysoft.com 16
6. Compiler Support
Testwell CTC++ works with all compilers (continued)
→
Microsoft compilers cl on host, both 32 and 64 bit / cl for Smartphones and PocketPC / csc C# compiler
/ vjc J# compiler
Mono compilers dmcs, mcs, gmcs, smcs
Motorola chc12, chc08
Pathscale pathcc/pathCC
Renesas shc,shcpp,ch38, ccrx
Raisonance rc51,rcmp
Sun WorkShop compilers,javac
Symbian various compilers
TI Code Composer Studio (Windows) cl2000,cl16x,cl470,cl55,cl500,cl430
Texas Instruments Linux compilers cl2000,cl16x,cl470,cl55,cl500,cl430
Trimedia tmcc
VisualDSP++ ccblkfn,cc21k,ccts
Windriver ccarm, ccsimpc,g++simpc,g++arm, cchppa,ccsimso,ccsparc,cc68k,cc386,cc960, ccmips,
ccppc
You have not seen your compiler? Contactus!
We will adapt Testwell CTC++ to your compiler within a
few daysand without any cost (adaptationcan even be
done by the customer).
Testwell CTC++ supports all compilers!
No unsupportedcompilers!
www.verifysoft.com 17
Instrumentation
• Adding of global counters (Integer-Arrays)
into the source code
• Storage of information about counter instrumentation
• Increment counters with each run
• Storage of counter values
• Analysis of the counter values for reporting
17
7. Code Instrumentation
www.verifysoft.com 18
Pre-
processor
Compiler Linker
Testbed
*.c *.i *.o *.11
Tests
Protocol
Testcoverage Tool
RAM
ROM
Memory requirement
without instrumentation
18
Tool-Chain
7. Code Instrumentation
www.verifysoft.com 19
Pre-
processor
Compiler Linker
Testbed
*.c *.i *.o *.11
Tests
Protocol
Instrumen-
tation
Report
Generator
*.c
Coverage Report
Symbol data
Datafile
(counter)
Testcoverage Tool
RAM
ROM
Memory requirement
without instrumentation
RAM
ROM
Memory requirement
with instrumentation
19
Tool-Chain
7. Code Instrumentation
www.verifysoft.com 20
7. Code Instrumentation
• RAM
Reason for lack of memory: 80 % RAM, 20 % ROM (pract. experience)
• ROM
• Mostly no filesystem (so counters have to be stored in memory)
• Limited amount of interfaces on the target device (transfer of datafile)
Consider additional testing interfaces in the hardware design
(design for test)
www.verifysoft.com 21
Testwell CTC++ has a very low
instrumentationoverhead
It works with all embedded targets
If instrumentationoverheadit to high
We can use Bit Cov Add-on
Thus Testwell CTC++ works with even smallest
targets and microcontrollers
7. Code Instrumentation
www.verifysoft.com 22
7. Code Instrumentation
ROM-Usage
Without instrumentation: 60 Byte
Function Coverage: 67 Byte
Branch Coverage: 118 Byte
Condition Coverage: 285 Byte
Simple example with small code and big
instrumentation overhead (mean 30 % of code size).
Additional RAM-Usage without Bit-Coverage
Function Coverage: 1 Integer
Branch Coverage: 4 Integer
ConditionCoverage: 7 Integer
Additional RAM-Usage using Bit-Coverage
Function Coverage: 1 Bit
Branch Coverage: 4 Bit
ConditionCoverage: 7 Bit
Integer:
32 Bit (unsigned long)
as default
www.verifysoft.com 23
Testwell CTC++ is the ideal tool for embedded targets
• Dramatically easy to use !
• Very low instrumentationoverhead on your C files
• Works with all targets
Host-Target add-on is provided as source code
and so can be easily adapted to new targets
• … even with smallest targets and microcontrollers
• Supports all compilers/cross-compilers
8. Support for Embedded Targets and native projects
www.verifysoft.com 24
Testwell CTC++ is the ideal tool for native projects
• Setup and usage are straightforward
• Java and C# support on top of C and C++
• Very fast analysis
• Interfacing with MS Visual Studio IDE (and other IDEs)
• … even on large projects
8. Support for Embedded Targets and native projects
www.verifysoft.com 25
9. Qualification Kit
Testwell CTC++ can be used to obtain certification
in automotive, railway, avionics and medical
industries
Tool-Qualification Kits available
www.verifysoft.com 26
10. Different Reports
Reports in text, XML,HTML, JSON
Directory Summary
Files Summary
Functions Summary
Execution Profile
Untested Code Listing
Execution Time Listing
www.verifysoft.com 27
10. Different Reports
www.verifysoft.com 28
10. Different Reports
www.verifysoft.com 29
10. Different Reports
www.verifysoft.com 30
10. Different Reports
www.verifysoft.com 31
10. Different Reports
www.verifysoft.com 32
10. Different Reports
www.verifysoft.com 33
11. Supported Platforms/IDE and Tool Integrations
Supported Platforms
Windows, Linux, FreeBSD, Solaris, HP-UX
MacOSX, AIX, others on request
www.verifysoft.com 34
11. Supported Platforms/IDE and Tool Integrations
IDE-Integrations
Visual Studio v7.0 and later
IAR (all platforms)
Borland 5.02
Fujitsu Softune
Eclipse
Others on request
Works also with:
MP-LAB, Keil, …
www.verifysoft.com 35
11. Supported Platforms/IDE and Tool Integrations
Integrations
with Tool-Chains and Testing environments
include
CATIA - AUTOSAR Builder (DassaultSystèmes)
dSpace SystemDesk
dSpace TargetLink
PikeTech TPT
QTronic TestWeaver / Silver
Imagix 4D
SonarQube
… (ask for other integrations)
Further information: www.verifysoft.com
www.verifysoft.com 36
12. Live Demo
For a live demo, please visit OUR BOOTH 95 or:
http://www.verifysoft.com/en_ctcpp_online_presentations.html
www.verifysoft.com 37
Testwell CTC++ Test Coverage Analyser for C and C++
CTC++ add-on for Java and Android
CTC++ add-on for C#
Testwell CTC++
All coverage levels
Statement coverage
Function coverage
Decision/branch coverage
Condition coverage
Modified condition/decision cov.
MC/DC coverage
Multicondition coverage (MCC)
All compilers
All embedded targets!
Works with all unit test tools
www.verifysoft.com 38
Customers
www.verifysoft.com 39
Thank you for your time!
Visit our BOOTH 95!
Your Verifysoft Team
Thank You

More Related Content

PPTX
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
PPTX
PVS-Studio. Static code analyzer. Windows/Linux, C/C++/C#. 2017
PPTX
PVS-Studio is ready to improve the code of Tizen operating system
PPTX
Static Code Analysis for Projects, Built on Unreal Engine
PDF
PVS-Studio advertisement - static analysis of C/C++ code
PDF
Accelerated Windows Debugging 3 training public slides
PDF
Accelerated .NET Memory Dump Analysis training public slides
PPTX
PVS-Studio features overview (2020)
Safety on the Max: How to Write Reliable C/C++ Code for Embedded Systems
PVS-Studio. Static code analyzer. Windows/Linux, C/C++/C#. 2017
PVS-Studio is ready to improve the code of Tizen operating system
Static Code Analysis for Projects, Built on Unreal Engine
PVS-Studio advertisement - static analysis of C/C++ code
Accelerated Windows Debugging 3 training public slides
Accelerated .NET Memory Dump Analysis training public slides
PVS-Studio features overview (2020)

What's hot (20)

PPTX
What has to be paid attention when reviewing code of the library you develop
PPTX
IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자
PDF
Vlsi lab manual_new
PDF
Checking the Qt 5 Framework
PPTX
SAST and Application Security: how to fight vulnerabilities in the code
PDF
PVS-Studio for Visual C++
PPTX
PVS-Studio, a static analyzer detecting errors in the source code of C/C++/C+...
PDF
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
PPTX
PVS-Studio static analyzer: advanced features
PPTX
CodeChecker Overview Nov 2019
PDF
Practical file
PDF
the grinder testing certification
DOCX
SoftwareEngineer
PDF
Embedded system design psoc lab report
PDF
Thesis - LLVM toolchain support as a plug-in for Eclipse CDT
PDF
Vlsi lab manual exp:1
PPTX
Legacy of Void*
PDF
Digital System Design Lab Report - VHDL ECE
PPTX
Static analysis: looking for errors ... and vulnerabilities?
PDF
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
What has to be paid attention when reviewing code of the library you develop
IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자
Vlsi lab manual_new
Checking the Qt 5 Framework
SAST and Application Security: how to fight vulnerabilities in the code
PVS-Studio for Visual C++
PVS-Studio, a static analyzer detecting errors in the source code of C/C++/C+...
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
PVS-Studio static analyzer: advanced features
CodeChecker Overview Nov 2019
Practical file
the grinder testing certification
SoftwareEngineer
Embedded system design psoc lab report
Thesis - LLVM toolchain support as a plug-in for Eclipse CDT
Vlsi lab manual exp:1
Legacy of Void*
Digital System Design Lab Report - VHDL ECE
Static analysis: looking for errors ... and vulnerabilities?
VLSI lab manual Part A, VTU 7the sem KIT-tiptur
Ad

Similar to MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger (20)

PDF
en_verifysoft_testwell_flyer
PPTX
CodeChecker summary 21062021
PPT
Stephan berg track f
PDF
froglogic Coco Code Coverage Presentation
PDF
TDC2016SP - Trilha Linux Embarcado
PDF
OCCF: A Framework for Developing Test Coverage Measurement Tools Supporting M...
PDF
Mathematically Guaranteeing Code Correctness with TrustInSoft
PPTX
Automated requirements based testing for ISO 26262
PPT
Code coverage
PDF
Topics in Verification: Reuse, Coverage, Regression Engineering, Planning, Qu...
PPTX
C++ and Embedded Linux - a perfect match
PPTX
Automated Requirements-Based Testing for Medical Device Software
PDF
Introduction to Software Testing.pdf
PPT
Introduction to Parasoft C++TEST
PDF
Mathematically Guaranteed C and C++ Code
PDF
Code Coverage
PPTX
Sta unit 2(abimanyu)
PDF
How it's made: C++ compilers (GCC)
PPTX
GNAT Pro User Day: Latest Advances in AdaCore Static Analysis Tools
PPTX
GCC Summit 2010
en_verifysoft_testwell_flyer
CodeChecker summary 21062021
Stephan berg track f
froglogic Coco Code Coverage Presentation
TDC2016SP - Trilha Linux Embarcado
OCCF: A Framework for Developing Test Coverage Measurement Tools Supporting M...
Mathematically Guaranteeing Code Correctness with TrustInSoft
Automated requirements based testing for ISO 26262
Code coverage
Topics in Verification: Reuse, Coverage, Regression Engineering, Planning, Qu...
C++ and Embedded Linux - a perfect match
Automated Requirements-Based Testing for Medical Device Software
Introduction to Software Testing.pdf
Introduction to Parasoft C++TEST
Mathematically Guaranteed C and C++ Code
Code Coverage
Sta unit 2(abimanyu)
How it's made: C++ compilers (GCC)
GNAT Pro User Day: Latest Advances in AdaCore Static Analysis Tools
GCC Summit 2010
Ad

More from Ievgenii Katsan (20)

PDF
8 andrew kalyuzhin - 30 ux-advices, that will make users love you
PDF
5 hans van loenhoud - master-class the 7 skills of highly successful teams
PDF
4 alexey orlov - life of product in startup and enterprise
PDF
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
PDF
7 hans van loenhoud - the problem-goal-solution trinity
PDF
1 hans van loenhoud -
PDF
3 denys gobov - change request specification the knowledge base or the task...
PDF
5 victoria cupet - learn to play business analysis
PDF
5 alina petrenko - key requirements elicitation during the first contact wi...
PDF
3 karabak kuyavets transformation of business analyst to product owner
PDF
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
PDF
3 zornitsa nikolova - the product manager between decision making and facil...
PDF
4 viktoriya gudym - how to effectively manage remote employees
PDF
9 natali renska - product and outsource development, how to cook 2 meals in...
PDF
7 denis parkhomenko - from idea to execution how to make a product that cus...
PDF
6 anton vitiaz - inside the mvp in 3 days
PDF
5 mariya popova - ideal product management. unicorns in our reality
PDF
2 victor podzubanov - design thinking game
PDF
3 sergiy potapov - analyst to product owner
PDF
4 anton parkhomenko - how to make effective user research with no budget at...
8 andrew kalyuzhin - 30 ux-advices, that will make users love you
5 hans van loenhoud - master-class the 7 skills of highly successful teams
4 alexey orlov - life of product in startup and enterprise
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
7 hans van loenhoud - the problem-goal-solution trinity
1 hans van loenhoud -
3 denys gobov - change request specification the knowledge base or the task...
5 victoria cupet - learn to play business analysis
5 alina petrenko - key requirements elicitation during the first contact wi...
3 karabak kuyavets transformation of business analyst to product owner
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
3 zornitsa nikolova - the product manager between decision making and facil...
4 viktoriya gudym - how to effectively manage remote employees
9 natali renska - product and outsource development, how to cook 2 meals in...
7 denis parkhomenko - from idea to execution how to make a product that cus...
6 anton vitiaz - inside the mvp in 3 days
5 mariya popova - ideal product management. unicorns in our reality
2 victor podzubanov - design thinking game
3 sergiy potapov - analyst to product owner
4 anton parkhomenko - how to make effective user research with no budget at...

Recently uploaded (20)

PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Classroom Observation Tools for Teachers
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Complications of Minimal Access Surgery at WLH
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Pharma ospi slides which help in ospi learning
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Lesson notes of climatology university.
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Computing-Curriculum for Schools in Ghana
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
master seminar digital applications in india
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
Microbial diseases, their pathogenesis and prophylaxis
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
human mycosis Human fungal infections are called human mycosis..pptx
Classroom Observation Tools for Teachers
VCE English Exam - Section C Student Revision Booklet
Complications of Minimal Access Surgery at WLH
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Pharma ospi slides which help in ospi learning
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Lesson notes of climatology university.
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
01-Introduction-to-Information-Management.pdf
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Sports Quiz easy sports quiz sports quiz
Computing-Curriculum for Schools in Ghana
O7-L3 Supply Chain Operations - ICLT Program
master seminar digital applications in india
2.FourierTransform-ShortQuestionswithAnswers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf

MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger

  • 1. www.verifysoft.com Code coverage for small safety-critical embedded targets
  • 2. www.verifysoft.com 2 Agenda 1. Speaker Introduction 2. Verifysoft Short Introduction 3. Why Code Coverage? 4. Safety Standards and Code Coverage 5. Different Coverage Levels 6. Compiler Support 7. How does it work? Code Instrumention 8. Support for Embedded Targets 9. Qualification Kit 10. Different Reports 11. Supported Platforms/IDEand Tool Integrations 12. Live Demo
  • 3. www.verifysoft.com 3 1. Introduction – Meet the speaker Sebastian Götzinger • ISTQB® Certified Tester Foundation Level • Employed since 2013 at Verifysoft Technology GmbH • Trainer for test tools
  • 4. www.verifysoft.com 4 2. Where does he come from? VerifysoftTechnologyGmbH • Founded 2003 • Headquarters: Offenburg, Germany • >400 customers in more than 30 countries • Owner of: ▪ Testwell CTC++ (Code Coverage) ▪ Testwell CMT++ (SW-Metrics) ▪ Testwell CTA++ (Unit-Tests) • Distrubution of complementary Software (e.g. Grammatec Codesonar® in Germany) • Seminars for software quality
  • 5. www.verifysoft.com 5 3. Why Code Coverage? Code Coverage shows the parts of the code which have been executed / not executed tested / not tested Mandatory for security-critical development -> security standards Code Coverage Test Coverage Requirement Coverage
  • 7. www.verifysoft.com 7 3. Why Code Coverage? Why measure Code Coverage ? • Helps to write better (more adapted) tests • Helps to avoid redundant tests • You know when you can stop testing • Prove to your customers you have good quality • You can be sure that your development partner delivers good quality • Helps to find Dead Code • Required to obtain certifications • Mandatory for security critical development (standards DO-178C, IEC 61508, EN 50128, ISO 26262, …)
  • 8. www.verifysoft.com 8 4. Safety Standards and Code Coverage Code Coverage shows the parts of the code which have been executed / not executed tested / not tested Mandatory for security-critical development -> security standards
  • 9. www.verifysoft.com 9 Table B.2 from DIN EN 61508-3 ++ Highly recommended + Recommended 4. Safety Standards and Code Coverage DIN EN 61508-3
  • 10. www.verifysoft.com 10 ++ Highly recommended + Recommended 4. Safety Standards and Code Coverage ISO 26262-6
  • 11. www.verifysoft.com 11 4. Safety Standards and Code Coverage
  • 12. www.verifysoft.com 12 int goo( int a, int b, int c) { int x; if (((a>0) || (b>0)) && (c>0)) { x = 1; } else { x = 0; } return x; } DO-178B Definition: „Every decision has taken all possible outcomes at least once, and every condition in a decision is shown to independently affect that decision‘s outcome.“ (a>0) (b>0) (c>0) x true - true 1 true - false 0 false true true 1 false true false 0 false false - 0 Incomplete Evaluation in C/C++ - is not to be evaluated, can be true or false n+1 Tests necessary, n := amount of atomic conditions 12 4. Safety Standards and Code Coverage
  • 13. www.verifysoft.com 13 Code Coverage Requirements: CENELEC EN 50128
  • 14. www.verifysoft.com 14 5. Different Coverage Levels Testwell CTC++ supports all required coverage levels: • Function Coverage • Decision Coverage • Statement Coverage • Condition Coverage • Modified Condition/Decision Coverage (MC/DC) • Multicondition Coverage (MCC) works together with all unit-test tools
  • 15. www.verifysoft.com 15 6. Compiler Support Testwell CTC++ works with all compilers Support is available for (as of March 2014, for actual list refer to www.verifysoft.com/en_compilers.html): Altium Tasking classic toolsets,VX-toolsettoolsets,c166,cc166, ccm16c,cc51 ARM DS-5, Keil MDK-ARM Borland/Inprise/Paradigm/Codegear bcc, bcc32,pcc, pcc32 (Paradigm) Ceva DSP all (justusegcc settings) Cosmic cx6805,cx6808,cx6812, cxs12x,cxs12z, cxxgate, cx6811,cx6816,cx332,cxst10,cxstm8, cxst7, cxcf,cx56K, cxppc Freescale/Metrowerks mwccmcf, mwcceppc, mwccmcore, mwcc56800, mwcc56800e, chc12, chc08 Fujitsu/Softune fcc907s,fcc911s,fcc896s gcc and all gcc based cross-compilers i586-mingw32msvc-gcc,x86_64-linux-gnu-gcc,m68k-palmos-coff- gcc, tricore-gcc,arm-linux-gnueabi-gcc,arm-none-eabi-gcc,arm-none-linux-gnueabi-gcc,arm-elf-gcc, arm-montavista-linux-gnueabi-gcc,pic30-gcc,pic32-gcc,avr-gcc,xc16-gcc,mlx16-gcc,thumb-epoc-pe- gcc, arm4-epoc-pe-gcc, armv-epoc-pe-gcc, powerpc-wrs-linux-gnu-e500v2-glibc_small-gcc,*-gcc,*-*-gcc, *-*-*-gcc GHS/GreenHills/Multi ccv850,cxv850, ccmips,cxmips,ccarm,cxarm,ccthumb, cxthumb, ccppc, cxppc,gcc (GreenHill,not GNU) Hitatchi shc, shcpp,ch38,cxrx HI-Tech PICC (Windows and Linux) picc,picc18,picc32, dspicc,xc16-gcc,xc32-gcc, HP HPUX CC, HP C++, aCC IAR compilers and toolchains icc430,icc78k,icc78k0r,icc8051, iccarm,iccavr,iccavr32,icccf,icchcs12, iccdspic,iccmaxq,iccpic18,icccr16c,iccv850,icch8,iccm8k,iccm32c,iccm16c,iccr32c,iccrl78, iccrx, iccsam8,iccstm8 Intel (all platforms) icc,ic86,ic96 Java compilers Javac,jikes,ecj,gcj,kaffe Keil c51,c166, c251,ca/ cx51, cx2, tcc / armcc LLVM clang,clang++/ Matlab/Simulink / lcc Metaware (both Windows and Linux host) hcac,hcarc,hcarm Microchip MPLAB C pic30-gcc,pic32-gcc ---->
  • 16. www.verifysoft.com 16 6. Compiler Support Testwell CTC++ works with all compilers (continued) → Microsoft compilers cl on host, both 32 and 64 bit / cl for Smartphones and PocketPC / csc C# compiler / vjc J# compiler Mono compilers dmcs, mcs, gmcs, smcs Motorola chc12, chc08 Pathscale pathcc/pathCC Renesas shc,shcpp,ch38, ccrx Raisonance rc51,rcmp Sun WorkShop compilers,javac Symbian various compilers TI Code Composer Studio (Windows) cl2000,cl16x,cl470,cl55,cl500,cl430 Texas Instruments Linux compilers cl2000,cl16x,cl470,cl55,cl500,cl430 Trimedia tmcc VisualDSP++ ccblkfn,cc21k,ccts Windriver ccarm, ccsimpc,g++simpc,g++arm, cchppa,ccsimso,ccsparc,cc68k,cc386,cc960, ccmips, ccppc You have not seen your compiler? Contactus! We will adapt Testwell CTC++ to your compiler within a few daysand without any cost (adaptationcan even be done by the customer). Testwell CTC++ supports all compilers! No unsupportedcompilers!
  • 17. www.verifysoft.com 17 Instrumentation • Adding of global counters (Integer-Arrays) into the source code • Storage of information about counter instrumentation • Increment counters with each run • Storage of counter values • Analysis of the counter values for reporting 17 7. Code Instrumentation
  • 18. www.verifysoft.com 18 Pre- processor Compiler Linker Testbed *.c *.i *.o *.11 Tests Protocol Testcoverage Tool RAM ROM Memory requirement without instrumentation 18 Tool-Chain 7. Code Instrumentation
  • 19. www.verifysoft.com 19 Pre- processor Compiler Linker Testbed *.c *.i *.o *.11 Tests Protocol Instrumen- tation Report Generator *.c Coverage Report Symbol data Datafile (counter) Testcoverage Tool RAM ROM Memory requirement without instrumentation RAM ROM Memory requirement with instrumentation 19 Tool-Chain 7. Code Instrumentation
  • 20. www.verifysoft.com 20 7. Code Instrumentation • RAM Reason for lack of memory: 80 % RAM, 20 % ROM (pract. experience) • ROM • Mostly no filesystem (so counters have to be stored in memory) • Limited amount of interfaces on the target device (transfer of datafile) Consider additional testing interfaces in the hardware design (design for test)
  • 21. www.verifysoft.com 21 Testwell CTC++ has a very low instrumentationoverhead It works with all embedded targets If instrumentationoverheadit to high We can use Bit Cov Add-on Thus Testwell CTC++ works with even smallest targets and microcontrollers 7. Code Instrumentation
  • 22. www.verifysoft.com 22 7. Code Instrumentation ROM-Usage Without instrumentation: 60 Byte Function Coverage: 67 Byte Branch Coverage: 118 Byte Condition Coverage: 285 Byte Simple example with small code and big instrumentation overhead (mean 30 % of code size). Additional RAM-Usage without Bit-Coverage Function Coverage: 1 Integer Branch Coverage: 4 Integer ConditionCoverage: 7 Integer Additional RAM-Usage using Bit-Coverage Function Coverage: 1 Bit Branch Coverage: 4 Bit ConditionCoverage: 7 Bit Integer: 32 Bit (unsigned long) as default
  • 23. www.verifysoft.com 23 Testwell CTC++ is the ideal tool for embedded targets • Dramatically easy to use ! • Very low instrumentationoverhead on your C files • Works with all targets Host-Target add-on is provided as source code and so can be easily adapted to new targets • … even with smallest targets and microcontrollers • Supports all compilers/cross-compilers 8. Support for Embedded Targets and native projects
  • 24. www.verifysoft.com 24 Testwell CTC++ is the ideal tool for native projects • Setup and usage are straightforward • Java and C# support on top of C and C++ • Very fast analysis • Interfacing with MS Visual Studio IDE (and other IDEs) • … even on large projects 8. Support for Embedded Targets and native projects
  • 25. www.verifysoft.com 25 9. Qualification Kit Testwell CTC++ can be used to obtain certification in automotive, railway, avionics and medical industries Tool-Qualification Kits available
  • 26. www.verifysoft.com 26 10. Different Reports Reports in text, XML,HTML, JSON Directory Summary Files Summary Functions Summary Execution Profile Untested Code Listing Execution Time Listing
  • 33. www.verifysoft.com 33 11. Supported Platforms/IDE and Tool Integrations Supported Platforms Windows, Linux, FreeBSD, Solaris, HP-UX MacOSX, AIX, others on request
  • 34. www.verifysoft.com 34 11. Supported Platforms/IDE and Tool Integrations IDE-Integrations Visual Studio v7.0 and later IAR (all platforms) Borland 5.02 Fujitsu Softune Eclipse Others on request Works also with: MP-LAB, Keil, …
  • 35. www.verifysoft.com 35 11. Supported Platforms/IDE and Tool Integrations Integrations with Tool-Chains and Testing environments include CATIA - AUTOSAR Builder (DassaultSystèmes) dSpace SystemDesk dSpace TargetLink PikeTech TPT QTronic TestWeaver / Silver Imagix 4D SonarQube … (ask for other integrations) Further information: www.verifysoft.com
  • 36. www.verifysoft.com 36 12. Live Demo For a live demo, please visit OUR BOOTH 95 or: http://www.verifysoft.com/en_ctcpp_online_presentations.html
  • 37. www.verifysoft.com 37 Testwell CTC++ Test Coverage Analyser for C and C++ CTC++ add-on for Java and Android CTC++ add-on for C# Testwell CTC++ All coverage levels Statement coverage Function coverage Decision/branch coverage Condition coverage Modified condition/decision cov. MC/DC coverage Multicondition coverage (MCC) All compilers All embedded targets! Works with all unit test tools
  • 39. www.verifysoft.com 39 Thank you for your time! Visit our BOOTH 95! Your Verifysoft Team Thank You