Is There a Way to Disable Code Optimization in VectorCast?

  • Thread starter rdsingh
  • Start date
  • Tags
    Vector
In summary, the conversation discusses the use of VectorCast for unit testing code written in C language. The code is being optimized at the disassembly level, causing it to not appear in VectorCast and resulting in the If condition not being hit. This has led to abnormal termination of test cases. The individual is seeking a solution, possibly by turning off code optimization through a flag in the tool's documentation.
  • #1
rdsingh
1
0
I am using VectorCast tool to Unit Test the code written in C language.

Brief Description:-The following piece of code (which is present in source code) is getting optimized in VectorCast at Disassembly Level. Hence, the code is not even visible in VectorCast Disassembly.

Details:-

In Function ffx_ScheduleInsertCCEvent() :- The Following Code is getting Optimized in VectorCast automatically and hence, the If condition is not getting hit.

if ( FFX_Scheduler.PendingCCFreeList == NULL )
{
#ifdef SIMULATION_BUILD
TRAP();
#else
FM_ASSERTION_RESET_FAULT( AF_FFX_PCCLIST_OVERFLOW, (UINT32) Signal, callers_address() );
#endif
}

Due to the Code Optimization by VectorCast, the piece of code is not visible in the Disassembly while debugging. Plus, the FM_ASSERTION_RESET_FAULT is not getting hit and the Test case is getting terminated Abnormally.

Does anybode has a solution to this problem.
 
Technology news on Phys.org
  • #2
I'm not familiar with VectorCast, but is there some way to turn off code optimization? I would think there's a flag you could set when the code is compiled. I would take a look at the documentation for this tool to see if that is a possibility.
 

Related to Is There a Way to Disable Code Optimization in VectorCast?

1. What is Vector Cast Tool?

Vector Cast Tool is a software testing tool used for automated unit and integration testing of embedded software. It is designed to help developers ensure the quality and reliability of their code by identifying and fixing defects early in the development process.

2. How does Vector Cast Tool work?

Vector Cast Tool works by analyzing the source code of embedded software and automatically generating test cases to exercise different paths and functions within the code. It then executes these test cases and compares the actual results with the expected results to identify any defects or errors.

3. What are the benefits of using Vector Cast Tool?

Some of the key benefits of using Vector Cast Tool include improved code quality, reduced development time, increased test coverage, and enhanced software reliability. It also helps in reducing the overall cost of software development by catching defects early and preventing them from becoming more serious and expensive to fix.

4. Can Vector Cast Tool be integrated with other software development tools?

Yes, Vector Cast Tool can be integrated with other software development tools such as compilers, debuggers, and continuous integration tools. This allows for a seamless and efficient testing process within the existing development environment.

5. Is Vector Cast Tool suitable for all types of embedded software?

Vector Cast Tool is suitable for a wide range of embedded software, including safety-critical systems. It supports various programming languages and can be customized to meet specific project requirements. However, it is always recommended to thoroughly evaluate the tool's capabilities and compatibility with your specific project before implementing it.

Similar threads

  • Programming and Computer Science
2
Replies
54
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
527
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • Feedback and Announcements
Replies
0
Views
95K
Back
Top