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

22 views (last 30 days)
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.
  2 Comments
Mark
Mark on 3 Jul 2023
Are there any further examples or guidelines on how to get polyspace-configure to trace a WindRiver VxWorks7 build? I just keep running into the problem whereby I get error messages like the following:
polyspace-configure: 68s: ERROR: All detected programs are unknown: there is no matching compiler configuration found.
polyspace-configure: 68s: ERROR: Executed programs are:
polyspace-configure: 68s: ERROR: ipconfig "C:\WINDOWS\system32\ipconfig.exe"
polyspace-configure: 68s: ERROR: java "C:\WindRiver\workbench-4\eclipse\x86_64-win32\jre\bin\java.exe"
polyspace-configure: 68s: ERROR: No compilation unit detected in your build.
polyspace-configure: 68s: ERROR: Possible reasons for this error are:
polyspace-configure: 68s: ERROR: - Your build command does not compile any C/C++ files.
polyspace-configure: 68s: ERROR: - Your compiler was not called. Try forcing a clean rebuild.
polyspace-configure: 68s: ERROR: - Your compiler is unknown to Polyspace. See https://www.mathworks.com/help/bugfinder/ug/your-compiler-is-unknown.html
polyspace-configure: 68s: ERROR: - You use a -include-sources/-exclude-sources combination that filters out all source files. To see which files you are including/excluding, use options -print-included-sources and print-excluded-sources.
polyspace-configure: 68s: ERROR: Fatal error
The problem seems to be that when the VxWorks code gets buit, it is built inside a tool (utility / shell) called "wrtool"
I had a go at creating a new compiler configuration file and placed it inside my C:\Program Files\Polyspace\R2023a\polyspace\configure\compiler_configuration folder, but it is not totally clear how to set that up (or indeed whether having a VxWorks/writool specific version of a compiler configuration file is going to help at all).
Would be good to see an example of: This is how to get polyspace to trace a wrtool build.
Are there any such examples?
Anirban
Anirban on 13 Jul 2023
There isn't an example as far as I can tell, but please contact MathWorks Technical Support with more information about the issue. You can use the -easy-debug option with polyspace-configure to create a zip file that can help Technical Support figure out why a compilation command is not being detected.

Sign in to comment.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!