Keil uVision Static Analysis Problem
I worked with Keil uVision. For analysing Keil uVision code I followed instruction of the https://docs.parasoft.com/display/CPPDESKE1041/Keil+MDK-ARM+Support document. I create bdf file and I import my code and bdf file to standalone C++test ide. Then I tried to do static analysis for this code.
In the parasoft document it says that following thing ;
After the project has been successfully imported, no additional configuration steps are required for running static analysis.
For details on performing static analysis, see Static Code Analysis and Flow Analysis.
It says that no additional steps are reduired for running static analysis. Therefore I select one .c source file and I run a static analysis with using this file. Then C++test does not analyse this file because in the scope tab current document number 0/0 it means that I can not run this file for static analysis. Therefore after anaysis zero violation found and task was not reported.
Why this case occur?
Comments
-
Hello @fatmanur61,
I have recently posted an updated guide on how to run static analysis on Keil uVision. Here is the link to the post:
https://forums.parasoft.com/discussion/4348/keil-uvision-static-analysis-quick-start/p1?new=1
0 -
Hi @MichaelC,
I looked at the your posted document. I followed the instruction of it. I work in command line also. I try to related command line which creates bdf file but the bdf file did not generate correctly. Then I try to compile code with - r command, it compiled correctly. There is no problem for compile. Why the bdf file does not created correctly? Related screen shot is added to question.
0 -
Hello @fatmanur61 ,
The tutorial that I linked uses the Keil generated batch to collect information for the bdf. Using the UV4.exe requires more configuration try adding the line:
--cpptesttraceQuoteCmdLineMode=sq
to your command line. I have attached some documentation on how to build a bdf using the UV4.exe. Please let me know if you have any other questions regarding C++test.
Keil uVision bdf generation:
https://docs.parasoft.com/display/CPPDESKE1042/Project+Creation+and+Configuration+with+Keil+MDK-ARM+Support0 -
Hi @MichaelC, we try to generate bdf file with the tutorial which you linked to discussion. We tried also --cpptesttraceQuoteCmdLineMode=sq command but bdf file did not generated correctly. One thing which we did not do is we did not generate batch file from keil. It is mondatory? How batch file uses while creating bdf?
0 -
Hello @fatmanur61, building the batch file is mandatory for creating a bdf. The batch contains all of the necessary dependencies of your Keil project that C++test needs to generate a bdf and run analysis.
0 -
Hi @MichaelC . We managed static analysis for Keil. The bdf file created correctly by using batch file. Then we try to generate unit tests for keil project. We generated tests successfully. After that we try to run this tests via "Unit tests->Embedded-> Keil configurations ". But we took error. Then I search the error internet and I added extra compiler options. Added compiler option was shown in image. Related images are added to discussion. How can we solve this problem?
0 -
Hello @fatmanur61, it may be best to create a support case so our support team can resolve this issue. We'll need to take a deeper look in your project to determine what is causing this issue.
0