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

1 visualizzazione (ultimi 30 giorni)
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,
  1 Commento
Walter Roberson
Walter Roberson il 14 Set 2022
https://www.mathworks.com/matlabcentral/answers/527508-autosar-memory-section-defines-in-generated-c-code is potentially relevant

Accedi per commentare.

Risposte (1)

Anirban il 15 Set 2022
Modificato: Anirban il 15 Set 2022
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