Unable to use Polyspace PackNGo when the project name is the same as the filename
5 views (last 30 days)
Show older comments
MathWorks Support Team
on 30 Mar 2023
Answered: MathWorks Support Team
on 5 Apr 2023
I have a Simulink project called "PolyspacePacknGoTest.prj" in MATLAB R2020b. I have a Simulink model inside a project called "PolyspacePacknGoTest.slx" and a test harness for my model called "PolyspaceHarness.slx". I am trying to use the "polyspacePackNGo" function for the test harness and I am getting the following error:
>> zipfile = polyspacePackNGo('PolyspaceHarness')
### Starting Polyspace options generation for Embedded Coder
### Checking Polyspace Configuration:
Warning: For Polyspace code verification, MathWorks recommends that you either set 'InitFltsAndDblsToZero' to 'on' using the command line, or search for 'Use memset to initialize floats and doubles to 0.0' in the Configuration Parameters dialog box and clear the checkbox.
### Parameters used for code verification:
System : PolyspaceHarness
Additional Files : 0
Constraint input mode : DesignMinMax
Constraint parameter mode : None
Constraint output mode : None
Expected one output from a curly brace or dot indexing expression, but there were 2 results.
Error in pslink.verifier.ec.OptionSet/fixIncludes
Error in pslink.verifier.OptionSet/writeOptionsFile
Error in pslink.verifier.OptionSet/prepareOptions
Error in prepareCodeVerification
Error in polyspacePackNGo (line 89)
generatedArchive = prepareCodeVerification(systemH, opts, coderID, isTopMdlRefAnalysis);
What is causing this?
Accepted Answer
MathWorks Support Team
on 30 Mar 2023
The error is caused by the project and the Simulink model having the same name (Eg. "PolyspacePacknGoTest" shown below):
Project path: W:\\PolyspacePacknGoTestModel\TestPolyspacePackNGo\PolyspacePacknGoTest
Simulink model path:
W:\\PolyspacePacknGoTestModel\TestPolyspacePackNGo\PolyspacePacknGoTest\slprj\ert\PolyspacePacknGoTest
To resolve the issue, change the name of either the file or the project to avoid shadowing.
0 Comments
More Answers (0)
See Also
Categories
Find more on Test Model Components in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!