필터 지우기
필터 지우기

Polyspace: Only one (green) check despite expecting multiple hundreds of checks

조회 수: 6 (최근 30일)
Fabian Milczewski
Fabian Milczewski 2022년 9월 14일
편집: Anirban 2022년 9월 15일
Hi, I am using polyspace to run the Code Prover for software components. However for some components I only receive one green check and the error message :
#error "MemMap.h was included without valid memory section define!"
which then leads to a failed compilation.
Expected were multiple checks (1000+).
I would appreciate any help regarding the matter.
Best regards,
Fabian
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 9월 14일
https://www.mathworks.com/matlabcentral/answers/527508-autosar-memory-section-defines-in-generated-c-code is potentially relevant

댓글을 달려면 로그인하십시오.

답변 (1개)

Anirban
Anirban 2022년 9월 15일
편집: Anirban 2022년 9월 15일
The answer depends on whether you used polyspace-autosar (to generate modules for software components from ARXML specifications and then analyze them) or polyspace-code-prover (to analyze the modules you had manually created).
I will give an answer assuming the latter. Since polyspace-autosar eventually uses polyspace-code-prover at the end, the answer should apply to both cases. A #error directive is typically a deliberate stop in the code. It is typically used to stop compilation if certain macros are not defined through compiler flags. Polyspace tries to emulate this compiler behavior and also stops the analysis if it encounters a #error directive. For an example, see Fix Polyspace Compilation Errors Related to #error Directive.
In a normal compilation, a #error directive is not meant to be hit. The fact that Polyspace is hitting one means that you have not sufficiently emulated your compilation through Polyspace options. You can go to the location of the #error directive, see what macros you need to define so Polyspace does not hit the #error directive and define those macros through the analysis option -D.
This is a general answer based on the information you have given. Generally, the #error problems can be tricky to fix because they might be related to some other setup issue. I will need more information on how you ran the analysis for a more concrete answer. Your best bet might be to contact Technical Support for more help with your problem. See also Contact Technical Support About Issues Running Polyspace.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by