Polyspace: Only one (green) check despite expecting multiple hundreds of checks
1 次查看(过去 30 天)
显示 更早的评论
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
2022-9-14
https://www.mathworks.com/matlabcentral/answers/527508-autosar-memory-section-defines-in-generated-c-code is potentially relevant
回答(1 个)
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!