This procedure provides a method for testing existing SIL or MIL code using the PIL Transform and a Lauterbach ICE.
To create a project, you need all the software and licenses listed in PIL Software Prerequisites and Licenses. Before harnessing code for PIL testing, be sure it compiles and runs successfully in its original environment (SIL or MIL). Do not begin the following procedure until any issues are resolved. |
![]() | 1. Build the Eclipse Project with S32 Design Studio |
Use S32 Design Studio to build your existing code with Eclipse: 1.In S32 Design Studio, open your project and set the Build Configuration to Debug. (Right-click on the project and select Build Configurations->Set Active->Debug.) 2.Ensure that it builds without errors:
|
Copy the provided template files into the S32 Design Studio workspace: 1.Create a subdirectory called MxV in the workspace. 2.Copy the code files AppIF.c, AppIF.h, and MxNet_Target_Config.h from <MxVInstallDirectory>\Templates\Trace32 into the MxV subdirectory: 3. Right-click on the project and select Refresh.
|
![]() | 3. Copy key parts of your code into the templates |
Create a new MxVDev project. This is the project that controls the PIL Transform. If you have an existing MxV project, you can copy and modify it. Replace your current Transform with the PIL Transform. Select these options: •Create new folder. In the examples in this Help, the folder is named MxV. •Custom •MxClock •Start MxTransIt on Finish |
Copy the folders from the workspace into the MxV project folder so it can be used by the PIL Transform. 1.Copy the Eclipse project to the MxV project folder created in the previous step: 2.Copy the Debugger.ts2, Debugger.cmm, Simulator.ts2, and Simulator.cmm files from <MxVInstallDirectory>\Templates\Trace32\ARM to the ARMDemo subfolder in the MxV project folder. These templates are used to run the ARM-based S32K144 target: Note: If the target is different than samples provided, get the script (.cmm) files from the Trace32 installer location and create a configuration (.ts2) file for your target. See FAQ for more details. 3.Modify the script (.cmm) file as appropriate for the Simulation mode. The parameter in the example below is added to Simulator.cmm, which runs S32K144 target. Add appropriate CPU configuration as necessary. Note that the file takes a single parameter passed from MxVDev that is the file name of the elf that is built.
|
Use the Toolbox to create a PIL Transform. The following properties are available to configure the PIL Transform for compiling source code and for use with the Trace32 system.
|
Use the PIL Transform to build the harnessed project: 1.Click the Build verb in the Transform's Properties box. Be sure it builds and generates the executable (.elf). 2. Set the Target File property to the full path of the generated executable (.elf): |
1.Click the Enumerate verb to connect with Trace32 and enumerate the ports on the Transform: 2.Export the ports to MxVDev signal dictionary. |
1.In MxVDev, click the Connect Harness button to connect MxV with the Transform and Trace32. 2.Use the Connections dialog to import the Signals into the MxVDev Signal Dictionary. 3.Create Scenarios and TestCases with the imported Signals: a.Use the Pick Signals dialog to add Signals to your TestCases: b.Create the transitions in the Test Case. c.Save the TestCase. 4.Run the TestCase and see the result: 5.Click Accept Results and run again for a passing test.
|
Port Registration (AppIF.c)