メインコンテンツ

polyspace-test -manage-target-package

(System Command) Register, list, configure or otherwise manage target packages for test execution or code profiling on targets

Since R2023b

Description

The system command polyspace-test -manage-target-package registers, lists, configures or otherwise manages target packages for execution of C/C++ tests on target boards.

polyspace-test -manage-target-package -list Board lists the names of boards registered with Polyspace® Test™.

polyspace-test -manage-target-package -list Toolchain lists the names of toolchains registered with Polyspace Test.

polyspace-test -manage-target-package -list Processor lists the names of processors registered with Polyspace Test.

polyspace-test -manage-target-package -register-from-file <registrationFile> registers an execution target using the custom target registration file <registrationFile>. Once a target is registered, you can use board and toolchain names from the target with project build options such as -board and -toolchain. For more information, see polyspace-test -build.

polyspace-test -manage-target-package -unregister-from-file <unregistrationFile> unregisters components in a previously registered target using the custom target unregistration file <unRegistrationFile>.

polyspace-test -manage-target-package -remove Board -name <boardName> removes a previously registered board <boardName> and all associated components.

polyspace-test -manage-target-package -remove Toolchain -name <toolchainName> removes a previously registered toolchain <toolchainName> and all associated components.

polyspace-test -manage-target-package -remove Processor -name <processorName> removes a previously registered processor <processorName> and all associated components.

polyspace-test -manage-target-package -config <boardName> lists all reconfigurable properties of the previously registered board boardName along with their current values.

polyspace-test -manage-target-package -config <boardName> -set <boardProperty>=<boardPropertyValue> sets the property <boardProperty> of the previously registered board <boardName> to <boardPropertyValue>, and then prints the updated list of reconfigurable properties of the target.

Examples

collapse all

This example shows how to register a target for use with Polyspace Test.

Follow these steps using files in the folder <polyspaceroot>\polyspace\examples\doc_pstest\execute_on_target. Here, <polyspaceroot> is the Polyspace installation folder.

  1. Register a target package using the custom target registration file customPackage.m.

    polyspace-test -manage-target-package -register-from-file customPackage.m
    This registration file registers a board myTarget along with a toolchain myToolchain. For more information on the basics of authoring a custom target registration file, see Create Target Registration Packages for C/C++ Test Execution on Targets.

  2. List the target boards registered for use with Polyspace Test.

    polyspace-test -manage-target-package -list Board
    The board myTarget appears in the list of registered boards.

  3. List the toolchains registered for use with Polyspace Test.

    polyspace-test -manage-target-package -list Toolchain
    The toolchain myToolchain appears in the list of registered toolchains.

  4. List the checks that can be performed to test the connection to a target board.

    polyspace-test -check-target-package -list-checks
    The check BoardUsingPSTUnit appears in the list of available checks. This check builds some simple sources and tests using the toolchain in the target and runs the resulting application on the target board.

  5. Run the check BoardUsingPSTUnit to test the connection to the target.

    polyspace-test -check-target-package -check BoardUsingPSTUnit -toolchain myToolchain -board myTarget
    If all checks complete without errors, you see the status:
    BoardUsingPSTUnit Status: OK
    Otherwise, you see an appropriate error message.

  6. Unregister the target using the custom target unregistration file.

    polyspace-test -manage-target-package -unregister-from-file customPackageRemove.m

Input Arguments

collapse all

Path to MATLAB file for registering a custom target. For more information on target registration files, see Automate C/C++ Test Execution on Targets Using Polyspace Platform Projects.

Path to MATLAB file for unregistering a custom target. For more information on target unregistration file, see Automate C/C++ Test Execution on Targets Using Polyspace Platform Projects.

Name of the hardware board used for testing. To see the names of all boards registered with Polyspace Test, use the command polyspace-test -manage-target-package -list Board.

Name of the compilation toolchain for testing. To see the names of all toolchains registered with Polyspace Test, use the command polyspace-test -manage-target-package -list Toolchain.

Name of the processor used for testing. To see the names of all processors registered with Polyspace Test, use the command polyspace-test -manage-target-package -list Processor.

Name of the board that you want to reconfigure. To see the names of all boards registered with Polyspace Test, use the command polyspace-test -manage-target-package -list Board.

Name of board property with the new property value. To see all configurable properties of a board with name <boardName> and their allowed values, use the command polyspace-test -manage-target-package -config <boardName>.

Example: -set Parity=Odd

Version History

Introduced in R2023b