Follow the public account below to learn more embedded knowledge!
Do you usually use static code analysis tools when writing code?
Many people may not have performed static analysis on their code, so today I will recommend several static code analysis tools.
0
About Static Code Analysis ToolsStatic code analysis tools, as the name suggests, are tools that perform static analysis on code to predict (analyze) potential issues in the code in advance.In other words, they help identify bugs (errors, warnings) in your code.Static code analysis tools require your code to adhere to certain standards, such as C99, MISRA C:2012, etc., otherwise the tools will not support static analysis of your code.Static code analysis tools can exist independently (as standalone software) or be integrated into an IDE. For example, IAR EWARM comes with a built-in static analysis tool.Additionally, some tools can be integrated into IDEs through “plugin installation,” such as adding the PC-lint static code analysis tool in Keil MDK.Below are several static code analysis tools:
1
LDRA1. Website
https://www.ldra.com/
2. Introduction
LDRA is a leading company with over 40 years of experience, primarily focused on code analysis and software testing automation for code safety and mission-critical markets, aiming to identify early errors in code and eliminate bugs.
LDRA fully complies with industry standards and tracks requirements through static and dynamic analysis to perform unit testing and validation across various hardware and software platforms. LDRA operates globally, with headquarters in the UK, USA, Germany, and India, and has an extensive distributor network.
LDRA is ISO 9001:2008 certified. The LDRA tool suite has been certified by TÜV SÜD and SGS-TÜV Saar. These tools comply with IEC 61508, IEC 62304, IEC 60880, EN 50128, and ISO 26262 regulations and can be used for safety-related software development.
Application Areas:3. Features
-
Automated unit testing and system-level testing
-
Automatically generates software certification and approval evidence
-
Plans and executes requirement-based testing
-
Performs and reports coverage analysis for all code down to the target level
-
Can perform unit testing and system-level testing on almost any host or target platform
-
Complies with coding standards (industry and user-defined)
4. TrialThe LDRA tool suite supports a 30-day free trial.
2
Parasoft C / C++ Test1. Website
https://www.parasoftchina.com/products/ctest/
2. Introduction
Parasoft® C/C++test® is a development testing solution specifically for C and C++ languages, proven to enhance software development efficiency and code quality through automated best practices.
Founded in 1987, Parasoft is headquartered in Los Angeles, California. With over 30 years of rich technical expertise and industry application experience, its products span unit testing, static analysis, dynamic analysis, functional testing, stress testing, information security testing, communication protocol simulation, and application environment virtualization.
3. Features
-
Improves C/C++ software quality
-
Automated testing platform
-
Compliance certification standards
-
Embedded and cross-platform development
-
Enhances development efficiency and accelerates software delivery
-
Low-cost learning with high customizability
4. Supports a wide range of platformsSupported host platforms:
- Windows
- Visual Studio
- Solaris UltraSPARC
Supported IDEs:
- Eclipse IDE for Developers
- Microsoft Visual Studio
- Wind River Workbench
- ARM Workbench IDE for RVDS
- ARM Development Studio
- QNX Momentics IDE (QNX Software Development Platform)
- Texas Instruments Code Composer Studio
- ARM ADS
- Green Hills MULTI
- IAR Embedded Workbench
- Keil µVision IDE
- Keil RealView
- Microsoft eMbedded Visual C++
- Microsoft Visual Studio
- Texas Instruments Code Composer
- Wind River Tornado
And more:4. TrialThe Parasoft C/C++test tool suite also supports free trials, and you can apply for a free trial on the official website.
3
PVS-Studio1. Website
https://pvs-studio.com/en/pvs-studio/
2. Introduction
PVS-Studio is a tool for detecting errors and security vulnerabilities in source code written in C, C++, C#, and Java. It can run on 64-bit systems in Windows, Linux, and macOS environments and can analyze source code for 32-bit, 64-bit, and embedded ARM platforms.
PVS-Studio performs static code analysis and generates reports to help programmers find and fix errors. It conducts various code checks and is useful for identifying print errors and copy-paste errors, such as V501, V517, V522, V523, V3001, and similar error messages.
3. Features
Note: The content in the screenshot is automatically translated and may contain some translation errors.4. Supports a wide range of platforms
Operating Systems:
-
Windows
-
Linux
-
macOS
For tutorials corresponding to C/C++ compilers, visit:https://pvs-studio.com/en/m/0033/5. TrialThe PVS-Studio tool suite is also commercial software but supports free trials.
4
VectorCAST1. Website
https://www.vector.com/de/en/products/products-a-z/software/vectorcast/
2. Introduction
The VectorCAST embedded software testing platform is a suite of products that automates analysis and testing throughout the software development lifecycle.
The VectorCAST tool suite supports the creation and management of test cases to validate the underlying software. Additionally, VectorCAST tools capture and report structural code coverage data at all levels specified by DO-178C and ED-12C (including Level A).
Applicable to: aerospace, automotive, industrial, medical, rail transportation, and other fields.
Software critical levels and structural coverage requirements:
3. Features
-
Supports code coverage for all levels required by DO-178C; ED-12C
-
Automatically generates and compiles complete test stubs and drivers
-
Automated regression testing
-
Generates standard-compliant test reports
-
Test execution on host, simulator, and embedded target systems
4. TrialThe VectorCAST tool suite is also commercial software but supports free trials.
👉 Those moments that make hardware engineers shed tears! 👉 Implementing SPI communication with STM32 microcontroller to continuously transmit 24-bit data 👉 C language, those must-know techniques 👉 The