polyspace.project.Processor Class
R2026bNamespace: polyspace.project
Description
This Python® class represents the processor associated with a build configuration. A polyspace.project.Processor object stores your target processor characteristics such as data type sizes, byte ordering, and alignment. Polyspace®
Test™ uses this information to generate driver code for building a project on target hardware, and other purposes. Some checkers that run during static analysis also use the processor details.
You can get a processor (polyspace.project.Processor object) in one of the following ways:
You can create a processor using the
createFromTForcreateCustommethod on theProcessorsproperty of a project (polyspace.project.Projectobject) and then set the newly created processor in your build configuration. You set a processor by assigning it to theProcessorproperty of a build configuration (polyspace.project.OwnedBuildConfigurationorpolyspace.project.BuildConfigurationobject).You can get the currently used processor by reading the current
Processorproperty of a build configuration.If you set the
Boardproperty of a build configuration to the name of a previously registered hardware board (that is, a value other than"None"or"Host Computer"), theProcessorproperty is set to the processor associated with the board.
Creation
Syntax
Description
processor = buildConf.Processor returns the polyspace.project.Processor object associated with the build configuration buildConf. Here, buildConf is a polyspace.project.OwnedBuildConfiguration or polyspace.project.BuildConfiguration object.
processor = proj.Processors.createFromTF( creates a standardProcessorName, manufacturerName)polyspace.project.Processor object from a predefined target processor specification with the specified processor name and manufacturer name. The processor is added to the list of available processors for the polyspace.project.Project object proj. You can then assign the processor to the Processor property of a build configuration. For a list of supported processor names and manufacturer names, see Target processor type
(-target).
processor = proj.Processors.createCustom( creates a custom customProcessorName)polyspace.project.Processor object with the specified name. You can then configure the processor properties such as data type sizes, byte ordering, and alignment. The processor is added to the list of available processors for the polyspace.project.Project object proj.
Input Arguments
Properties
Tips
The following constraints apply to your processor specifications:
If you specify a predefined processor by its name and manufacturer name, you cannot edit all properties of the processor. Trying to edit nonconfigurable properties leads to a
ValueErrorwith a message:Unable to set parameter <parameterName> in processor <processorName>You cannot set negative values for processor properties that specify sizes of data types.