MATLAB Answers

Polyspace R2020b - compilation error occurs on stdio.h with error 'identifier "_Va_list" is undefined'

1 view (last 30 days)
Kyle Caparoso
Kyle Caparoso on 17 May 2021
Answered: Anirban on 17 May 2021
Hi,
I keep getting compilation error on stdio.h with error 'identifier "_Va_list" is undefined'.
I am trying to configure a Polyspace Project for a VxWorks 7 DKM project and I'm getting a lot of errors. Is there a template for a VxWorks 7 project?
Any help would be appreciated.

Answers (1)

Anirban
Anirban on 17 May 2021
In the Polyspace user interface, when you create a new project, you can choose to use a predefined template. See more details in Create Project Using Configuration Template. In the list of templates available, it looks like as of now, upto VxWorks 6 is supported. However, it is possible that the options set by the Polyspace template also work for VxWorks 7. In other words, the template sets the include location to $WIND_BASE/target/h and adds -D CPU=I80386 and -D __OS_VXWORKS, and this might also work for VxWorks 7.
A more robust solution would be to use the polyspace-configure command on your VxWorks build. The command sniffs out all the compilation options used during your build and sets the equivalent Polyspace options. You can run the command directly at the command-line or from within an IDE. Here are some documentation links for how to use the command from inside IDEs:
  • Eclipse-based IDEs : Here, you temporarily replace the build command in your IDE with polyspace-configure ... buildCommand and run a build. Your IDE project is now ready for a Polyspace analysis. (This example assumes you are using the Polyspace plugin in Eclipse, or an Eclipse-based IDE.)
  • Visual Studio: Here, starting from the Polyspace user interface, when creating a project, you open your IDE, perform a build of your IDE project and then close it. The resulting Polyspace project is set up for analysis with the right set of options. If you know the underlying build command that your IDE uses, you can also run polyspace-configure directly on that build command at the command line. For instance, the Visual Studio IDE uses the msbuild command, so a polyspace-configure run would look like this: polyspace-configure msbuild TestProject.vcxproj /t:Rebuild
If you contact MathWorks Technical Support, they can help you with setting up a Polyspace project from your VxWorks project.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!