メインコンテンツ

Target board name (Testing)

Specify the target board that you run your test executable on

Description

Specify the hardware board on which to execute tests.

Set Option

Set the option using one of these methods:

  • Polyspace Platform user interface (desktop products only): In your project configuration, on the Build tab, select the Target & Compiler node and then select a value for this option.

  • Command line and : Use the option -manage-target-package as an input to polyspace-test. See Command-Line Information.

Why Use This Option

By default, tests in a Polyspace® Platform project are executed on your host computer. Use this option to specify a target board for dynamic testing. If your target board is not listed, register the target using a registration file that describes your target including processor, toolchain, and communication interface.

A custom target registration file is a MATLAB® code file that defines a target using classes from the Target Framework MATLAB API. Though the file uses MATLAB code, You do not need an installation of MATLAB to author this file or use the file later for target registration in Polyspace Test™. However, the editors in MATLAB or MATLAB Online provide better support for authoring the file with features such as syntax highlighting and code completions.

For more information on creating this file, see:

For an example file and more information on the target registration workflow, see Get Started with C/C++ Test Execution on Target.

Settings

Default: Host Computer

Host Computer

Execute tests in a Polyspace Platform project on your host computer.

Custom target board

Execute tests in a Polyspace Platform project on the target board that you registered. To register a custom target, create a registration file for your target. A registration file is a MATLAB code file that describes your target and its communication interface. To register the target:

  1. On the Polyspace Platform toolstrip, select Configuration > Manage Boards to open the Manage boards window.

    Alternatively, in a project configuration, you can click the Manage Boards icon to open the same window.

    Manage boards window

  2. Click Register a target. Select the registration file for your target.

  3. If there are no errors, your target board name appears in the list of boards. Click OK to complete target registration.

  4. In the project configuration, select your registered target board from the Target board name (Testing) list.

If your target board registration file defines a toolchain and processor, when you select the board, other options in the configuration are also specified.

  • The Processor option is set to the processor defined in your target board registration file. You cannot select a different processor.

  • The Compilation toolchain (Testing) option is set to the toolchain defined in your target board registration file. However, you can change this setting to a different toolchain for compilation.

None

Do not use a target board for test execution. You can use this setting to build the sources and tests in a project but cannot execute them.

Use this setting if the target you registered consists of a toolchain only (build command with compiler and linker) and check if your project builds without errors using the registered toolchain. Using this setting helps you avoid writing additional MATLAB code in your custom target registration file to associate the toolchain with a board.

Tips

You can override some properties related to your target connection without having to create an entirely new target and registering the new target. On the Manage Boards window, click the Configure board connection icon next to the target name. Modify the connection to the board as needed. For instance, you can change the parity of the serial connection to the board.

Configure board connection properties such as baud rate, parity and port.

Command-Line Information

Parameter: -manage-target-package
Example (Target Registration): polyspace-test -manage-target-package -register-from-file pathToMATLABFile
Example (Target Override): polyspace-test -manage-target-package -config boardName -set boardProperty=boardPropertyValue