Issue with verifying AUTOSAR software components by using Polyspace Code Prover, variable definitions are not considering from Rte_Type.h header file even if it included in source file.

6 ビュー (過去 30 日間)
I am verifying Autosar swc by using Polyspace Code Prover, in that one source file is included with 'Rte_Type.h' all variables and structure defintions are defined in the 'Rte_Type.h' but while creating the project I am getting compilation errors like identifier 'Varianle_name' is undefined I can see in the log files,even include folder is having 'Rte_Type.h' file. So many times I am getting this error for different software components, I think this is a bug present in the polyspace code prover. Please fix this issue as soon as possible.
  2 件のコメント
Anirban
Anirban 2020 年 6 月 12 日
Hi Venkata,
It is possible you ran into a bug, but it might also be possible that there is an issue in setting up the project. In principle, an include file explicitly specified in the project should be visible to the Polyspace analysis.
To be able to understand the issue better, I would require to know how you are running Polyspace Code Prover.
If you are running at the command line, are you using:
OR
  • One of polyspace-bug-finder or polyspace-bug-finder-server?
If you are running from the user interface, when creating the project:
  • Did you choose the option Create from AUTOSAR specification?
OR
  • Did you add sources and includes manually to the project?
Depending on the answer, I might be able to point you to some resources for further troubleshooting or might even be able to tell what is happening. However, issues with AUTOSAR projects are often convoluted. You might get a faster answer if you contacted MathWorks Technical Support.
Venkata Narendra
Venkata Narendra 2020 年 6 月 14 日
Hi Anirban,
Thanks for your comment on the question.
I am creating the project by using the project configuration option as 'create from AUTOSAR specification'
And I am using a folder which contains both .c and .h files and I am providing this folder as a source and include folder to create a project along with ARXML file.

サインインしてコメントする。

回答 (1 件)

Anirban
Anirban 2020 年 6 月 12 日
編集済み: Anirban 2020 年 6 月 12 日
Hi Venkata,
I can actually give a partial answer to your question.
There is a common user perception that if a header file is specified in a source file, the Polyspace analysis should knows its contents. That is somewhat true for standard headers. But even for standard headers, it might be better if you specify the path to your compiler version of the headers by using the -I option (or by just adding the header paths to the Project Include Folders if you are running analysis from the UI). The reason is that eventually you are compiling your code with those headers and you want the Polyspace analysis to emulate your compilation as closely as possible. As an aside, there is a command polyspace-configure that can extract the header paths from a build command or makefile without you having to explicitly dig them up.
However, for standard headers, Polyspace does know their contents and you do not necessarily have to specify folder paths to those headers using an analysis option. For instance, a simple file with stdio.h included will compile fine without your having to specify the path to your compiler version of stdio.h. Along the same lines, Rte_Type.h is a standard header too, but only in the AUTOSAR context. So:
  • If you run a regular Code Prover analysis, say using polyspace-code-prover, you have to explicitly specify the folder paths to the AUTOSAR headers. Simply including them in source files will not work. If you know the folder paths to the AUTOSAR headers, you can take this approach.
  • If you run the polyspace-autosar command, it is AUTOSAR-aware. You then do not have to specify the folder paths to AUTOSAR headers explicitly.
Hope this helps.
  5 件のコメント
Anirban
Anirban 2020 年 6 月 15 日
編集済み: Anirban 2020 年 6 月 15 日
Hi Venkata,
I think it is better to contact Technical Support at this point. If you provide them the logs, they can help diagnose the specific issue. If the issue is indeed a bug, they can get back to development for a fix. You can point to this answer to save on some initial conversations.
Venkata Narendra
Venkata Narendra 2020 年 6 月 17 日
Hi Anirban,
Thanks for you reply.
We will contact technical support team.

サインインしてコメントする。

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by