Creating an SDK

In S32 Design Studio , you can create an SDK from the C/C++ source files and resource files. The resulting SDK can be stored in the workspace and be available for use in many application projects. Or, the created SDK can be stored in a particular project and be available in the scope of this project only.

To create an SDK:

  1. Open the location where the SDK will be stored:
    • To add the SDK to the workspace, click Window > Preferences on the main menu. In the Preferences dialog box, go to S32 Design Studio for S32 Platform > SDK Management.
    • To add the SDK to a particular project, right-click the project in the Project Explorer and click Properties on the context menu. In the Properties dialog box, go to SDKs.
    Note: If you choose to add your SDK to a project, the generated SDK descriptor includes the language, MCU, core, and toolchain properties that are specified in the project. When made global later, this SDK will be compatible with projects that have similar properties. When created global, an SDK does not specify the above properties and can be used in a project.
  2. Click the Add... button.
  3. In the New SDK dialog box, specify the SDK properties:


    Specifying SDK properties

    • Name: Enter a valid name that starts with a letter. Use letters, digits, and underscores.
    • Version: Enter a string in the format “major.minor.micro.qualifier”. The “major” is mandatory, other parts can be skipped. The “qualifier” can include letters, digits and underscores, other parts can only use digits.
    • Target folder name: Enter a valid folder name that starts with a letter. After you attach the SDK to your project, the SDK files appear in the Project Explorer in the specified folder. Leave this field blank to use the SDK name for the project folder. This field is optional.
    • Description: Enter a brief description of your SDK. This field is optional.
    Note: The combination of the name and version must be unique in the workspace. This combination gives the name to the environment variable that is generated for the SDK automatically.
  4. To set up the location of the SDK folder, click Change....
  5. In the Change SDK Location dialog box, select the variable where the path of the SDK folder will be specified:


    Setting the location for SDK

    • Define new variable: Click to use a new variable for the SDK. To use the variable generated automatically, click Browse and browse to the SDK folder. Or, click Variable and select the environment variable that holds the path to the SDK folder.
      Note: Use an environment variable to be able to share your SDK with other people or distribute it widely. If necessary, define a new environment variable and assign it with the SDK folder path in Preferences > Run/Debug > String Substitution.

    • Select system variable: Click to use a system environment variable. Select the required variable in the drop-down list.

    Once done, you can see the resolved location of the SDK folder.

  6. Click OK. In the New SDK dialog box, select the files (source files, headers, binaries, resources, linker ID files) to be included in the SDK:


    Sources

    • In the Select column, mark the files with plus to be linked to a destination project.
    • In the Copy column, mark the files with plus to be copied to a destination project.

    By default, files are marked with cross (not selected).

  7. Add compiler and preprocessor symbols on the Symbols tab.
  8. Click OK.
Once done, the new SDK appears on the SDK Management page of the user preferences. If added to a project, the SDK also appears on the SDKs page of the project properties.