Create a new Simulink project and connect to the P4 Server

When you create a new Simulink project the .p4config file might not be present. The following steps will create a new project, connect the project to the P4 Server, and write a .p4config file for the project.

Create a new Simulink project and connect to the P4 Server:

  1. From the Home tab, select New > Project > From Simulink Template.
  2. Image of creating a new Simulink project by selecting New, Project, From Simulink Template

  3. In the Simulink Start Page dialog, select the Simple Project template and click Create Project.

  4. In the Create Project dialog, enter a name for the project. The project name is then assigned to the project folder name that you create

  5. Click the Folder icon in the Create Project dialog to open the Select a Project Directory dialog.
  6. (Optional) To change the project directory, click the folder icon and select or create a new project directory.
  7. Click OK in the Create Project dialog to create your project.
  8. Image of the Create project dialog

  9. Close the Welcome to your project dailog box to start setting up the P4 source control.
  10. From the Simulink Project tab, click Use Source Control to open the Source Control Information dialog.
  11. Add to Source Control

  12. Click Add Project to Source Control...
  13. In the Source control tool drop down, select P4 P4SL.
  14. To the right of the Repository path field, click Change to open the P4 Connection dialog.

  15. Enter the your credentials for the following:

    • P4 Server

    • Username

    • Workspace

    Click Connect.

    The URI is automatically generated and verified when Simulink successfully connects to the P4 Server.

  16. Image of the Perforce connection detail entry

  17. Check that your P4 Connection is verified.
  18. Click OK to close this dialog.
  19. Click Convert to connect to the P4 Server

Your project is now connected to the P4 Server. For details of the P4 Server file and folder operations available to you, see File management.