Fix Polyspace Compilation Errors Related to TASKING Compiler
If you choose tasking for the option Compiler (-compiler), you can
encounter this issue.
Issue
During Polyspace® analysis, you see an error related to a Special Function Register data type.
Cause
When compiling with the TASKING compiler, you typically use the following compiler flags to specify where Special Function Register (SFR) data types are declared:
--cpu=: The compiler implicitlyxxx#includes the filesfr/regin your source files. Oncexxx.sfr#include-ed, you can use Special Function Registers (SFR-s) declared in that.sfrfile.--alternative-sfr-file: The compiler uses an alternative SFR file instead of the regular SFR file. You can use Special Function Registers (SFR-s) declared in that alternative SFR file.
If you specify the TASKING compiler for your Polyspace analysis, the analysis makes the following assumptions about these compiler flags:
--cpu=: The analysis chooses a specific value ofxxxxxx. If you use a different value with your TASKING compiler, you can encounter an error during Polyspace analysis.The
xxxvalue that the Polyspace analysis uses depends on your choice ofTarget processor type (-target):tricore:tc1793bc166:xc167cirh850:r7f701603arm:ARMv7M
--alternative-sfr-file: The analysis assumes that you do not use an alternative SFR file. If you use one, you can encounter an error.
Solution
Use the command-line option -compiler-parameter in your Polyspace analysis as follows. You use this command-line option to make Polyspace aware of your compiler flags. In the user interface, you can enter the
command-line option in the field Other. You can enter the option multiple times.
--cpu=: For your Polyspace analysis, usexxxHere,-compiler-parameter --cpu=xxx
xxxis the value that you use when compiling with your compiler.--alternative-sfr-file: For your Polyspace analysis, use-compiler-parameter --alternative-sfr-file
If you still encounter an error because Polyspace is not able to locate your
.asfrfile, explicitly#includeyour.asfrfile in the preprocessed code using the optionInclude (-include).Typically, the path to the file is
. For instance, if your TASKING compiler is installed inTasking_C166_INSTALL_DIR\include\sfr\regCPUNAME.asfrC:\Program Files\Tasking\C166-VX_v4.0r1\and you use the CPU-related flag-Cxc2287m_104for--cpu=xc2287m_104f, the path isC:\Program Files\Tasking\C166-VX_v4.0r1\include\sfr\regxc2287m.asfr.You can also encounter the same issue with alternative sfr files when you trace your build command. For more information, see Requirements for Project Creation from Build Systems.