Main Content

Requirements for Polyspace Project Creation from Build Systems

For automatic project creation from build systems, your build commands or makefiles must meet certain requirements.

Compiler Requirements

  • Your compiler must be called locally.

    If you use a compiler cache such as ccache or a distributed build system such as distmake, the software cannot trace your build. You must deactivate them.

  • Your compiler must perform a clean build.

    If your compiler performs only an incremental build, use appropriate options to build all your source files. For example, if you use gmake, append the -B or -W makefileName option to force a clean build. For the list of options allowed with the GNU® make, see make options.

  • Your compiler configuration must be available to Polyspace®. The compilers currently supported include the following:

    • Arm Keil.

    • ARM® v5 and v6.

    • Clang.

    • Cosmic.

    • Wind River® Diab.

    • Green Hills®.

    • GNU C/C++.

    • IAR Embedded Workbench.

    • IAR systems.

    • Intel® C++ Compiler Classic (icc/icl) compiler.

    • Microsoft® Visual C++®.

    • MPLAB XC8 C.

      Note that the compilation must use the xc8-cc executable. Older MPLAB XC8 compilers prior to v2.0 and MPLAB C18 compilers, which use the picc executable, are not supported.

    • NXP CodeWarrior®.

    • Renesas®.

    • Altium® Tasking.

    • Texas Instruments®.

    • tcc - Tiny C Compiler.

    If your compiler configuration is not available to Polyspace:

  • If you build your code in Cygwin™, use versions 2.x or 3.x of Cygwin for Polyspace project creation from your build system (for instance, Cygwin version 2.10 or 3.0).

  • With the TASKING compiler, if you use an alternative sfr file with extension .asfr, Polyspace might not be able to locate your file. If you encounter an error, explicitly #include your .asfr file in the preprocessed code using the option Forced includes (-include).

    Typically, you use the statement #include __SFRFILE__(__CPU__) along with the compiler option --alternative-sfr-file to specify an alternative sfr file. The path to the file is typically Tasking_C166_INSTALL_DIR\include\sfr\regCPUNAME.asfr. For instance, if your TASKING compiler is installed in C:\Program Files\Tasking\C166-VX_v4.0r1\ and you use the CPU-related flag -Cxc2287m_104f or --cpu=xc2287m_104f, the path is C:\Program Files\Tasking\C166-VX_v4.0r1\include\sfr\regxc2287m.asfr.

Build Command Requirements

  • Your build command must run to completion without any user interaction.

  • In Linux®, only UNIX® shell (sh) commands must be used. If your build uses advanced commands such as commands supported only by bash, tcsh or zsh, Polyspace cannot trace your build.

    In Windows®, only DOS commands must be used. If your build uses advanced commands such as commands supported only by PowerShell or Cygwin, Polyspace cannot trace your build. To see if Polyspace supports your build command, run the command from cmd.exe in Windows. For more information, see Check If Polyspace Supports Build Scripts.

  • Your build command must not contain lines where several sources are compiled in a single line using wildcard characters, for instance:

    cl.exe *.c

  • If you use statically linked libraries, Polyspace cannot trace your build. In Linux, you can install the full Linux Standard Base (LSB) package to allow dynamic linking. For example, on Debian® systems, install LSB with the command apt-get install lsb.

  • Your build command must not use aliases.

    The alias command is used in Linux to create an alternate name for commands. If your build command uses those alternate names, Polyspace cannot recognize them.

  • Your build process must not use the LD_PRELOAD mechanism.

  • Your compilation command must not contain short file names or 8.3 filenames such as PROGRA~ and C__~1 in this path:

    "command": "C:\\PROGRA~1\\mingw64\\bin\\C__~1.EXE

  • Your build command must be executable completely on the current machine and must not require privileges of another user.

    If your build uses sudo to change user privileges or ssh to remotely log in to another machine, Polyspace cannot trace your build.

  • If your build command uses redirection with the > or | character, the redirection occurs after Polyspace traces the command. Therefore, Polyspace does not handle the redirection.

    For example, if your command occurs as

    command1 | command2
    And you enter
    polyspace-configure command1 | command2
    When tracing the build, Polyspace traces the first command only.

  • Tracing a build command and creating a Polyspace project is not supported on Mac computers in the following cases. If you want to create a project on a Mac computer that falls in one of these categories, try creating a project from a compilation database instead. See Create Polyspace Options File from JSON Compilation Database.

    • If the System Integrity Protection (SIP) feature is active on the operating system macOS El Capitan (10.11) or a later macOS version, it prevents the tracking of processes underlying a build command. In this case, you can disable SIP temporarily to create a Polyspace project or create a project from a compilation database.

      Similar considerations apply to other security applications such as security-related products from CylanceProtect, Avecto and Tanium.

    • Tracing of build commands is not supported on Mac computers that use Apple silicon processors with ARM architecture.

  • If your computer hibernates during the build process, Polyspace might not be able to trace your build.

  • When creating projects from build commands in the Polyspace User Interface, you might encounter errors such as libcurl.so.4: version 'CURL_OPENSSL_3' not found. In such cases, create the Polyspace project by using the command polyspace-configure in the system command line interface, using the build command as the argument. See polyspace-configure.

Note

Your environment variables are preserved when Polyspace traces your build command.

See Also

Topics