Page tree

Skip to end of metadata
Go to start of metadata

The Test Configurations that are provided for testing Code Composer Studio v3.x projects are pre-configured to handle most typical projects configurations. However, it may be necessary to modify the project configuration to enable runtime testing. Common modifications include:

  • Due to the testing framework’s additional resource consumption, you may need to increase the default size of the heap and stack.
  • Due to the testing framework’s additional resource consumption, you may need to change the program layout in the memory. Typically, the test executable linked with the C++test runtime library does not fit into the internal signal processor memory and needs to be located into external RAM. This may require changes in the project's linker script.
  • It has been observed that unit test execution may be significantly slower than the original program’s execution. There are few factors that contribute to this: C++test's instrumentation overhead; the use of the TI runtime support library for channeling file i/o operations to the host platform  (for storing test results), and using slower external memory for program execution. Performance can be improved by limiting instrumentation features; you can configure limited instrumentation in Test Configuration> Execution tab> Instrumentation mode. The  best results can be achieved with a "no instrumentation" configuration (running only regression unit tests without coverage or stack trace reporting).
  • The built-in Test Configuration Builtin> Embedded Systems> Texas Instruments> Run TI CCS 3.x Tests contains a built-in step for preparing the C++test runtime library.  When this step is present, you do not need to manually build the C++test runtime library and add it to the linker flags.

To facilitate testing with the Code Composer environment, a simple connecting program is provided. This program assists with deploying and running the test binary on the target or simulator. It is called CCSconnector.exe and it accepts the following parameters:

 

OptionDescription
--help

CCSconnector.printHelp bool
Prints help message and exits.

--te=string

CCSconnector.testExecutable string
Specifies the path to the target executable on the host machine (mandatory).

--bd=string

CCSconnector.board string
Specifies the board name to be used for running the test executable. If not specified, the first board found will be used.

--fc

CCSconnector.forceConnection bool
Forces the connection establishment if the target board is disconnected.

 

Users typically need to change the name of the target board to be used for running the test executable. The name of the target board should be specified exactly as it is shown in the "Setup Code Composer Studio" TI utility.

Once started, the CCSconnector utility will try to connect to an existing instance of Code Composer Studio or it will start a new instance of Code Composer Studio. If you are working with a running instance of Code Composer Studio that has some user settings, be aware that using the --fc flag may result in setting being lost through the request for establishing the connection. Thus, we recommend using the  --fc flag only for automatic testing session runs that start their own instance of Code Composer.

Unit Testing

After the Code Composer Studio v3.x project has been successfully imported, you need to customize the provided Test Configuration to suit your particular development environment as follows:

  1. Duplicate the built-in "Builtin> Embedded Systems> Texas Instruments> Run TI CCS 3.x Tests" Test Configuration.
  2. Open the duplicated Test Configuration’s Execution> General tab.
  3. In the Execution details area, modify the name of the target you want to use for your testing process.
    • The name of the target should be specified exactly as it is shown in the Code Composer Setup panel.
    • Your environment needs to be correctly configured for using this target (including GEL files initialization). C++test will only attempt to connect to the target as specified—without introducing any extra initialization.

After the customization, the configuration is ready to be used for executing the test cases. 

Debugging Test Cases

C++test does not support direct Test Cases debugging for this environment. Use the standard means of executables debugging.

Application Monitoring

After the Code Composer Studio v3.x project has been successfully imported, you need to customize the provided Test Configuration to suit your particular development environment as follows:

  1. Duplicate the built-in Builtin> Embedded Systems> Texas Instruments> Run TI CCS 3.x Application with Memory Monitoring
  2. Open the duplicated Test Configuration’s Execution> General tab.
  3. In the Execution details area, modify the name of the target you want to use for your testing process.
    • The name of the target should be specified exactly as it is shown in the Code Composer Setup panel.
    • Your environment needs to be correctly configured for using this target (including GEL files initialization). C++test will only attempt to connect to the target as specified—without introducing any extra initialization.

After the customization, the configuration is ready to be used for application memory monitoring.

  • No labels