Set up the Project in S32 Design Studio
1.Open S32 Design Studio and select a workspace. 2.Use Copy Samples to get the PIL sample project. 3.Use this link to download ARMDemo.zip: (Registration is required.) https://ftp-www.danlawinc.com/shared/mxsuite/other_files/ARMDemo.zip 4.Use WinZip to extract the ARMDemo folder from the zip archive to your workspace: a.Open the archive and right-click on the ARMDemo folder: b.Select your workspace folder as the Destination path: 5.In S32 Design Studio, open the ARMDemo project and set the Build Configuration to Debug. (Right-click on the project and select Build Configurations->Set Active->Debug.) 6.Ensure that it builds without errors:
|
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. 4.Copy any initialization code from the main() function into the SUT_Init() function of AppIF.c: 5.Define macros to enable/disable hardware dependent code as shown below: 6.Copy the user code from the for loop of the main() function into SUT_Tick() of AppIF.c. 7.Copy any headers required for variable declarations and function prototypes from main.c to AppIF.h: 8.For each memory location needed as input or output from the unit under test, add the appropriate port registration function in the AppIF.h MxVRegisterPortDefinitions() function. Ensure that the defines that specify the port counts are correct (for example, if there are 25 output port registrations, ensure that the _MXV_NUMBER_OUTPORTS is at least 25). In this demonstration, all three port counts are 1.
|
1.Set up your project so that the AppIF.c file is compiled instead of the compilation unit that contains the main() function, either by hand-editing the make file or through project settings. 2.Create a new build configuration that is copied from your project. This build configuration name must match the build configuration that is set in the Transform properties. 3.Set your new configuration (MxVBuild) to active status. 4.Add the files from the MxV folder and remove main.c from the Build configuration: 5.Copy the makefile.defs file from the <MxVInstallDirectory>\Templates\Trace32 folder into your Eclipse project source directory: 6.Right-click on the Project and select Properties: 7.Select C/C++ Build->Settings tab in the window. Select Standard S32DS C Compiler Tool Settings, and add $(MXNETINCLUDES) to the end of the command line. Be sure to use parenthesis (): 8.Select Settings->Includes and add "${ProjDirPath}/UserSource" as shown below: 9. Build the project and ensure there are no errors:
|
Proceed to Part 2. The MxVDev Project.